Documentation ¶
Overview ¶
Package model defines the "Model" interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RegisteredBuilders = make(map[string]func(header *model_pb.AbstractModel, dataspec *dataspec_pb.DataSpecification) Implementation)
RegisteredBuilders is the list of model builders, keyed by a unique `ModelKey` string per model type. Only register (change) this during the runtime initialization, in `init()` function. End users probably want to use `io.LoadModel()` to load models instead.
Functions ¶
This section is empty.
Types ¶
type Implementation ¶
type Implementation interface { Model // LoadSpecific loads the model implementation specific data from a directory. // Users are not expected to call this method directly. Instead, models // should be loaded with "model, err := io.LoadModel(path)". LoadSpecific(modelPath string, prefix string) error }
Implementation interface needs to be implemented by Models (mostly internal). Not needed by those only using a model.
type Model ¶
type Model interface { // Registered name of the model. Name() string // Header of the model. Header() *model_pb.AbstractModel // Dataspec of the model. Dataspec() *dataspec_pb.DataSpecification }
Model is a generic model interface.
Examples:
// Create a new GBT model model := gradientboostedtrees.Create(...)
// Load an existing model. model, err := io.Load("/path/to/model") fmt.Println("My model is a %v.", model.Name()) >> My model is a GRADIENT_BOOSTED_TREES.
Directories ¶
Path | Synopsis |
---|---|
Package canonical registers the "canonical" models.
|
Package canonical registers the "canonical" models. |
Package decisiontree contains utilities to handle decision trees.
|
Package decisiontree contains utilities to handle decision trees. |
io
Package io contains utilities to load/save decision trees
|
Package io contains utilities to load/save decision trees |
io/blobsequence
Package blobsequence implement node reading from blob sequence files.
|
Package blobsequence implement node reading from blob sequence files. |
io/canonical
Package canonical registers the "canonical" ways to read tree nodes.
|
Package canonical registers the "canonical" ways to read tree nodes. |
proto
Package proto includes all proto definitions used in the golang package in one large package.
|
Package proto includes all proto definitions used in the golang package in one large package. |
Package gradientboostedtrees defines the gradient boosted trees model.
|
Package gradientboostedtrees defines the gradient boosted trees model. |
proto
Package proto includes all proto definitions used in the golang package in one large package.
|
Package proto includes all proto definitions used in the golang package in one large package. |
Package io contains utilities to save and load models.
|
Package io contains utilities to save and load models. |
canonical
Package canonical is an alias for the `model/io` package that also links all the canonical model support along.
|
Package canonical is an alias for the `model/io` package that also links all the canonical model support along. |
Package proto includes all proto definitions used in the golang package in one large package.
|
Package proto includes all proto definitions used in the golang package in one large package. |
Package randomforest defines the gradient boosted trees model.
|
Package randomforest defines the gradient boosted trees model. |
proto
Package proto includes all proto definitions used in the golang package in one large package.
|
Package proto includes all proto definitions used in the golang package in one large package. |