leaspy.algo.personalize.constant_prediction_algo¶
Classes¶
ConstantPredictionAlgorithm is an algorithm that provides constant predictions. |
Module Contents¶
- class ConstantPredictionAlgorithm(settings)[source]¶
Bases:
leaspy.algo.personalize.base.PersonalizeAlgorithm[leaspy.models.ConstantModel,leaspy.io.outputs.individual_parameters.IndividualParameters]ConstantPredictionAlgorithm is an algorithm that provides constant predictions.
It is used with the
ConstantModel.- Parameters:
- settings
AlgorithmSettings - The settings of constant prediction algorithm. It supports the following prediction_type values (str)::
'last': last value even if NaN,'last_known': last non NaN value,'max': maximum (=worst) value ,'mean': average of values
depending on features, the last_known / max value may correspond to different visits. For a given feature, value will be NaN if and only if all values for this feature are NaN.
- settings
- Raises:
LeaspyAlgoInputErrorIf any invalid setting for the algorithm
- Parameters:
settings (AlgorithmSettings)
- name: AlgorithmName¶
- prediction_type: PredictionType¶