iguanas.metrics.unsupervised
.PercVolume¶
- class iguanas.metrics.unsupervised.PercVolume(perc_vol_expected: float)[source]¶
Calculates the negative squared difference(s) between the percentage of the overall volume that the binary predictor(s) vs the expected.
- Parameters
- perc_vol_expectedfloat
Expected percentage of the overall volume that the binary predictor should flag.
- fit(y_preds: Union[iguanas.utils.typing.numpy.ndarray, iguanas.utils.typing.pandas.core.series.Series, iguanas.utils.typing.databricks.koalas.series.Series, iguanas.utils.typing.pandas.core.frame.DataFrame, iguanas.utils.typing.databricks.koalas.frame.DataFrame]) Union[float, iguanas.utils.typing.numpy.ndarray] [source]¶
Calculates the negative squared difference(s) between the percentage of the overall volume that the binary predictor(s) vs the expected.
- Parameters
- y_predsUnion[NumpyArrayType, PandasSeriesType, KoalasSeriesType, PandasDataFrameType, KoalasDataFrameType]
The binary predictor column(s).
- Returns
- Union[float, NumpyArrayType]
The negative squared difference(s).