databaseexamplesource.html

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

HTML
693
字号
<!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:36:26 CEST 2008 --><TITLE>DatabaseExampleSource (RapidMiner Class Documentation)</TITLE><META NAME="keywords" CONTENT="com.rapidminer.operator.io.DatabaseExampleSource class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="DatabaseExampleSource (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/DatabaseExampleSource.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/operator/io/DatabaseExampleSetWriter.html" title="class in com.rapidminer.operator.io"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../com/rapidminer/operator/io/DBaseExampleSource.html" title="class in com.rapidminer.operator.io"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html?com/rapidminer/operator/io/DatabaseExampleSource.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="DatabaseExampleSource.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;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&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.operator.io</FONT><BR>Class DatabaseExampleSource</H2><PRE>java.lang.Object  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/rapidminer/operator/Operator.html" title="class in com.rapidminer.operator">com.rapidminer.operator.Operator</A>      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../com/rapidminer/operator/io/ResultSetExampleSource.html" title="class in com.rapidminer.operator.io">com.rapidminer.operator.io.ResultSetExampleSource</A>          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.rapidminer.operator.io.DatabaseExampleSource</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../com/rapidminer/gui/wizards/ConfigurationListener.html" title="interface in com.rapidminer.gui.wizards">ConfigurationListener</A>, <A HREF="../../../../com/rapidminer/gui/wizards/PreviewListener.html" title="interface in com.rapidminer.gui.wizards">PreviewListener</A>, <A HREF="../../../../com/rapidminer/parameter/ParameterHandler.html" title="interface in com.rapidminer.parameter">ParameterHandler</A>, <A HREF="../../../../com/rapidminer/tools/LoggingHandler.html" title="interface in com.rapidminer.tools">LoggingHandler</A></DD></DL><HR><DL><DT><PRE>public class <B>DatabaseExampleSource</B><DT>extends <A HREF="../../../../com/rapidminer/operator/io/ResultSetExampleSource.html" title="class in com.rapidminer.operator.io">ResultSetExampleSource</A></DL></PRE><P><p>This operator reads an <A HREF="../../../../com/rapidminer/example/ExampleSet.html" title="interface in com.rapidminer.example"><CODE>ExampleSet</CODE></A> from an SQL database. The SQL query can be passed to RapidMiner via a parameter or, in case of long SQL statements, in a separate file. Please note that column names are often case sensitive. Databases may behave differently here.</p>  <p>The most convenient way of defining the necessary parameters is the  configuration wizard. The most important parameters (database URL and user name) will be automatically determined by this wizard and it is also possible to define the special attributes like labels or ids.</p>  <p>Please note that this operator supports two basic working modes:</p> <ol> <li>reading the data from the database and creating an example table in main memory</li> <li>keeping the data in the database and directly working on the database table </li> </ol> <p>The latter possibility will be turned on by the parameter &quot;work_on_database&quot;. Please note that this working mode is still regarded as experimental and errors might occur. In order to ensure proper data changes the database working mode is only allowed on a single table which must be defined with the parameter &quot;table_name&quot;.  IMPORTANT: If you encounter problems during data updates (e.g. messages that the result set is not  updatable) you probably have to define a primary key for your table.</p>  <p>If you are not directly working on the database, the data will be read with an arbitrary SQL query statement (SELECT ... FROM ... WHERE ...) defined by &quot;query&quot; or &quot;query_file&quot;. The memory mode is the recommended way of using this operator. This is especially important for following operators like learning schemes which would often load (most of) the data into main memory during the learning process. In these cases a direct working on the database is not recommended anyway.</p>  <h5>Warning</h5> As the java <code>ResultSetMetaData</code> interface does not provide information about the possible values of nominal attributes, the internal indices the nominal values are mapped to will depend on the ordering they appear in the table. This may cause problems only when processes are split up into a training process and an application or testing process. For learning schemes which are capable of handling nominal attributes, this is not a problem. If a learning scheme like a SVM is used with nominal data, RapidMiner pretends that nominal attributes are numerical and uses indices for the nominal values as their numerical value. A SVM may perform well if there are only two possible values. If a test set is read in another process, the nominal values may be assigned different indices, and hence the SVM trained is useless. This is not a problem for label attributes, since the classes can be specified using the <code>classes</code> parameter and hence, all learning schemes intended to use with nominal data are safe to use.<P><P><DL><DT><B>Version:</B></DT>  <DD>$Id: DatabaseExampleSource.java,v 1.11 2006/03/27 13:22:00          ingomierswa Exp $</DD><DT><B>Author:</B></DT>  <DD>Ingo Mierswa</DD><DT><B>To do:</B></DT>  <DD>Fix the above problem. This may not be possible effeciently since            it is not supported by the Java ResultSet interface.</DD></DL><HR><P><!-- =========== FIELD SUMMARY =========== --><A NAME="field_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>Field Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/operator/io/DatabaseExampleSource.html#PARAMETER_CLASSES">PARAMETER_CLASSES</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The parameter name for &quot;Whitespace separated list of possible class values of the label attribute.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/operator/io/DatabaseExampleSource.html#PARAMETER_DATABASE_SYSTEM">PARAMETER_DATABASE_SYSTEM</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The parameter name for &quot;Indicates the used database system&quot;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/operator/io/DatabaseExampleSource.html#PARAMETER_DATABASE_URL">PARAMETER_DATABASE_URL</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The parameter name for &quot;The complete URL connection string for the database, e.g.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/operator/io/DatabaseExampleSource.html#PARAMETER_PASSWORD">PARAMETER_PASSWORD</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The parameter name for &quot;Password for the database.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/operator/io/DatabaseExampleSource.html#PARAMETER_QUERY">PARAMETER_QUERY</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The parameter name for &quot;SQL query.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/operator/io/DatabaseExampleSource.html#PARAMETER_QUERY_FILE">PARAMETER_QUERY_FILE</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The parameter name for &quot;File containing the query.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../com/rapidminer/operator/io/DatabaseExampleSource.html#PARAMETER_TABLE_NAME">PARAMETER_TABLE_NAME</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The parameter name for &quot;Use this table if work_on_database is true or no other query is specified.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">

⌨️ 快捷键说明

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