:mod:`quartic_sdk.model.helpers` ================================ .. py:module:: quartic_sdk.model.helpers Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: quartic_sdk.model.helpers.Validation quartic_sdk.model.helpers.ModelUtils .. class:: Validation Bases: :class:`object` .. method:: get_model_prediction_and_time(cls, model, test_df) :classmethod: evaluates prediction of model with test data frame :param model: Instance BaseQuarticModel :param test_df: Test Dataframe :return: tuple of prediction and processing time .. method:: validate_prediction_output(cls, result: pandas.Series) :classmethod: Validates if prediction output is of type Series and values of series are float64 :param result: pandas series :return: None :raises: InvalidPredictionException .. method:: validate_window_prediction_output(cls, result: Union[(int, float, None)]) :classmethod: Validates if the prediction for window model is returning a single value or None (allowed - int/float/None) .. method:: validate_model(cls, model, test_df) :classmethod: Validates the model for size and performance :param model: Instance of BaseQuarticModel :param test_df: Test dataframe .. class:: ModelUtils Bases: :class:`object` Contains utils to pickle model and add checksum .. method:: get_checksum(cls, model_bytes) :classmethod: Calculates the checksum for given byte array :param model_bytes: pickeled model :return: Returns the checksum of model .. method:: get_pickled_object(cls, object) :classmethod: Generates pickle for model and adds checksum to it :param object: Model to pickle :return: Pickled Model as string .. method:: get_performance_test_df(cls, test_df: pandas.DataFrame) :classmethod: Creates a Test data frame of size 100 rows(for 30sec batch approximation) :param test_df: Test Data frame :return: Returns test dataframe with configured number of rows