train_model
Train a predictive model to forecast a target column using numeric features. Supports linear regression, logistic regression, random forest, gradient boosting, and decision tree, saving the model for later evaluation and prediction.
Instructions
Train a model. Types: 'linear_regression', 'logistic_regression', 'random_forest', 'gradient_boosting', 'decision_tree'. The model is stored for later predict/evaluate. Start with simple model (linear/logistic) as baseline. Only move to complex models (random_forest, gradient_boosting) if baseline is insufficient. Uses ALL numeric columns as features. Example: train_model(target_column="Revenue", model_type="random_forest")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model_name | No | ||
| model_type | No | random_forest | |
| hyperparams | No | ||
| target_column | Yes | ||
| train_df_name | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |