filter.html
来自「由java开发的软件包」· HTML 代码 · 共 689 行 · 第 1/3 页
HTML
689 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_05) on Mon Mar 07 15:28:01 NZDT 2005 --><TITLE>Filter</TITLE><META NAME="keywords" CONTENT="weka.filters.Filter class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){ parent.document.title="Filter";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../Tutorial.pdf"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://www.cs.waikato.ac.nz/ml/weka/index.html"><FONT CLASS="NavBarFont1"><B>Weka's home</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../weka/filters/AllFilter.html" title="class in weka.filters"><B>PREV CLASS</B></A> <A HREF="../../weka/filters/NullFilter.html" title="class in weka.filters"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="Filter.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">weka.filters</FONT><BR>Class Filter</H2><PRE>java.lang.Object <IMG SRC="../../resources/inherit.gif" ALT="extended by"><B>weka.filters.Filter</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD></DL><DL><DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../weka/filters/unsupervised/attribute/AbstractTimeSeries.html" title="class in weka.filters.unsupervised.attribute">AbstractTimeSeries</A>, <A HREF="../../weka/filters/unsupervised/attribute/Add.html" title="class in weka.filters.unsupervised.attribute">Add</A>, <A HREF="../../weka/filters/unsupervised/attribute/AddCluster.html" title="class in weka.filters.unsupervised.attribute">AddCluster</A>, <A HREF="../../weka/filters/unsupervised/attribute/AddExpression.html" title="class in weka.filters.unsupervised.attribute">AddExpression</A>, <A HREF="../../weka/filters/unsupervised/attribute/AddNoise.html" title="class in weka.filters.unsupervised.attribute">AddNoise</A>, <A HREF="../../weka/filters/AllFilter.html" title="class in weka.filters">AllFilter</A>, <A HREF="../../weka/filters/supervised/attribute/AttributeSelection.html" title="class in weka.filters.supervised.attribute">AttributeSelection</A>, <A HREF="../../weka/filters/unsupervised/attribute/ChangeDateFormat.html" title="class in weka.filters.unsupervised.attribute">ChangeDateFormat</A>, <A HREF="../../weka/filters/supervised/attribute/ClassOrder.html" title="class in weka.filters.supervised.attribute">ClassOrder</A>, <A HREF="../../weka/filters/unsupervised/attribute/ClusterMembership.html" title="class in weka.filters.unsupervised.attribute">ClusterMembership</A>, <A HREF="../../weka/filters/unsupervised/attribute/Copy.html" title="class in weka.filters.unsupervised.attribute">Copy</A>, <A HREF="../../weka/filters/supervised/attribute/Discretize.html" title="class in weka.filters.supervised.attribute">Discretize</A>, <A HREF="../../weka/filters/unsupervised/attribute/FirstOrder.html" title="class in weka.filters.unsupervised.attribute">FirstOrder</A>, <A HREF="../../weka/filters/unsupervised/attribute/MakeIndicator.html" title="class in weka.filters.unsupervised.attribute">MakeIndicator</A>, <A HREF="../../weka/filters/unsupervised/attribute/MergeTwoValues.html" title="class in weka.filters.unsupervised.attribute">MergeTwoValues</A>, <A HREF="../../weka/filters/supervised/attribute/NominalToBinary.html" title="class in weka.filters.supervised.attribute">NominalToBinary</A>, <A HREF="../../weka/filters/unsupervised/attribute/NominalToBinary.html" title="class in weka.filters.unsupervised.attribute">NominalToBinary</A>, <A HREF="../../weka/filters/unsupervised/instance/NonSparseToSparse.html" title="class in weka.filters.unsupervised.instance">NonSparseToSparse</A>, <A HREF="../../weka/filters/unsupervised/instance/Normalize.html" title="class in weka.filters.unsupervised.instance">Normalize</A>, <A HREF="../../weka/filters/NullFilter.html" title="class in weka.filters">NullFilter</A>, <A HREF="../../weka/filters/unsupervised/attribute/NumericTransform.html" title="class in weka.filters.unsupervised.attribute">NumericTransform</A>, <A HREF="../../weka/filters/unsupervised/attribute/Obfuscate.html" title="class in weka.filters.unsupervised.attribute">Obfuscate</A>, <A HREF="../../weka/filters/unsupervised/attribute/PotentialClassIgnorer.html" title="class in weka.filters.unsupervised.attribute">PotentialClassIgnorer</A>, <A HREF="../../weka/filters/unsupervised/instance/Randomize.html" title="class in weka.filters.unsupervised.instance">Randomize</A>, <A HREF="../../weka/filters/unsupervised/attribute/RandomProjection.html" title="class in weka.filters.unsupervised.attribute">RandomProjection</A>, <A HREF="../../weka/filters/unsupervised/attribute/Remove.html" title="class in weka.filters.unsupervised.attribute">Remove</A>, <A HREF="../../weka/filters/unsupervised/instance/RemoveFolds.html" title="class in weka.filters.unsupervised.instance">RemoveFolds</A>, <A HREF="../../weka/filters/unsupervised/instance/RemoveMisclassified.html" title="class in weka.filters.unsupervised.instance">RemoveMisclassified</A>, <A HREF="../../weka/filters/unsupervised/instance/RemovePercentage.html" title="class in weka.filters.unsupervised.instance">RemovePercentage</A>, <A HREF="../../weka/filters/unsupervised/instance/RemoveRange.html" title="class in weka.filters.unsupervised.instance">RemoveRange</A>, <A HREF="../../weka/filters/unsupervised/attribute/RemoveType.html" title="class in weka.filters.unsupervised.attribute">RemoveType</A>, <A HREF="../../weka/filters/unsupervised/attribute/RemoveUseless.html" title="class in weka.filters.unsupervised.attribute">RemoveUseless</A>, <A HREF="../../weka/filters/unsupervised/instance/RemoveWithValues.html" title="class in weka.filters.unsupervised.instance">RemoveWithValues</A>, <A HREF="../../weka/filters/supervised/instance/Resample.html" title="class in weka.filters.supervised.instance">Resample</A>, <A HREF="../../weka/filters/unsupervised/instance/Resample.html" title="class in weka.filters.unsupervised.instance">Resample</A>, <A HREF="../../weka/filters/unsupervised/instance/SparseToNonSparse.html" title="class in weka.filters.unsupervised.instance">SparseToNonSparse</A>, <A HREF="../../weka/filters/supervised/instance/SpreadSubsample.html" title="class in weka.filters.supervised.instance">SpreadSubsample</A>, <A HREF="../../weka/filters/supervised/instance/StratifiedRemoveFolds.html" title="class in weka.filters.supervised.instance">StratifiedRemoveFolds</A>, <A HREF="../../weka/filters/unsupervised/attribute/StringToNominal.html" title="class in weka.filters.unsupervised.attribute">StringToNominal</A>, <A HREF="../../weka/filters/unsupervised/attribute/StringToWordVector.html" title="class in weka.filters.unsupervised.attribute">StringToWordVector</A>, <A HREF="../../weka/filters/unsupervised/attribute/SwapValues.html" title="class in weka.filters.unsupervised.attribute">SwapValues</A></DD></DL><HR><DL><DT>public abstract class <B>Filter</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL><P>An abstract class for instance filters: objects that take instances as input, carry out some transformation on the instance and then output the instance. The method implementations in this class assume that most of the work will be done in the methods overridden by subclasses.<p> A simple example of filter use. This example doesn't remove instances from the output queue until all instances have been input, so has higher memory consumption than an approach that uses output instances as they are made available:<p> <code> <pre> Filter filter = ..some type of filter.. Instances instances = ..some instances.. for (int i = 0; i < data.numInstances(); i++) { filter.input(data.instance(i)); } filter.batchFinished(); Instances newData = filter.outputFormat(); Instance processed; while ((processed = filter.output()) != null) { newData.add(processed); } ..do something with newData.. </pre> </code><P><P><DL><DT><B>Version:</B></DT> <DD>$Revision: 1.24 $</DD><DT><B>Author:</B></DT> <DD>Len Trigg (trigg@cs.waikato.ac.nz)</DD><DT><B>See Also:</B><DD><A HREF="../../serialized-form.html#weka.filters.Filter">Serialized Form</A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../weka/filters/Filter.html#Filter()">Filter</A></B>()</CODE><BR> </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/filters/Filter.html#batchFilterFile(weka.filters.Filter, java.lang.String[])">batchFilterFile</A></B>(<A HREF="../../weka/filters/Filter.html" title="class in weka.filters">Filter</A> filter, java.lang.String[] options)</CODE><BR> Method for testing filters ability to process multiple batches.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/filters/Filter.html#batchFinished()">batchFinished</A></B>()</CODE><BR> Signify that this batch of input to the filter is finished.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/filters/Filter.html#filterFile(weka.filters.Filter, java.lang.String[])">filterFile</A></B>(<A HREF="../../weka/filters/Filter.html" title="class in weka.filters">Filter</A> filter, java.lang.String[] options)</CODE><BR> Method for testing filters.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/filters/Filter.html#getOutputFormat()">getOutputFormat</A></B>()</CODE><BR> Gets the format of the output instances.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/filters/Filter.html#input(weka.core.Instance)">input</A></B>(<A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance)</CODE><BR> Input an instance for filtering.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/filters/Filter.html#inputFormat(weka.core.Instances)">inputFormat</A></B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> instanceInfo)</CODE><BR> <B>Deprecated.</B> <I>use <code>setInputFormat(Instances)</code> instead.</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/filters/Filter.html#isOutputFormatDefined()">isOutputFormatDefined</A></B>()</CODE><BR> Returns whether the output format is ready to be collected</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/filters/Filter.html#main(java.lang.String[])">main</A></B>(java.lang.String[] args)</CODE>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?