ols

package module
v0.0.0-...-0dd20d7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2016 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetLogger

func SetLogger(logger *logrus.Logger)

SetLogger replaces the default logger

Types

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model handles the regression

func NewModel

func NewModel(x, y mat64.Matrix) *Model

NewModel creates a new model with an intercept by default

func NewModelWithIntercept

func NewModelWithIntercept(x, y mat64.Matrix, intercept bool) *Model

NewModelWithIntercept creates a new OLS model with or without an intercept x or y can be nil, just needs to be updated before training

func (*Model) Dims

func (m *Model) Dims() (int, int)

Dims returns number of independent variabes and count of rows

func (*Model) SetX

func (m *Model) SetX(data mat64.Matrix)

SetX replaces the independent variables in the model

func (*Model) SetY

func (m *Model) SetY(y mat64.Matrix)

SetY replaces the dependent model NOTE: only uses first column of the matrix

func (*Model) Train

func (m *Model) Train() *mat64.Dense

Train - process the data and return the result

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址