Interface Classifier<O>

  • Type Parameters:
    O - the type of objects handled by this algorithm
    All Superinterfaces:
    Algorithm
    All Known Implementing Classes:
    AbstractClassifier, KNNClassifier, PriorProbabilityClassifier

    public interface Classifier<O>
    extends Algorithm
    A Classifier is to hold a model that is built based on a database, and to classify a new instance of the same type.
    Since:
    0.7.0
    Author:
    Arthur Zimek
    • Method Detail

      • buildClassifier

        void buildClassifier​(Database database,
                             Relation<? extends ClassLabel> classLabels)
        Performs the training. Sets available labels.
        Parameters:
        database - the database to build the model on
        classLabels - the classes to be learned
      • classify

        ClassLabel classify​(O instance)
        Classify a single instance.
        Parameters:
        instance - an instance to classify
        Returns:
        predicted class label of the given instance
      • model

        java.lang.String model()
        Produce a String representation of the classification model.
        Returns:
        a String representation of the classification model