Commit f158c0c2 authored by dasharatha.vamshi's avatar dasharatha.vamshi

update model auto trainer

parent 925ca1fc
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,9 +3,9 @@ from loguru import logger
class GetBestModel:
def __init__(self, df, target_col_list, list_of_models, no_of_models=1):
def __init__(self, df, target_col, list_of_models, no_of_models=1):
self.df = df
self.target_col_list = target_col_list
self.target_col = target_col
self.no_of_models = no_of_models
self.list_of_models = list_of_models
......@@ -18,7 +18,7 @@ class GetBestModel:
"""
try:
logger.info("Using Pycaret to train mentioned models")
regression.setup(data=self.df, target=self.target_col_list)
regression.setup(data=self.df, target=self.target_col)
logger.info(f"Selecting the best model using the metric {comparison_metric}")
best_model = regression.compare_models(include=self.list_of_models, sort=comparison_metric,
n_select=self.no_of_models)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment