Spaces:
Sleeping
Sleeping
# tahmin çıktılarında date kolonu sadece yyyy/mm/dd şeklinde yap | |
from dotenv import load_dotenv | |
import os | |
from sklearn.metrics import r2_score | |
load_dotenv('.env') | |
class Config(): | |
def __init__(self): | |
pass | |
MJ_APIKEY_PUBLIC = os.getenv('MJ_APIKEY_PUBLIC') | |
MJ_APIKEY_PRIVATE = os.getenv('MJ_APIKEY_PRIVATE') | |
target = 'demand' | |
split_local_test = False | |
not_include_features = [ | |
target, | |
'date' | |
] | |
cat_features = [ | |
'product_id', | |
'product_application', | |
'product_marketing_name', | |
'product_main_family', | |
'planning_method_latest' | |
] | |
scorer = r2_score | |
model_type = 'CATBOOST' | |
fold = 5 | |
fold_models_directory = 'models/date_models_test' | |
fold_input_directory = 'maps/date_models_test' | |
result_path = 'demand_predictions/' | |
catboost_params = { | |
'learning_rate': 0.03, | |
'objective':'RMSE', | |
'depth': 5, | |
'early_stopping_rounds':200, | |
'iterations': 2000, | |
'use_best_model': True, | |
# 'eval_metric': CatBoostEvalMetricSMAPE(), | |
'eval_metric': 'R2', | |
'random_state': 42, | |
'allow_writing_files': False, | |
'thread_count':-1 | |
} | |
# deployment | |
MAIN_TITLE = 'Infineon Product Demand Forecasting System' | |
SUB_TITLE = 'Data Analytics in Applications' | |
ICON_PATH = 'images/infineon-icon-1.png' | |
FORECAST_START_DATE = '01-11-2023' | |
FORECAST_END_DATE = '01-07-2024' | |
FORECAST_BUTTON_TEXT = 'Predict' | |
LINE_PLOT_SELECTBOX_TEXT = 'Filter at product level' | |
BAR_PLOT_SELECTBOX_TEXT = 'Filter at category level' | |
SAVE_CHECKBOX_TEXT = 'Save predictions' | |
SAVE_BUTTON_TEXT = 'Apply' | |
SAVE_BUTTON_SUCCESS_TEXT = 'Successfully Applied!' |