pdstools.prediction =================== .. py:module:: pdstools.prediction Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/pdstools/prediction/Prediction/index Classes ------- .. autoapisummary:: pdstools.prediction.Prediction Package Contents ---------------- .. py:class:: Prediction(df: polars.LazyFrame) Monitor Pega Prediction Studio Predictions .. py:attribute:: predictions :type: polars.LazyFrame .. py:attribute:: plot :type: PredictionPlots .. py:attribute:: prediction_validity_expr .. py:attribute:: cdh_guidelines .. py:method:: from_mock_data(days=70) :staticmethod: .. py:property:: is_available :type: bool .. py:property:: is_valid :type: bool .. py:method:: summary_by_channel(custom_predictions: Optional[List[List]] = None, by_period: str = None) -> polars.LazyFrame Summarize prediction per channel :param custom_predictions: Optional list with custom prediction name to channel mappings. Defaults to None. :type custom_predictions: Optional[List[CDH_Guidelines.NBAD_Prediction]], optional :param by_period: Optional grouping by time period. Format string as in polars.Expr.dt.truncate (https://docs.pola.rs/api/python/stable/reference/expressions/api/polars.Expr.dt.truncate.html), for example "1mo", "1w", "1d" for calendar month, week day. If provided, creates a new Period column with the truncated date/time. Defaults to None. :type by_period: str, optional :returns: Dataframe with prediction summary (validity, numbers in test, control etc.) :rtype: pl.LazyFrame .. py:method:: overall_summary(custom_predictions: Optional[List[List]] = None, by_period: str = None) -> polars.LazyFrame Overall prediction summary. Only valid prediction data is included. :param custom_predictions: Optional list with custom prediction name to channel mappings. Defaults to None. :type custom_predictions: Optional[List[CDH_Guidelines.NBAD_Prediction]], optional :param by_period: Optional grouping by time period. Format string as in polars.Expr.dt.truncate (https://docs.pola.rs/api/python/stable/reference/expressions/api/polars.Expr.dt.truncate.html), for example "1mo", "1w", "1d" for calendar month, week day. If provided, creates a new Period column with the truncated date/time. Defaults to None. :type by_period: str, optional :returns: Summary across all valid predictions as a dataframe :rtype: pl.LazyFrame