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 adams.data.spreadsheet.SpreadSheet
toSpreadSheet(adams.core.logging.LoggingSupporter logger, adams.core.MessageCollection errors, ResultItem item, boolean addAdditionalAttributes, boolean showError)
Turns the result item into a spreadsheet with the predictions.static adams.data.spreadsheet.SpreadSheet
toSpreadSheet(adams.core.logging.LoggingSupporter logger, adams.core.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 adams.data.spreadsheet.SpreadSheet
toSpreadSheet(adams.core.logging.LoggingSupporter logger, adams.core.MessageCollection errors, weka.classifiers.Evaluation eval, int[] originalIndices, adams.data.spreadsheet.SpreadSheet additionalAttributes, boolean showError)
Turns the result item into a spreadsheet with the predictions.static adams.data.spreadsheet.SpreadSheet
toSpreadSheet(adams.core.logging.LoggingSupporter logger, adams.core.MessageCollection errors, weka.classifiers.Evaluation eval, int[] originalIndices, adams.data.spreadsheet.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 adams.data.spreadsheet.SpreadSheet toSpreadSheet(adams.core.logging.LoggingSupporter logger, adams.core.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 adams.data.spreadsheet.SpreadSheet toSpreadSheet(adams.core.logging.LoggingSupporter logger, adams.core.MessageCollection errors, weka.classifiers.Evaluation eval, int[] originalIndices, adams.data.spreadsheet.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 adams.data.spreadsheet.SpreadSheet toSpreadSheet(adams.core.logging.LoggingSupporter logger, adams.core.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 adams.data.spreadsheet.SpreadSheet toSpreadSheet(adams.core.logging.LoggingSupporter logger, adams.core.MessageCollection errors, weka.classifiers.Evaluation eval, int[] originalIndices, adams.data.spreadsheet.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
-
-