Class PredictionHelper
- java.lang.Object
-
- adams.gui.tools.wekainvestigator.tab.classifytab.PredictionHelper
-
public class PredictionHelper extends Object
Helper class for dealing with predictions from result items.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description PredictionHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SpreadSheet
toSpreadSheet(LoggingSupporter logger, MessageCollection errors, ResultItem item, boolean addAdditionalAttributes, boolean showError)
Turns the result item into a spreadsheet with the predictions.static SpreadSheet
toSpreadSheet(LoggingSupporter logger, MessageCollection errors, ResultItem item, boolean addAdditionalAttributes, boolean addLabelIndex, boolean showDistribution, boolean showProbability, boolean showError, boolean showWeight)
Turns the result item into a spreadsheet with the predictions.static SpreadSheet
toSpreadSheet(LoggingSupporter logger, MessageCollection errors, weka.classifiers.Evaluation eval, int[] originalIndices, SpreadSheet additionalAttributes, boolean showError)
Turns the result item into a spreadsheet with the predictions.static SpreadSheet
toSpreadSheet(LoggingSupporter logger, MessageCollection errors, weka.classifiers.Evaluation eval, int[] originalIndices, SpreadSheet additionalAttributes, boolean addLabelIndex, boolean showDistribution, boolean showProbability, boolean showError, boolean showWeight)
Turns the result item into a spreadsheet with the predictions.
-
-
-
Method Detail
-
toSpreadSheet
public static SpreadSheet toSpreadSheet(LoggingSupporter logger, MessageCollection errors, ResultItem item, boolean addAdditionalAttributes, boolean showError)
Turns the result item into a spreadsheet with the predictions.- Parameters:
logger
- the object used for logging, can be nullerrors
- for collecting errorsitem
- the result item to useaddAdditionalAttributes
- whether to add additional attributesshowError
- whether to add the error in a separate column- Returns:
- the generated spreadsheet
-
toSpreadSheet
public static SpreadSheet toSpreadSheet(LoggingSupporter logger, MessageCollection errors, weka.classifiers.Evaluation eval, int[] originalIndices, SpreadSheet additionalAttributes, boolean showError)
Turns the result item into a spreadsheet with the predictions.- Parameters:
logger
- the object used for logging, can be nullerrors
- for collecting errorseval
- the evaluation to useoriginalIndices
- the original indices to use, can be nulladditionalAttributes
- the additional attributes to add, can be nullshowError
- whether to add the error in a separate column- Returns:
- the generated spreadsheet
-
toSpreadSheet
public static SpreadSheet toSpreadSheet(LoggingSupporter logger, MessageCollection errors, ResultItem item, boolean addAdditionalAttributes, boolean addLabelIndex, boolean showDistribution, boolean showProbability, boolean showError, boolean showWeight)
Turns the result item into a spreadsheet with the predictions.- Parameters:
logger
- the object used for logging, can be nullerrors
- for collecting errorsitem
- the result item to useaddAdditionalAttributes
- whether to add additional attributesaddLabelIndex
- whether to add the label index in a separate columnshowDistribution
- whether to add the distribution in a separate columnshowProbability
- whether to add the probability in a separate columnshowError
- whether to add the error in a separate columnshowWeight
- whether to add the weight in a separate column- Returns:
- the generated spreadsheet, null if failed
-
toSpreadSheet
public static SpreadSheet toSpreadSheet(LoggingSupporter logger, MessageCollection errors, weka.classifiers.Evaluation eval, int[] originalIndices, SpreadSheet additionalAttributes, boolean addLabelIndex, boolean showDistribution, boolean showProbability, boolean showError, boolean showWeight)
Turns the result item into a spreadsheet with the predictions.- Parameters:
logger
- the object used for logging, can be nullerrors
- for collecting errorseval
- the evaluation to useoriginalIndices
- the original indices to use, can be nulladditionalAttributes
- the additional attributes to use, can be nulladdLabelIndex
- whether to add the label index in a separate columnshowDistribution
- whether to add the distribution in a separate columnshowProbability
- whether to add the probability in a separate columnshowError
- whether to add the error in a separate columnshowWeight
- whether to add the weight in a separate column- Returns:
- the generated spreadsheet, null if failed
-
-