|
template<domain D :shared3p > |
D float32 | weightedLinearRegression (D float32[[2]] variables, D float32[[1]] dependent, D float32[[1]] weights) |
|
template<domain D :shared3p > |
D float64 | weightedLinearRegression (D float64[[2]] variables, D float64[[1]] dependent, D float64[[1]] weights) |
|
Fitting of linear models with observation weights.
- Note
- D - shared3p protection domain
-
Supported types - float32 / float64
- Parameters
-
variables | - independent variable samples as column vectors |
dependent | - dependent variable sample |
weights | - observation weight vector |
- Returns
- returns coefficient vector. The last element is the intercept.
- Leakage
- None
◆ weightedLinearRegression() [1/2]
D float32 weightedLinearRegression |
( |
D float32[[2]] |
variables, |
|
|
D float32[[1]] |
dependent, |
|
|
D float32[[1]] |
weights |
|
) |
| |
◆ weightedLinearRegression() [2/2]
D float64 weightedLinearRegression |
( |
D float64[[2]] |
variables, |
|
|
D float64[[1]] |
dependent, |
|
|
D float64[[1]] |
weights |
|
) |
| |