On this page
article
Train Scikit-learn Model
Fit a classifier on tabular data.
Category: scikit-learn
Problem
Fit a classifier on tabular data.
Solution
clf = RandomForestClassifier()
clf.fit(X_train, y_train)
Notes
- Adapt variable names and paths to your project
- Add error handling for production use
- See related chapters in the Learning Path