SecreC 2 language 2.9.0 (2026.10)
Language and standard library reference
Loading...
Searching...
No Matches
Functions
weightedLinearRegression

Functions

template<domain D :shared3p >
D float32 weightedLinearRegression (D float32 variables, D float32 dependent, D float32 weights)
 
template<domain D :shared3p >
D float64 weightedLinearRegression (D float64 variables, D float64 dependent, D float64 weights)
 

Detailed Description

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

Function Documentation

◆ weightedLinearRegression() [1/2]

template<domain D :shared3p >
D float32 weightedLinearRegression ( D float32  variables,
D float32  dependent,
D float32  weights 
)

◆ weightedLinearRegression() [2/2]

template<domain D :shared3p >
D float64 weightedLinearRegression ( D float64  variables,
D float64  dependent,
D float64  weights 
)