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

📄 binarysparseinstance.html

📁 由java开发的软件包
💻 HTML
📖 第 1 页 / 共 2 页
字号:
 attribute types)<P><DT><B>Parameters:</B><DD><CODE>instance</CODE> - the instance from which the attribute values and the weight are to be copied</DL><HR><A NAME="BinarySparseInstance(weka.core.SparseInstance)"><!-- --></A><H3>BinarySparseInstance</H3><PRE>public <B>BinarySparseInstance</B>(<A HREF="../../weka/core/SparseInstance.html" title="class in weka.core">SparseInstance</A>&nbsp;instance)</PRE><DL><DD>Constructor that copies the info from the given instance.  Reference to the dataset is set to null. (ie. the instance doesn't have access to information about the attribute types)<P><DT><B>Parameters:</B><DD><CODE>instance</CODE> - the instance from which the attribute info is to be copied</DL><HR><A NAME="BinarySparseInstance(double, double[])"><!-- --></A><H3>BinarySparseInstance</H3><PRE>public <B>BinarySparseInstance</B>(double&nbsp;weight,                            double[]&nbsp;attValues)</PRE><DL><DD>Constructor that generates a sparse instance from the given parameters. Reference to the dataset is set to null. (ie. the instance doesn't have access to information about the attribute types)<P><DT><B>Parameters:</B><DD><CODE>weight</CODE> - the instance's weight<DD><CODE>attValues</CODE> - a vector of attribute values</DL><HR><A NAME="BinarySparseInstance(double, int[], int)"><!-- --></A><H3>BinarySparseInstance</H3><PRE>public <B>BinarySparseInstance</B>(double&nbsp;weight,                            int[]&nbsp;indices,                            int&nbsp;maxNumValues)</PRE><DL><DD>Constructor that inititalizes instance variable with given values. Reference to the dataset is set to null. (ie. the instance doesn't have access to information about the attribute types)<P><DT><B>Parameters:</B><DD><CODE>weight</CODE> - the instance's weight<DD><CODE>indices</CODE> - the indices of the given values in the full vector<DD><CODE>maxNumValues</CODE> - the maximium number of values that can be stored</DL><HR><A NAME="BinarySparseInstance(int)"><!-- --></A><H3>BinarySparseInstance</H3><PRE>public <B>BinarySparseInstance</B>(int&nbsp;numAttributes)</PRE><DL><DD>Constructor of an instance that sets weight to one, all values to 1, and the reference to the dataset to null. (ie. the instance doesn't have access to information about the attribute types)<P><DT><B>Parameters:</B><DD><CODE>numAttributes</CODE> - the size of the instance</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="copy()"><!-- --></A><H3>copy</H3><PRE>public java.lang.Object <B>copy</B>()</PRE><DL><DD>Produces a shallow copy of this instance. The copy doesn't have access to a dataset.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../weka/core/Copyable.html#copy()">copy</A></CODE> in interface <CODE><A HREF="../../weka/core/Copyable.html" title="interface in weka.core">Copyable</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/core/SparseInstance.html#copy()">copy</A></CODE> in class <CODE><A HREF="../../weka/core/SparseInstance.html" title="class in weka.core">SparseInstance</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the shallow copy</DL></DD></DL><HR><A NAME="mergeInstance(weka.core.Instance)"><!-- --></A><H3>mergeInstance</H3><PRE>public <A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A> <B>mergeInstance</B>(<A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A>&nbsp;inst)</PRE><DL><DD>Merges this instance with the given instance and returns the result. Dataset is set to null.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/core/SparseInstance.html#mergeInstance(weka.core.Instance)">mergeInstance</A></CODE> in class <CODE><A HREF="../../weka/core/SparseInstance.html" title="class in weka.core">SparseInstance</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>inst</CODE> - the instance to be merged with this one<DT><B>Returns:</B><DD>the merged instances</DL></DD></DL><HR><A NAME="replaceMissingValues(double[])"><!-- --></A><H3>replaceMissingValues</H3><PRE>public void <B>replaceMissingValues</B>(double[]&nbsp;array)</PRE><DL><DD>Does nothing, since we don't support missing values.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/core/SparseInstance.html#replaceMissingValues(double[])">replaceMissingValues</A></CODE> in class <CODE><A HREF="../../weka/core/SparseInstance.html" title="class in weka.core">SparseInstance</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>array</CODE> - containing the means and modes<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if numbers of attributes are unequal</DL></DD></DL><HR><A NAME="setValue(int, double)"><!-- --></A><H3>setValue</H3><PRE>public void <B>setValue</B>(int&nbsp;attIndex,                     double&nbsp;value)</PRE><DL><DD>Sets a specific value in the instance to the given value  (internal floating-point format). Performs a deep copy of the vector of attribute values before the value is set.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/core/SparseInstance.html#setValue(int, double)">setValue</A></CODE> in class <CODE><A HREF="../../weka/core/SparseInstance.html" title="class in weka.core">SparseInstance</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attIndex</CODE> - the attribute's index<DD><CODE>value</CODE> - the new attribute value (If the corresponding attribute is nominal (or a string) then this is the new value's index as a double).</DL></DD></DL><HR><A NAME="setValueSparse(int, double)"><!-- --></A><H3>setValueSparse</H3><PRE>public void <B>setValueSparse</B>(int&nbsp;indexOfIndex,                           double&nbsp;value)</PRE><DL><DD>Sets a specific value in the instance to the given value  (internal floating-point format). Performs a deep copy of the vector of attribute values before the value is set.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/core/SparseInstance.html#setValueSparse(int, double)">setValueSparse</A></CODE> in class <CODE><A HREF="../../weka/core/SparseInstance.html" title="class in weka.core">SparseInstance</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>indexOfIndex</CODE> - the index of the attribute's index<DD><CODE>value</CODE> - the new attribute value (If the corresponding attribute is nominal (or a string) then this is the new value's index as a double).</DL></DD></DL><HR><A NAME="toDoubleArray()"><!-- --></A><H3>toDoubleArray</H3><PRE>public double[] <B>toDoubleArray</B>()</PRE><DL><DD>Returns the values of each attribute as an array of doubles.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/core/SparseInstance.html#toDoubleArray()">toDoubleArray</A></CODE> in class <CODE><A HREF="../../weka/core/SparseInstance.html" title="class in weka.core">SparseInstance</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an array containing all the instance attribute values</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>Returns the description of one instance in sparse format.  If the instance doesn't have access to a dataset, it returns the  internal floating-point values. Quotes string values that contain  whitespace characters.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/core/SparseInstance.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../weka/core/SparseInstance.html" title="class in weka.core">SparseInstance</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the instance's description as a string</DL></DD></DL><HR><A NAME="value(int)"><!-- --></A><H3>value</H3><PRE>public double <B>value</B>(int&nbsp;attIndex)</PRE><DL><DD>Returns an instance's attribute value in internal format.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/core/SparseInstance.html#value(int)">value</A></CODE> in class <CODE><A HREF="../../weka/core/SparseInstance.html" title="class in weka.core">SparseInstance</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>attIndex</CODE> - the attribute's index<DT><B>Returns:</B><DD>the specified value as a double (If the corresponding attribute is nominal (or a string) then it returns the value's index as a  double).</DL></DD></DL><HR><A NAME="valueSparse(int)"><!-- --></A><H3>valueSparse</H3><PRE>public final double <B>valueSparse</B>(int&nbsp;indexOfIndex)</PRE><DL><DD>Returns an instance's attribute value in internal format. Does exactly the same thing as value() if applied to an Instance.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/core/Instance.html#valueSparse(int)">valueSparse</A></CODE> in class <CODE><A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>indexOfIndex</CODE> - the index of the attribute's index<DT><B>Returns:</B><DD>the specified value as a double (If the corresponding attribute is nominal (or a string) then it returns the value's index as a  double).</DL></DD></DL><HR><A NAME="main(java.lang.String[])"><!-- --></A><H3>main</H3><PRE>public static void <B>main</B>(java.lang.String[]&nbsp;options)</PRE><DL><DD>Main method for testing this class.<P><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" 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_bottom_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../Tutorial.pdf"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</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>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../weka/core/AttributeStats.html" title="class in weka.core"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../weka/core/CheckOptionHandler.html" title="class in weka.core"><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>  &nbsp;&nbsp;<A HREF="BinarySparseInstance.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>

⌨️ 快捷键说明

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