emacs.d/clones/lisp/www.cliki.net/decisiontree.html

104 lines
5.4 KiB
HTML
Raw Normal View History

2022-10-07 15:47:14 +02:00
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>CLiki: decisiontree</title>
<link rel="alternate" type="application/atom+xml" title="ATOM feed of edits to current article"
href="https://www.cliki.net/site/feed/article.atom?title=decisiontree">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/colorize.css">
</head>
<body>
<span class="hidden">CLiki - decisiontree</span>
<div id="content"><div id="content-area"><div id="article-title">decisiontree</div><div id="article">This package provides an implementation of an <a href="algorithm.html" class="category">algorithm</a> that creates a decision tree.<p>It provides the following features<p><ul>
<li> Classification of multiple classes of instances
</li>
<li> Handling attributes with continuous values (A bit clunky for the timebeing)
</li>
<li> Function for selecting attributes can be modified by changing the <tt>*attribute-selection-function*</tt> variable
</li>
</ul><p>Repository: <a href="https://github.com/reubencornel/cl-decisiontree">https://github.com/reubencornel/cl-decisiontree</a><p><h2>Usage</h2>
To train a decision tree call the function <tt>create-classifier</tt> function.
This function requires a list of training instances.<p>A training instance can be created by calling the macro <tt>define-instance</tt>.
This macro requires the first argument to be the name of the class to
which the instance belongs and the rest are list of attribute values.<p>The <tt>create-classifier</tt> returns the root
node of the decision tree. This inturn is used by
the <tt>classify</tt> function that classifies new
instances.<p><h3>Continuous values</h3>
Before passing a list of continous values to
the <tt>create-classifier</tt> function the
continous values need to be removed. As of now this is what the
algorithm that I have written does.<p><ul>
<li> It sorts the instances based on the values of the attribute in
ascending order
</li>
<li> Then for every instance in the list it check the value of the
attribute and the class and identifies ranges where the classes are same
</li>
<li> It then replaces all the continuous values with symbols that were
idenified by the previous step
</li>
<li> It returns a list of ranges and the corresponding symbols
</li>
</ul> <p>This is done by the
function <tt>generate-range-symbols</tt>. When
trying to classify any new instance the continuous values need to be
replaced, this is done by the
function <tt>replace-continuous-values</tt>. This
function requires the range list generated by
the <tt>generate-range-symbols</tt> function, the
instance and the attribute that is supposed to be continous<p><h2>Todo</h2>
<ul>
<li> Addition of rule post pruning
</li>
<li> A set of newer attribute selection functions
</li>
<li> Better method to define and use attributes with continous values
(requesting suggestions)
<ul>
<li> I want to know if there is a means by which I can define
instances with continous values such that when defining new
instances the continous values are replaced automatically.
</li>
</ul>
</li>
</ul><p>If there are any suggestions/bugs please mail me at reuben dot cornel at gmail dot com. Thank you!!!<p><hr>
<a href="Artificial&#32;Intelligence.html" class="category">Artificial Intelligence</a></div></div>
<div id="footer" class="buttonbar"><ul><li><a href="decisiontree.html">Current version</a></li>
<li><a href="https://www.cliki.net/site/history?article=decisiontree">History</a></li>
<li><a href="https://www.cliki.net/site/backlinks?article=decisiontree">Backlinks</a></li><li><a href="https://www.cliki.net/site/edit-article?title=decisiontree&amp;from-revision=3800110267">Edit</a></li><li><a href="https://www.cliki.net/site/edit-article?create=t">Create</a></li></ul></div>
</div>
<div id="header-buttons" class="buttonbar">
<ul>
<li><a href="https://www.cliki.net/">Home</a></li>
<li><a href="https://www.cliki.net/site/recent-changes">Recent Changes</a></li>
<li><a href="CLiki.html">About</a></li>
<li><a href="Text&#32;Formatting.html">Text Formatting</a></li>
<li><a href="https://www.cliki.net/site/tools">Tools</a></li>
</ul>
<div id="search">
<form action="https://www.cliki.net/site/search">
<label for="search_query" class="hidden">Search CLiki</label>
<input type="text" name="query" id="search_query" value="" />
<input type="submit" value="search" />
</form>
</div>
</div>
<div id="pageheader">
<div id="header">
<span id="logo">CLiki</span>
<span id="slogan">the common lisp wiki</span>
<div id="login"><form method="post" action="https://www.cliki.net/site/login">
<label for="login_name" class="hidden">Account name</label>
<input type="text" name="name" id="login_name" class="login_input" />
<label for= "login_password" class="hidden">Password</label>
<input type="password" name="password" id="login_password" class="login_input" />
<input type="submit" name="login" value="login" id="login_submit" /><br />
<div id="register"><a href="https://www.cliki.net/site/register">register</a></div>
<input type="submit" name="reset-pw" value="reset password" id="reset_pw" />
</form>
</div>
</div>
</div>
</body></html>