Name: noether
Owner: Spotify
Description: Machine Learning Scala Tools.
Created: 2018-03-30 17:25:23.0
Updated: 2018-05-18 22:02:53.0
Pushed: 2018-05-18 22:02:52.0
Size: 71
Language: Scala
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Emmy Noether was a German mathematician known for her landmark contributions to abstract algebra and theoretical physics.
Noether is a collection of Machine Learning tools targeted at the JVM and Scala. It relies heavily on the Algebird library especially for Aggregators.
Aggregators enable creation of reusable and composable aggregation functions. Most Machine Learning loss functions and metrics can be decomposed into a single aggregator. This becomes useful when a model produces a set of predictions and one or more metrics are needed to be computed on this collection.
Below is an example for a binary classification task. Algebird's MultiAggregator can be used to combine multiple metrics into a single callable aggregator.
multiAggregator =
ltiAggregator(AUC(ROC), AUC(PR), ClassificationReport(), BinaryConfusionMatrix())
.andThenPresent{case (roc, pr, report, cm) =>
(roc, pr, report.accuracy, report.recall, report.precision, cm(1, 1), cm(0, 0))
}
predictions = List(Prediction(false, 0.1), Prediction(false, 0.6), Prediction(true, 0.9))
tln(multiAggregator(predictions))
Most aggregators take a single parameterized class called Prediction as input to the aggregator. However the type of
the prediction object differ based on the aggregator. In the above example each binary classifier takes a prediction
of type Prediction[Boolean, Double]
where the first type is the label and the second in the predicted score.
Other aggregators will takes slightly different types such as the Error Rate Aggregator which expects Prediction[Int, List[Double]]
where the types are label and a list of scores.
See the docs on each aggregator for a more detailed walk-through on the functionality and the return objects.
Copyright 2016-2018 Spotify AB.
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0