Java Code Examples for weka.core.Capabilities.Capability#values()

The following examples show how to use weka.core.Capabilities.Capability#values() . 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: FilteredClusterer.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns default capabilities of the clusterer.
 *
 * @return		the capabilities of this clusterer
 */
public Capabilities getCapabilities() {
  Capabilities	result;
  
  if (getFilter() == null) {
    result = super.getCapabilities();
    result.disableAll();
    result.enable(Capability.NO_CLASS);
  } else {
    result = getFilter().getCapabilities();
  }
  
  // set dependencies
  for (Capability cap: Capability.values())
    result.enableDependency(cap);
  
  return result;
}
 
Example 2
Source File: FilteredAssociator.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns default capabilities of the associator.
 *
 * @return      the capabilities of this associator
 */
public Capabilities getCapabilities() {
  Capabilities	result;
  
  if (getFilter() == null) {
    result = super.getCapabilities();
    result.disableAll();
  } else {
    result = getFilter().getCapabilities();
  }
  
  result.enable(Capability.NO_CLASS);
  
  // set dependencies
  for (Capability cap: Capability.values())
    result.enableDependency(cap);
  
  return result;
}
 
Example 3
Source File: FilteredAttributeEval.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns default capabilities of the evaluator.
 *
 * @return      the capabilities of this evaluator.
 */
public Capabilities getCapabilities() {
  Capabilities result;

  if (getFilter() == null) {
    result = super.getCapabilities();
    result.disableAll();
  } else {
    result = getFilter().getCapabilities();
  }
  
  // set dependencies
  for (Capability cap: Capability.values()) {
    result.enableDependency(cap);
  }
  
  return result;
}
 
Example 4
Source File: ClassifierSubsetEval.java    From tsml with GNU General Public License v3.0 6 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);
  
  return result;
}
 
Example 5
Source File: FilteredSubsetEval.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns default capabilities of the evaluator.
 *
 * @return      the capabilities of this evaluator.
 */
public Capabilities getCapabilities() {
  Capabilities result;

  if (getFilter() == null) {
    result = super.getCapabilities();
    result.disableAll();
  } else {
    result = getFilter().getCapabilities();
  }
  
  // set dependencies
  for (Capability cap: Capability.values()) {
    result.enableDependency(cap);
  } 
  
  return result; 
}
 
Example 6
Source File: FilteredClassifier.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;
  
  if (getFilter() == null)
    result = super.getCapabilities();
  else
    result = getFilter().getCapabilities();
  
  // the filtered classifier always needs a class
  result.disable(Capability.NO_CLASS);
  
  // set dependencies
  for (Capability cap: Capability.values())
    result.enableDependency(cap);
  
  return result;
}
 
Example 7
Source File: LWL.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;
  
  if (m_Classifier != null) {
    result = m_Classifier.getCapabilities();
  } else {
    result = super.getCapabilities();
  }
  
  result.setMinimumNumberInstances(0);
  
  // set dependencies
  for (Capability cap: Capability.values())
    result.enableDependency(cap);
  
  return result;
}
 
Example 8
Source File: FilteredCollectiveClassifier.java    From collective-classification-weka-package 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
 */
@Override
public Capabilities getCapabilities() {
  Capabilities	result;
  
  if (getFilter() == null)
    result = super.getCapabilities();
  else
    result = getFilter().getCapabilities();
  
  // set dependencies
  for (Capability cap: Capability.values())
    result.enableDependency(cap);
  
  return result;
}
 
Example 9
Source File: SingleClustererEnhancer.java    From tsml with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Returns default capabilities of the clusterer.
 *
 * @return		the capabilities of this clusterer
 */
public Capabilities getCapabilities() {
  Capabilities	result;
  
  if (getClusterer() == null)
    result = super.getCapabilities();
  else
    result = getClusterer().getCapabilities();
  
  // set dependencies
  for (Capability cap: Capability.values())
    result.enableDependency(cap);
  
  return result;
}
 
Example 10
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 11
Source File: AttributeSelectedClassifier.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;
  
  if (getEvaluator() == null)
    result = super.getCapabilities();
  else
    result = getEvaluator().getCapabilities();
  
  // set dependencies
  for (Capability cap: Capability.values())
    result.enableDependency(cap);
  
  return result;
}