Constructor and Description |
---|
MLEvalUtils() |
Modifier and Type | Method and Description |
---|---|
static Result |
averageResults(Result[] folds)
Deprecated.
|
static Result |
combinePredictions(Result[] folds)
Combine Predictions - Combine together various results (for example, from cross-validation)
into one, simply by appending predictions and true values together, and averaging together their 'vals'.
|
static HashMap<String,Object> |
getMLStats(double[][] Rpred,
int[][] Y,
double[] t,
String vop)
GetMLStats - Given predictions and corresponding true values and a threshold string, retreive statistics.
|
static HashMap<String,Object> |
getMLStats(double[][] Rpred,
int[][] Y,
String t,
String vop)
GetMLStats - Given predictions and corresponding true values and a threshold string, retreive statistics.
|
static HashMap<String,Object> |
getMTStats(double[][] Rpred,
int[][] Y,
String vop)
GetMTStats - Given multi-target predictions and corresponding true values, retreive evaluation statistics.
|
static String |
getThreshold(ArrayList<double[]> Y,
weka.core.Instances D,
String top)
GetThreshold - Get a threshold from a Threshold OPtion string 'top'.
|
static void |
main(String[] args)
Main - can use this function for writing tests during development.
|
public static String getThreshold(ArrayList<double[]> Y, weka.core.Instances D, String top) throws Exception
Y
- label space; for calculating a threshold with PCutD
- training data; for calculating a threshold with PCuttop
- Threshold OPtion (either "PCut1", "PCutL" or a real value e.g. "0.5" or L real values e.g. "[0.1, 0.2, 0.8]" for L = 3Exception
public static HashMap<String,Object> getMLStats(double[][] Rpred, int[][] Y, String t, String vop)
Rpred
- predictions (may be real-valued confidences)Y
- corresponding true valuest
- a threshold string, e.g. "0.387"vop
- the verbosity option, e.g. "5"public static HashMap<String,Object> getMLStats(double[][] Rpred, int[][] Y, double[] t, String vop)
Rpred
- predictions (may be double-valued confidences in the multi-label case)Y
- corresponding true valuest
- a vector of thresholds, e.g. [0.1,0.1,0.1] or [0.1,0.5,0.4,0.001]public static HashMap<String,Object> getMTStats(double[][] Rpred, int[][] Y, String vop)
Rpred
- predictionsY
- corresponding true valuespublic static Result combinePredictions(Result[] folds)
folds
- an array of Results@Deprecated public static Result averageResults(Result[] folds)
folds
- array of Results (e.g., from CV-validation)public static void main(String[] args)
args
- command line argumentsCopyright © 2017. All Rights Reserved.