Train
AI-generatedSummary
Train a stacking classifier using scikit-learn ensembles.
Inputs
- featureColumns (required) — Comma-separated list of feature column names
- targetColumn (required) — Name of the target column
- estimators — Select base estimators for stacking
- finalEstimator — Meta-learner that combines base estimator predictions
- cv — Number of cross-validation folds for generating meta-features
- pythonPath — Path to Python executable with scikit-learn installed
Output shape
a single record containing the trained model (base64-encoded pickle), training score, list of base estimator names, final estimator name, list of classes, and feature column names
The model field is a base64 string of the fitted StackingClassifier; additional fields include training_samples count and may carry error details if training fails.
Examples
Example 1: Train on a dataset with three numeric features to predict a binary target
featureColumns: 'feature1,feature2,feature3'; targetColumn: 'target'; estimators: ['RandomForestClassifier','GradientBoostingClassifier']; finalEstimator: 'LogisticRegression'; cv: 5
Example 2: Retrain the model with new incoming data
featureColumns: 'colA,colB'; targetColumn: 'label'; estimators: ['SVC','KNeighborsClassifier']; finalEstimator: 'RandomForestClassifier'; cv: 3