Versions in this module Expand all Collapse all v1 v1.0.0 Dec 6, 2021 Changes in this version + const C_SVC + const EPSILON_SVR + const FREE + const LINEAR + const LOWER_BOUND + const LibSvmGoVersion + const NU_SVC + const NU_SVR + const ONE_CLASS + const POLY + const PRECOMPUTED + const RBF + const SIGMOID + const TAU + const UPPER_BOUND + func CrossValidation(prob *Problem, param *Parameter, nrFold int) (target []float64) + func MapToSnode(m map[int]float64) []snode + func SnodeToMap(x []snode) map[int]float64 + type Model struct + func NewModel(param *Parameter) *Model + func NewModelFromFile(file string) *Model + func (model *Model) Dump(file string) error + func (model *Model) ReadModel(file string) error + func (model *Model) Train(prob *Problem) error + func (model Model) NrClass() int + func (model Model) Predict(x map[int]float64) float64 + func (model Model) PredictProbability(x map[int]float64) (returnValue float64, probabilityEstimate []float64) + func (model Model) PredictValues(x map[int]float64) (returnValue float64, decisionValues []float64) + type Parameter struct + C float64 + CacheSize int + Coef0 float64 + Degree int + Eps float64 + Gamma float64 + KernelType int + NrWeight int + Nu float64 + NumCPU int + P float64 + Probability bool + QuietMode bool + SvmType int + Weight []float64 + WeightLabel []int + func NewParameter() *Parameter + type Problem struct + func NewProblem(file string, param *Parameter) (*Problem, error) + func (problem *Problem) Begin() + func (problem *Problem) Done() bool + func (problem *Problem) GetLine() (y float64, x map[int]float64) + func (problem *Problem) Next() + func (problem *Problem) ProblemSize() int + func (problem *Problem) Read(file string, param *Parameter) error + type SquareErrorComputer struct + func NewSquareErrorComputer() SquareErrorComputer + func (s *SquareErrorComputer) MeanSquareError() (err float64) + func (s *SquareErrorComputer) SquareCorrelationCoeff() (coeff float64) + func (s *SquareErrorComputer) Sum(predict, target float64)