pdstools.infinity.resources.prediction_studio.v24_2.prediction ============================================================== .. py:module:: pdstools.infinity.resources.prediction_studio.v24_2.prediction Classes ------- .. autoapisummary:: pdstools.infinity.resources.prediction_studio.v24_2.prediction.Prediction pdstools.infinity.resources.prediction_studio.v24_2.prediction.AsyncPrediction Module Contents --------------- .. py:class:: Prediction(client, *, predictionId: str, label: str, status: str, lastUpdateTime: str, objective: str | None = None, subject: str | None = None) Bases: :py:obj:`_PredictionV24_2Mixin`, :py:obj:`pdstools.infinity.resources.prediction_studio.v24_1.prediction.Prediction` The ``Prediction`` class provide functionality including retrieving notifications, models, adding conditional models, getting champion challengers, metrics, and plotting metrics. .. py:method:: get_notifications(category: pdstools.infinity.resources.prediction_studio.types.NotificationCategory | None = None, return_df: Literal[False] = False) -> pdstools.infinity.internal._pagination.PaginatedList[pdstools.infinity.resources.prediction_studio.base.Notification] get_notifications(category: pdstools.infinity.resources.prediction_studio.types.NotificationCategory | None = None, return_df: Literal[True] = True) -> polars.DataFrame Fetches a list of notifications for a specific prediction. This function retrieves notifications related to a prediction. You can filter these notifications by their category. Optionally, the notifications can be returned as a DataFrame for easier analysis and visualization. :param category: The category of notifications to retrieve. If not specified, all notifications are fetched. :type category: {"All", "Responses", "Performance", "Model approval", "Output", "Predictors", "Prediction deployment", "Generic"} or None :param return_df: If True, returns the notifications as a DataFrame. Otherwise, returns a list. :type return_df: bool, default False :returns: A list of notifications or a DataFrame containing the notifications, depending on the value of ``return_df``. :rtype: PaginatedList[Notification] or polars.DataFrame .. py:method:: get_champion_challengers() Fetches list of ChampionChallenger objects linked to the prediction. This function fetches Champion-challenger pairs from a prediction. In cases where a challenger model is absent, it returns a ChampionChallenger object containing only the champion model. :returns: A list of entries, each pairing a primary model with its challenger across various segments of the prediction. :rtype: list of ChampionChallenger .. py:method:: add_conditional_model(new_model, category: str, context: str | None = None) Incorporates a new model into a prediction for a specified category and context. :param new_model: Identifier of the model to be added. :type new_model: str or Model :param category: The category under which the model will be classified. :type category: str :param context: The specific context or scenario in which the model will be utilized. :type context: str, optional :returns: An object detailing the updated configuration with the newly added model. :rtype: ChampionChallenger .. py:class:: AsyncPrediction(client, *, predictionId: str, label: str, status: str, lastUpdateTime: str, objective: str | None = None, subject: str | None = None) Bases: :py:obj:`_PredictionV24_2Mixin`, :py:obj:`pdstools.infinity.resources.prediction_studio.v24_1.prediction.AsyncPrediction` Async variant of the v24.2 Prediction. .. py:method:: get_notifications(category: pdstools.infinity.resources.prediction_studio.types.NotificationCategory | None = None, return_df: bool = False) -> pdstools.infinity.internal._pagination.AsyncPaginatedList[pdstools.infinity.resources.prediction_studio.base.AsyncNotification] | polars.DataFrame :async: Fetches a list of notifications for a specific prediction. :param category: The category of notifications to retrieve. :type category: {"All", "Responses", "Performance", "Model approval", "Output", "Predictors", "Prediction deployment", "Generic"} or None :param return_df: If True, returns the notifications as a DataFrame. :type return_df: bool, default False :returns: A list of notifications or a DataFrame. :rtype: AsyncPaginatedList[AsyncNotification] or polars.DataFrame .. py:method:: get_champion_challengers() :async: Fetches list of ChampionChallenger objects linked to the prediction. :returns: Champion-challenger pairs from a prediction. :rtype: list of AsyncChampionChallenger .. py:method:: add_conditional_model(new_model, category: str, context: str | None = None) :async: Incorporates a new model into a prediction for a specified category and context. :param new_model: Identifier of the model to be added. :type new_model: str or AsyncModel :param category: The category under which the model will be classified. :type category: str :param context: The specific context or scenario. :type context: str, optional :returns: An object detailing the updated configuration. :rtype: AsyncChampionChallenger