SingularValueDecompositionLinearRegression
public class SingularValueDecompositionLinearRegression : LinearRegression
Singular value decomposition linear regression.
Reference: “Use of the Singular Value Decomposition in Regression Analysis”
-
Whether to calculate the intercept for this model.
Declaration
Swift
public var fitIntercept: Bool -
The weights of the model.
Declaration
Swift
public var weights: Tensor<Float> -
Creates a linear regression model.
Declaration
Swift
public init( fitIntercept: Bool = true )Parameters
fitInterceptWhether to calculate the intercept for this model. If
false, no intercept will be used in calculations. The default istrue. -
Fit a linear model.
Declaration
Swift
public func fit(data: Tensor<Float>, labels: Tensor<Float>)Parameters
dataTraining data with shape
[sample count, feature count].labelsTarget value with shape
[sample count, target count].
SingularValueDecompositionLinearRegression Class Reference