List of usage examples for weka.filters.supervised.attribute PLSFilter PREPROCESSING_CENTER
int PREPROCESSING_CENTER
To view the source code for weka.filters.supervised.attribute PLSFilter PREPROCESSING_CENTER.
Click Source Link
From source file:adams.core.discovery.genetic.SIMPLSWeightsMatrix.java
License:Open Source License
/** * Gets called for performing the initialization. * <br>/*from w ww . j a v a 2s .c o m*/ * Apply simpls PLS filter and extract * * @param owner the owning algorithm * @param cont the property container to update */ public void performInitialization(AbstractGeneticAlgorithm owner, PropertyContainer cont) { Matrix value; PLSFilterWithLoadings pls = new PLSFilterWithLoadings(); pls.setNumComponents(getColumns()); pls.setAlgorithm(new SelectedTag(PLSFilter.PREPROCESSING_CENTER, PLSFilter.TAGS_PREPROCESSING)); pls.setAlgorithm(new SelectedTag(PLSFilter.ALGORITHM_SIMPLS, PLSFilter.TAGS_ALGORITHM)); try { pls.setInputFormat(((Hermione) owner).getInstances()); Filter.useFilter(((Hermione) owner).getInstances(), pls); } catch (Exception e) { e.printStackTrace(); } value = pls.getSimplsW(); ((SIMPLSMatrixFilter) cont.getObject()).setMatrix(value); }