Java Code Examples for weka.core.Capabilities#setMinimumNumberInstances()

The following examples show how to use weka.core.Capabilities#setMinimumNumberInstances() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JRip.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns default capabilities of the classifier.
 *
 * @return      the capabilities of this classifier
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enable(Capability.NOMINAL_ATTRIBUTES);
  result.enable(Capability.NUMERIC_ATTRIBUTES);
  result.enable(Capability.DATE_ATTRIBUTES);
  result.enable(Capability.MISSING_VALUES);

  // class
  result.enable(Capability.NOMINAL_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);
 
  // instances
  result.setMinimumNumberInstances(m_Folds);
  
  return result;
}
 
Example 2
Source File: NaiveBayes.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns default capabilities of the classifier.
 *
 * @return      the capabilities of this classifier
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enable(Capability.NOMINAL_ATTRIBUTES);
  result.enable(Capability.NUMERIC_ATTRIBUTES);
  result.enable(Capability.MISSING_VALUES);

  // class
  result.enable(Capability.NOMINAL_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);

  // instances
  result.setMinimumNumberInstances(0);

  return result;
}
 
Example 3
Source File: KStar.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns default capabilities of the classifier.
 *
 * @return      the capabilities of this classifier
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enable(Capability.NOMINAL_ATTRIBUTES);
  result.enable(Capability.NUMERIC_ATTRIBUTES);
  result.enable(Capability.DATE_ATTRIBUTES);
  result.enable(Capability.MISSING_VALUES);

  // class
  result.enable(Capability.NOMINAL_CLASS);
  result.enable(Capability.NUMERIC_CLASS);
  result.enable(Capability.DATE_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);

  // instances
  result.setMinimumNumberInstances(0);
  
  return result;
}
 
Example 4
Source File: Dl4jStringToWordEmbeddings.java    From wekaDeeplearning4j with GNU General Public License v3.0 6 votes vote down vote up
@Override
public Capabilities getCapabilities() {

  Capabilities result = new Capabilities(this);
  result.disableAll();

  // attributes
  result.enableAllAttributes();
  result.enable(Capability.MISSING_VALUES);

  // class
  result.enableAllClasses();
  result.enable(Capability.MISSING_CLASS_VALUES);
  result.enable(Capability.NO_CLASS);

  result.setMinimumNumberInstances(0);

  return result;
}
 
Example 5
Source File: SPegasos.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns default capabilities of the classifier.
 *
 * @return      the capabilities of this classifier
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();
  
  //attributes
  result.enable(Capability.NOMINAL_ATTRIBUTES);
  result.enable(Capability.NUMERIC_ATTRIBUTES);
  result.enable(Capability.MISSING_VALUES);
  
  // class
  result.enable(Capability.BINARY_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);
  
  // instances
  result.setMinimumNumberInstances(0);
  
  return result;
}
 
Example 6
Source File: AODE.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns default capabilities of the classifier.
 *
 * @return      the capabilities of this classifier
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enable(Capability.NOMINAL_ATTRIBUTES);
  result.enable(Capability.MISSING_VALUES);

  // class
  result.enable(Capability.NOMINAL_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);

  // instances
  result.setMinimumNumberInstances(0);
  
  return result;
}
 
Example 7
Source File: Dl4jStringToWordEmbeddings.java    From wekaDeeplearning4j with GNU General Public License v3.0 6 votes vote down vote up
@Override
public Capabilities getCapabilities() {

  Capabilities result = new Capabilities(this);
  result.disableAll();

  // attributes
  result.enableAllAttributes();
  result.enable(Capability.MISSING_VALUES);

  // class
  result.enableAllClasses();
  result.enable(Capability.MISSING_CLASS_VALUES);
  result.enable(Capability.NO_CLASS);

  result.setMinimumNumberInstances(0);

  return result;
}
 
Example 8
Source File: Winnow.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns default capabilities of the classifier.
 *
 * @return      the capabilities of this classifier
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enable(Capability.NOMINAL_ATTRIBUTES);
  result.enable(Capability.MISSING_VALUES);

  // class
  result.enable(Capability.BINARY_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);

  // instances
  result.setMinimumNumberInstances(0);
  
  return result;
}
 
Example 9
Source File: NBTreeClassifierTree.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns default capabilities of the classifier tree.
 *
 * @return      the capabilities of this classifier tree
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enable(Capability.NOMINAL_ATTRIBUTES);
  result.enable(Capability.NUMERIC_ATTRIBUTES);
  result.enable(Capability.DATE_ATTRIBUTES);
  result.enable(Capability.MISSING_VALUES);

  // class
  result.enable(Capability.NOMINAL_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);

  // instances
  result.setMinimumNumberInstances(0);
  
  return result;
}
 
Example 10
Source File: AODEsr.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
* Returns default capabilities of the classifier.
*
* @return      the capabilities of this classifier
*/
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enable(Capability.NOMINAL_ATTRIBUTES);
  result.enable(Capability.MISSING_VALUES);

  // class
  result.enable(Capability.NOMINAL_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);

  // instances
  result.setMinimumNumberInstances(0);

  return result;
}
 
Example 11
Source File: NNge.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns default capabilities of the classifier.
 *
 * @return      the capabilities of this classifier
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enable(Capability.NOMINAL_ATTRIBUTES);
  result.enable(Capability.NUMERIC_ATTRIBUTES);
  result.enable(Capability.DATE_ATTRIBUTES);
  result.enable(Capability.MISSING_VALUES);

  // class
  result.enable(Capability.NOMINAL_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);

  // instances
  result.setMinimumNumberInstances(0);
  
  return result;
}
 
Example 12
Source File: MOA.java    From moa with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns the Capabilities of this classifier. Maximally permissive
 * capabilities are allowed by default. MOA doesn't specify what
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getCapabilities() {
  Capabilities result = new Capabilities(this);

  // attributes
  result.enable(Capability.NOMINAL_ATTRIBUTES);
  result.enable(Capability.NUMERIC_ATTRIBUTES);
  result.enable(Capability.MISSING_VALUES);

  // class
  result.enable(Capability.NOMINAL_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);

  result.setMinimumNumberInstances(0);

  return result;
}
 
Example 13
Source File: RegressionByDiscretization.java    From tsml with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Returns default capabilities of the classifier.
 *
 * @return      the capabilities of this classifier
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();

  // class
  result.disableAllClasses();
  result.disableAllClassDependencies();
  result.enable(Capability.NUMERIC_CLASS);
  result.enable(Capability.DATE_CLASS);
  
  result.setMinimumNumberInstances(2);
  
  return result;
}
 
Example 14
Source File: RacedIncrementalLogitBoost.java    From tsml with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Returns default capabilities of the classifier.
 *
 * @return      the capabilities of this classifier
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();

  // class
  result.disableAllClasses();
  result.disableAllClassDependencies();
  result.enable(Capability.NOMINAL_CLASS);

  // instances
  result.setMinimumNumberInstances(0);
  
  return result;
}
 
Example 15
Source File: AddCluster.java    From tsml with GNU General Public License v3.0 5 votes vote down vote up
/** 
 * Returns the Capabilities of this filter.
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getCapabilities() {
  Capabilities result = m_Clusterer.getCapabilities();
  
  result.setMinimumNumberInstances(0);
  
  return result;
}
 
Example 16
Source File: PLSClassifier.java    From tsml with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Returns default capabilities of the classifier.
 *
 * @return		the capabilities of this classifier
 */
public Capabilities getCapabilities() {
  Capabilities result = getFilter().getCapabilities();

  // class
  result.enable(Capability.MISSING_CLASS_VALUES);

  // other
  result.setMinimumNumberInstances(1);
  
  return result;
}
 
Example 17
Source File: WrapperSubsetEval.java    From tsml with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Returns the capabilities of this evaluator.
 *
 * @return            the capabilities of this evaluator
 * @see               Capabilities
 */
public Capabilities getCapabilities() {
  Capabilities	result;
  
  if (getClassifier() == null) {
    result = super.getCapabilities();
    result.disableAll();
  } else {
    result = getClassifier().getCapabilities();
  }
  
  // set dependencies
  for (Capability cap: Capability.values())
    result.enableDependency(cap);
  
  // adjustment for class based on selected evaluation metric
  result.disable(Capability.NUMERIC_CLASS);
  result.disable(Capability.DATE_CLASS);
  if (m_evaluationMeasure != EVAL_ACCURACY && m_evaluationMeasure != EVAL_FMEASURE &&
      m_evaluationMeasure != EVAL_AUC && m_evaluationMeasure != EVAL_AUPRC) {
    result.enable(Capability.NUMERIC_CLASS);
    result.enable(Capability.DATE_CLASS);
  }
  
  result.setMinimumNumberInstances(getFolds());
  
  return result;
}
 
Example 18
Source File: RemoveMisclassified.java    From tsml with GNU General Public License v3.0 5 votes vote down vote up
/** 
 * Returns the Capabilities of this filter.
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getCapabilities() {
  Capabilities 	result;
  
  if (getClassifier() == null) {
    result = super.getCapabilities();
    result.disableAll();
  } else {
    result = getClassifier().getCapabilities();
  }
  
  result.setMinimumNumberInstances(0);
  
  return result;
}
 
Example 19
Source File: AbstractSaver.java    From tsml with GNU General Public License v3.0 5 votes vote down vote up
/** 
 * Returns the Capabilities of this saver. Derived savers have to
 * override this method to enable capabilities.
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getCapabilities() {
  Capabilities result = new Capabilities(this);
  
  result.setMinimumNumberInstances(0);
  
  return result;
}
 
Example 20
Source File: PartitionMembership.java    From tsml with GNU General Public License v3.0 3 votes vote down vote up
/** 
 * Returns the Capabilities of this filter.
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getCapabilities() {
  
  Capabilities result = m_partitionGenerator.getCapabilities();
  
  result.setMinimumNumberInstances(0);
  
  return result;
}