Tabnine Logo
RemovePercentage.setPercentage
Code IndexAdd Tabnine to your IDE (free)

How to use
setPercentage
method
in
weka.filters.unsupervised.instance.RemovePercentage

Best Java code snippets using weka.filters.unsupervised.instance.RemovePercentage.setPercentage (Showing top 14 results out of 315)

origin: Waikato/weka-trunk

 setPercentage(Double.parseDouble(percent));
} else {
 setPercentage(50.0);
origin: nz.ac.waikato.cms.weka/weka-stable

 setPercentage(Double.parseDouble(percent));
} else {
 setPercentage(50.0);
origin: Waikato/wekaDeeplearning4j

/**
 * Split the dataset into p% train an (100-p)% test set
 *
 * @param data Input data
 * @param p train percentage
 * @return Array of instances: (0) Train, (1) Test
 * @throws Exception Filterapplication went wrong
 */
public static Instances[] splitTrainVal(Instances data, double p) throws Exception {
 // Randomize data
 Randomize rand = new Randomize();
 rand.setInputFormat(data);
 rand.setRandomSeed(42);
 data = Filter.useFilter(data, rand);
 // Remove testpercentage from data to get the train set
 RemovePercentage rp = new RemovePercentage();
 rp.setInputFormat(data);
 rp.setPercentage(p);
 Instances train = Filter.useFilter(data, rp);
 // Remove trainpercentage from data to get the test set
 rp = new RemovePercentage();
 rp.setInputFormat(data);
 rp.setPercentage(p);
 rp.setInvertSelection(true);
 Instances test = Filter.useFilter(data, rp);
 return new Instances[]{train, test};
}
origin: net.sf.meka.thirdparty/mulan

RemovePercentage rmvp = new RemovePercentage();
rmvp.setInvertSelection(true);
rmvp.setPercentage(Double.parseDouble(percentage));
rmvp.setInputFormat(dataSet);
Instances trainDataSet = Filter.useFilter(dataSet, rmvp);
rmvp.setPercentage(Double.parseDouble(percentage));
rmvp.setInputFormat(dataSet);
Instances testDataSet = Filter.useFilter(dataSet, rmvp);
origin: nz.ac.waikato.cms.weka/weka-stable

public void testInverting() {
 // non-inverted
 m_Filter = getFilter();
 ((RemovePercentage) m_Filter).setPercentage(20.0);
 Instances result = useFilter();
 // inverted
 m_Filter = getFilter();
 ((RemovePercentage) m_Filter).setPercentage(20.0);
 ((RemovePercentage) m_Filter).setInvertSelection(true);
 Instances resultInv = useFilter();
 assertEquals(
   m_Instances.numInstances(), 
   result.numInstances() + resultInv.numInstances());
}
origin: net.sf.meka.thirdparty/mulan

@Override
protected void buildInternal(MultiLabelInstances trainingSet)
    throws Exception {
  Instances dataSet = new Instances(trainingSet.getDataSet());
  for (int i = 0; i < numOfModels; i++) {
    dataSet.randomize(rand);
    RemovePercentage rmvp = new RemovePercentage();
    rmvp.setInputFormat(dataSet);
    rmvp.setPercentage(percentage);
    rmvp.setInvertSelection(true);
    Instances trainDataSet = Filter.useFilter(dataSet, rmvp);
    MultiLabelInstances train = new MultiLabelInstances(trainDataSet, trainingSet.getLabelsMetaData());
    ensemble[i].build(train);
  }
}
origin: Waikato/weka-trunk

public void testInverting() {
 // non-inverted
 m_Filter = getFilter();
 ((RemovePercentage) m_Filter).setPercentage(20.0);
 Instances result = useFilter();
 // inverted
 m_Filter = getFilter();
 ((RemovePercentage) m_Filter).setPercentage(20.0);
 ((RemovePercentage) m_Filter).setInvertSelection(true);
 Instances resultInv = useFilter();
 assertEquals(
   m_Instances.numInstances(), 
   result.numInstances() + resultInv.numInstances());
}
origin: net.sf.meka.thirdparty/mulan

RemovePercentage rmvp = new RemovePercentage();
rmvp.setInvertSelection(true);
rmvp.setPercentage(samplingPercentage);
rmvp.setInputFormat(dataSet);
sampledDataSet = Filter.useFilter(dataSet, rmvp);
origin: Waikato/wekaDeeplearning4j

/**
 * Split the dataset into p% train and (100-p)% testImdb set
 *
 * @param data Input data
 * @param p train percentage
 * @return Array of instances: (0) Train, (1) Test
 * @throws Exception Filterapplication went wrong
 */
public static Instances[] splitTrainTest(Instances data, double p) throws Exception {
 Randomize rand = new Randomize();
 rand.setInputFormat(data);
 rand.setRandomSeed(42);
 data = Filter.useFilter(data, rand);
 RemovePercentage rp = new RemovePercentage();
 rp.setInputFormat(data);
 rp.setPercentage(p);
 rp.setInvertSelection(true);
 Instances train = Filter.useFilter(data, rp);
 rp = new RemovePercentage();
 rp.setInputFormat(data);
 rp.setPercentage(p);
 Instances test = Filter.useFilter(data, rp);
 return new Instances[] {train, test};
}
origin: Waikato/wekaDeeplearning4j

rp.setPercentage(98);
rp.setInputFormat(data);
data = Filter.useFilter(data, rp);
origin: nz.ac.waikato.cms.weka/rotationForest

dataSubSet.randomize(m_random);
RemovePercentage rp = new RemovePercentage();
rp.setPercentage( m_RemovedPercentage );
rp.setInputFormat( dataSubSet );
dataSubSet = Filter.useFilter( dataSubSet, rp );
origin: Waikato/wekaDeeplearning4j

RemovePercentage rp = new RemovePercentage();
rp.setInputFormat(rel);
rp.setPercentage(rand.nextDouble()*100);
final Instances rel2 = Filter.useFilter(rel, rp);
final int i = generated.attribute(0).addRelation(rel2);
origin: Waikato/wekaDeeplearning4j

rp.setPercentage(95);
rp.setInputFormat(data);
data = Filter.useFilter(data, rp);
origin: Waikato/wekaDeeplearning4j

RemovePercentage rp = new RemovePercentage();
rp.setInputFormat(data);
rp.setPercentage(98);
final Instances dataFiltered = Filter.useFilter(data, rp);
weka.filters.unsupervised.instanceRemovePercentagesetPercentage

Javadoc

Sets the percentage of intances to select.

Popular methods of RemovePercentage

  • <init>
  • setInvertSelection
    Sets if selection is to be inverted.
  • setInputFormat
    Sets the format of the input instances.
  • bufferInput
  • flushInput
  • getInputFormat
  • getInvertSelection
    Gets if selection is to be inverted.
  • getPercentage
    Gets the percentage of instances to select.
  • isFirstBatchDone
  • numPendingOutput
  • push
  • resetQueue
  • push,
  • resetQueue,
  • runFilter,
  • setOutputFormat

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • requestLocationUpdates (LocationManager)
  • onCreateOptionsMenu (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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