This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def train_evaluate_regression_models(df, numeric_features, categorical_features, target_column, test_size=0.2, random_state=42, metric='r_squared'): | |
| """ | |
| Train and evaluate multiple regression models on the given dataset. | |
| Parameters: | |
| ----------- | |
| df : pandas.DataFrame | |
| The input dataframe containing the features and target variable | |
| numeric_features : list | |
| List of column names that are numeric features |