added bot prediction for assessments
This commit is contained in:
@@ -4,11 +4,6 @@ import logging
|
||||
from logging.handlers import RotatingFileHandler
|
||||
|
||||
|
||||
handler = RotatingFileHandler('/root/ds_erp_ai/logs/prediction_pipeline.log', maxBytes=100000, backupCount=3)
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.setLevel(logging.INFO)
|
||||
logger.addHandler(handler)
|
||||
|
||||
class DataPreprocessor:
|
||||
def __init__(self, input_path, company_id):
|
||||
self.input_path = input_path
|
||||
|
||||
@@ -33,7 +33,8 @@ class ModelTrainer:
|
||||
y = self.df[['open_items', 'red_flags']] # Multi-target for open items and red flags
|
||||
|
||||
# Split into training and test sets with 10% as test size
|
||||
X_train, self.X_test, y_train, self.y_test = train_test_split(X, y, test_size=0.1, random_state=42)
|
||||
X_train, self.X_test, y_train, self.y_test = train_test_split(X, y, test_size=0.1, random_state=42, shuffle=False)
|
||||
|
||||
|
||||
# Train the model
|
||||
self.model.fit(X_train, y_train)
|
||||
|
||||
Reference in New Issue
Block a user