public class TargetRegressionStatistics extends RegressionStatistics
abs( class - target )
for
each entry.
Window Size Analysis
This class can perform an analysis how many entries are predicted to have a class variable be less than a certain distance from the target value, and how many of those actually truly fall within some specified distance of the target. Consider this as a way of testing how well this model can be used as a way of screening candidate materials for possessing a certain level of a target property.In order to run this analysis, specify a maximum window size and a tolerance window for successful predictions. This chart can be printed out using the "window" command.
Candidate Analysis
Similarly, one can test then number of entries truly within the acceptance tolerance when
the a certain number of closest candidates are selected. For a range of numbers of
candidates up to the maximum number of candidates, the average distance of the entries from
the target value and fraction correctly identified to be within a certain tolerance are calculated.
These results will be calculated if the maximum number of candidates and tolerance are set.
Print using the "rank" command;
Usage: <target> [-accept <Acceptance Tolerance>] [-window <Max Window Size>] [-cands <Max Number Candidates>]
Implemented Print Commands:
rank - Prints how the performance of best-performing entries according to model predictions window - Prints statistics regarding this model’s ability to act as a filter
Modifier and Type | Field and Description |
---|---|
protected int |
MaxCandidates
Maximum number of candidates for ranking analysis
|
protected double |
MaxWindowSize
Maximum tolerance during window size analysis
|
protected double |
Target
Target value of class variable
|
protected double |
Tolerance
Tolerance for successful prediction
|
MAE, MeasuredMAD, MeasuredMedian, MeasuredRange, MeasuredStdDev, MRE, R, Rho, RMSE, Tau
Measured, NumberTested, Predicted, ROC, ROC_AUC
Constructor and Description |
---|
TargetRegressionStatistics() |
Modifier and Type | Method and Description |
---|---|
protected void |
evaluate_protected(Dataset Results)
Internal method for acutally computing results.
|
java.lang.String |
printCandidateAnalysis()
Print results of the candidate ranking analysis.
|
java.lang.String |
printCommand(java.util.List<java.lang.String> Command)
Handles more complicated printing commands.
|
java.lang.String |
printUsage()
Print out required format for options.
|
java.lang.String |
printWindowAnalysis()
Print results of the tolerance size analysis.
|
protected void |
runCandidateAnalysis(double[] measured,
double[] predicted)
Perform a candidate selection analysis (described in documentation for this
class as a whole).
|
protected void |
runWindowAnalysis(double[] measured,
double[] predicted)
Perform a window-size analysis.
|
void |
setMaxCandidates(int MaxCandidates)
Set the maximum number of candidates for an analysis of how the number of
candidates affects prediction accuracy.
|
void |
setMaxWindowSize(double MaxWindowSize)
Set the maximum window size for an analysis of how tolerance window size affects
prediction accuracy.
|
void |
setNSteps(int NSteps)
Set the number of steps to use when calculating model performance for ranking
or filtering.
|
void |
setOptions(java.util.List<java.lang.Object> OptionsObj)
Set any options for this object.
|
void |
setTarget(double Target)
Define target value of class variable.
|
void |
setTolerance(double Tolerance)
Define the error threshold that is considered a successful prediction.
|
clone, getStatistics, getStatistics, printBaselineStats, toString
about, evaluate, getROCCurve, getStatisticsNoNaNs, printDescription, printROCCurve, runCommand, saveCommand, savePerformanceData
protected double Target
protected double Tolerance
protected double MaxWindowSize
protected int MaxCandidates
public void setOptions(java.util.List<java.lang.Object> OptionsObj) throws java.lang.Exception
Options
setOptions
in interface Options
setOptions
in class BaseStatistics
OptionsObj
- Array of options as Objects - can be null
java.lang.Exception
- if problem with inputspublic java.lang.String printUsage()
Options
printUsage
in interface Options
printUsage
in class BaseStatistics
public void setNSteps(int NSteps)
NSteps
- Number of step increments (default: 20)public void setTarget(double Target)
Target
- Desired target valuepublic void setTolerance(double Tolerance)
Tolerance
- Desired tolerancepublic void setMaxCandidates(int MaxCandidates)
MaxCandidates
- Desired maximum number of candidatespublic void setMaxWindowSize(double MaxWindowSize)
MaxWindowSize
- Desired maximum window sizeprotected void evaluate_protected(Dataset Results)
BaseStatistics
evaluate_protected
in class RegressionStatistics
Results
- Dataset to be evaluatedprotected void runCandidateAnalysis(double[] measured, double[] predicted)
measured
- Measured distance of class variable from targetpredicted
- Predicted distance of class variable from targetprotected void runWindowAnalysis(double[] measured, double[] predicted)
measured
- Measured distance of class variable from targetpredicted
- Predicted distance of class variable from targetpublic java.lang.String printCandidateAnalysis()
public java.lang.String printWindowAnalysis()
public java.lang.String printCommand(java.util.List<java.lang.String> Command) throws java.lang.Exception
Printable
printCommand
in interface Printable
printCommand
in class BaseStatistics
Command
- Command specifying what to printjava.lang.Exception
- If command not understood