source: orange/Orange/doc/reference/LinearLearner.htm @ 9671:a7b056375472

Revision 9671:a7b056375472, 2.9 KB checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1<html>
2<HEAD>
3<LINK REL=StyleSheet HREF="../style.css" TYPE="text/css">
4<LINK REL=StyleSheet HREF="style-print.css" TYPE="text/css" MEDIA=print>
5</HEAD>
6<body>
7<index name="classifiers+logistic regresssion+linear+svm">
8<h1>Linear Learner</h1>
9<p><code>orange.LinearLearner</code> is a learner that uses the <a href="http://www.csie.ntu.edu.tw/~cjlin/liblinear/">LIBLINEAR library</a> backend that is very fast on large datasets.</p>
10<index name="classifiers+logistic regresssion+linear learner">
11<h2>LinearLearner</h2>
12<p>Linear learner learnes the attribute weights using one of the four possible methods.</p>
13<p class=section>Attributes</p>
14<dl class=attributes>
15  <dt>solver_type</dt>
16  <dd>Specifiys whitch method to use. Can be one of the folowing:
17    <ul><li><code>orange.LinearLearner.L2_LR (L2-regularized logistic regression, default)</li>
18    <li><code>orange.LinearLearner.L2LOSS_SVM_DUAL</code></li>
19    <li><code>orange.LinearLearner.L2LOSS_SVM</code></li>
20    <li><code>orange.LinearLearner.L1LOSS_SVM_DUAL</code></li>
21    </ul>
22    Note that only <code>L2_LR</code> supports probabilty esstimations.</dd>
23  <dt>eps</dt>
24  <dd>Stopping criteria (default 0.01)</dd>
25  <dt>C</dt>
26  <dd>Regularization parameter (default 1.0)</dd>
27</dl>
28
29<index name="classifiers+logistic regresssion+linear classifier">
30<h2>LinearClassifeir</h2>
31<p>Linear classifiers that uses one class vs. rest strategy for multi-class classification. It supports probability esstimation only if it was build with L2-regularized logistic regression learner.</p>
32<p class=section> Attributes</p>
33<dl class=attributes>
34  <dt>weights</dt>
35  <dd>A list of computed weight vectors for all one class vs. rest classifiers</dd>
36<dl>
37
38<h2>Examples</h2>
39<p>Part of <a href="linear-learner.py">linear-learner.py</a>
40<xmp class=code>data = orange.ExampleTable("iris")
41classifier = orange.LinearLearner(data)
42
43for i, cls_name in enumerate(data.domain.classVar.values):
44    print "Attribute weights for %s vs. rest classification:\n\t" % cls_name,
45    for attr, w in  zip(data.domain.attributes, classifier.weights[i]):
46        print "%s: %.3f " % (attr.name, w),
47    print
48</xmp>
49
50<p>Produces the output:</p>
51<xmp class=code>
52Attribute weights for Iris-setosa vs. rest classification:
53    sepal length: 0.463  sepal width: 1.464  petal length: -2.251  petal width: -1.025
54Attribute weights for Iris-versicolor vs. rest classification:
55    sepal length: 0.566  sepal width: -1.482  petal length: 0.548  petal width: -1.415
56Attribute weights for Iris-virginica vs. rest classification:
57    sepal length: -1.862  sepal width: -1.640  petal length: 2.474  petal width: 2.587
58...
59</xmp>
60
61<hr>
62
63<H2>References</H2>
64
65<p>R.-E. Fan, K.-W. Chang, C.-J. Hsieh, X.-R. Wang, and C.-J. Lin. LIBLINEAR: A Library for Large Linear Classification, Journal of Machine Learning Research 9(2008), 1871-1874. Software available at <a
66href=http://www.csie.ntu.edu.tw/~cjlin/liblinear>http://www.csie.ntu.edu.tw/~cjlin/liblinear</a></p>
67
68</body></html>
Note: See TracBrowser for help on using the repository browser.