Class AbstractDataPreparation

    • Constructor Detail

      • AbstractDataPreparation

        public AbstractDataPreparation()
    • Method Detail

      • prepareTrain

        public abstract byte[] prepareTrain​(weka.core.Instances data,
                                            SocketFacade facade)
        Prepares the data for training.
        Parameters:
        data - the data to use
        facade - 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 the Classifier.classifyInstance(Instance) method.
        Parameters:
        inst - the data to use
        facade - 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 the Classifier.distributionForInstance(Instance) method.
        Parameters:
        inst - the data to use
        facade - 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 the Classifier.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 the Classifier.distributionForInstance(Instance) method.
        Parameters:
        data - the data to parse
        numClasses - the number of classes
        Returns:
        the class distribution