### Set up virtual environment and install dependencies Source: https://sapientml.readthedocs.io/en/latest/dev/setup.html Creates a virtual environment in the sapientml repository folder, installs Poetry and project dependencies, sets up pre-commit, and installs core (and optionally preprocess/loaddata) in editable mode. ```bash cd /path/to/AutoML/sapientml python -m venv venv . venv/bin/activate pip install poetry poetry install pre-commit install pip install -e ../core # optional pip install -e ../preprocess pip install -e ../loaddata ``` -------------------------------- ### Expected directory structure after installation Source: https://sapientml.readthedocs.io/en/latest/dev/setup.html Expected directory structure after successful installation, showing the layout of core and sapientml folders. ```text AutoML/ ├── core/ │ ├── sapientml_core/ │ ├── corpus/ │ │ ├── clean-notebooks/ │ │ ├── annotated-notebooks/ │ │ └── dataset/ │ ├── design/ │ └── training/ │ └── sapientml/ └──sapientml/ ``` -------------------------------- ### Workaround for poetry install failure on Ubuntu Source: https://sapientml.readthedocs.io/en/latest/dev/setup.html Workaround for Ubuntu when poetry install fails; sets the keyring backend to null. ```bash PYTHON_KEYRING_BACKEND="keyring.backends.null.Keyring" poetry install ``` -------------------------------- ### static_info.json example Source: https://sapientml.readthedocs.io/en/latest/dev/training.html Example output of static_analysis_of_columns.py. It lists dropped columns, renamed columns, and the target column for a pipeline script. ```json { "script0011.py": { "drop_api": [ "Age", "Balance", "CreditScore", "EstimatedSalary", "RowNumber", "CustomerId", "Surname", "Tenure", "HasCrCard" ], "rename_api": [], "target": "Exited" }, } ``` -------------------------------- ### Example of label_orders.json Source: https://sapientml.readthedocs.io/en/latest/dev/training.html Shows the format of the label_orders.json file, which contains pairwise label orders. Each entry is a string with two labels separated by '#'. ```json [ "PREPROCESS:MissingValues:fillna:pandas#PREPROCESS:GenerateColumn:groupby:pandas", "PREPROCESS:TypeChange:astype:pandas#PREPROCESS:MissingValues:fillna:pandas", "PREPROCESS:MissingValues:interpolate:sklearn#PREPROCESS:CONVERT_NUM2NUM:where:numpy", "PREPROCESS:TypeChange:astype:pandas#PREPROCESS:GenerateColumn:date:pandas", "PREPROCESS:MissingValues:fillna:pandas#PREPROCESS:TypeChange:astype:pandas", "PREPROCESS:MissingValues:fillna:pandas#PREPROCESS:Category:get_dummies:pandas", ] ``` -------------------------------- ### Install sapientml with pip Source: https://sapientml.readthedocs.io/en/latest/user/installation.html Use pip to install the sapientml package into your documentation building environment. Follow third-party plugin guidelines if you plan to use plugins. ```bash pip install sapientml ``` -------------------------------- ### dataset-snapshots example Source: https://sapientml.readthedocs.io/en/latest/dev/training.html Example output of dataset_snapshot_extractor. It shows a list with a dictionary mapping line number to a list containing column names, a data label, and the DataFrame type. ```json [ { "4": [ [ "RowNumber", "CustomerId", "Surname", "CreditScore", "Geography", "Gender", "Age", "Tenure", "Balance", "NumOfProducts", "HasCrCard", "IsActiveMember", "EstimatedSalary", "Exited" ], "data", "" ] } ] ``` -------------------------------- ### Integrate sapientml and core packages Source: https://sapientml.readthedocs.io/en/latest/dev/setup.html Installs the core package in editable mode to integrate sapientml and core, then deactivates the virtual environment. ```bash pip install -e /path/to/AutoML/core deactivate ``` -------------------------------- ### Example of files generated by fit Source: https://sapientml.readthedocs.io/en/latest/user/usage.html Shows the directory structure of the `outputs` folder after calling `fit`. It includes scripts for hold-out validation, final training, prediction, and a library folder for supporting modules. This is a file tree output, not executable code. ```text outputs ├── 1_script.py ├── 2_script.py ├── 3_script.py ├── final_predict.py ├── final_script.out.json ├── final_script.py ├── final_train.py └── lib └── sample_dataset.py ``` -------------------------------- ### feature_analysis_summary.json example Source: https://sapientml.readthedocs.io/en/latest/dev/training.html Example output of determine_used_features. It provides a summary for a pipeline including used columns, unmapped columns, new columns, target, deleted columns, and status. ```json { "script0011.py": { "pipeline": "script0011.py", "used_cols": [ "EstimatedSalary", "Exited", "Age", "CreditScore", "NumOfProducts", "Gender", "Geography", "Balance", "IsActiveMember" ], "unmapped_cols": [], "new_cols": [], "target": "Exited", "deleted": [ "Tenure", "Surname", "HasCrCard", "RowNumber", "CustomerId" ], "status": "FINALIZED" }, } ``` -------------------------------- ### Restore SapientML instance from generated model Source: https://sapientml.readthedocs.io/en/latest/user/usage.html Shows how to save the SapientML model to a pickle file and restore it using `SapientML.from_pretrained`. The example uses the `cls` object from previous sections and saves it as `model.pkl`. ```python import pickle cls.fit(train_data) with open("model.pkl", "wb") as f: pickle.dump(sml.model, f) with open("model.pkl", "rb") as f: model = pickle.load(f) sml = SapientML.from_pretrained(model) ``` -------------------------------- ### Fit and predict with SapientML Source: https://sapientml.readthedocs.io/en/latest/user/usage.html Demonstrates the `fit` and `predict` methods for model training and prediction using generated code. The example uses a public Titanic dataset, splits it into training and test sets, and prints the F1 score of the prediction. ```python import pandas as pd from sklearn.metrics import f1_score from sklearn.model_selection import train_test_split train_data = pd.read_csv("https://github.com/sapientml/sapientml/files/12481088/titanic.csv") train_data, test_data = train_test_split(train_data) y_true = test_data["survived"].reset_index(drop=True) test_data.drop(["survived"], axis=1, inplace=True) cls.fit(train_data, output_dir="./outputs") y_pred = cls.predict(test_data) print(f"F1 score: {f1_score(y_true, y_pred)}") ``` -------------------------------- ### Example of dependent_labels.json Source: https://sapientml.readthedocs.io/en/latest/dev/training.html Shows the format of the dependent_labels.json file, which maps dependent API pairs to their occurrence count. The number indicates how many pipelines executed that dependent pair. ```json { "['PREPROCESS:Category:get_dummies:pandas', 'PREPROCESS:DeleteColumns:drop:pandas']": 79, "['PREPROCESS:ConvertStr2Date:to_datetime:pandas', 'PREPROCESS:DeleteColumns:drop:pandas']": 27, "['PREPROCESS:MissingValues:fillna:pandas', 'PREPROCESS:DeleteColumns:drop:pandas']": 16, "['PREPROCESS:Scaling:log:numpy', 'PREPROCESS:DeleteColumns:drop:pandas']": 12, } ``` -------------------------------- ### Create SapientML instance with target columns Source: https://sapientml.readthedocs.io/en/latest/user/usage.html Sets up a SapientML instance for a classification task. The `target_columns` parameter is required and specifies which column the model predicts. The `task_type` parameter is optional; if set to `None`, the task type is suggested automatically based on target column values. The example shows a classification task for the 'survived' column. ```python from sapientml import SapientML cls = SapientML( target_columns=["survived"], task_type=None, # suggested automatically from the target columns ) ``` -------------------------------- ### Directory structure for SapientML local training Source: https://sapientml.readthedocs.io/en/latest/dev/training.html Expected directory structure after successful setup of the development environment. The corpus is stored under sapientml_core/corpus with clean-notebooks, annotated-notebooks, and dataset subdirectories. ```text AutoML/ ├── core/ │ ├── sapientml_core/ │ ├── corpus/ │ │ ├── clean-notebooks/ │ │ ├── annotated-notebooks/ │ │ └── dataset/ │ ├── design │ └── training │ └── sapientml/ └──sapientml/ ``` -------------------------------- ### Get GeneratedModel instance after fit Source: https://sapientml.readthedocs.io/en/latest/user/usage.html After calling `fit`, you can obtain the `GeneratedModel` instance from `cls.model`. The instance behaves like a usual model and provides `fit` and `predict` methods. ```python cls.fit(train_data) model = cls.model # obtains GeneratedModel instance ``` -------------------------------- ### Create sample main.py for SapientML training Source: https://sapientml.readthedocs.io/en/latest/dev/training.html Driver code to run each training step. Explicitly calls the train method from SapientMLGenerator with a tag and num_parallelization argument. The tag determines the cache folder name (e.g., ./.cache/2.5.1-test) and num_parallelization defaults to 200. ```python from sapientml_core.generator import SapientMLGenerator print("Training started") print("=================") cls = SapientMLGenerator() cls.train(, ) print("=================") print("Training ended") ``` -------------------------------- ### Clone sapientml and core repositories Source: https://sapientml.readthedocs.io/en/latest/dev/setup.html Clones the sapientml and core repositories, and optionally preprocess and loaddata, into a new AutoML directory. ```bash mkdir AutoML cd AutoML git clone https://github.com/sapientml/sapientml.git git clone https://github.com/sapientml/core.git # optional git clone https://github.com/sapientml/preprocess.git git clone https://github.com/sapientml/loaddata.git ``` -------------------------------- ### Download and set up sapientml corpus Source: https://sapientml.readthedocs.io/en/latest/dev/setup.html Downloads and extracts the sapientml corpus (version 0.1.4) inside sapientml_core, runs the pull script, cleans up the zip, and deactivates the environment. ```bash . venv/bin/activate cd /path/to/AutoML/core/sapientml_core pip install dvc wget https://github.com/user-attachments/files/16861353/sapientml-corpus-0.1.4.zip unzip sapientml-corpus-0.1.4.zip -d corpus cd corpus bash ./scripts/pull.sh cd .. rm -f sapientml-corpus-0.1.4.zip deactivate ``` -------------------------------- ### sapientml_preprocess.PreprocessConfig Source: https://sapientml.readthedocs.io/en/latest/reference/api.html Configuration arguments for sapientml_preprocess.Preprocess class. ```APIDOC ## sapientml_preprocess.PreprocessConfig ### Description Configuration arguments for sapientml_preprocess.Preprocess class. ### Constructor ```python sapientml_preprocess.PreprocessConfig(*, initial_timeout: int = 600, timeout_for_test: int = 0, cancel: CancellationToken | None = None, project_name: str | None = None, debug: bool = False, use_pos_list: list[str] | None = ['名詞', '動詞', '助動詞', '形容詞', '副詞'], use_word_stemming: bool = True) ``` ### Parameters - **initial_timeout** (int) - Optional - Timelimit to execute each generated script. Ignored when hyperparameter_tuning=True and hyperparameter_tuning_timeout is set. - **timeout_for_test** (int) - Optional - Timelimit to execute test script (final_script) and Visualization. - **cancel** (CancellationToken) - Optional - Object to interrupt evaluations. - **project_name** (str) - Optional - Project name. - **debug** (bool) - Optional - Debug mode or not. - **use_pos_list** (Optional[list[str]]) - Optional - List of parts of speech to use. Default ['名詞', '動詞', '助動詞', '形容詞', '副詞']. - **use_word_stemming** (bool) - Optional - Whether to use word stemming. Default True. ### Notes Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be validated to form a valid model. ``` -------------------------------- ### Files contained in GeneratedModel Source: https://sapientml.readthedocs.io/en/latest/user/usage.html Shows the directory structure of a generated model containing source code and `.pkl` files for preprocessors and the trained model. This is a file tree output, not executable code. ```text model ├── final_predict.py ├── final_train.py ├── lib │ └── sample_dataset.py ├── model.pkl ├── ordinalEncoder.pkl ├── simpleimputer-numeric.pkl └── simpleimputer-string.pkl ``` -------------------------------- ### SapientML.fit() Source: https://sapientml.readthedocs.io/en/latest/reference/api.html Generates ML scripts for input data. ```APIDOC ## SapientML.fit ### Description Generate ML scripts for input data. ### Method fit ### Signature fit(training_data: DataFrame | str, validation_data: DataFrame | str | None = None, test_data: DataFrame | str | None = None, save_datasets_format: Literal['csv', 'pickle'] = 'pickle', csv_encoding: Literal['UTF-8', 'SJIS'] = 'UTF-8', csv_delimiter: str = ',', ignore_columns: list[str] | None = None, output_dir: str = './outputs', codegen_only: bool = False) ### Parameters - **training_data** (DataFrame | str) - Required - Training data. - **validation_data** (DataFrame | str | None) - Optional - Validation data. - **test_data** (DataFrame | str | None) - Optional - Test data. - **save_datasets_format** ('csv', 'pickle') - Optional - Format to save datasets, default 'pickle'. - **csv_encoding** ('UTF-8', 'SJIS') - Optional - Encoding for CSV files, default 'UTF-8'. - **csv_delimiter** (str) - Optional - Delimiter for CSV files, default ','. - **ignore_columns** (list[str] | None) - Optional - Columns to ignore. - **output_dir** (str) - Optional - Output directory, default './outputs'. - **codegen_only** (bool) - Optional - If True, only generate code, default False. ``` -------------------------------- ### sapientml.Config Source: https://sapientml.readthedocs.io/en/latest/reference/api.html Configuration arguments for sapientml.generator.CodeBlockGenerator and/or sapientml.generator.PipelineGenerator. ```APIDOC ## sapientml.Config ### Description Configuration arguments for sapientml.generator.CodeBlockGenerator and/or sapientml.generator.PipelineGenerator. ### Constructor ```python sapientml.Config(*, initial_timeout: int = 600, timeout_for_test: int = 0, cancel: CancellationToken | None = None, project_name: str | None = None, debug: bool = False) ``` ### Parameters - **initial_timeout** (int) - Optional - Timelimit to execute each generated script. Ignored when hyperparameter_tuning=True and hyperparameter_tuning_timeout is set. - **timeout_for_test** (int) - Optional - Timelimit to execute test script (final_script) and Visualization. - **cancel** (CancellationToken) - Optional - Object to interrupt evaluations. - **project_name** (str) - Optional - Project name. - **debug** (bool) - Optional - Debug mode or not. ### Notes Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be validated to form a valid model. ``` -------------------------------- ### sapientml_core.SapientMLConfig Source: https://sapientml.readthedocs.io/en/latest/reference/api.html Configuration arguments for SapientMLGenerator. ```APIDOC ## sapientml_core.SapientMLConfig ### Description Configuration arguments for SapientMLGenerator. ### Constructor ```python sapientml_core.SapientMLConfig(*, initial_timeout: int = 600, timeout_for_test: int = 0, cancel: CancellationToken | None = None, project_name: str | None = None, debug: bool = False, n_models: int = 3, seed_for_model: int = 42, id_columns_for_prediction: list[str] | None = None, use_word_list: list[str] | dict[str, list[str]] | None = None, hyperparameter_tuning: bool = False, hyperparameter_tuning_n_trials: int = 10, hyperparameter_tuning_timeout: int = 0, hyperparameter_tuning_random_state: int = 1023, predict_option: Literal['default', 'probability'] = 'default', permutation_importance: bool = True, add_explanation: bool = False) ``` ### Parameters - **initial_timeout** (int) - Optional - Timelimit to execute each generated script. Ignored when hyperparameter_tuning=True and hyperparameter_tuning_timeout is set. - **timeout_for_test** (int) - Optional - Timelimit to execute test script (final_script) and Visualization. - **cancel** (CancellationToken) - Optional - Object to interrupt evaluations. - **project_name** (str) - Optional - Project name. - **debug** (bool) - Optional - Debug mode or not. - **n_models** (int) - Optional - Number of output models to be tried. Default 3. - **seed_for_model** (int) - Optional - Random seed for models such as RandomForestClassifier. Default 42. - **id_columns_for_prediction** (Optional[list[str]]) - Optional - Name of the dataframe columns that outputs the prediction result. Default None. - **use_word_list** (Optional[Union[list[str], dict[str, list[str]]]]) - Optional - List of words to be used as features when generating explanatory variables from text. If dict type is specified, key must be a column name and value must be a list of words. Default None. - **hyperparameter_tuning** (bool) - Optional - On/Off of hyperparameter tuning. Default False. - **hyperparameter_tuning_n_trials** (int) - Optional - The number of trials of hyperparameter tuning. Default 10. - **hyperparameter_tuning_timeout** (int) - Optional - Time limit for hyperparameter tuning in each generated script. Ignored when hyperparameter_tuning is False. Default 0. - **hyperparameter_tuning_random_state** (int) - Optional - Random seed for hyperparameter tuning. Default 1023. - **predict_option** (Literal['default', 'probability']) - Optional - Specify predict method (default: predict(), probability: predict_proba()). Default 'default'. - **permutation_importance** (bool) - Optional - On/Off of outputting permutation importance calculation code. Default True. - **add_explanation** (bool) - Optional - If True, outputs ipynb files including EDA and explanation. Default False. ### Methods #### postinit() Set initial_timeout and hyperparameter_tuning_timeout. If initial_timeout is set as None and hyperparameter_tuning is false, set initial_timeout as INITIAL_TIMEOUT. For hyperparameter_tuning_timeout, if both initial_timeout and hyperparameter_tuning_timeout are set as None, set hyperparameter_tuning_timeout as INITIAL_TIMEOUT. If initial_timeout is set and hyperparameter_tuning is True, and hyperparameter_tuning_timeout is None, set the hyperparameter_tuning_timeout to unlimited (hyperparameter_tuning_timeout = self.initial_timeout). Since initial_timeout always precedes hyperparameter_tuning_timeout, it can be expressed that there is no time limit for hyperparameters during actual execution. ### Notes Create a new model by parsing and validating input data from keyword arguments. Raises ValidationError if the input data cannot be validated to form a valid model. ``` -------------------------------- ### SapientML.from_pretrained Source: https://sapientml.readthedocs.io/en/latest/reference/api.html Factory method to create a SapientML instance from a pretrained model. ```APIDOC ## from_pretrained(model) ### Description The factory method of SapientML from a pretrained model built by source code previously generated by SapientML. ### Parameters - **model** (str, bytes-like object, or GeneratedModel) - Required - A pretrained model built by source code previously generated by SapientML. ### Returns - **sml** (SapientML) - a new SapientML instance loaded from the pretrained model. ``` -------------------------------- ### SapientML Source: https://sapientml.readthedocs.io/en/latest/reference/api.html Constructor of the SapientML class. ```APIDOC ## SapientML ### Description Constructor of the SapientML class. Initializes the main class for generating machine learning scripts. ### Method Constructor ### Signature SapientML(target_columns: list[str], task_type: Literal['classification', 'regression'] | None = None, adaptation_metric: str | None = None, split_method: Literal['random', 'time', 'group'] = 'random', split_seed: int = 17, split_train_size: float = 0.75, split_column_name: str | None = None, time_split_num: int = 5, time_split_index: int = 4, split_stratification: bool | None = None, model_type: str = 'sapientml', **kwargs) ### Parameters - **target_columns** (list[str]) - Required - Names of target columns. - **task_type** ('classification', 'regression', or None) - Optional - Specify task type classification, regression. - **adaptation_metric** (str) - Optional - Metric for evaluation. Classification: 'f1', 'auc', 'ROC_AUC', 'accuracy', 'Gini', 'LogLoss', 'MCC', 'QWK'. Regression: 'r2', 'RMSLE', 'RMSE', 'MAE'. - **split_method** ('random', 'time', or 'group') - Optional - Method of train-test split. 'random' uses random split. 'time' requires 'split_column_name'. 'group' requires 'split_column_name'. - **split_seed** (int) - Optional - Random seed for train-test split. Ignored when split_method='time'. - **split_train_size** (float) - Optional - The ratio of training size to input data. Ignored when split_method='time'. - **split_column_name** (str) - Optional - Name of the column used to split. Ignored when split_method='random'. - **time_split_num** (int) - Optional - Passed to TimeSeriesSplit's n_splits. Valid only when split_method='time'. - **time_split_index** (int) - Optional - The index of the split from TimeSeriesSplit. Valid only when split_method='time'. - **split_stratification** (bool) - Optional - To perform stratification in train-test split. Valid only when task_type='classification'. - **model_type** (str) - Optional - Model type, default 'sapientml'. - **kwargs** - Optional - Additional keyword arguments for configurations of PipelineGenerators and CodeBlockGenerators from plugins. ### Description You can pass all the keyword arguments for configurations of PipelineGenerators and CodeBlockGenerators from plugins. ``` -------------------------------- ### GeneratedModel Source: https://sapientml.readthedocs.io/en/latest/reference/api.html Constructor for GeneratedModel. Instantiating this class by yourself is not intended. ```APIDOC ## GeneratedModel(input_dir: PathLike, save_datasets_format: Literal['csv', 'pickle'], timeout: int, csv_encoding: Literal['UTF-8', 'SJIS'], csv_delimiter: str, params: dict) ### Description The constructor of GeneratedModel. Instantiating this class by yourself is not intended. ### Parameters - **input_dir** (PathLike) - Required - Directory path containing training/prediction scripts and trained models. - **save_datasets_format** ('csv' or 'pickle') - Required - Data format when the input dataframes are written to files. Ignored when all inputs are specified as file path. - **timeout** (int) - Required - Timeout for the execution of training and prediction. - **csv_encoding** ('UTF-8' or 'SJIS') - Required - Encoding method when csv files are involved. Ignored when only pickle files are involved. - **csv_delimiter** (str) - Required - Delimiter to read csv files. - **params** (dict) - Required - Additional parameters. ``` -------------------------------- ### GeneratedModel.fit Source: https://sapientml.readthedocs.io/en/latest/reference/api.html Generate ML scripts for input data. ```APIDOC ## fit(X: DataFrame, y: DataFrame | Series | None = None) ### Description Generate ML scripts for input data. ### Parameters - **X** (pandas.DataFrame) - Required - Training dataframe. Contains target values if y is None. - **y** (pandas.DataFrame or pandas.Series) - Optional - The target values. ### Returns - **self** (GeneratedModel) - GeneratedModel object itself. ``` -------------------------------- ### GeneratedModel.save Source: https://sapientml.readthedocs.io/en/latest/reference/api.html Save generated code to output_dir folder. ```APIDOC ## save(output_dir: PathLike) ### Description Save generated code to output_dir folder. ### Parameters - **output_dir** (Path-like object) - Required - Training dataframe. ### Returns - **self** (GeneratedModel) - GeneratedModel object itself. ``` -------------------------------- ### SapientML Source: https://sapientml.readthedocs.io/en/latest/reference/api.html Main class for SapientML. It is used to generate ML scripts and train models. ```APIDOC ## SapientML ### Description Main class for SapientML. It is used to generate ML scripts and train models. ### Constructor Parameters - **training_data** (pandas.DataFrame or str) - Required - Training dataframe. When str, this is regarded as a file path. - **validation_data** (pandas.DataFrame, str, or None) - Optional - Validation dataframe. When str, this is regarded as file paths. When None, validation data is extracted from training data by split. - **test_data** (pandas.DataFrame, str, or None) - Optional - Test dataframes. When str, they are regarded as file paths. When None, test data is extracted from training data by split. - **save_datasets_format** ('csv' or 'pickle') - Optional - Data format when the input dataframes are written to files. Ignored when all inputs are specified as file path. - **csv_encoding** ('UTF-8' or 'SJIS') - Optional - Encoding method when csv files are involved. Ignored when only pickle files are involved. - **csv_delimiter** (str) - Optional - Delimiter to read csv files. - **ignore_columns** (list[str]) - Optional - Column names which must not be used and must be dropped. - **output_dir** (str) - Optional - Output directory. - **codegen_only** (bool) - Optional - Do not conduct fit() of GeneratedModel if True. ### Returns - **self** (SapientML) - SapientML object itself. ``` -------------------------------- ### SapientML.predict Source: https://sapientml.readthedocs.io/en/latest/reference/api.html Predicts the output of the test_data. ```APIDOC ## predict(test_data: DataFrame) ### Description Predicts the output of the test_data. ### Parameters - **test_data** (pd.DataFrame) - Required - Dataframe used for predicting the result. ### Returns - **result** (pd.DataFrame) - It returns the prediction_result.csv result in dataframe format. ``` -------------------------------- ### GeneratedModel.predict Source: https://sapientml.readthedocs.io/en/latest/reference/api.html Predicts the output of the test_data and store in the prediction_result.csv. ```APIDOC ## predict(X: DataFrame) ### Description Predicts the output of the test_data and store in the prediction_result.csv. ### Parameters - **X** (pd.DataFrame) - Required - Dataframe used for predicting the result. ### Returns - **result_df** (pd.DataFrame) - It returns the prediction_result.csv result in dataframe format. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.