public abstract class ThresholdUtils extends Object
| Constructor and Description |
|---|
ThresholdUtils() |
| Modifier and Type | Method and Description |
|---|---|
static double |
calibrateThreshold(ArrayList<double[]> Y,
double LC_train)
CalibrateThreshold - Calibrate a threshold using PCut: the threshold which results in the best approximation of the label cardinality of the training set.
|
static double[] |
calibrateThresholds(ArrayList<double[]> Y,
double[] LC_train)
CalibrateThreshold - Calibrate a vector of thresholds (one for each label) using PCut: the threshold t[j] which results in the best approximation of the frequency of the j-th label in the training data.
|
static int[][] |
round(double[][] Rpred)
Round - simply round numbers (e.g., 2.0 to 2) -- for multi-target data (where we don't *yet* use a threshold).
|
static int[][] |
threshold(double[][] Rpred,
double t)
Threshold - returns the labels after the prediction-confidence vector is passed through threshold.
|
static int[][] |
threshold(double[][] Rpred,
double[] t)
Threshold - returns the labels after the prediction-confidence vector is passed through a vector of thresholds.
|
static int[] |
threshold(double[] rpred,
String ts)
Threshold - returns the labels after the prediction-confidence vector is passed through threshold(s).
|
static double[] |
thresholdStringToArray(String top,
int L)
ThresholdStringToArray - parse a threshold option string to an array of L thresholds (one for each label variable).
|
public static double[] thresholdStringToArray(String top, int L)
public static double calibrateThreshold(ArrayList<double[]> Y, double LC_train)
Y - labelsLC_train - label cardinality of the training setpublic static double[] calibrateThresholds(ArrayList<double[]> Y, double[] LC_train)
Y - labelsLC_train - average frequency of each labelpublic static final int[][] threshold(double[][] Rpred,
double[] t)
Rpred - label confidence predictions in [0,1]t - threshold for each labelpublic static final int[][] threshold(double[][] Rpred,
double t)
Rpred - label confidence predictions in [0,1]t - thresholdpublic static final int[] threshold(double[] rpred,
String ts)
rpred - label confidence predictions in [0,1]ts - threshold Stringpublic static final int[][] round(double[][] Rpred)
Rpred - class predictions in [0,1,...,K]Copyright © 2017. All Rights Reserved.