pricing_report¶
Return the rating tables, the actual versus expected cells and the diagnostics of the pruning and graduation stages, in one document for review.
The report describes the data passed to it; it is not evidence that the data were held out. Save it beside the serialized model. Regression and binary classification only.
Note
The model prediction results will be correct only if the X parameter with feature values
contains all the features used in the model. For a polars DataFrame or LazyFrame, the
features are matched by name: extra columns are ignored and the order of the columns does
not matter (a LazyFrame collects only the columns the model needs). For other types, and
for a model trained without feature names, the features must be in the same number and
order as the columns provided during the training.
Method call format¶
Parameters¶
X¶
Description¶
Feature values data.
Possible types
- polars.DataFrame
- polars.LazyFrame
- numpy.ndarray of shape
(object_count, feature_count) - other array-like data of the same shape
Default value
Required parameter
y¶
Description¶
The target values of the objects. A string names a column of a polars X.
Possible types
- numpy.ndarray of shape
(object_count,) - polars.Series
- list
- string
Default value
Required parameter
sample_weight, exposure¶
Description¶
The weight and the exposure of each object, passed explicitly as for actual_vs_expected.
Possible types
- numpy.ndarray of shape
(object_count,) - polars.Series
- list
- string
Default value
None
ref_measure¶
Description¶
The reference measure of the exported tables, as for tables.
Possible types
string
Default value
None
Return value¶
A dictionary:
report_version— The version of the report format.prediction_units,reference_normalization,band_interpretation— How to read the numbers.tables— The rating tables, as returned by tables.actual_vs_expected— The cells returned by actual_vs_expected, each feature with its axis.pruning— Thepruning_report_attribute.graduation— The diagnostics of graduation.