examplesetfactory.html

来自「数据挖掘方面最新软件」· HTML 代码 · 共 410 行 · 第 1/2 页

HTML
410
字号
<!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.5.0_13) on Mon Jul 14 01:33:48 CEST 2008 --><TITLE>ExampleSetFactory (RapidMiner Class Documentation)</TITLE><META NAME="keywords" CONTENT="com.rapidminer.example.ExampleSetFactory class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="ExampleSetFactory (RapidMiner Class Documentation)";}</SCRIPT><NOSCRIPT></NOSCRIPT></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=2 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>&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="class-use/ExampleSetFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</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="../../../com/rapidminer/example/ExampleSet.html" title="interface in com.rapidminer.example"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../com/rapidminer/example/FastExample2SparseTransform.html" title="class in com.rapidminer.example"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?com/rapidminer/example/ExampleSetFactory.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="ExampleSetFactory.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_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">com.rapidminer.example</FONT><BR>Class ExampleSetFactory</H2><PRE>java.lang.Object  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>com.rapidminer.example.ExampleSetFactory</B></PRE><HR><DL><DT><PRE>public class <B>ExampleSetFactory</B><DT>extends java.lang.Object</DL></PRE><P><p>This class can be used to easily create @link ExampleSet}s and the underlying  <A HREF="../../../com/rapidminer/example/table/ExampleTable.html" title="interface in com.rapidminer.example.table"><CODE>ExampleTable</CODE></A> with simple method calls. Please note that it is often better  to explicitly fill the data table yourself, or, if possible, to extend <A HREF="../../../com/rapidminer/example/table/ExampleTable.html" title="interface in com.rapidminer.example.table"><CODE>ExampleTable</CODE></A> or <A HREF="../../../com/rapidminer/example/table/DataRow.html" title="class in com.rapidminer.example.table"><CODE>DataRow</CODE></A> to provide the necessary data to RapidMiner. For memory usage reasons, it is also often not recommended to create the data matrix from your existing data  in an extra step and then use one of the factory methods. In these cases, it is better  to directly fill an <A HREF="../../../com/rapidminer/example/table/ExampleTable.html" title="interface in com.rapidminer.example.table"><CODE>ExampleTable</CODE></A> from your data source.</p>    <p>However, in some cases it might be more convenient to use this class in order to  create example sets from data matrices in a fast and simple way. The resulting example  set will be backed up by a <A HREF="../../../com/rapidminer/example/table/MemoryExampleTable.html" title="class in com.rapidminer.example.table"><CODE>MemoryExampleTable</CODE></A>. If the data set  at hand is completely numerical, one can simply use one of the double matrix methods provided by this class. This will lead to an <A HREF="../../../com/rapidminer/example/ExampleSet.html" title="interface in com.rapidminer.example"><CODE>ExampleSet</CODE></A> containing only numerical attributes. Otherwise, one have to use the Object matrix methods. Please note that only String objects and Number objects (Double, Integer) are allowed in this case. Otherwise an Exception will be thrown. In case of the Object matrix methods the method tries to identify the type itself and initialized the example set with the  correct attribute types (nominal or numerical).</p>  <p>Please note that the internal representation of the nominal attribute values  depend on the order they appear in the data set. If this is not allowed (e.g.  for the label attribute of different training and testing sets, where the  internal representation should be the same in order to prevent label flips) one should definitely use the usual ExampleTable - ExampleSet construction where the nominal attribute value mapping can and should be performed beforehand. In these cases the usage of this class is definitely not recommended.</p><P><P><DL><DT><B>Version:</B></DT>  <DD>$Id: ExampleSetFactory.java,v 1.3 2008/05/09 19:22:42 ingomierswa Exp $</DD><DT><B>Author:</B></DT>  <DD>Ingo Mierswa</DD></DL><HR><P><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../com/rapidminer/example/ExampleSetFactory.html#ExampleSetFactory()">ExampleSetFactory</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../com/rapidminer/example/ExampleSet.html" title="interface in com.rapidminer.example">ExampleSet</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/example/ExampleSetFactory.html#createExampleSet(double[][])">createExampleSet</A></B>(double[][]&nbsp;data)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a numerical example set from the given data matrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../com/rapidminer/example/ExampleSet.html" title="interface in com.rapidminer.example">ExampleSet</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/example/ExampleSetFactory.html#createExampleSet(double[][], double[])">createExampleSet</A></B>(double[][]&nbsp;data,                 double[]&nbsp;labels)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a numerical example set from the given data matrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../com/rapidminer/example/ExampleSet.html" title="interface in com.rapidminer.example">ExampleSet</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/example/ExampleSetFactory.html#createExampleSet(double[][], int)">createExampleSet</A></B>(double[][]&nbsp;data,                 int&nbsp;classColumn)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a numerical example set from the given data matrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../com/rapidminer/example/ExampleSet.html" title="interface in com.rapidminer.example">ExampleSet</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/example/ExampleSetFactory.html#createExampleSet(java.lang.Object[][])">createExampleSet</A></B>(java.lang.Object[][]&nbsp;data)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a mixed-type example set from the given data matrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;<A HREF="../../../com/rapidminer/example/ExampleSet.html" title="interface in com.rapidminer.example">ExampleSet</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../com/rapidminer/example/ExampleSetFactory.html#createExampleSet(java.lang.Object[][], int)">createExampleSet</A></B>(java.lang.Object[][]&nbsp;data,                 int&nbsp;classColumn)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a numerical example set from the given data matrix.</TD>

⌨️ 快捷键说明

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