Ticket #149 (closed bug: fixed)

Opened 6 years ago

Last modified 6 years ago

tree prepruning z minSubset ne dela pravilno

Reported by: blaz Owned by: janez
Milestone: 1.0 Component: orng_modules
Severity: major Keywords:
Cc: Blocking:
Blocked By:

Description

import orange import orngTree

data = orange.ExampleTable('adult_sample') tree = orngTree.TreeLearner(data, minSubset=100) orngTree.printTree(tree, leafStr="%N")

mi da izpis:

age<26.500 | fnlwgt<193451.500: 104.000 | fnlwgt>=193451.500: 100.000 age>=26.500 | education-num<12.500 | | marital-status=Divorced: 107.000 | | marital-status=Never-married: 85.000 | | marital-status=Separated: 28.000 | | marital-status=Widowed: 31.000 | | marital-status=Married-spouse-absent: 10.000 | | marital-status=Married-AF-spouse<null node>: <null node> | | marital-status=Married-civ-spouse | | | education-num>=9.500: 100.000 | | | education-num<9.500 | | | | fnlwgt<175033.000: 102.000 | | | | fnlwgt>=175033.000: 104.000 | education-num>=12.500 | | hours-per-week<42.500: 106.000 | | hours-per-week>=42.500: 100.000

kjer imajo nekateri listi manjse stevilo primerov od zahtevanih (npr. 85 < 100). so danes opazili studenti med predavanji.

Change History

comment:1 Changed 6 years ago by blaz

import orange import orngTree

data = orange.ExampleTable('adult_sample')
tree = orngTree.TreeLearner(data, minSubset=100)
orngTree.printTree(tree, leafStr="%N")

mi da izpis:

age<26.500
|    fnlwgt<193451.500: 104.000
|    fnlwgt>=193451.500: 100.000
age>=26.500
|    education-num<12.500
|    |    marital-status=Divorced: 107.000
|    |    marital-status=Never-married: 85.000
|    |    marital-status=Separated: 28.000
|    |    marital-status=Widowed: 31.000
|    |    marital-status=Married-spouse-absent: 10.000
|    |    marital-status=Married-AF-spouse<null node>: <null node>
|    |    marital-status=Married-civ-spouse
|    |    |    education-num>=9.500: 100.000
|    |    |    education-num<9.500
|    |    |    |    fnlwgt<175033.000: 102.000
|    |    |    |    fnlwgt>=175033.000: 104.000
|    education-num>=12.500
|    |    hours-per-week<42.500: 106.000
|    |    hours-per-week>=42.500: 100.000

kjer imajo nekateri listi manjse stevilo primerov od zahtevanih (npr. 85 < 100). so danes opazili studenti med predavanji.

comment:2 Changed 6 years ago by janez

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.