public class SparkDataSetLossCalculator extends java.lang.Object implements ScoreCalculator<MultiLayerNetwork>
MultiLayerNetwork
on that data set (data set
as a JavaRDD
), using Spark.
Typically used to calculate the loss on a test set.Constructor and Description |
---|
SparkDataSetLossCalculator(org.apache.spark.api.java.JavaRDD<org.nd4j.linalg.dataset.DataSet> data,
boolean average,
org.apache.spark.SparkContext sc)
Calculate the score (loss function value) on a given data set (usually a test set)
|
Modifier and Type | Method and Description |
---|---|
double |
calculateScore(MultiLayerNetwork network)
Calculate the score for the given MultiLayerNetwork
|
public SparkDataSetLossCalculator(org.apache.spark.api.java.JavaRDD<org.nd4j.linalg.dataset.DataSet> data, boolean average, org.apache.spark.SparkContext sc)
data
- Data set to calculate the score foraverage
- Whether to return the average (sum of loss / N) or just (sum of loss)public double calculateScore(MultiLayerNetwork network)
ScoreCalculator
calculateScore
in interface ScoreCalculator<MultiLayerNetwork>