⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filter.html

📁 weka是机器学习和数据挖掘领域最有影响力的开源项目之一
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<TD><CODE><B><A HREF="../../weka/filters/Filter.html#makeCopy(weka.filters.Filter)">makeCopy</A></B>(<A HREF="../../weka/filters/Filter.html" title="class in weka.filters">Filter</A>&nbsp;model)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a deep copy of the given filter using serialization.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/filters/Filter.html#numPendingOutput()">numPendingOutput</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of instances pending output</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/filters/Filter.html#output()">output</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Output an instance after filtering and remove from the output queue.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/filters/Filter.html#outputPeek()">outputPeek</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Output an instance after filtering but do not remove from the output queue.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/filters/Filter.html#setInputFormat(weka.core.Instances)">setInputFormat</A></B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;instanceInfo)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the format of the input instances.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<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#useFilter(weka.core.Instances, weka.filters.Filter)">useFilter</A></B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;data,          <A HREF="../../weka/filters/Filter.html" title="class in weka.filters">Filter</A>&nbsp;filter)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Filters an entire set of instances through a filter and returns the new set.</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="Filter()"><!-- --></A><H3>Filter</H3><PRE>public <B>Filter</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="isNewBatch()"><!-- --></A><H3>isNewBatch</H3><PRE>public boolean <B>isNewBatch</B>()</PRE><DL><DD>Returns true if the a new batch was started, either a new instance of the  filter was created or the batchFinished() method got called.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if a new batch has been initiated<DT><B>See Also:</B><DD><A HREF="../../weka/filters/Filter.html#m_NewBatch"><CODE>m_NewBatch</CODE></A>, <A HREF="../../weka/filters/Filter.html#batchFinished()"><CODE>batchFinished()</CODE></A></DL></DD></DL><HR><A NAME="isFirstBatchDone()"><!-- --></A><H3>isFirstBatchDone</H3><PRE>public boolean <B>isFirstBatchDone</B>()</PRE><DL><DD>Returns true if the first batch of instances got processed. Necessary for supervised filters, which "learn" from the first batch and then shouldn't get updated with subsequent calls of batchFinished().<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the first batch has been processed<DT><B>See Also:</B><DD><A HREF="../../weka/filters/Filter.html#m_FirstBatchDone"><CODE>m_FirstBatchDone</CODE></A>, <A HREF="../../weka/filters/Filter.html#batchFinished()"><CODE>batchFinished()</CODE></A></DL></DD></DL><HR><A NAME="getCapabilities()"><!-- --></A><H3>getCapabilities</H3><PRE>public <A HREF="../../weka/core/Capabilities.html" title="class in weka.core">Capabilities</A> <B>getCapabilities</B>()</PRE><DL><DD>Returns the Capabilities of this filter. Derived filters have to override this method to enable capabilities.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../weka/core/CapabilitiesHandler.html#getCapabilities()">getCapabilities</A></CODE> in interface <CODE><A HREF="../../weka/core/CapabilitiesHandler.html" title="interface in weka.core">CapabilitiesHandler</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the capabilities of this object<DT><B>See Also:</B><DD><A HREF="../../weka/core/Capabilities.html" title="class in weka.core"><CODE>Capabilities</CODE></A></DL></DD></DL><HR><A NAME="setInputFormat(weka.core.Instances)"><!-- --></A><H3>setInputFormat</H3><PRE>public boolean <B>setInputFormat</B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;instanceInfo)                       throws java.lang.Exception</PRE><DL><DD>Sets the format of the input instances. If the filter is able to determine the output format before seeing any input instances, it does so here. This default implementation clears the output format and output queue, and the new batch flag is set. Overriders should call <code>super.setInputFormat(Instances)</code><P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>instanceInfo</CODE> - an Instances object containing the input instance structure (any instances contained in the object are ignored - only the structure is required).<DT><B>Returns:</B><DD>true if the outputFormat may be collected immediately<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the inputFormat can't be set successfully</DL></DD></DL><HR><A NAME="getOutputFormat()"><!-- --></A><H3>getOutputFormat</H3><PRE>public <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> <B>getOutputFormat</B>()</PRE><DL><DD>Gets the format of the output instances. This should only be called after input() or batchFinished() has returned true. The relation name of the output instances should be changed to reflect the action of the filter (eg: add the filter name and options).<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an Instances object containing the output instance structure only.<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if no input structure has been defined (or the output format hasn't been determined yet)</DL></DD></DL><HR><A NAME="input(weka.core.Instance)"><!-- --></A><H3>input</H3><PRE>public boolean <B>input</B>(<A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A>&nbsp;instance)              throws java.lang.Exception</PRE><DL><DD>Input an instance for filtering. Ordinarily the instance is processed and made available for output immediately. Some filters require all instances be read before producing output, in which case output instances should be collected after calling batchFinished(). If the input marks the start of a new batch, the output queue is cleared. This default implementation assumes all instance conversion will occur when batchFinished() is called.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>instance</CODE> - the input instance<DT><B>Returns:</B><DD>true if the filtered instance may now be collected with output().<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if the input format has not been defined.<DD><CODE>java.lang.Exception</CODE> - if the input instance was not of the correct  format or if there was a problem with the filtering.</DL></DD></DL><HR><A NAME="batchFinished()"><!-- --></A><H3>batchFinished</H3><PRE>public boolean <B>batchFinished</B>()                      throws java.lang.Exception</PRE><DL><DD>Signify that this batch of input to the filter is finished. If the filter requires all instances prior to filtering, output() may now be called to retrieve the filtered instances. Any subsequent instances filtered should be filtered based on setting obtained from the first batch (unless the inputFormat has been re-assigned or new options have been set). This default implementation assumes all instance processing occurs during inputFormat() and input().<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if there are instances pending output<DT><B>Throws:</B><DD><CODE>java.lang.NullPointerException</CODE> - if no input structure has been defined,<DD><CODE>java.lang.Exception</CODE> - if there was a problem finishing the batch.</DL></DD></DL><HR><A NAME="output()"><!-- --></A><H3>output</H3><PRE>public <A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A> <B>output</B>()</PRE><DL><DD>Output an instance after filtering and remove from the output queue.<P><DD><DL></DL></DD>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -