📄 binarysparseinstance.html
字号:
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/BinarySparseInstance.html#setValue(int, double)">setValue</A></B>(int attIndex, double value)</CODE><BR> Sets a specific value in the instance to the given value (internal floating-point format).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/BinarySparseInstance.html#setValueSparse(int, double)">setValueSparse</A></B>(int indexOfIndex, double value)</CODE><BR> Sets a specific value in the instance to the given value (internal floating-point format).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/BinarySparseInstance.html#toDoubleArray()">toDoubleArray</A></B>()</CODE><BR> Returns the values of each attribute as an array of doubles.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/BinarySparseInstance.html#toString()">toString</A></B>()</CODE><BR> Returns the description of one instance in sparse format.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/BinarySparseInstance.html#value(int)">value</A></B>(int attIndex)</CODE><BR> Returns an instance's attribute value in internal format.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> double</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/core/BinarySparseInstance.html#valueSparse(int)">valueSparse</A></B>(int indexOfIndex)</CODE><BR> Returns an instance's attribute value in internal format.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_weka.core.SparseInstance"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class weka.core.<A HREF="../../weka/core/SparseInstance.html" title="class in weka.core">SparseInstance</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../weka/core/SparseInstance.html#attributeSparse(int)">attributeSparse</A>, <A HREF="../../weka/core/SparseInstance.html#index(int)">index</A>, <A HREF="../../weka/core/SparseInstance.html#isMissing(int)">isMissing</A>, <A HREF="../../weka/core/SparseInstance.html#locateIndex(int)">locateIndex</A>, <A HREF="../../weka/core/SparseInstance.html#modifyValue(int, double)">modifyValue</A>, <A HREF="../../weka/core/SparseInstance.html#numAttributes()">numAttributes</A>, <A HREF="../../weka/core/SparseInstance.html#numValues()">numValues</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_weka.core.Instance"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class weka.core.<A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../weka/core/Instance.html#attribute(int)">attribute</A>, <A HREF="../../weka/core/Instance.html#classAttribute()">classAttribute</A>, <A HREF="../../weka/core/Instance.html#classIndex()">classIndex</A>, <A HREF="../../weka/core/Instance.html#classIsMissing()">classIsMissing</A>, <A HREF="../../weka/core/Instance.html#classValue()">classValue</A>, <A HREF="../../weka/core/Instance.html#dataset()">dataset</A>, <A HREF="../../weka/core/Instance.html#deleteAttributeAt(int)">deleteAttributeAt</A>, <A HREF="../../weka/core/Instance.html#enumerateAttributes()">enumerateAttributes</A>, <A HREF="../../weka/core/Instance.html#equalHeaders(weka.core.Instance)">equalHeaders</A>, <A HREF="../../weka/core/Instance.html#hasMissingValue()">hasMissingValue</A>, <A HREF="../../weka/core/Instance.html#insertAttributeAt(int)">insertAttributeAt</A>, <A HREF="../../weka/core/Instance.html#isMissing(weka.core.Attribute)">isMissing</A>, <A HREF="../../weka/core/Instance.html#isMissingSparse(int)">isMissingSparse</A>, <A HREF="../../weka/core/Instance.html#isMissingValue(double)">isMissingValue</A>, <A HREF="../../weka/core/Instance.html#missingValue()">missingValue</A>, <A HREF="../../weka/core/Instance.html#numClasses()">numClasses</A>, <A HREF="../../weka/core/Instance.html#relationalValue(weka.core.Attribute)">relationalValue</A>, <A HREF="../../weka/core/Instance.html#relationalValue(int)">relationalValue</A>, <A HREF="../../weka/core/Instance.html#setClassMissing()">setClassMissing</A>, <A HREF="../../weka/core/Instance.html#setClassValue(double)">setClassValue</A>, <A HREF="../../weka/core/Instance.html#setClassValue(java.lang.String)">setClassValue</A>, <A HREF="../../weka/core/Instance.html#setDataset(weka.core.Instances)">setDataset</A>, <A HREF="../../weka/core/Instance.html#setMissing(weka.core.Attribute)">setMissing</A>, <A HREF="../../weka/core/Instance.html#setMissing(int)">setMissing</A>, <A HREF="../../weka/core/Instance.html#setValue(weka.core.Attribute, double)">setValue</A>, <A HREF="../../weka/core/Instance.html#setValue(weka.core.Attribute, java.lang.String)">setValue</A>, <A HREF="../../weka/core/Instance.html#setValue(int, java.lang.String)">setValue</A>, <A HREF="../../weka/core/Instance.html#setWeight(double)">setWeight</A>, <A HREF="../../weka/core/Instance.html#stringValue(weka.core.Attribute)">stringValue</A>, <A HREF="../../weka/core/Instance.html#stringValue(int)">stringValue</A>, <A HREF="../../weka/core/Instance.html#toString(weka.core.Attribute)">toString</A>, <A HREF="../../weka/core/Instance.html#toString(int)">toString</A>, <A HREF="../../weka/core/Instance.html#value(weka.core.Attribute)">value</A>, <A HREF="../../weka/core/Instance.html#weight()">weight</A></CODE></TD></TR></TABLE> <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, wait, wait, wait</CODE></TD></TR></TABLE> <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="BinarySparseInstance(weka.core.Instance)"><!-- --></A><H3>BinarySparseInstance</H3><PRE>public <B>BinarySparseInstance</B>(<A HREF="../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance)</PRE><DL><DD>Constructor that generates a sparse instance 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><DL><DT><B>Parameters:</B><DD><CODE>instance</CODE> - the instance from which the attribute values and the weight are to be copied</DL></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> 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><DL><DT><B>Parameters:</B><DD><CODE>instance</CODE> - the instance from which the attribute info is to be copied</DL></DL><HR><A NAME="BinarySparseInstance(double, double[])"><!-- --></A><H3>BinarySparseInstance</H3><PRE>public <B>BinarySparseInstance</B>(double weight, double[] 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><DL><DT><B>Parameters:</B><DD><CODE>weight</CODE> - the instance's weight<DD><CODE>attValues</CODE> - a vector of attribute values</DL></DL><HR><A NAME="BinarySparseInstance(double, int[], int)"><!-- --></A><H3>BinarySparseInstance</H3><PRE>public <B>BinarySparseInstance</B>(double weight, int[] indices, int 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><DL><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></DL><HR><A NAME="BinarySparseInstance(int)"><!-- --></A><H3>BinarySparseInstance</H3><PRE>public <B>BinarySparseInstance</B>(int 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><DL><DT><B>Parameters:</B><DD><CODE>numAttributes</CODE> - the size of the instance</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="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> 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[] array)</PRE><DL><DD>Does nothing, since we don't support missing values.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -