Documentation ¶
Overview ¶
Package linear_models implements linear and logistic regression models.
Index ¶
Constants ¶
View Source
const ( L2R_LR = C.L2R_LR L2R_L2LOSS_SVC_DUAL = C.L2R_L2LOSS_SVC_DUAL L2R_L2LOSS_SVC = C.L2R_L2LOSS_SVC L2R_L1LOSS_SVC_DUAL = C.L2R_L1LOSS_SVC_DUAL MCSVM_CS = C.MCSVM_CS L1R_L2LOSS_SVC = C.L1R_L2LOSS_SVC L1R_LR = C.L1R_LR L2R_LR_DUAL = C.L2R_LR_DUAL )
Variables ¶
View Source
var ( NotEnoughDataError = errors.New("not enough rows to support this many variables.") NoTrainingDataError = errors.New("you need to Fit() before you can Predict()") )
Functions ¶
Types ¶
type LinearRegression ¶
type LinearRegression struct {
// contains filtered or unexported fields
}
func NewLinearRegression ¶
func NewLinearRegression() *LinearRegression
func (*LinearRegression) Fit ¶
func (lr *LinearRegression) Fit(inst base.FixedDataGrid) error
func (*LinearRegression) Predict ¶
func (lr *LinearRegression) Predict(X base.FixedDataGrid) (base.FixedDataGrid, error)
type LogisticRegression ¶
type LogisticRegression struct {
// contains filtered or unexported fields
}
func NewLogisticRegression ¶
func NewLogisticRegression(penalty string, C float64, eps float64) (*LogisticRegression, error)
func (*LogisticRegression) Fit ¶
func (lr *LogisticRegression) Fit(X base.FixedDataGrid)
func (*LogisticRegression) Predict ¶
func (lr *LogisticRegression) Predict(X base.FixedDataGrid) base.FixedDataGrid
Click to show internal directories.
Click to hide internal directories.