Lines Matching refs:regressor

11 Note that by "regressor" we mean an algorithm or implementation used to fit and apply a regression
28 Before a regressor can be used to make predictions, the model must be fitted using an initial set o…
37 The code presented {any}`below <regressor-ex3>` solves an ordinary linear
40 In the simplest usage of a regressor, the user provides a training (or "design") matrix
42 Once the regressor is fitted, the user can then obtain a vector of predicted values for a set of ne…
45 `REGRESSOR_LINEAR_OLS`, which is a sub-type of linear regressor,
51 clarity. The complete code is available in {ref}`ex3.c <regressor-ex3>`.
53 (regressor-ex3)=
54 :::{admonition} Listing: `src/ml/regressor/tests/ex3.c`
55 ```{literalinclude} /../src/ml/regressor/tests/ex3.c
66 PetscRegressorCreate(MPI_Comm comm, PetscRegressor *regressor);
69 To choose a regressor type, the user can either call
72 PetscRegressorSetType(PetscRegressor regressor, PetscRegressorType type);
82 PetscRegressorSetFromOptions(regressor);
91 After having set these routines and options, the user can fit (or "train") the regressor
95 PetscRegressorFit(PetscRegressor regressor, Mat X, Vec y);
99 Finally, after fitting the regressor, the user can compute model
101 using the fitted regressor:
104 PetscRegressorPredict(PetscRegressor regressor, Mat X, Vec y_predicted);
107 Finally, after the user is done using the regressor,
111 PetscRegressorDestroy(PetscRegressor *regressor);
118 One can see the list of regressor types in Table
139 PetscRegressorSetRegularizerWeight(PetscRegressor regressor, PetscReal weight);
146 ## Linear regressor
154 Currently, linear regressor has three types, which are described
180 PetscRegressorLinearSetUseKSP(PetscRegressor regressor, PetscBool flg);
193 PetscRegressorLinearSetFitIntercept(PetscRegressor regressor, PetscBool flg);
202 PetscRegressorLinearGetCoefficients(PetscRegressor regressor, Vec *coefficients);
203 PetscRegressorLinearGetIntercept(PetscRegressor regressor, PetscScalar *intercept);