weka.core.Capabilities.Capability Java Examples

The following examples show how to use weka.core.Capabilities.Capability. 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: MINND.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.RELATIONAL_ATTRIBUTES);
  result.enable(Capability.MISSING_VALUES);

  // class
  result.enable(Capability.NOMINAL_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);
  
  // other
  result.enable(Capability.ONLY_MULTIINSTANCE);
  
  return result;
}
 
Example #2
Source File: SMOreg.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 = getKernel().getCapabilities();
  result.setOwner(this);

  // attribute
  result.enableAllAttributeDependencies();
  // with NominalToBinary we can also handle nominal attributes, but only
  // if the kernel can handle numeric attributes
  if (result.handles(Capability.NUMERIC_ATTRIBUTES))
    result.enable(Capability.NOMINAL_ATTRIBUTES);
  result.enable(Capability.MISSING_VALUES);
  
  // class
  result.disableAllClasses();
  result.disableAllClassDependencies();
  result.enable(Capability.NUMERIC_CLASS);
  result.enable(Capability.DATE_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);
  
  return result;
}
 
Example #3
Source File: CitationKNN.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.RELATIONAL_ATTRIBUTES);
  result.enable(Capability.MISSING_VALUES);

  // class
  result.enable(Capability.NOMINAL_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);
  
  // other
  result.enable(Capability.ONLY_MULTIINSTANCE);
  
  return result;
}
 
Example #4
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 #5
Source File: NominalToString.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/** 
 * Returns the Capabilities of this filter.
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enableAllAttributes();
  result.enable(Capability.MISSING_VALUES);
  
  // class
  result.enableAllClasses();
  result.enable(Capability.MISSING_CLASS_VALUES);
  result.enable(Capability.NO_CLASS);
  
  return result;
}
 
Example #6
Source File: LinearRegression.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.NUMERIC_CLASS);
  result.enable(Capability.DATE_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);
  
  return result;
}
 
Example #7
Source File: SimpleCollective.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 = new Capabilities(this);

  // 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.BINARY_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);
  
  return result;
}
 
Example #8
Source File: MIEMDD.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns the capabilities of this multi-instance classifier for the
 * relational data.
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getMultiInstanceCapabilities() {
  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.disableAllClasses();
  result.enable(Capability.NO_CLASS);
  
  return result;
}
 
Example #9
Source File: C45PruneableClassifierTreeG.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.MISSING_VALUES);

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

  // instances
  result.setMinimumNumberInstances(0);

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

  // attributes
  result.enableAllAttributes();
  result.enable(Capability.MISSING_VALUES);
  
  // class
  result.enableAllClasses();
  result.enable(Capability.MISSING_CLASS_VALUES);
  result.enable(Capability.NO_CLASS);
  
  return result;
}
 
Example #11
Source File: LLGC.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 = new Capabilities(this);

  // 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);
  
  return result;
}
 
Example #12
Source File: C45PruneableClassifierTree.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 #13
Source File: MergeTwoValues.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/** 
 * Returns the Capabilities of this filter.
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enableAllAttributes();
  result.enable(Capability.MISSING_VALUES);
  
  // class
  result.enableAllClasses();
  result.enable(Capability.MISSING_CLASS_VALUES);
  result.enable(Capability.NO_CLASS);
  
  return result;
}
 
Example #14
Source File: NonSparseToSparse.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/** 
 * Returns the Capabilities of this filter.
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enableAllAttributes();
  result.enable(Capability.MISSING_VALUES);
  
  // class
  result.enableAllClasses();
  result.enable(Capability.MISSING_CLASS_VALUES);
  result.enable(Capability.NO_CLASS);
  
  return result;
}
 
Example #15
Source File: DecisionStump.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);
  
  return result;
}
 
Example #16
Source File: AddNoise.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/** 
 * Returns the Capabilities of this filter.
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enableAllAttributes();
  result.enable(Capability.MISSING_VALUES);
  
  // class
  result.enableAllClasses();
  result.enable(Capability.MISSING_CLASS_VALUES);
  result.enable(Capability.NO_CLASS);
  
  return result;
}
 
Example #17
Source File: Copy.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/** 
 * Returns the Capabilities of this filter.
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enableAllAttributes();
  result.enable(Capability.MISSING_VALUES);
  
  // class
  result.enableAllClasses();
  result.enable(Capability.MISSING_CLASS_VALUES);
  result.enable(Capability.NO_CLASS);
  
  return result;
}
 
Example #18
Source File: ChangeDateFormat.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/** 
 * Returns the Capabilities of this filter.
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

  // attributes
  result.enableAllAttributes();
  result.enable(Capability.MISSING_VALUES);
  
  // class
  result.enableAllClasses();
  result.enable(Capability.MISSING_CLASS_VALUES);
  result.enable(Capability.NO_CLASS);
  
  return result;
}
 
Example #19
Source File: AttributeSelection.java    From tsml with GNU General Public License v3.0 6 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 (m_ASEvaluator == null) {
    result = super.getCapabilities();
    result.disableAll();
  } else {
    result = m_ASEvaluator.getCapabilities();
    // class index will be set if necessary, so we always allow the dataset
    // to have no class attribute set. see the following method:
    //   weka.attributeSelection.AttributeSelection.SelectAttributes(Instances)
    result.enable(Capability.NO_CLASS);
  }
  
  result.setMinimumNumberInstances(0);
  
  return result;
}
 
Example #20
Source File: MIWrapper.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();

  // class
  result.disableAllClasses();
  result.disableAllClassDependencies();
  if (super.getCapabilities().handles(Capability.NOMINAL_CLASS))
    result.enable(Capability.NOMINAL_CLASS);
  if (super.getCapabilities().handles(Capability.BINARY_CLASS))
    result.enable(Capability.BINARY_CLASS);
  result.enable(Capability.RELATIONAL_ATTRIBUTES);
  result.enable(Capability.MISSING_CLASS_VALUES);
  
  // other
  result.enable(Capability.ONLY_MULTIINSTANCE);
  
  return result;
}
 
Example #21
Source File: KernelEstimator.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
 */
@Override
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();
  // class
  if (!m_noClass) {
    result.enable(Capability.NOMINAL_CLASS);
    result.enable(Capability.MISSING_CLASS_VALUES);
  } else {
    result.enable(Capability.NO_CLASS);
  }

  // attributes
  result.enable(Capability.NUMERIC_ATTRIBUTES);
  return result;
}
 
Example #22
Source File: MDD.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Returns the capabilities of this multi-instance classifier for the
 * relational data.
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getMultiInstanceCapabilities() {
  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.disableAllClasses();
  result.enable(Capability.NO_CLASS);
  
  return result;
}
 
Example #23
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 #24
Source File: HoeffdingTree.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
 */
@Override
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  result.disableAll();

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

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

  result.setMinimumNumberInstances(0);

  return result;
}
 
Example #25
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 #26
Source File: MakeDecList.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 = new Capabilities(this);
  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);
  
  return result;
}
 
Example #27
Source File: C45Saver.java    From tsml with GNU General Public License v3.0 6 votes vote down vote up
/** 
 * Returns the Capabilities of this saver.
 *
 * @return            the capabilities of this object
 * @see               Capabilities
 */
public Capabilities getCapabilities() {
  Capabilities result = super.getCapabilities();
  
  // 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);
  
  return result;
}
 
Example #28
Source File: CollectiveIBk.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 = new Capabilities(this);

  // 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.BINARY_CLASS);
  
  return result;
}
 
Example #29
Source File: SimpleLinearRegression.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.NUMERIC_ATTRIBUTES);
  result.enable(Capability.DATE_ATTRIBUTES);

  // class
  result.enable(Capability.NUMERIC_CLASS);
  result.enable(Capability.DATE_CLASS);
  result.enable(Capability.MISSING_CLASS_VALUES);
  
  return result;
}
 
Example #30
Source File: GainRatioAttributeEval.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
 */
@Override
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);

  return result;
}