A nonlinear mapping relates changes in one quantity to another without a linear function. The relationship may bend, vary in sensitivity, or respond differently across ranges. section 7.2
Nonlinearity matters when a model must represent complex patterns rather than a constant-rate association. Stock prices, for example, reflect interacting economic, behavioral, and market factors; traditional ARIMA, exponential smoothing, or linear models may miss such dynamics. section 7.2 section 4.1.3
Common modeling responses include:
- Transform variables with logarithmic, reciprocal, square-root, or power transformations, while interpreting the fitted relationship on the transformed scale. section 4.1.3
- Use decision trees when feature-target relationships are nonlinear and preprocessing should not require normalization or scaling. section 6.3.7
- Treat outlier removal cautiously: deleting one point can improve a regression fit, but transformation or another model may better represent the underlying pattern. section 4.1.3
Regression versus a decision tree
A linear regression can fit an association after transforming a skewed variable, but the transformation changes the modeled scale. A decision tree can capture nonlinear feature-target relationships directly, although an unpruned tree may overfit. section 4.1.3 section 6.3.7
df['x'] = np.log(df['x'])
A logarithmic transformation illustrates one way to reshape a variable before fitting a linear model. section 4.1.3






