Skip to main content
Back to Machine Learning

Machine Learning · Regression

Svr Decision Tree and Random Forest Regression

The one idea: Linear and polynomial regression assume you know the shape of the relationship in advance (a line, a curve of a chosen degree). Support Vector Regression, decision trees, and random forests instead let the data decide the shape — at the cost of needing more care (SVR) or more trees (random forest) to avoid memorizing noise instead of learning pattern.
⚠️ The trap: A single, unrestricted decision tree regressor will happily grow until every leaf contains exactly the training points needed to hit near-zero training error — training R² can reach 1.0. That's not a sign of a good model; it's a sign the tree has memorized the training set, leaf by leaf, down to individual outliers. A decision tree with max_depth=None (the default) reported on training-set performance is measuring memorization, not learning — always check it against a held-out test set, and expect the gap to be large.

Three more regression tools, in ascending order of "how much do I have to babysit this model."

Support Vector Regression (SVR): fitting a tube, not a line

Ordinary regression minimizes total squared error — every point that's off the line contributes to the cost. **Support Vector Regression flips that: it draws a "tube" of width epsilon (ε) around the fitted line/curve, and points inside the tube contribute zero cost at all.** Only points outside the tube (the margin violations) get penalized, and the penalty is controlled by C, same role as in classification SVMs. The intuition: small residuals are treated as noise you shouldn't chase; only the meaningfully-wrong predictions get corrected.

The real power shows up with the…

Keep reading: Svr Decision Tree and Random Forest Regression

Unlock the full Machine Learning track — every lesson, the AI tutor, and full mock assessments.

  • Full lesson content
  • AI tutor for this section
  • Practice questions