Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metrics ¶
Metrics represents a collection of performance metrics to evaluate a machine learning classifier.
func Evaluate ¶
Evaluate takes a path to the dataset CSV file and an algorithm that implements the Predictor interface. The function returns performance scores measuring the skill of the algorithm at correctly predicting the class of observations or an error if one occurs. This function assumes that labels are the last column in the dataset.
type Predictor ¶
type Predictor interface { // Fit the model to the training data. This trains the model learning // associations between each feature vector (row vector) within matrix // X and it's associated ground truth class label in slice Y. Fit(X *mat.Dense, Y []string) // Predict will classify the feature vectors (row vectors) within // matrix X, predicting the correct class for each based upon what // what the model learned during training. Predict(X *mat.Dense) []string }
Predictor implementations define specific machine learning algorithms to classify data. The interface contains Fit and Predict methods to Fit the model to training data and Predict classes of previously unseen observations respectively.