|
template<domain D :shared3p > |
D float32 | simpleLinearRegression (D int32[[1]] x, D int32[[1]] y, D bool[[1]] filter) |
|
template<domain D :shared3p > |
D float64 | simpleLinearRegression (D int64[[1]] x, D int64[[1]] y, D bool[[1]] filter) |
|
template<domain D :shared3p > |
D float32 | simpleLinearRegression (D float32[[1]] x, D float32[[1]] y, D bool[[1]] filter) |
|
template<domain D :shared3p > |
D float64 | simpleLinearRegression (D float64[[1]] x, D float64[[1]] y, D bool[[1]] filter) |
|
Fitting of simple linear models.
- Note
- D - shared3p protection domain
-
Supported types - int32 / int64 / float32 / float64
- Parameters
-
x | - explanatory variable sample |
y | - dependent variable sample |
filter | - filter indicating which elements of the samples are available |
- Returns
- returns vector {α, β} where α, β are such that y ≈ α + β · x
- Leakage
- Leaks the number of missing values
◆ simpleLinearRegression() [1/4]
D float32 simpleLinearRegression |
( |
D float32[[1]] |
x, |
|
|
D float32[[1]] |
y, |
|
|
D bool[[1]] |
filter |
|
) |
| |
◆ simpleLinearRegression() [2/4]
D float64 simpleLinearRegression |
( |
D float64[[1]] |
x, |
|
|
D float64[[1]] |
y, |
|
|
D bool[[1]] |
filter |
|
) |
| |
◆ simpleLinearRegression() [3/4]
D float32 simpleLinearRegression |
( |
D int32[[1]] |
x, |
|
|
D int32[[1]] |
y, |
|
|
D bool[[1]] |
filter |
|
) |
| |
◆ simpleLinearRegression() [4/4]
D float64 simpleLinearRegression |
( |
D int64[[1]] |
x, |
|
|
D int64[[1]] |
y, |
|
|
D bool[[1]] |
filter |
|
) |
| |