Example usage for weka.filters.supervised.attribute PLSFilter TAGS_PREPROCESSING

List of usage examples for weka.filters.supervised.attribute PLSFilter TAGS_PREPROCESSING

Introduction

In this page you can find the example usage for weka.filters.supervised.attribute PLSFilter TAGS_PREPROCESSING.

Prototype

Tag[] TAGS_PREPROCESSING

To view the source code for weka.filters.supervised.attribute PLSFilter TAGS_PREPROCESSING.

Click Source Link

Document

the types of preprocessing

Usage

From source file:adams.core.discovery.genetic.SIMPLSWeightsMatrix.java

License:Open Source License

/**
 * Gets called for performing the initialization.
 * <br>/*from  w  w  w. j  a  v  a2s . 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);
}