Ignore:
Timestamp:
01/06/13 00:27:59 (16 months ago)
Author:
blaz <blaz.zupan@…>
Branch:
default
Message:

new tutorial

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/tutorial/rst/code/assoc1.py

    r9374 r11051  
    1 # Description: Creates a list of association rules, selects five rules and prints them out 
    2 # Category:    description 
    3 # Uses:        imports-85 
    4 # Classes:     orngAssoc.build, Preprocessor_discretize, EquiNDiscretization 
    5 # Referenced:  assoc.htm 
     1import orngAssoc 
     2import Orange 
    63 
    7 import orange, orngAssoc 
     4data = Orange.data.Table("imports-85") 
     5data = Orange.data.Table("zoo") 
     6#data = Orange.data.preprocess.Discretize(data, \ 
     7#  method=Orange.data.discretization.EqualFreq(numberOfIntervals=3)) 
     8# data = data.select(range(10)) 
    89 
    9 data = orange.ExampleTable("imports-85") 
    10 data = orange.Preprocessor_discretize(data, \ 
    11   method=orange.EquiNDiscretization(numberOfIntervals=3)) 
    12 data = data.select(range(10)) 
    13  
    14 rules = orange.AssociationRulesInducer(data, support=0.4) 
     10rules = Orange.associate.AssociationRulesInducer(data, support=0.4) 
    1511 
    1612print "%i rules with support higher than or equal to %5.3f found.\n" % (len(rules), 0.4) 
Note: See TracChangeset for help on using the changeset viewer.