Tabnine Logo
weka.attributeSelection
Code IndexAdd Tabnine to your IDE (free)

How to use weka.attributeSelection

Best Java code snippets using weka.attributeSelection (Showing top 20 results out of 315)

origin: stackoverflow.com

 Ranker ranker = new Ranker();
InfoGainAttributeEval ig = new InfoGainAttributeEval();
Instances instances = SamplesManager.asWekaInstances(trainSet);
ig.buildEvaluator(instances);
firstAttributes = ranker.search(ig,instances);
candidates = Arrays.copyOfRange(firstAttributes, 0, FIRST_SIZE_REDUCTION);
instances = reduceDimenstions(instances, candidates)
PrincipalComponents pca = new PrincipalComponents();
pca.setVarianceCovered(var);
ranker = new Ranker();
ranker.setNumToSelect(numFeatures);
selection = new AttributeSelection();
selection.setEvaluator(pca);
selection.setSearch(ranker);
selection.SelectAttributes(instances );
instances = selection.reduceDimensionality(wekaInstances);
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * set the search method
 * 
 * @param search the search method to use
 */
public void setSearch(ASSearch search) {
 m_searchMethod = search;
 if (m_searchMethod instanceof RankedOutputSearch) {
  setRanking(((RankedOutputSearch) m_searchMethod).getGenerateRanking());
 }
}
origin: nz.ac.waikato.cms.weka/weka-stable

 /**
  * Main method for executing this class.
  * 
  * @param args the options
  */
 public static void main(String[] args) {
  runEvaluator(new ClassifierAttributeEval(), args);
 }
}
origin: Waikato/weka-trunk

/**
 * set options to their default values
 */
protected void resetOptions() {
 m_trainSelector = new weka.attributeSelection.AttributeSelection();
 setEvaluator(new CfsSubsetEval());
 setSearch(new BestFirst());
 m_SelectedAttributes = null;
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * configures the CheckAttributeSelection instance used throughout the tests
 * 
 * @return    the fully configured CheckAttributeSelection instance used for testing
 */
protected CheckAttributeSelection getTester() {
 CheckAttributeSelection    result;
 
 result = super.getTester();
 result.setTestEvaluator(false);
 
 return result;
}

origin: Waikato/weka-trunk

/**
 * tests whether the scheme declares a serialVersionUID.
 */
public void testSerialVersionUID() {
 boolean[]     result;
 result = m_Tester.declaresSerialVersionUID();
 if (!result[0])
  fail("Doesn't declare serialVersionUID!");
}
origin: Waikato/weka-trunk

/**
 * Return the number of attributes selected from the most recent run of
 * attribute selection
 * 
 * @return the number of attributes selected
 */
public int numberAttributesSelected() throws Exception {
 int[] att = selectedAttributes();
 return att.length - 1;
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Set the value of the threshold for repeating cross validation
 * 
 * @param t the value of the threshold
 */
public void setThreshold(double t) {
 m_wrapperTemplate.setThreshold(t);
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Set the class value (label or index) to use with IR metric evaluation of
 * subsets. Leaving this unset will result in the class weighted average for
 * the IR metric being used.
 * 
 * @param val the class label or 1-based index of the class label to use when
 *          evaluating subsets with an IR metric
 */
public void setIRClassValue(String val) {
 m_wrapperTemplate.setIRClassValue(val);
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Get the number of folds used for accuracy estimation
 * 
 * @return the number of folds
 */
public int getFolds() {
 return m_wrapperTemplate.getFolds();
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Constructor
 */
public InfoGainAttributeEval() {
 resetOptions();
}
origin: nz.ac.waikato.cms.weka/weka-stable

/** 
 * returns a string for the class type
 * 
 * @param type        the class type
 * @return            the class type as string
 */
protected String getClassTypeString(int type) {
 return CheckAttributeSelection.attributeTypeToString(type);
}
origin: nz.ac.waikato.cms.weka/attributeSelectionSearchMethods

/**
 * Constructor
 */
public ExhaustiveSearch() {
 resetOptions();
}
origin: nz.ac.waikato.cms.weka/attributeSelectionSearchMethods

/**
 * Constructor. Make a new GeneticSearch object
 */
public GeneticSearch() {
 resetOptions();
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * set options to their default values
 */
protected void resetOptions() {
 m_trainSelector = new weka.attributeSelection.AttributeSelection();
 setEvaluator(new CfsSubsetEval());
 setSearch(new BestFirst());
 m_SelectedAttributes = null;
}
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * configures the CheckAttributeSelection instance used throughout the tests
 * 
 * @return    the fully configured CheckAttributeSelection instance used for testing
 */
protected CheckAttributeSelection getTester() {
 CheckAttributeSelection    result;
 
 result = super.getTester();
 result.setTestEvaluator(true);
 
 return result;
}

origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * tests whether the scheme declares a serialVersionUID.
 */
public void testSerialVersionUID() {
 boolean[]     result;
 result = m_Tester.declaresSerialVersionUID();
 if (!result[0])
  fail("Doesn't declare serialVersionUID!");
}
origin: Waikato/weka-trunk

/**
 * set the search method
 * 
 * @param search the search method to use
 */
public void setSearch(ASSearch search) {
 m_searchMethod = search;
 if (m_searchMethod instanceof RankedOutputSearch) {
  setRanking(((RankedOutputSearch) m_searchMethod).getGenerateRanking());
 }
}
origin: Waikato/weka-trunk

/**
 * configures the CheckAttributeSelection instance used throughout the tests
 * 
 * @return    the fully configured CheckAttributeSelection instance used for testing
 */
protected CheckAttributeSelection getTester() {
 CheckAttributeSelection    result;
 
 result = super.getTester();
 result.setTestEvaluator(false);
 
 return result;
}

origin: Waikato/weka-trunk

/**
 * configures the CheckAttributeSelection instance used throughout the tests
 * 
 * @return    the fully configured CheckAttributeSelection instance used for testing
 */
protected CheckAttributeSelection getTester() {
 CheckAttributeSelection    result;
 
 result = super.getTester();
 result.setTestEvaluator(true);
 
 return result;
}

weka.attributeSelection

Most used classes

  • AttributeSelection
    Attribute selection class. Takes the name of a search class and an evaluation class on the command l
  • Ranker
    Ranker : Ranks attributes by their individual evaluations. Use in conjunction with attribute eval
  • ASEvaluation
    Abstract attribute selection evaluation class
  • GreedyStepwise
    GreedyStepwise : Performs a greedy forward or backward search through the space of attribute subse
  • GainRatioAttributeEval
    GainRatioAttributeEval : Evaluates the worth of an attribute by measuring the gain ratio with resp
  • AttributeEvaluator,
  • BestFirst,
  • CfsSubsetEval,
  • SubsetEvaluator,
  • WrapperSubsetEval,
  • ASSearch,
  • AttributeTransformer,
  • CheckAttributeSelection,
  • ClassifierSubsetEval,
  • CorrelationAttributeEval,
  • OneRAttributeEval,
  • PrincipalComponents,
  • ReliefFAttributeEval,
  • SymmetricalUncertAttributeEval
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now