leaspy.algo.personalize.constant_prediction_algo ================================================ .. py:module:: leaspy.algo.personalize.constant_prediction_algo Classes ------- .. autoapisummary:: leaspy.algo.personalize.constant_prediction_algo.ConstantPredictionAlgorithm Module Contents --------------- .. py:class:: ConstantPredictionAlgorithm(settings) Bases: :py:obj:`leaspy.algo.personalize.base.PersonalizeAlgorithm`\ [\ :py:obj:`leaspy.models.ConstantModel`\ , :py:obj:`leaspy.io.outputs.individual_parameters.IndividualParameters`\ ] ConstantPredictionAlgorithm is an algorithm that provides constant predictions. It is used with the :class:`~leaspy.models.ConstantModel`. :Parameters: **settings** : :class:`.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. :Raises: :exc:`.LeaspyAlgoInputError` If any invalid setting for the algorithm .. !! processed by numpydoc !! .. py:attribute:: name :type: leaspy.algo.base.AlgorithmName .. py:attribute:: deterministic :type: bool :value: True .. py:attribute:: prediction_type :type: PredictionType