Skip to main content
`Ctrl`+`K`

# PETSCREGRESSORLINEAR

Linear regression model (ordinary least squares or regularized variants)

## Options Database

- -regressor_linear_fit_intercept - Calculate the intercept for the linear model

- -regressor_linear_use_ksp - Use `KSP` instead of `Tao` for linear model fitting (non-regularized variants only)

## Notes

By “linear” we mean that the model is linear in its coefficients, but not necessarily in its input features. One can use the linear regressor to fit polynomial functions by training the model with a design matrix that is a nonlinear function of the input data.

This is the default regressor in `PetscRegressor`.

## See Also

`PetscRegressorCreate()`, `PetscRegressor`, `PetscRegressorSetType()`

## Level

beginner

## Location

src/ml/regressor/impls/linear/linear.c

Index of all PetscRegressor routines
Table of Contents for all manual pages
Index of all manual pages