Example usage for weka.filters.unsupervised.attribute Center setInputFormat

List of usage examples for weka.filters.unsupervised.attribute Center setInputFormat

Introduction

In this page you can find the example usage for weka.filters.unsupervised.attribute Center setInputFormat.

Prototype

public boolean setInputFormat(Instances instanceInfo) throws Exception 

Source Link

Document

Sets the format of the input instances.

Usage

From source file:com.deafgoat.ml.prognosticator.InstancesFilter.java

License:Apache License

/**
 * Makes numeric attributes have zero mean
 * // www. j  a  va2s.  c o m
 * @throws Exception
 *             If filter could not be applied
 */
public void centerFilter() throws Exception {
    if (_logger.isDebugEnabled()) {
        _logger.debug("Applying centering filter");
    }
    // Might employ filtered classifier for production
    Center ct = new Center();
    ct.setInputFormat(_instances);
    _instances = Filter.useFilter(_instances, ct);
}