Machine Learning
knowledge skill
Trains a supervised classification model from labeled data and outputs the trained model artifact. The agent loads input data, fits a scikit-learn classifier, and serializes the estimator to disk for later use.
Worked examples
- {"input": {"data_path": "/data/iris.csv", "target_column": "species", "test_size": 0.2, "random_state": 42}, "output": {"model_path": "/models/iris_model.pkl", "metrics": {"accuracy": 0.9667, "f1_macro": 0.9667}, "feature_importance": {"petal_length": 0.46, "petal_width": 0.42, "sepal_length": 0.08, "sepal_width": 0.04}}}
- {"input": {"data_path": "/data/winequality.csv", "target_column": "quality", "test_size": 0.3, "random_state": 123}, "output": {"model_path": "/models/wine_model.pkl", "metrics": {"accuracy": 0.6632, "f1_macro": 0.3316}, "feature_importance": {"alcohol": 0.3, "volatile_acidity": 0.25, "sulphates": 0.15, "citric_acid": 0.1}}}
Input
- data_path: str
- target_column: str
- test_size: float
- random_state: int
Output
- model_path: str
- metrics: dict
- feature_importance: dict
Details
- Skill type: knowledge skill
- Safety level: safe_public_research
- Version: 1.0.0