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

📄 usersguide.html

📁 数据挖掘算法
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Cahit Arf User's Guide</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="ca.css"/>
</head>
<body>
<div id="main">
<div id="menu">
    <h3>Contents</h3>
    <p><a href="#installation">Instaallation</a></p>
    <p><a href="#options">Options File Format</a></p>
    <p><a href="#modeCmd">Command Line Mode</a></p>
    <p><a href="#modeWizard">Wizard Mode</a></p>
    <p><a href="#jdbcDrivers">Obtaining JDBC Driver</a></p>
	<hr width="95%" noshade>
    <p><a href="index.html">Back to the Main Page</a></p>
    <p>&nbsp;</p>
</div>
  <h1>Cahit Arf 1.0 User's Guide </h1>
  <h2><a name="installation"></a>Installation</h2>
    
  <p>Since you are reading this manual on your computer, it means that Cahit Arf 
     is already installed. Now, you need to obtain JDBC driver of your database 
    and to create your options file(s) using your favorite text editor or 
    Cahit Arf's interactive wizard. </p>
  <p>In order to make available your JDBC drivers for Cahit Arf, just copy the 
    Java archive (.jar) files of drivers into <code>'&lt;CahitAtf base dir&gt;/lib'</code>
		 directory. 
    No additional classpath modification is necessary. On run-time, Cahit Arf will 
		scan that directory for drivers. If you do not have relevant JDBC driver right now, 
    <a href="#jdbcDrivers">Obtaining JDBC Drivers</a> section might be useful.</p>
  <h2><a name="options"></a>Options File Format</h2>
  <p>You can <strong>skip</strong> this section if you wish to use the Wizard. </p>
  <p>Cahit Arf needs to know</p>
  <ul>
		<li><b>How to connect to your database</b> : The full Java class name of the JDBC driver, 
		    the database server location (URL), your login id and password.</li>
		<li><b>How to collect data</b> : The SQL 'select' statement for querying data table(s).</li>
		<li><b>How to convert data</b> : The 'Relation' name; attribute names and types according to columns of
		    query results.</li>
  </ul>
	<p>We deliver all these informatin to Cahit Arf using an options file which includes several </p>
	<pre>option name=option value</pre>
	<p>formated options.  Each option - value pair should be placed into one line. Lines started with '#' character are comment lines and they have no effect on Cahit Arf. In order to increase readability, you can leave some lines blank as well. An options file may be created either with a text editor manually or Cahit Arf Wizard. Cahit Arf options are as follows : </p>
	<dl>
    <dt>relation</dt>
    <dd>The value of WEKA relation name (e.g. <code>Weather</code>)</dd>
    <dt>jdbc.driver</dt>
    <dd>The full Java class name of the main driver class of your JDBC driver (e.g <code>org.gjt.mm.mysql.Driver</code>)</dd>
    <dt>jdbc.url</dt>
    <dd>A URL statement indicates your database location. Refer to jour JDBC driver documentation 
      for URL composition rules (e.g. <code>jdbc:mysql://localhost/mydb</code>)</dd>
    <dt>jdbc.user, jdbc.password</dt>
    <dd>User name and password to login to the database server. Unnecessary one(s) might 
      be omitted or left blank of value part.</dd>
    <dt>jdbc.select</dt>
    <dd>The SQL Select statement  (e.g. <code>SELECT * FROM WEATHER_OBSERVATIONS</code> ). The number of columns returned from the query must be equal to 
      the number of attributes. Attribute names, on the other 
      hand, would be different from column names of the result set.</dd>
    <dt>attr.0, attr.1 ... attr.n</dt>
    <dd>Attribute definitions acording to columns of the result set of the given select 
      statement. Be careful: attribute indexes start from 0, not 1. 
			attr.0 correspondes to the first column of the query results, 
			attr.1 to the second column and so forth. If you ommit attribute definitions, 
			Cahit Arf generates them from query result.</dd>
    <dt>
    <dd>Each attribute definetion contains two or three  parts separated by ':' (colon) character. 
		The format is : <b><code>attribute-name:class|numeric|string[:q|qs]</code></b> . 
		<code>attribute-name</code> does not have to be the same with the corresponding 
		column name. The type value would be one of <code>class</code>, <code>numeric</code>, 
		or <code>string</code>. <code>class</code> type differs from <code>string</code> 
		with declaring all possible values at the header of the ARFF file. The last
		 and optional parameter denotes that attribute values will be quoted or not. 
		 <code>q</code> means double quote, and <code>qs</code> single quote. 
		 If you omit the quote field, the values will not be quoted. 
		 You should not list the possible class values of <code>class</code> typed 
		 attributes, Cahit Arf extractor will generate them from the result set automaticaly.</dd>
    </dt>
  </dl>
  <p>A sample option file content would be as follows for 'weather.arff' sample data file which 
    comes with WEKA distribution :</p>
  <a name="sample"></a>
  <pre>
#Created by Cahit Arf Wizard
#Mon Sep 22 12:35:04 GMT+02:00 2003
relation=Weather

jdbc.driver=org.gjt.mm.mysql.Driver
jdbc.url=jdbc:mysql://localhost/weatherdb
jdbc.user=ayhan
jdbc.password=mypasswd
jdbc.select=SELECT * FROM WEATHER_OBSERVATIONS

attr.0=outlook:class:qs
attr.1=temperature:numeric
attr.2=humidity:numeric
attr.3=windy:class
attr.4=play:class
</pre>
  <h2><a name="modeCmd"></a>Command Line Mode</h2>
  <p>if java executable is in your PATH and your current directory is Cahit Arf root directory, a typical command line would be as follows : </p>
  <pre>java -cp CahitArf.jar com.prcomps.cahitarf.Db2Arff &lt;options file path&gt;  &lt;output file path&gt;
</pre>
<p>If if the output file path denotes an existing file, it will be overridden.</p>
  <h2><a name="modeWizard"></a>Wizard Mode</h2>
  <p>You can start Cahit Arf Wizard with either doule clicking <code>CahitArf.jar</code> 
	file or typing a command such as :</p>
  <pre>java -jar CahitArf.jar</pre>
  <p>Step 1 - Creating a new or selecting an existing options set</p>
  <blockquote><p>Before to depart, you should decide to open an existing options 
  file or create a new one. In addition to options file building, 
	you wuold prefere to use the wizard for querying and 
  creating an ARFF output file rather than use command line mode. </p></blockquote>
  <p>Step 2 - Providing database connection data and testing connection</p>
  <blockquote>
    <p>Refer to the specific JDBC documentations for the driver class and how to construct JDBC URL.
		We supplied the class names and URL templates of some widely used drivers.  
		If you are creating new options file or modifying the connection properties of an existing one, we strongly recommand you to test  your connection before the next step. </p>
  </blockquote>
  <p>Step 3 - Building SQL query string</p>
  <blockquote>
    <p>After typing the SQL select statement, press the 'Rietrive Sample Rows' button which attempts to rietrive up to 50 rows using the query string you provide.</p>
  </blockquote>
  <p>Step 4 - Defining attributes</p>
  <blockquote>
    <p>You can change attribute names with double clcking over the name you wish to change.  Attribute type and quotation options are listed by combo boxes. At this point, 
		you gave all necessary information to Cahit Arf, you had better save them 
		as an options file right now. </p>
  </blockquote>
  <p>Step 5 - Generating an ARFF output</p>
  <blockquote>
    <p>If you tested your connection and query, you are ready to generate an ARFF 
		output. You can do this in three ways : 1) If you are expacting a large amount 
		of output, it would be a good idea to generate a sample output to the screen. 
		2) You can generate the complete output to the screen and copy-paste the output
		into a file via a text editor. 3) You can redirect the output to a file you specified. </p>
  </blockquote>
  <h2><a name="jdbcDrivers"></a>Obtaining JDBC Drivers</h2>
  <p>JDBC drivers, in general, are operating system independend pure Java classes 
    packed as Java archive (.jar) files. As mentioned in <a href="#installation">
		Installation</a> part, in order to make available JDBC driver for Cahit Arf, 
		you should to obtain the driver from your database (or 3rd party JDBC driver)
		 developer, and then put its driver .jar file into <code>&lt;CahitArf directory&gt;/lib</code> 
		 directory. Here are web pages of some widely used JDBC drivers :</p>
  <p><a href="http://www.mysql.com/downloads/api-jdbc-stable.html">MySQL</a></p>
  <p><a href="http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html">Oracle</a></p>
  <p><a href="http://jtds.sourceforge.net/">MS SQL Server</a></p>
  <p><a href="http://www.postgresql.org/mirrors-ftp.html">Postgresql</a></p>
  <p><a href="http://mckoi.com/database/">Mckoi SQL</a></p>
  <p><a href="http://www.sapdb.org/7.4/sap_db_software.htm">SAP DB</a></p>
  <p><a href="http://www14.software.ibm.com/webapp/download/product.jsp?cat=database&S_TACT=&S_CMP=&id=MBEN-4ZKP2T&s=c">Informix</a></p>
  <p>&nbsp;</p>
</div>
</body>
</html>

⌨️ 快捷键说明

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