source: orange/docs/reference/rst/code/ @ 9823:7f9c3f3c6474

Revision 9823:7f9c3f3c6474, 690 bytes checked in by lanumek, 2 years ago (diff)

Changed names of data sets (table replaced with data or name of the data set).

1# Description: CN2 Rule Induction on Titanic dataset
2# Category:    classification
3# Uses:        titanic
4# Referenced:  Orange.classification.rules
5# Classes:     Orange.classification.rules.CN2Learner
7import Orange
8# Read some data
9titanic ="titanic")
11# construct the learning algorithm and use it to induce a classifier
12cn2_learner = Orange.classification.rules.CN2Learner()
13cn2_clasifier = cn2_learner(titanic)
15# ... or, in a single step.
16cn2_classifier = Orange.classification.rules.CN2Learner(titanic)
18# All rule-base classifiers can have their rules printed out like this:
19for r in cn2_classifier.rules:
20    print Orange.classification.rules.rule_to_string(r)
Note: See TracBrowser for help on using the repository browser.