2014-04-30 09:08:33 +01:00
|
|
|
// Package base provides base interfaces for GoLearn objects to implement.
|
|
|
|
// It also provides a raw base for those objects.
|
|
|
|
|
|
|
|
package base
|
|
|
|
|
2014-05-01 19:56:30 +01:00
|
|
|
import (
|
2014-05-03 23:08:43 +01:00
|
|
|
mat64 "github.com/gonum/matrix/mat64"
|
2014-05-01 19:56:30 +01:00
|
|
|
)
|
|
|
|
|
2014-04-30 09:08:33 +01:00
|
|
|
// An object that can ingest some data and train on it.
|
|
|
|
type Estimator interface {
|
|
|
|
Fit()
|
|
|
|
Summarise()
|
|
|
|
}
|
|
|
|
|
|
|
|
// An object that provides predictions.
|
|
|
|
type Predictor interface {
|
|
|
|
Predict()
|
|
|
|
}
|
|
|
|
|
|
|
|
// An supervised learning object, that is possible of scoring accuracy against a test set.
|
|
|
|
type Model interface {
|
|
|
|
Score()
|
|
|
|
}
|
|
|
|
|
2014-05-01 19:56:30 +01:00
|
|
|
// @todo: Implement BaseEstimator setters and getters.
|
|
|
|
type BaseEstimator struct {
|
2014-05-03 23:08:43 +01:00
|
|
|
Estimator
|
|
|
|
Data *mat64.Dense
|
2014-04-30 09:08:33 +01:00
|
|
|
}
|