mirror of
https://github.com/sjwhitworth/golearn.git
synced 2025-04-28 13:48:56 +08:00
30 lines
613 B
Go
30 lines
613 B
Go
// Package base provides base interfaces for GoLearn objects to implement.
|
|
// It also provides a raw base for those objects.
|
|
|
|
package base
|
|
|
|
import (
|
|
mat "github.com/skelterjohn/go.matrix"
|
|
)
|
|
|
|
// 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()
|
|
}
|
|
|
|
// @todo: Implement BaseEstimator setters and getters.
|
|
type BaseEstimator struct {
|
|
Data *mat.DenseMatrix
|
|
}
|