Documentation
¶
Index ¶
- type ClassifierOption
- func WithClassifierAlpha(alpha float64) ClassifierOption
- func WithClassifierEta0(eta0 float64) ClassifierOption
- func WithClassifierLearningRate(lr string) ClassifierOption
- func WithClassifierLoss(loss string) ClassifierOption
- func WithClassifierMaxIter(maxIter int) ClassifierOption
- func WithClassifierPenalty(penalty string) ClassifierOption
- func WithClassifierRandomState(seed int64) ClassifierOption
- type LinearRegression
- func (lr *LinearRegression) Clone() model.SKLearnCompatible
- func (lr *LinearRegression) Coef() []float64
- func (lr *LinearRegression) ExportWeights() (*model.ModelWeights, error)
- func (lr *LinearRegression) Fit(X, y mat.Matrix) error
- func (lr *LinearRegression) GetParams(deep bool) map[string]interface{}
- func (lr *LinearRegression) GetWeightHash() string
- func (lr *LinearRegression) ImportWeights(weights *model.ModelWeights) error
- func (lr *LinearRegression) Intercept() float64
- func (lr *LinearRegression) IsFitted() bool
- func (lr *LinearRegression) Predict(X mat.Matrix) (mat.Matrix, error)
- func (lr *LinearRegression) Score(X, y mat.Matrix) (float64, error)
- func (lr *LinearRegression) SetParams(params map[string]interface{}) error
- func (lr *LinearRegression) String() string
- type LinearRegressionOption
- type LogisticRegression
- func (lr *LogisticRegression) Fit(X, y mat.Matrix) error
- func (lr *LogisticRegression) GetParams() map[string]interface{}
- func (lr *LogisticRegression) Predict(X mat.Matrix) (mat.Matrix, error)
- func (lr *LogisticRegression) PredictProba(X mat.Matrix) (mat.Matrix, error)
- func (lr *LogisticRegression) Score(X, y mat.Matrix) float64
- func (lr *LogisticRegression) SetParams(params map[string]interface{}) error
- type LogisticRegressionOption
- func WithLRC(c float64) LogisticRegressionOption
- func WithLRMaxIter(maxIter int) LogisticRegressionOption
- func WithLRPenalty(penalty string) LogisticRegressionOption
- func WithLRRandomState(seed int64) LogisticRegressionOption
- func WithLRSolver(solver string) LogisticRegressionOption
- func WithLRTol(tol float64) LogisticRegressionOption
- func WithLogisticFitIntercept(fit bool) LogisticRegressionOption
- type Option
- func WithAlpha(alpha float64) Option
- func WithEta0(eta0 float64) Option
- func WithFitIntercept(fit bool) Option
- func WithLearningRate(lr string) Option
- func WithLoss(loss string) Option
- func WithMaxIter(maxIter int) Option
- func WithPenalty(penalty string) Option
- func WithRandomState(seed int64) Option
- func WithTol(tol float64) Option
- func WithWarmStart(warmStart bool) Option
- type PassiveAggressiveClassifier
- func (pa *PassiveAggressiveClassifier) Fit(X, y mat.Matrix) error
- func (pa *PassiveAggressiveClassifier) FitStream(ctx context.Context, dataChan <-chan *model.Batch) error
- func (pa *PassiveAggressiveClassifier) GetParams() map[string]interface{}
- func (pa *PassiveAggressiveClassifier) IsFitted() bool
- func (pa *PassiveAggressiveClassifier) IsWarmStart() bool
- func (pa *PassiveAggressiveClassifier) NIterations() int
- func (pa *PassiveAggressiveClassifier) PartialFit(X, y mat.Matrix, classes []int) error
- func (pa *PassiveAggressiveClassifier) Predict(X mat.Matrix) (mat.Matrix, error)
- func (pa *PassiveAggressiveClassifier) SetWarmStart(warmStart bool)
- type PassiveAggressiveOption
- type PassiveAggressiveRegressor
- func (pa *PassiveAggressiveRegressor) Fit(X, y mat.Matrix) error
- func (pa *PassiveAggressiveRegressor) FitStream(ctx context.Context, dataChan <-chan *model.Batch) error
- func (pa *PassiveAggressiveRegressor) GetParams() map[string]interface{}
- func (pa *PassiveAggressiveRegressor) IsFitted() bool
- func (pa *PassiveAggressiveRegressor) IsWarmStart() bool
- func (pa *PassiveAggressiveRegressor) NIterations() int
- func (pa *PassiveAggressiveRegressor) PartialFit(X, y mat.Matrix, classes []int) error
- func (pa *PassiveAggressiveRegressor) Predict(X mat.Matrix) (mat.Matrix, error)
- func (pa *PassiveAggressiveRegressor) SetWarmStart(warmStart bool)
- type SGDClassifier
- func (sgd *SGDClassifier) Classes() []int
- func (sgd *SGDClassifier) Coef() [][]float64
- func (sgd *SGDClassifier) DecisionFunction(X mat.Matrix) (mat.Matrix, error)
- func (sgd *SGDClassifier) Fit(X, y mat.Matrix) error
- func (sgd *SGDClassifier) FitPredictStream(ctx context.Context, dataChan <-chan *model.Batch) <-chan mat.Matrix
- func (sgd *SGDClassifier) FitStream(ctx context.Context, dataChan <-chan *model.Batch) error
- func (sgd *SGDClassifier) GetConverged() bool
- func (sgd *SGDClassifier) GetLearningRate() float64
- func (sgd *SGDClassifier) GetLearningRateSchedule() string
- func (sgd *SGDClassifier) GetLoss() float64
- func (sgd *SGDClassifier) GetLossHistory() []float64
- func (sgd *SGDClassifier) GetParams() map[string]interface{}
- func (sgd *SGDClassifier) Intercept() []float64
- func (sgd *SGDClassifier) IsFitted() bool
- func (sgd *SGDClassifier) IsWarmStart() bool
- func (sgd *SGDClassifier) NIterations() int
- func (sgd *SGDClassifier) PartialFit(X, y mat.Matrix, classes []int) error
- func (sgd *SGDClassifier) Predict(X mat.Matrix) (mat.Matrix, error)
- func (sgd *SGDClassifier) PredictProba(X mat.Matrix) (mat.Matrix, error)
- func (sgd *SGDClassifier) PredictStream(ctx context.Context, inputChan <-chan mat.Matrix) <-chan mat.Matrix
- func (sgd *SGDClassifier) Score(X, y mat.Matrix) (float64, error)
- func (sgd *SGDClassifier) SetLearningRate(lr float64)
- func (sgd *SGDClassifier) SetLearningRateSchedule(schedule string)
- func (sgd *SGDClassifier) SetWarmStart(warmStart bool)
- type SGDRegressor
- func (sgd *SGDRegressor) Coef() []float64
- func (sgd *SGDRegressor) Fit(X, y mat.Matrix) error
- func (sgd *SGDRegressor) FitPredictStream(ctx context.Context, dataChan <-chan *model.Batch) <-chan mat.Matrix
- func (sgd *SGDRegressor) FitStream(ctx context.Context, dataChan <-chan *model.Batch) error
- func (sgd *SGDRegressor) GetConverged() bool
- func (sgd *SGDRegressor) GetLearningRate() float64
- func (sgd *SGDRegressor) GetLearningRateSchedule() string
- func (sgd *SGDRegressor) GetLoss() float64
- func (sgd *SGDRegressor) GetLossHistory() []float64
- func (sgd *SGDRegressor) GetParams() map[string]interface{}
- func (sgd *SGDRegressor) Intercept() float64
- func (sgd *SGDRegressor) IsFitted() bool
- func (sgd *SGDRegressor) IsWarmStart() bool
- func (sgd *SGDRegressor) NIterations() int
- func (sgd *SGDRegressor) PartialFit(X, y mat.Matrix, classes []int) error
- func (sgd *SGDRegressor) Predict(X mat.Matrix) (mat.Matrix, error)
- func (sgd *SGDRegressor) PredictStream(ctx context.Context, inputChan <-chan mat.Matrix) <-chan mat.Matrix
- func (sgd *SGDRegressor) Score(X, y mat.Matrix) (float64, error)
- func (sgd *SGDRegressor) SetLearningRate(lr float64)
- func (sgd *SGDRegressor) SetLearningRateSchedule(schedule string)
- func (sgd *SGDRegressor) SetWarmStart(warmStart bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClassifierOption ¶
type ClassifierOption func(*SGDClassifier)
ClassifierOption はSGDClassifierの設定オプション
func WithClassifierAlpha ¶
func WithClassifierAlpha(alpha float64) ClassifierOption
WithClassifierAlpha は正則化の強度を設定
func WithClassifierEta0 ¶
func WithClassifierEta0(eta0 float64) ClassifierOption
WithClassifierEta0 は初期学習率を設定
func WithClassifierLearningRate ¶
func WithClassifierLearningRate(lr string) ClassifierOption
WithClassifierLearningRate は学習率スケジュールを設定
func WithClassifierLoss ¶
func WithClassifierLoss(loss string) ClassifierOption
WithClassifierLoss は損失関数を設定
func WithClassifierMaxIter ¶
func WithClassifierMaxIter(maxIter int) ClassifierOption
WithClassifierMaxIter は最大イテレーション数を設定
func WithClassifierPenalty ¶
func WithClassifierPenalty(penalty string) ClassifierOption
WithClassifierPenalty は正則化を設定
func WithClassifierRandomState ¶
func WithClassifierRandomState(seed int64) ClassifierOption
WithClassifierRandomState は乱数シードを設定
type LinearRegression ¶ added in v0.3.0
type LinearRegression struct {
// contains filtered or unexported fields
}
LinearRegression is a linear regression model using ordinary least squares Fully compatible with scikit-learn's LinearRegression
func NewLinearRegression ¶ added in v0.3.0
func NewLinearRegression(options ...LinearRegressionOption) *LinearRegression
NewLinearRegression creates a new LinearRegression model
func (*LinearRegression) Clone ¶ added in v0.3.0
func (lr *LinearRegression) Clone() model.SKLearnCompatible
Clone creates a new instance of the model (with same hyperparameters)
func (*LinearRegression) Coef ¶ added in v0.3.0
func (lr *LinearRegression) Coef() []float64
Coef returns the learned weight coefficients
func (*LinearRegression) ExportWeights ¶ added in v0.3.0
func (lr *LinearRegression) ExportWeights() (*model.ModelWeights, error)
ExportWeights exports model weights (guarantees complete reproducibility)
func (*LinearRegression) Fit ¶ added in v0.3.0
func (lr *LinearRegression) Fit(X, y mat.Matrix) error
Fit trains the model with training data
func (*LinearRegression) GetParams ¶ added in v0.3.0
func (lr *LinearRegression) GetParams(deep bool) map[string]interface{}
GetParams returns the model's hyperparameters (scikit-learn compatible)
func (*LinearRegression) GetWeightHash ¶ added in v0.3.0
func (lr *LinearRegression) GetWeightHash() string
GetWeightHash calculates the hash value of weights (for verification)
func (*LinearRegression) ImportWeights ¶ added in v0.3.0
func (lr *LinearRegression) ImportWeights(weights *model.ModelWeights) error
ImportWeights imports model weights (guarantees complete reproducibility)
func (*LinearRegression) Intercept ¶ added in v0.3.0
func (lr *LinearRegression) Intercept() float64
Intercept returns the learned intercept
func (*LinearRegression) IsFitted ¶ added in v0.4.0
func (lr *LinearRegression) IsFitted() bool
IsFitted returns whether the model has been fitted
func (*LinearRegression) Score ¶ added in v0.3.0
func (lr *LinearRegression) Score(X, y mat.Matrix) (float64, error)
Score computes the coefficient of determination (R²) of the model
func (*LinearRegression) SetParams ¶ added in v0.3.0
func (lr *LinearRegression) SetParams(params map[string]interface{}) error
SetParams sets the model's hyperparameters (scikit-learn compatible)
func (*LinearRegression) String ¶ added in v0.3.0
func (lr *LinearRegression) String() string
String returns the string representation of the model
type LinearRegressionOption ¶ added in v0.3.0
type LinearRegressionOption func(*LinearRegression)
LinearRegressionOption is a configuration option
func WithCopyX ¶ added in v0.3.0
func WithCopyX(copy bool) LinearRegressionOption
WithCopyX sets whether to copy data
func WithLRFitIntercept ¶ added in v0.3.0
func WithLRFitIntercept(fit bool) LinearRegressionOption
WithLRFitIntercept sets whether to learn intercept (for LinearRegression)
func WithNJobs ¶ added in v0.3.0
func WithNJobs(n int) LinearRegressionOption
WithNJobs sets number of parallel jobs
func WithNormalize ¶ added in v0.3.0
func WithNormalize(normalize bool) LinearRegressionOption
WithNormalize sets whether to normalize (deprecated)
func WithPositive ¶ added in v0.3.0
func WithPositive(positive bool) LinearRegressionOption
WithPositive sets positive constraint on coefficients
type LogisticRegression ¶ added in v0.4.0
type LogisticRegression struct {
C float64 // Inverse regularization strength (1/alpha)
// contains filtered or unexported fields
}
LogisticRegression implements logistic regression for classification Compatible with scikit-learn's LogisticRegression
func NewLogisticRegression ¶ added in v0.4.0
func NewLogisticRegression(opts ...LogisticRegressionOption) *LogisticRegression
NewLogisticRegression creates a new LogisticRegression classifier
func (*LogisticRegression) Fit ¶ added in v0.4.0
func (lr *LogisticRegression) Fit(X, y mat.Matrix) error
Fit trains the logistic regression model
func (*LogisticRegression) GetParams ¶ added in v0.4.0
func (lr *LogisticRegression) GetParams() map[string]interface{}
GetParams returns the model hyperparameters
func (*LogisticRegression) PredictProba ¶ added in v0.4.0
PredictProba returns probability estimates for each class
func (*LogisticRegression) Score ¶ added in v0.4.0
func (lr *LogisticRegression) Score(X, y mat.Matrix) float64
Score returns the mean accuracy on the given test data and labels
func (*LogisticRegression) SetParams ¶ added in v0.4.0
func (lr *LogisticRegression) SetParams(params map[string]interface{}) error
SetParams sets the model hyperparameters
type LogisticRegressionOption ¶ added in v0.4.0
type LogisticRegressionOption func(*LogisticRegression)
LogisticRegressionOption is a functional option for LogisticRegression
func WithLRC ¶ added in v0.4.0
func WithLRC(c float64) LogisticRegressionOption
WithLRC sets the inverse regularization strength
func WithLRMaxIter ¶ added in v0.4.0
func WithLRMaxIter(maxIter int) LogisticRegressionOption
WithMaxIter sets the maximum number of iterations
func WithLRPenalty ¶ added in v0.4.0
func WithLRPenalty(penalty string) LogisticRegressionOption
WithLRPenalty sets the regularization type
func WithLRRandomState ¶ added in v0.4.0
func WithLRRandomState(seed int64) LogisticRegressionOption
WithRandomState sets the random seed
func WithLRSolver ¶ added in v0.4.0
func WithLRSolver(solver string) LogisticRegressionOption
WithLRSolver sets the optimization solver
func WithLRTol ¶ added in v0.4.0
func WithLRTol(tol float64) LogisticRegressionOption
WithTol sets the tolerance for stopping criteria
func WithLogisticFitIntercept ¶ added in v0.4.0
func WithLogisticFitIntercept(fit bool) LogisticRegressionOption
WithLogisticFitIntercept sets whether to fit intercept
type Option ¶
type Option func(*SGDRegressor)
Option is a configuration option for SGDRegressor
func WithLearningRate ¶
WithLearningRate sets the learning rate schedule
type PassiveAggressiveClassifier ¶
type PassiveAggressiveClassifier struct {
// Hyperparameters
C float64 // Regularization parameter
// contains filtered or unexported fields
}
PassiveAggressiveClassifier is a passive aggressive classification model
func NewPassiveAggressiveClassifier ¶
func NewPassiveAggressiveClassifier(options ...PassiveAggressiveOption) *PassiveAggressiveClassifier
NewPassiveAggressiveClassifier creates a new PassiveAggressiveClassifier
func (*PassiveAggressiveClassifier) Fit ¶
func (pa *PassiveAggressiveClassifier) Fit(X, y mat.Matrix) error
Fit はバッチ学習でモデルを訓練
func (*PassiveAggressiveClassifier) GetParams ¶ added in v0.4.0
func (pa *PassiveAggressiveClassifier) GetParams() map[string]interface{}
GetParams returns the hyperparameters for classifier
func (*PassiveAggressiveClassifier) IsFitted ¶ added in v0.4.0
func (pa *PassiveAggressiveClassifier) IsFitted() bool
IsFitted returns whether the classifier has been fitted
func (*PassiveAggressiveClassifier) IsWarmStart ¶
func (pa *PassiveAggressiveClassifier) IsWarmStart() bool
func (*PassiveAggressiveClassifier) NIterations ¶
func (pa *PassiveAggressiveClassifier) NIterations() int
func (*PassiveAggressiveClassifier) PartialFit ¶
func (pa *PassiveAggressiveClassifier) PartialFit(X, y mat.Matrix, classes []int) error
PartialFit はミニバッチでモデルを逐次的に学習
func (*PassiveAggressiveClassifier) SetWarmStart ¶
func (pa *PassiveAggressiveClassifier) SetWarmStart(warmStart bool)
type PassiveAggressiveOption ¶
type PassiveAggressiveOption func(interface{})
PassiveAggressiveOption is a configuration option
func WithPAC ¶
func WithPAC(c float64) PassiveAggressiveOption
WithPAC sets regularization parameter
func WithPAFitIntercept ¶
func WithPAFitIntercept(fit bool) PassiveAggressiveOption
WithPAFitIntercept sets whether to learn intercept
func WithPALoss ¶
func WithPALoss(loss string) PassiveAggressiveOption
WithPALoss sets loss function
func WithPAMaxIter ¶
func WithPAMaxIter(maxIter int) PassiveAggressiveOption
WithPAMaxIter sets maximum number of iterations
type PassiveAggressiveRegressor ¶
type PassiveAggressiveRegressor struct {
// Hyperparameters
C float64 // Regularization parameter
// contains filtered or unexported fields
}
PassiveAggressiveRegressor is a passive aggressive regression model Compatible with scikit-learn's PassiveAggressiveRegressor
func NewPassiveAggressiveRegressor ¶
func NewPassiveAggressiveRegressor(options ...PassiveAggressiveOption) *PassiveAggressiveRegressor
NewPassiveAggressiveRegressor creates a new PassiveAggressiveRegressor
func (*PassiveAggressiveRegressor) Fit ¶
func (pa *PassiveAggressiveRegressor) Fit(X, y mat.Matrix) error
Fit はバッチ学習でモデルを訓練
func (*PassiveAggressiveRegressor) FitStream ¶
func (pa *PassiveAggressiveRegressor) FitStream(ctx context.Context, dataChan <-chan *model.Batch) error
FitStream はデータストリームからモデルを学習
func (*PassiveAggressiveRegressor) GetParams ¶ added in v0.4.0
func (pa *PassiveAggressiveRegressor) GetParams() map[string]interface{}
GetParams returns the hyperparameters for regressor
func (*PassiveAggressiveRegressor) IsFitted ¶ added in v0.4.0
func (pa *PassiveAggressiveRegressor) IsFitted() bool
IsFitted returns whether the regressor has been fitted
func (*PassiveAggressiveRegressor) IsWarmStart ¶
func (pa *PassiveAggressiveRegressor) IsWarmStart() bool
IsWarmStart はウォームスタートが有効かどうかを返す
func (*PassiveAggressiveRegressor) NIterations ¶
func (pa *PassiveAggressiveRegressor) NIterations() int
NIterations は実行された学習イテレーション数を返す
func (*PassiveAggressiveRegressor) PartialFit ¶
func (pa *PassiveAggressiveRegressor) PartialFit(X, y mat.Matrix, classes []int) error
PartialFit はミニバッチでモデルを逐次的に学習
func (*PassiveAggressiveRegressor) SetWarmStart ¶
func (pa *PassiveAggressiveRegressor) SetWarmStart(warmStart bool)
SetWarmStart はウォームスタートの有効/無効を設定
type SGDClassifier ¶
type SGDClassifier struct {
// contains filtered or unexported fields
}
SGDClassifier is a classification model using stochastic gradient descent Compatible with scikit-learn's SGDClassifier
func NewSGDClassifier ¶
func NewSGDClassifier(options ...ClassifierOption) *SGDClassifier
NewSGDClassifier は新しいSGDClassifierを作成
func (*SGDClassifier) DecisionFunction ¶
DecisionFunction は決定関数の値を返す
func (*SGDClassifier) FitPredictStream ¶
func (sgd *SGDClassifier) FitPredictStream(ctx context.Context, dataChan <-chan *model.Batch) <-chan mat.Matrix
FitPredictStream は学習と予測を同時に行う(test-then-train方式)
func (*SGDClassifier) GetConverged ¶
func (sgd *SGDClassifier) GetConverged() bool
GetConverged は収束したかどうかを返す
func (*SGDClassifier) GetLearningRate ¶
func (sgd *SGDClassifier) GetLearningRate() float64
GetLearningRate は現在の学習率を返す
func (*SGDClassifier) GetLearningRateSchedule ¶
func (sgd *SGDClassifier) GetLearningRateSchedule() string
GetLearningRateSchedule は学習率スケジュールを返す
func (*SGDClassifier) GetLossHistory ¶
func (sgd *SGDClassifier) GetLossHistory() []float64
GetLossHistory は損失値の履歴を返す
func (*SGDClassifier) GetParams ¶ added in v0.4.0
func (sgd *SGDClassifier) GetParams() map[string]interface{}
GetParams returns the hyperparameters
func (*SGDClassifier) Intercept ¶
func (sgd *SGDClassifier) Intercept() []float64
Intercept は学習された切片を返す
func (*SGDClassifier) IsFitted ¶ added in v0.4.0
func (sgd *SGDClassifier) IsFitted() bool
IsFitted returns whether the model has been fitted
func (*SGDClassifier) IsWarmStart ¶
func (sgd *SGDClassifier) IsWarmStart() bool
IsWarmStart はウォームスタートが有効かどうかを返す
func (*SGDClassifier) NIterations ¶
func (sgd *SGDClassifier) NIterations() int
NIterations は実行された学習イテレーション数を返す
func (*SGDClassifier) PartialFit ¶
func (sgd *SGDClassifier) PartialFit(X, y mat.Matrix, classes []int) error
PartialFit はミニバッチでモデルを逐次的に学習(オンライン学習)
func (*SGDClassifier) PredictProba ¶
PredictProba は各クラスの予測確率を返す
func (*SGDClassifier) PredictStream ¶
func (sgd *SGDClassifier) PredictStream(ctx context.Context, inputChan <-chan mat.Matrix) <-chan mat.Matrix
PredictStream は入力ストリームに対してリアルタイム予測
func (*SGDClassifier) Score ¶
func (sgd *SGDClassifier) Score(X, y mat.Matrix) (float64, error)
Score はモデルの精度を計算
func (*SGDClassifier) SetLearningRate ¶
func (sgd *SGDClassifier) SetLearningRate(lr float64)
SetLearningRate は学習率を設定
func (*SGDClassifier) SetLearningRateSchedule ¶
func (sgd *SGDClassifier) SetLearningRateSchedule(schedule string)
SetLearningRateSchedule は学習率スケジュールを設定
func (*SGDClassifier) SetWarmStart ¶
func (sgd *SGDClassifier) SetWarmStart(warmStart bool)
SetWarmStart はウォームスタートの有効/無効を設定
type SGDRegressor ¶
type SGDRegressor struct {
// contains filtered or unexported fields
}
SGDRegressor is a linear regression model using stochastic gradient descent Compatible with scikit-learn's SGDRegressor
func NewSGDRegressor ¶
func NewSGDRegressor(options ...Option) *SGDRegressor
NewSGDRegressor creates a new SGDRegressor
func (*SGDRegressor) FitPredictStream ¶
func (sgd *SGDRegressor) FitPredictStream(ctx context.Context, dataChan <-chan *model.Batch) <-chan mat.Matrix
FitPredictStream は学習と予測を同時に行う(test-then-train方式)
func (*SGDRegressor) GetConverged ¶
func (sgd *SGDRegressor) GetConverged() bool
GetConverged は収束したかどうかを返す
func (*SGDRegressor) GetLearningRate ¶
func (sgd *SGDRegressor) GetLearningRate() float64
GetLearningRate は現在の学習率を返す
func (*SGDRegressor) GetLearningRateSchedule ¶
func (sgd *SGDRegressor) GetLearningRateSchedule() string
GetLearningRateSchedule は学習率スケジュールを返す
func (*SGDRegressor) GetLossHistory ¶
func (sgd *SGDRegressor) GetLossHistory() []float64
GetLossHistory は損失値の履歴を返す
func (*SGDRegressor) GetParams ¶ added in v0.4.0
func (sgd *SGDRegressor) GetParams() map[string]interface{}
GetParams returns the hyperparameters
func (*SGDRegressor) IsFitted ¶ added in v0.4.0
func (sgd *SGDRegressor) IsFitted() bool
IsFitted returns whether the model has been fitted
func (*SGDRegressor) IsWarmStart ¶
func (sgd *SGDRegressor) IsWarmStart() bool
IsWarmStart はウォームスタートが有効かどうかを返す
func (*SGDRegressor) NIterations ¶
func (sgd *SGDRegressor) NIterations() int
NIterations は実行された学習イテレーション数を返す
func (*SGDRegressor) PartialFit ¶
func (sgd *SGDRegressor) PartialFit(X, y mat.Matrix, classes []int) error
PartialFit はミニバッチでモデルを逐次的に学習(オンライン学習)
func (*SGDRegressor) PredictStream ¶
func (sgd *SGDRegressor) PredictStream(ctx context.Context, inputChan <-chan mat.Matrix) <-chan mat.Matrix
PredictStream は入力ストリームに対してリアルタイム予測
func (*SGDRegressor) Score ¶
func (sgd *SGDRegressor) Score(X, y mat.Matrix) (float64, error)
Score はモデルの決定係数(R²)を計算
func (*SGDRegressor) SetLearningRate ¶
func (sgd *SGDRegressor) SetLearningRate(lr float64)
SetLearningRate は学習率を設定
func (*SGDRegressor) SetLearningRateSchedule ¶
func (sgd *SGDRegressor) SetLearningRateSchedule(schedule string)
SetLearningRateSchedule は学習率スケジュールを設定
func (*SGDRegressor) SetWarmStart ¶
func (sgd *SGDRegressor) SetWarmStart(warmStart bool)
SetWarmStart はウォームスタートの有効/無効を設定