Skip to content

UniformConditioning

Uniform conditioning of panel estimates to recoveries of the selective blocks (SMUs) inside them.

Parameters:

Name Type Description Default
anamorphosis HermiteAnamorphosis

Fitted point anamorphosis.

required
r_smu float

Change-of-support coefficient of the selective blocks, in (0, 1].

required
r_panel float

Change-of-support coefficient of the panel estimates, in (0, r_smu]. When omitted, each panel's comes from its own kriging: the panel methods then take every panel's estimate variance C(V, V) - variance - 2 * lagrange (estimate_variance in the predict diagnostics), which carries the smoothing of each estimate. The kriging variogram's sill should then be the anamorphosis variance. A panel estimate more variable than the selective blocks takes r_panel = r_smu.

required

from_json staticmethod

from_json(text)

Reads to_json output; raises InvalidInput on another class's JSON or a newer format.

grade_tonnage method descriptor

grade_tonnage(
    panels,
    grade,
    cutoffs,
    *,
    estimate_variance=None,
    density=None,
)

Global grade-tonnage curve of the panels.

Parameters:

Name Type Description Default
panels BlockModel
required
grade str

Column of estimated panel grades; null panels are left out.

required
cutoffs array_like
required
estimate_variance str

Column of the panels' estimate variances; required without r_panel, refused with it.

None
density (float, array_like or str)

Density of each panel, or the column of panels holding it.

1.0

Returns:

Type Description
Table

cutoff, tonnage (volume × density above cutoff, summed over the panels), mean_grade (null when nothing is above), metal (tonnage × mean_grade) and benefit.

localize method descriptor

localize(
    smus,
    ranking,
    panels,
    grade,
    *,
    estimate_variance=None,
    name="localized",
)

Localized grades of the selective blocks nested in the panels.

A panel holding n selective blocks splits its selective-block distribution into n equal-probability bands, and its block ranked i gets the mean of band i: the blocks average to the panel grade and reproduce the panel's grade-tonnage curve at tonnages k / n. Partial panels localize over the blocks present.

Parameters:

Name Type Description Default
smus BlockModel

Selective blocks nesting in the panels: same rotation, sizes dividing the panel sizes, grids aligned; not sub-blocked.

required
ranking str

Column of smus ordering the blocks within a panel, such as a direct kriging of the blocks; ties follow row order.

required
panels BlockModel
required
grade str

Column of estimated panel grades.

required
estimate_variance str

Column of the panels' estimate variances; required without r_panel, refused with it.

None
name str

Name of the new column.

"localized"

Returns:

Type Description
BlockModel

smus with the localized grades; null in null panels and outside every panel.

Raises:

Type Description
InvalidInput

If the blocks do not nest, or a block of an estimated panel has a null rank.

localized_grades method descriptor

localized_grades(
    panel_grade, n_smu, *, estimate_variance=None
)

Grades of the selective blocks of one panel, ascending.

Parameters:

Name Type Description Default
panel_grade float
required
n_smu int

Number of selective blocks in the panel.

required
estimate_variance float

As in panel_recovery.

None

Returns:

Type Description
ndarray

The means of n_smu equal-probability bands of the panel's selective-block distribution. They average to the panel grade, and the top k recover the panel's metal at tonnage k / n_smu.

panel_recovery method descriptor

panel_recovery(
    panel_grade, cutoffs, *, estimate_variance=None
)

Recoveries of the selective blocks within one panel.

Parameters:

Name Type Description Default
panel_grade float

Estimated panel grade, clamped to the anamorphosis range.

required
cutoffs array_like
required
estimate_variance float

The panel's estimate variance; required without r_panel, refused with it.

None

Returns:

Type Description
Table

As HermiteAnamorphosis.grade_tonnage, in proportions of the panel.

to_json method descriptor

to_json()

JSON of the parameters and, once fitted, the fitted state.

used in