Ignore:
Timestamp:
02/07/12 22:08:39 (2 years ago)
Author:
blaz <blaz.zupan@…>
Branch:
default
Message:

Polished discretization scripts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/reference/rst/code/discretization.py

    r9927 r9988  
    2020 
    2121print "\nManual construction of Interval discretizer - single attribute" 
    22 idisc = Orange.feature.discretization.Interval(points = [3.0, 5.0]) 
     22idisc = Orange.feature.discretization.IntervalDiscretizer(points = [3.0, 5.0]) 
    2323sep_l = idisc.construct_variable(data.domain["sepal length"]) 
    2424data2 = data.select([data.domain["sepal length"], sep_l, data.domain.classVar]) 
     
    2828 
    2929print "\nManual construction of Interval discretizer - all attributes" 
    30 idisc = Orange.feature.discretization.Interval(points = [3.0, 5.0]) 
     30idisc = Orange.feature.discretization.IntervalDiscretizer(points = [3.0, 5.0]) 
    3131newattrs = [idisc.construct_variable(attr) for attr in data.domain.attributes] 
    3232data2 = data.select(newattrs + [data.domain.class_var]) 
     
    6767 
    6868print "\nManual construction of EqualWidth - all attributes" 
    69 edisc = Orange.feature.discretization.EqualWidth(first_cut = 2.0, step = 1.0, number_of_intervals = 5) 
     69edisc = Orange.feature.discretization.EqualWidthDiscretizer(first_cut=2.0, step=1.0, n=5) 
    7070newattrs = [edisc.constructVariable(attr) for attr in data.domain.attributes] 
    7171data2 = data.select(newattrs + [data.domain.classVar]) 
Note: See TracChangeset for help on using the changeset viewer.