-unset-class-temporarily Unsets the class index temporarily before the filter is applied to the data. (default: no)
215216217218219220221
public PLSFilter() { super(); // setup pre-processing m_Missing = new ReplaceMissingValues(); m_Filter = new Center(); }
10881089109010911092109310941095109610971098
switch (m_Preprocessing) { case PREPROCESSING_CENTER: m_ClassMean = instances.meanOrMode(instances.classIndex()); m_ClassStdDev = 1; m_Filter = new Center(); ((Center) m_Filter).setIgnoreClass(true); break; case PREPROCESSING_STANDARDIZE: m_ClassMean = instances.meanOrMode(instances.classIndex()); m_ClassStdDev = StrictMath.sqrt(instances.variance(instances.classIndex()));
658659660661662663664665666667668
} double[] att = new double[m_trainInstances.numInstances()]; // now center the data by subtracting the mean m_centerFilter = new Center(); m_centerFilter.setInputFormat(m_trainInstances); m_trainInstances = Filter.useFilter(m_trainInstances, m_centerFilter); // now compute the covariance matrix m_correlation = new double[m_numAttribs][m_numAttribs];
6768697071727374757677
public Filter getConfiguredFilterVariant() { MultiFilter result = new MultiFilter(); Filter[] filters = new Filter[2]; filters[0] = new ReplaceMissingValues(); filters[1] = new Center(); result.setFilters(filters); return result; }
10871088108910901091109210931094109510961097
454647484950515253
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); }
660661662663664665666667668669670