Class AbstractDataPreparation
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- weka.classifiers.meta.socketfacade.AbstractDataPreparation
-
- All Implemented Interfaces:
Destroyable,GlobalInfoSupporter,LoggingLevelHandler,LoggingSupporter,OptionHandler,SizeOfHandler,Serializable
- Direct Known Subclasses:
Simple
public abstract class AbstractDataPreparation extends AbstractOptionHandler
Ancestor for classes that prepare data for theSocketFacadeclassifier.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class adams.core.option.AbstractOptionHandler
m_OptionManager
-
Fields inherited from class adams.core.logging.LoggingObject
m_Logger, m_LoggingIsEnabled, m_LoggingLevel
-
-
Constructor Summary
Constructors Constructor Description AbstractDataPreparation()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract doubleparseClassify(byte[] data)Parses the data received from the process, to be returned by theClassifier.classifyInstance(Instance)method.abstract double[]parseDistribution(byte[] data, int numClasses)Parses the data received from the process, to be returned by theClassifier.distributionForInstance(Instance)method.abstract StringparseTrain(byte[] data)Parses the data received from the process from the training process.abstract byte[]prepareClassify(weka.core.Instance inst, SocketFacade facade)Prepares the instance for theClassifier.classifyInstance(Instance)method.abstract byte[]prepareDistribution(weka.core.Instance inst, SocketFacade facade)Prepares the instance for theClassifier.distributionForInstance(Instance)method.abstract byte[]prepareTrain(weka.core.Instances data, SocketFacade facade)Prepares the data for training.-
Methods inherited from class adams.core.option.AbstractOptionHandler
cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, globalInfo, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
-
Methods inherited from class adams.core.logging.LoggingObject
configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface adams.core.logging.LoggingLevelHandler
getLoggingLevel
-
-
-
-
Method Detail
-
prepareTrain
public abstract byte[] prepareTrain(weka.core.Instances data, SocketFacade facade)Prepares the data for training.- Parameters:
data- the data to usefacade- the classifier using the data preparation- Returns:
- the prepared data
-
prepareClassify
public abstract byte[] prepareClassify(weka.core.Instance inst, SocketFacade facade)Prepares the instance for theClassifier.classifyInstance(Instance)method.- Parameters:
inst- the data to usefacade- the classifier using the data preparation- Returns:
- the prepared data
-
prepareDistribution
public abstract byte[] prepareDistribution(weka.core.Instance inst, SocketFacade facade)Prepares the instance for theClassifier.distributionForInstance(Instance)method.- Parameters:
inst- the data to usefacade- the classifier using the data preparation- Returns:
- the prepared data
-
parseTrain
public abstract String parseTrain(byte[] data)
Parses the data received from the process from the training process.- Parameters:
data- the data to parse- Returns:
- null if successful, otherwise error message
-
parseClassify
public abstract double parseClassify(byte[] data)
Parses the data received from the process, to be returned by theClassifier.classifyInstance(Instance)method.- Parameters:
data- the data to parse- Returns:
- the classification
-
parseDistribution
public abstract double[] parseDistribution(byte[] data, int numClasses)Parses the data received from the process, to be returned by theClassifier.distributionForInstance(Instance)method.- Parameters:
data- the data to parsenumClasses- the number of classes- Returns:
- the class distribution
-
-