// NewAROW creates an AROW model. regWeight means sensitivity for data. When regWeight is large, // the model learns quickly but harms from noise. regWeight must be larger than zero. func NewAROW(regWeight float32) (*AROW, error) { if regWeight <= 0 { return nil, errors.New("regularization weight must be larger than zero") } return &AROW{ model: make(model), regWeight: regWeight, intern: intern.New(), }, nil }
// Clear clears a model. func (a *AROW) Clear() { a.m.Lock() defer a.m.Unlock() a.model = make(model) a.intern = intern.New() }