Class ClassSpecificClusterer

java.lang.Object
weka.clusterers.AbstractClusterer
weka.clusterers.SingleClustererEnhancer
weka.clusterers.ClassSpecificClusterer
All Implemented Interfaces:
Serializable, Cloneable, weka.clusterers.Clusterer, weka.core.CapabilitiesHandler, weka.core.CapabilitiesIgnorer, weka.core.CommandlineRunnable, weka.core.OptionHandler, weka.core.RevisionHandler, weka.tools.GlobalInfoHandler
Direct Known Subclasses:
ClassSpecificClustererClassCombined

public class ClassSpecificClusterer extends weka.clusterers.SingleClustererEnhancer implements weka.tools.GlobalInfoHandler
A class for clusterers that make separate clustering for each available class
Since:
0.0.1
Version:
0.0.1
Author:
pawel trajdos
See Also:
  • Constructor Details

    • ClassSpecificClusterer

      public ClassSpecificClusterer()
  • Method Details

    • buildClusterer

      public void buildClusterer(weka.core.Instances data) throws Exception
      Specified by:
      buildClusterer in interface weka.clusterers.Clusterer
      Specified by:
      buildClusterer in class weka.clusterers.AbstractClusterer
      Throws:
      Exception
    • distributionForInstance

      public double[] distributionForInstance(weka.core.Instance instance) throws Exception
      Specified by:
      distributionForInstance in interface weka.clusterers.Clusterer
      Overrides:
      distributionForInstance in class weka.clusterers.AbstractClusterer
      Throws:
      Exception
    • numberOfClusters

      public int numberOfClusters() throws Exception
      Specified by:
      numberOfClusters in interface weka.clusterers.Clusterer
      Overrides:
      numberOfClusters in class weka.clusterers.SingleClustererEnhancer
      Throws:
      Exception
    • numberOfClasses

      public int numberOfClasses() throws Exception
      Returns the number of classes
      Returns:
      0 if no classes during training or value greater or equal one.
      Throws:
      Exception
    • classSpecificDistributionForInstance

      public double[][] classSpecificDistributionForInstance(weka.core.Instance instance) throws Exception
      Returns class-specific cluster responses
      Parameters:
      instance -
      Returns:
      array of class-specific cluster responses
      Throws:
      Exception
    • classSpecificDistrbutionForInstances

      public double[][][] classSpecificDistrbutionForInstances(weka.core.Instances instances) throws Exception
      Throws:
      Exception
    • globalInfo

      public String globalInfo()
      Specified by:
      globalInfo in interface weka.tools.GlobalInfoHandler
    • getCapabilities

      public weka.core.Capabilities getCapabilities()
      Specified by:
      getCapabilities in interface weka.core.CapabilitiesHandler
      Specified by:
      getCapabilities in interface weka.clusterers.Clusterer
      Overrides:
      getCapabilities in class weka.clusterers.SingleClustererEnhancer