Training fits a model to supplied data: depending on the estimator, this can build model structure or estimate parameters. Keep training distinct from testing on data the model has not seen. section 6.3.2 section 7.3.9
What fitting does depends on the model:
- A decision tree classifier uses fit(X_train, y_train) to build a tree from the training split; predictions are then made on the held-out test split. section 6.3.2
- An ARIMA model estimates parameters from training data, using maximum likelihood estimation to optimize coefficients under its assumptions. Its fitted results can support prediction and diagnostics. section 7.3.9
- A logistic regression fit estimates regression parameters; its summary reports coefficients, p-values, and goodness-of-fit statistics that can inform model evaluation. section 5.2.2
>>> clf = clf.fit(X_train, y_train)
Example of fitting a decision tree classifier to training features and labels. section 6.3.2
>>> model_fit = model.fit()
Example of fitting a configured ARIMA model. section 7.3.9























