Commit 19d34264 authored by Hao Hu's avatar Hao Hu Committed by Hao Hu
Browse files

initial commit

parents
# MaxSAT encoding for Decision Tree
Source code for paper
[**Learning Optimal Decision Trees via MaxSAT and its Integeration in AdaBoost(pre-print)**](http://homepages.laas.fr/msiala/preprints/20-ijcai.pdf)
Hao Hu, Mohamed Siala, Emmanuel Hebrard, Marie-José Huguet
[IJCAI20](https://www.ijcai20.org/), International Joint Conference on Artificial Intelligence, July 2020, Yokuhama, Japan.
## Prerequisites
Some necessary python packages needed to execute the code:
-**python-sat**: check in (https://github.com/pysathq/pysat). It contains the API for different SAT solver and RC2 as MaxSAT solver.
-**scikit-learn**: check in (https://scikit-learn.org/stable/).
-**dl8.5**: check in (https://pypi.org/project/dl8.5/). It is the package of algorithm DL8.5.
Necessary MaxSAT solver:
-**Loandra**: check in (https://github.com/jezberg/loandra). Loandra is the winner of 2019 MaxSAT Evaluation in Incomplete Track(https://maxsat-evaluations.github.io/2019/rankings.html).
The install path of Loandra should be updated in function "generate_decision_tree_of_maxSAT" in script 'binarytree/mindt/dtencoder/dtencoder.py'.
*Small hint: You can use other MaxSAT solver by updating the install path in script indicated beforfe.*
## A brief explaination in code structure
-**binarytree/mindt**: This folder contains all source code relating to contructing decision trees via MaxSAT encoding. In datails, some files are important.
1. `maxSATdt_specific.py`: running script for learning decision tree via MaxSAT encoding.
2. `adaboost_MaxSATdt.py`: running script for learning AdaBoost model based on decision trees learnt by MaxSAT encoding.
3. `bagging_MaxSATdt.py`: running script for learning Bagging model based on decision trees learnt by MaxSAT encoding.
4. `options.py`: parameter file containing all useful parameters. For example, **max_depth** indicates the maximum depth for decision tree. Parameters are given in command, more parameters can be checked in the file.
5. `dtencoder/dtencoder.py`: core file for generating all constraints.
6. `dt_traditional`: folder contains the running script for CART and Dl8.5.
-**benchmarks**: Folder contains all datasets we used in the experiment. Dataset ends with `-un` indicates it is already transformed into binary by `one-hot encoding`.
-**results_\***: Such folders are set to store the results of different methods.
-**\*_dt**: Such folders are set to store the tree structure file as base learner generated in AdaBoost and Bagging.
-**wcnf**: Folder stores the wcnf file and tree structure generated by MaxSAT encoding.
## A simple example to use
python3 binarytree/mindt/maxSATdt_specific.py -a MaxSATdtencoding --max_depth 3 --ratio 0.8 --rest True --reduced 1 --seed 2019 --complete 0 --gtimeout 900 binarytree/benchmarks/datasetCP4IMpure/anneal-un.csv
or
python3 binarytree/mindt/maxSATdt_specific.py -a MaxSATdtencoding --max_depth 3 --kfold 5 --reduced 1 --seed 2019 --complete 0 --gtimeout 900 binarytree/benchmarks/datasetCP4IMpure/anneal-un.csv
*A small reminder for parameter choosing: In default, we use Loandra as incomplete MaxSAT solver, moreover, cause Loandra has two phase of solving the WCNF given (core-boosted phase and linear search phase), we consider the time limit for core-boosted phase is important. In all of our experiment, we set 600 seconds for core-boosted phase.*
## Author
- Hao Hu (hhu@laas.fr)
- Mohamed Siala (siala@laas.fr)
- Emmanuel Hebrard (hebrard@laas.fr)
- Marie-Jo Huguet (huguet@laas.fr)
Feel free to contact us if you have any confusion in the code.
## License
This project is licensed under the [2 clause BSD license](https://opensource.org/licenses/BSD-2-Clause).
## Acknowledgments
We thank Nina Narodytska for kindly sharing the source code of the original SAT model of learning decision trees.
\ No newline at end of file
#!/usr/bin/env python
#-*- coding:utf-8 -*-
##
import inspect, os, sys
sys.path.insert(0, os.path.join(os.path.realpath(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0])), '../pysat-module/'))
sys.path.insert(0, os.path.join(os.path.realpath(os.path.abspath(os.path.split(inspect.getfile(inspect.currentframe()))[0])), '../hitman/py/'))
if __name__ == '__main__':
# only one parameter: the path of the text results
if not len(sys.argv) == 2:
raise ValueError("It must give one exact parameter!!")
dataset_path = sys.argv[1]
pos_cnt = 0
neg_cnt = 0
with open(dataset_path, 'r') as f:
lines = f.readlines()
for line in lines:
label = line.strip().split(',')[-1].strip()
if label == '0':
neg_cnt = neg_cnt + 1
else:
pos_cnt = pos_cnt + 1
print("postive " + str(pos_cnt))
print("negative " + str(neg_cnt))
print(pos_cnt * 1.0/ (neg_cnt+ pos_cnt))
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
@relation lymphography-rm_attr_w_10p_missing-rm_inst_w_missing-weka.filters.unsupervised.attribute.Discretize-D-F-B8-M-1.0-Rfirst-last-nominal2binarysplit_minmulti.py-choose_class.py-vmetastases
@0: lymphatics = normal
@1: lymphatics = arched
@2: lymphatics = deformed
@3: lymphatics = displaced
@4: block_of_affere = no
@5: block_of_affere = yes
@6: bl_of_lymph_c = no
@7: bl_of_lymph_c = yes
@8: bl_of_lymph_s = no
@9: bl_of_lymph_s = yes
@10: by_pass = no
@11: by_pass = yes
@12: extravasates = no
@13: extravasates = yes
@14: regeneration_of = no
@15: regeneration_of = yes
@16: early_uptake_in = no
@17: early_uptake_in = yes
@18: lym_nodes_dimin = \'(-inf-1.5]\'
@19: lym_nodes_dimin = \'(1.5-inf)\'
@20: lym_nodes_dimin = \'(-inf-2.5]\'
@21: lym_nodes_dimin = \'(2.5-inf)\'
@22: lym_nodes_enlar = \'(-inf-1.5]\'
@23: lym_nodes_enlar = \'(1.5-inf)\'
@24: lym_nodes_enlar = \'(-inf-2.5]\'
@25: lym_nodes_enlar = \'(2.5-inf)\'
@26: lym_nodes_enlar = \'(-inf-3.5]\'
@27: lym_nodes_enlar = \'(3.5-inf)\'
@28: changes_in_lym = bean
@29: changes_in_lym = oval
@30: changes_in_lym = round
@31: defect_in_node = no
@32: defect_in_node = lacunar
@33: defect_in_node = lac_margin
@34: defect_in_node = lac_central
@35: changes_in_node = no
@36: changes_in_node = lacunar
@37: changes_in_node = lac_margin
@38: changes_in_node = lac_central
@39: changes_in_stru = no
@40: changes_in_stru = grainy
@41: changes_in_stru = drop_like
@42: changes_in_stru = coarse
@43: changes_in_stru = diluted
@44: changes_in_stru = reticular
@45: changes_in_stru = stripped
@46: changes_in_stru = faint
@47: special_forms = no
@48: special_forms = chalices
@49: special_forms = vesicles
@50: dislocation_of = no
@51: dislocation_of = yes
@52: exclusion_of_no = no
@53: exclusion_of_no = yes
@54: no_of_nodes_in = \'(-inf-1.5]\'
@55: no_of_nodes_in = \'(1.5-inf)\'
@56: no_of_nodes_in = \'(-inf-2.5]\'
@57: no_of_nodes_in = \'(2.5-inf)\'
@58: no_of_nodes_in = \'(-inf-3.5]\'
@59: no_of_nodes_in = \'(3.5-inf)\'
@60: no_of_nodes_in = \'(-inf-4.5]\'
@61: no_of_nodes_in = \'(4.5-inf)\'
@62: no_of_nodes_in = \'(-inf-5.5]\'
@63: no_of_nodes_in = \'(5.5-inf)\'
@64: no_of_nodes_in = \'(-inf-6.5]\'
@65: no_of_nodes_in = \'(6.5-inf)\'
@66: no_of_nodes_in = \'(-inf-7.5]\'
@67: no_of_nodes_in = \'(7.5-inf)\'
@class: 1='metastases' 0={'normal','malign_lymph','fibrosis'}
@data
1 5 6 8 10 12 14 17 18 20 23 25 27 30 34 36 45 49 51 53 55 57 59 61 62 64 66 0
3 5 6 8 11 13 14 17 18 20 23 25 26 30 34 36 43 49 51 53 55 57 58 60 62 64 66 0
2 4 6 8 11 13 15 16 19 21 22 24 26 28 32 35 43 49 50 52 55 57 59 61 63 65 66 0
1 4 6 8 10 13 14 17 18 20 23 24 26 29 33 37 41 49 50 53 54 56 58 60 62 64 66 0
1 4 6 8 10 12 14 16 18 20 23 24 26 30 33 37 46 49 50 52 54 56 58 60 62 64 66 1
1 4 6 8 10 12 14 17 18 20 23 24 26 29 34 36 46 49 51 53 55 57 58 60 62 64 66 0
2 4 6 8 10 12 14 16 18 20 23 24 26 29 34 36 46 48 51 53 54 56 58 60 62 64 66 0
2 4 6 8 10 12 14 17 18 20 23 25 27 30 33 38 43 49 51 53 55 57 58 60 62 64 66 0
1 4 6 8 10 12 14 17 18 20 23 25 26 29 34 36 46 49 51 53 55 57 59 60 62 64 66 0
3 4 6 8 10 12 14 17 18 20 23 25 26 29 34 38 46 49 51 53 54 56 58 60 62 64 66 0
1 5 6 8 10 12 14 17 18 20 23 24 26 30 32 37 46 48 50 52 54 56 58 60 62 64 66 1
3 4 6 8 10 12 14 16 19 20 22 24 26 30 34 36 46 47 51 53 54 56 58 60 62 64 66 1
2 4 6 8 10 13 14 17 18 20 23 25 26 30 34 38 42 49 50 53 55 57 59 61 63 64 66 0
2 4 6 8 10 12 14 16 18 20 23 24 26 29 34 37 43 47 51 53 54 56 58 60 62 64 66 1
2 5 7 9 11 13 14 17 18 20 23 24 26 30 33 37 42 49 51 53 55 57 59 61 63 65 66 1
3 5 6 8 11 12 14 17 18 20 23 25 26 30 33 37 40 48 51 53 55 57 58 60 62 64 66 1
3 4 6 8 10 12 14 17 18 20 23 25 27 29 32 38 45 49 51 53 55 57 59 61 63 65 66 0
1 4 6 8 10 12 14 17 18 20 23 25 26 29 32 36 44 49 51 53 55 57 59 61 63 64 66 0
3 4 6 8 10 12 14 17 18 20 23 25 27 29 34 36 46 49 51 53 55 57 59 61 63 64 66 0
2 5 6 8 10 13 14 16 18 20 23 24 26 29 34 37 42 47 51 53 55 56 58 60 62 64 66 1
1 4 6 8 10 12 14 17 18 20 23 25 26 29 34 38 42 49 51 53 55 57 59 61 62 64 66 0
1 5 6 8 10 12 14 17 18 20 23 25 27 30 34 36 46 48 50 53 55 57 59 60 62 64 66 1
2 5 6 8 10 13 14 17 18 20 23 24 26 30 33 37 40 48 51 53 55 57 58 60 62 64 66 1
3 4 6 8 10 12 14 17 18 20 23 24 26 29 33 37 41 49 51 52 54 56 58 60 62 64 66 0
1 4 6 8 10 13 14 17 18 20 23 25 26 29 32 36 42 49 50 53 55 57 59 61 62 64 66 0
1 5 6 8 10 13 14 17 18 20 23 25 26 30 33 37 46 49 51 53 55 57 59 60 62 64 66 0
1 4 6 8 10 12 14 16 18 20 22 24 26 28 32 36 41 47 51 53 54 56 58 60 62 64 66 1
1 5 6 8 10 12 14 17 18 20 23 25 26 29 32 36 46 49 50 53 55 57 59 61 62 64 66 0
3 5 6 8 10 12 14 17 18 20 23 24 26 29 32 37 41 48 51 53 54 56 58 60 62 64 66 1
2 4 6 8 10 13 14 17 18 20 23 25 27 29 34 38 40 49 51 53 55 57 58 60 62 64 66 0
1 4 6 8 10 13 14 16 18 20 23 24 26 29 32 36 41 47 50 52 54 56 58 60 62 64 66 0
3 4 6 8 11 13 14 17 18 20 23 25 26 30 33 38 43 49 51 53 55 57 59 60 62 64 66 0
1 5 7 8 11 13 14 17 18 20 23 25 26 29 34 37 43 47 51 53 55 57 58 60 62 64 66 1
2 5 6 8 10 12 14 17 18 20 23 24 26 30 33 37 46 48 51 53 54 56 58 60 62 64 66 1
1 5 7 8 11 13 14 16 18 20 23 24 26 29 33 37 42 48 50 53 54 56 58 60 62 64 66 1
2 5 7 9 11 13 15 16 19 20 23 24 26 29 34 36 42 49 51 53 55 57 59 61 63 65 66 0
3 4 6 8 10 13 14 17 18 20 23 25 26 30 34 36 42 49 51 53 55 57 59 60 62 64 66 0
1 4 6 8 10 13 14 17 18 20 23 25 26 30 32 36 42 49 51 53 55 57 59 61 63 64 66 0
1 5 7 8 10 13 14 16 18 20 23 24 26 30 32 37 41 48 50 52 54 56 58 60 62 64 66 1
1 5 6 8 11 13 14 16 18 20 23 25 26 30 34 37 42 49 50 52 54 56 58 60 62 64 66 1
1 4 6 8 10 12 14 16 18 20 22 24 26 28 31 35 41 47 51 53 54 56 58 60 62 64 66 1
1 4 6 8 10 12 14 17 18 20 23 24 26 29 32 35 45 47 51 53 55 56 58 60 62 64 66 0
1 5 6 8 10 13 14 17 18 20 23 24 26 30 33 37 43 49 51 53 55 56 58 60 62 64 66 1
3 4 6 8 10 13 14 17 18 20 23 25 27 30 34 36 43 49 51 53 55 56 58 60 62 64 66 0
2 5 7 8 10 13 14 16 18 20 23 24 26 30 33 37 43 48 50 53 55 56 58 60 62 64 66 1
3 5 7 8 10 13 14 17 18 20 23 24 26 29 33 37 46 49 51 53 55 56 58 60 62 64 66 1
2 5 6 8 11 13 14 17 18 20 23 25 26 30 32 37 42 48 51 53 55 56 58 60 62 64 66 1
1 5 7 8 11 13 14 17 18 20 23 25 26 30 34 37 42 49 51 53 55 57 59 61 63 64 66 1
3 5 7 8 11 13 14 17 18 20 23 25 26 30 34 37 46 48 51 53 55 57 58 60 62 64 66 1
3 5 6 8 10 12 14 17 18 20 23 24 26 29 32 38 46 47 50 53 55 56 58 60 62 64 66 0
2 4 6 8 10 12 14 17 18 20 23 25 26 29 32 36 46 47 50 52 54 56 58 60 62 64 66 1
2 4 6 8 10 12 14 17 19 20 22 24 26 29 32 36 46 49 50 53 55 57 59 61 63 65 67 0
2 5 7 8 11 13 14 16 18 20 23 25 26 30 34 37 42 48 51 53 55 57 58 60 62 64 66 1
2 4 6 8 11 13 15 16 19 21 22 24 26 28 34 36 43 49 50 53 55 57 59 60 62 64 66 0
1 5 6 8 10 12 14 17 18 20 23 25 26 30 33 37 41 48 50 53 54 56 58 60 62 64 66 1
2 4 6 8 10 12 14 17 18 20 23 24 26 29 32 37 40 47 51 53 54 56 58 60 62 64 66 1
2 5 6 8 10 13 14 17 18 20 23 25 26 29 34 37 42 48 51 53 55 56 58 60 62 64 66 1
1 4 6 8 10 12 14 17 18 20 23 25 26 30 33 37 44 49 50 53 55 57 59 60 62 64 66 1
1 4 6 8 10 12 14 16 18 20 23 24 26 30 32 36 46 47 51 52 54 56 58 60 62 64 66 1
2 5 6 8 10 13 14 17 18 20 23 24 26 29 32 36 39 49 50 52 54 56 58 60 62 64 66 1
1 5 6 8 10 13 14 17 18 20 23 24 26 30 33 37 43 49 51 53 54 56 58 60 62 64 66 1
1 5 6 8 10 13 14 17 18 20 23 24 26 29 33 37 42 48 50 53 54 56 58 60 62 64 66 1
2 5 7 9 11 13 15 17 18 20 23 25 27 30 33 38 46 49 51 53 55 57 59 61 63 65 66 0
2 5 7 8 11 13 14 17 18 20 23 25 26 29 32 37 42 47 51 53 54 56 58 60 62 64 66 1
1 4 6 8 10 12 14 17 18 20 23 24 26 29 32 36 42 47 51 52 55 56 58 60 62 64 66 1
3 5 6 8 10 13 14 16 18 20 23 24 26 29 33 37 43 48 50 53 54 56 58 60 62 64 66 1
1 5 6 8 10 12 14 17 18 20 23 25 26 30 33 37 40 48 51 52 54 56 58 60 62 64 66 1
1 5 6 8 10 12 14 17 18 20 23 24 26 29 33 37 40 49 51 53 55 56 58 60 62 64 66 1
2 4 6 8 11 12 14 17 18 20 23 24 26 30 33 37 43 49 50 52 54 56 58 60 62 64 66 1
2 4 6 8 10 13 14 16 18 20 23 25 26 29 33 37 46 49 51 53 55 56 58 60 62 64 66 0
3 5 6 8 11 13 14 17 18 20 23 25 27 30 34 37 42 48 51 53 55 56 58 60 62 64 66 1
3 5 6 8 10 12 14 17 18 20 23 24 26 29 32 36 41 48 50 52 54 56 58 60 62 64 66 1
1 4 6 8 10 12 14 17 18 20 23 24 26 29 34 36 40 47 51 53 54 56 58 60 62 64 66 1
2 5 7 9 11 13 15 17 19 21 22 24 26 28 32 36 46 47 51 53 55 57 59 60 62 64 66 0
3 5 6 8 10 13 14 17 18 20 23 25 27 30 33 37 45 49 51 53 55 57 58 60 62 64 66 0
2 5 7 8 10 13 14 16 18 20 23 25 26 29 33 37 42 49 50 53 55 56 58 60 62 64 66 1
1 4 6 8 10 12 14 17 18 20 23 24 26 29 34 38 46 48 50 53 55 56 58 60 62 64 66 0
3 5 6 8 10 13 14 16 18 20 23 24 26 30 32 37 40 48 50 52 54 56 58 60 62 64 66 1
1 5 7 8 11 13 15 17 18 20 23 25 26 30 34 38 43 49 51 53 55 57 59 61 62 64 66 0
2 4 6 8 10 12 14 17 18 20 23 24 26 29 34 38 40 49 51 52 54 56 58 60 62 64 66 0
1 5 6 8 10 13 14 17 18 20 23 24 26 29 34 38 43 49 51 53 54 56 58 60 62 64 66 1
1 4 6 8 10 13 14 17 18 20 23 24 26 29 32 36 46 48 50 53 55 56 58 60 62 64 66 0
1 5 7 8 10 12 14 17 18 20 23 24 26 29 34 37 46 48 51 53 55 56 58 60 62 64 66 1
1 4 6 8 10 12 14 16 18 20 23 24 26 29 32 37 46 48 50 53 54 56 58 60 62 64 66 1
1 5 6 8 10 12 14 16 18 20 23 24 26 30 33 37 40 48 51 53 54 56 58 60 62 64 66 1
3 4 6 8 10 12 14 17 18 20 23 25 26 29 32 38 41 48 51 52 54 56 58 60 62 64 66 0
2 5 6 8 11 13 14 16 18 20 23 24 26 29 34 37 40 47 51 53 55 57 58 60 62 64 66 1
1 5 6 8 10 13 14 17 18 20 23 25 27 30 34 38 46 49 51 53 55 57 59 61 63 65 66 0
2 5 6 8 10 13 14 17 18 20 23 24 26 29 32 38 46 49 50 53 55 57 58 60 62 64 66 0
1 5 6 8 10 13 14 17 18 20 23 24 26 30 32 36 42 48 50 52 55 56 58 60 62 64 66 1
1 5 7 8 11 13 15 17 18 20 23 25 27 29 32 36 42 49 51 53 55 57 59 61 63 64 66 0
3 5 6 8 11 13 14 16 18 20 22 24 26 30 33 37 41 49 51 53 55 57 58 60 62 64 66 1
1 4 6 8 10 12 14 17 18 20 23 24 26 29 32 36 46 48 51 53 54 56 58 60 62 64 66 0
1 4 6 8 10 12 14 17 18 20 23 25 27 30 34 38 43 49 51 53 55 57 59 61 62 64 66 0
1 4 6 8 10 12 14 17 18 20 23 25 26 29 33 37 46 49 51 53 55 57 58 60 62 64 66 0
2 4 6 8 10 13 14 17 18 20 23 25 27 29 32 36 42 49 51 53 55 57 59 61 63 65 66 0
1 4 6 8 10 12 14 17 18 20 23 24 26 29 33 37 43 49 50 52 55 56 58 60 62 64 66 0
1 5 6 8 10 13 14 17 18 20 23 25 26 30 33 38 46 49 51 53 55 56 58 60 62 64 66 0
3 4 6 8 10 13 14 17 18 20 23 25 27 29 32 38 45 49 51 53 55 56 58 60 62 64 66 0
2 5 6 8 10 13 14 16 18 20 23 24 26 30 34 36 42 47 50 52 54 56 58 60 62 64 66 1
1 4 6 8 10 13 14 17 18 20 23 24 26 29 32 38 46 47 51 53 55 56 58 60 62 64 66 0
3 5 7 9 11 13 15 17 18 20 23 25 27 30 34 38 45 49 51 53 55 57 59 61 63 65 67 0
3 5 6 8 10 13 14 16 18 20 23 25 26 30 34 37 46 49 51 53 55 56 58 60 62 64 66 1
3 5 7 8 11 13 14 17 18 20 22 24 26 29 32 35 41 47 51 53 55 56 58 60 62 64 66 0
2 4 6 8 10 13 14 17 18 20 23 24 26 29 34 37 46 48 51 53 54 56 58 60 62 64 66 0
2 4 6 8 10 12 14 17 18 20 23 24 26 29 34 36 42 49 51 53 55 57 58 60 62 64 66 0
3 5 7 8 10 12 14 17 18 20 23 24 26 29 32 37 41 48 51 53 55 56 58 60 62 64 66 1
2 5 6 8 10 12 14 16 18 20 23 24 26 29 33 37 43 47 50 52 54 56 58 60 62 64 66 1
0 4 6 8 10 13 14 17 18 20 23 24 26 29 31 35 40 47 50 52 55 56 58 60 62 64 66 0
1 5 6 8 10 13 14 17 18 20 23 25 26 30 34 36 46 49 51 53 55 56 58 60 62 64 66 0
1 5 6 8 11 13 14 16 18 20 23 24 26 29 34 36 46 49 51 53 54 56 58 60 62 64 66 1
2 4 6 8 10 12 15 16 18 20 23 24 26 29 34 37 43 48 50 53 54 56 58 60 62 64 66 1
1 5 7 8 11 13 14 17 18 20 23 25 26 30 33 37 46 49 51 53 55 56 58 60 62 64 66 1
3 4 6 8 11 12 15 17 18 20 23 25 26 29 33 38 43 49 51 53 55 57 59 61 63 65 66 0
1 5 6 8 10 12 14 17 18 20 23 24 26 30 33 37 43 48 50 53 54 56 58 60 62 64 66 1
2 5 7 8 11 13 14 17 18 20 23 24 26 30 33 38 40 48 51 52 54 56 58 60 62 64 66 1
1 5 6 8 10 12 14 16 18 20 23 24 26 29 33 37 43 48 51 53 54 56 58 60 62 64 66 1
2 5 6 8 10 12 14 16 18 20 23 24 26 29 33 37 41 49 50 52 55 56 58 60 62 64 66 1
1 5 6 8 10 12 14 17 18 20 23 24 26 30 33 37 43 49 50 53 54 56 58 60 62 64 66 1
1 5 7 9 11 13 14 16 18 20 23 24 26 29 34 37 46 48 51 53 55 57 58 60 62 64 66 1
1 4 6 8 10 12 14 17 18 20 23 25 26 29 32 36 46 49 51 53 55 57 59 61 62 64 66 0
0 4 6 8 10 12 14 16 18 20 22 24 26 28 31 35 39 47 50 52 54 56 58 60 62 64 66 0
1 5 6 8 10 12 14 16 18 20 22 24 26 29 32 37 41 47 50 52 54 56 58 60 62 64 66 1
2 5 6 8 10 12 14 17 18 20 23 24 26 30 33 37 43 48 51 52 54 56 58 60 62 64 66 1
3 5 6 8 11 13 14 17 18 20 23 25 26 30 34 37 42 49 51 53 55 56 58 60 62 64 66 1
3 5 6 8 10 12 14 16 18 20 23 25 27 30 33 37 42 48 51 52 54 56 58 60 62 64 66 1
3 4 6 8 10 13 14 17 18 20 23 25 27 30 34 37 41 49 51 53 55 57 59 61 62 64 66 0
1 4 6 8 10 12 14 16 18 20 23 24 26 30 32 37 41 48 51 52 54 56 58 60 62 64 66 0
2 4 6 8 10 12 14 16 18 20 23 24 26 29 32 36 43 47 50 53 55 56 58 60 62 64 66 0
1 5 6 8 10 12 14 17 18 20 23 24 26 29 32 37 46 49 50 53 54 56 58 60 62 64 66 1
2 5 6 8 10 12 14 17 18 20 23 24 26 29 32 36 43 47 50 52 54 56 58 60 62 64 66 1
2 4 6 8 10 12 14 16 18 20 23 24 26 30 33 37 42 49 50 53 55 56 58 60 62 64 66 1
1 4 6 8 10 12 14 16 18 20 23 24 26 29 32 36 46 47 50 52 54 56 58 60 62 64 66 1
1 4 6 8 10 13 14 17 18 20 23 25 26 30 34 36 46 49 51 53 55 57 58 60 62 64 66 0
1 4 6 8 10 12 14 16 18 20 22 24 26 29 32 37 41 47 51 53 54 56 58 60 62 64 66 1
1 5 6 8 10 12 14 16 18 20 23 24 26 30 33 37 41 49 50 53 54 56 58 60 62 64 66 1
1 5 6 8 10 13 14 16 18 20 23 24 26 29 32 37 43 48 50 53 55 56 58 60 62 64 66 1
3 5 7 9 11 13 14 17 18 20 23 25 27 30 34 38 45 49 51 53 55 57 59 61 63 64 66 0
3 5 6 8 11 13 14 17 18 20 23 24 26 30 32 37 40 49 51 53 55 57 59 60 62 64 66 1
2 5 6 8 10 13 14 17 18 20 23 25 26 30 33 37 42 49 51 53 54 56 58 60 62 64 66 1
2 5 7 8 11 12 14 17 18 20 23 24 26 29 33 37 46 49 50 53 54 56 58 60 62 64 66 1
1 4 6 8 10 12 14 17 18 20 23 25 26 30 32 37 42 49 51 53 55 56 58 60 62 64 66 0
1 5 7 8 11 13 14 17 18 20 23 25 26 30 33 37 46 49 50 53 55 56 58 60 62 64 66 1
3 4 6 8 10 12 14 17 18 20 23 25 26 30 32 36 42 48 51 53 55 56 58 60 62 64 66 1
2 4 6 8 10 13 14 17 18 20 23 25 27 30 34 36 42 49 51 53 55 57 59 61 63 64 66 0
2 5 6 8 11 13 14 17 18 20 23 24 26 29 34 37 43 48 51 53 55 57 59 60 62 64 66 0
2 5 6 8 10 12 14 17 18 20 23 25 26 29 32 38 46 49 51 53 55 57 58 60 62 64 66 0
1 4 6 8 10 12 14 16 18 20 22 24 26 29 34 37 46 48 51 53 55 56 58 60 62 64 66 1
This diff is collapsed.
@relation tumor-rm_attr_w_10p_missing-rm_inst_w_missing-weka.filters.unsupervised.attribute.Discretize-D-F-B8-M-1.0-Rfirst-last-nominal2binarysplit_minmulti.py-choose_class.py-vlung
@0: age = <30
@1: age = 30-59
@2: age = >=60
@3: sex = male
@4: sex = female
@5: bone = yes
@6: bone = no
@7: bone_marrow = yes
@8: bone_marrow = no
@9: lung = yes
@10: lung = no
@11: pleura = yes
@12: pleura = no
@13: peritoneum = yes
@14: peritoneum = no
@15: liver = yes
@16: liver = no
@17: brain = yes
@18: brain = no
@19: skin = yes
@20: skin = no
@21: neck = yes
@22: neck = no
@23: supraclavicular = yes
@24: supraclavicular = no
@25: axillar = yes
@26: axillar = no
@27: mediastinum = yes
@28: mediastinum = no
@29: abdominal = yes
@30: abdominal = no
@class: 1='lung' 0={'head_and_neck','esophagus','thyroid','stomach','duoden_and_sm_int','colon','rectum','anus','salivary_glands','pancreas','gallbladder','liver','kidney','bladder','testis','prostate','ovary','corpus_uteri','cervix_uteri','vagina','breast'}
@data
2 4 6 8 10 12 14 15 18 20 22 24 26 28 30 1
2 3 6 8 10 12 14 15 18 20 22 23 26 27 30 1
1 4 6 8 10 11 14 16 18 19 22 24 25 28 30 0
1 4 6 8 10 12 13 16 18 20 22 24 26 28 30 0
1 4 6 8 10 11 13 16 18 20 22 24 26 28 30 0
1 3 6 8 10 12 14 15 18 20 22 24 26 28 30 0
1 3 5 8 10 12 14 16 18 20 22 24 26 28 30 0
1 4 5 8 10 12 14 16 17 20 22 24 26 27 30 1
1 3 6 8 10 12 14 16 18 20 21 23 26 28 30 0
1 4 6 8 10 12 13 15 18 20 22 24 26 28 30 0
2 4 6 8 10 12 13 15 18 20 22 23 26 28 30 1
1 3 6 8 10 11 14 16 18 20 21 24 26 28 30 0
2 4 5 8 9 12 14 16 18 20 22 24 26 28 30 0
2 4 6 7 10 12 13 16 18 20 22 24 26 28 29 0
1 3 5 8 10 12 14 16 18 19 21 23 26 28 30 1
1 3 6 8 10 12 14 16 18 20 21 24 26 28 30 0
1 3 6 8 10 11 14 15 18 20 21 24 26 27 29 1
1 3 5 8 10 12 14 15 18 20 22 24 26 27 30 1
2 3 6 8 10 11 13 16 18 20 22 24 26 28 30 0
2 3 5 8 9 11 14 15 18 20 22 24 26 28 29 1
1 4 6 8 10 12 13 15 18 19 22 24 26 28 29 0
1 4 6 8 10 12 14 16 18 20 22 23 26 28 30 0
0 4 5 8 10 12 14 16 18 20 22 24 26 27 30 1
1 3 5 8 10 12 14 16 18 20 21 23 26 28 30 0
0 3 6 8 9 12 14 16 18 20 21 23 25 28 30 0
2 3 6 8 10 12 14 15 18 19 22 24 26 28 30 0
2 3 6 8 10 12 14 15 18 20 22 24 26 28 29 0
1 3 6 8 10 12 14 15 18 20 22 24 26 27 30 1
2 4 6 8 10 12 14 15 18 20 22 24 26 28 29 0
2 3 5 8 10 12 14 16 18 20 22 24 26 28 30 0
2 4 6 8 10 12 14 15 18 20 22 24 26 28 29 0
2 4 6 8 10 12 14 15 18 20 22 24 26 28 30 0
1 4 6 8 10 12 13 15 18 20 22 24 25 27 29 0
1 4 6 8 10 12 14 16 18 20 22 24 25 28 30 0
2 4 6 8 9 12 14 15 18 20 22 24 26 28 29 0
1 4 6 8 10 12 14 16 18 20 22 23 25 28 29 0
1 3 6 8 10 12 14 16 17 20 22 24 26 28 29 0
1 3 6 8 10 12 14 16 18 20 22 23 26 27 30 1
1 3 5 8 10 12 14 16 18 20 21 24 26 28 30 0
0 3 5 8 10 11 13 16 18 20 22 24 26 28 30 0
1 3 6 8 10 12 13 16 17 19 22 24 26 27 29 1
2 4 6 8 10 12 14 15 18 20 22 24 26 28 30 0
1 4 6 8 9 12 14 15 18 20 22 24 26 28 29 0
1 4 6 8 10 11 13 16 18 20 22 24 26 28 30 0
1 4 5 8 10 12 14 16 18 19 21 24 26 28 30 0
1 4 6 8 10 12 13 15 18 20 22 24 26 28 29 0
1 4 6 8 10 12 14 15 18 20 22 24 26 28 29 0
2 4 6 8 10 12 13 16 18 20 22 24 26 28 30 0
2 4 6 8 10 12 14 16 18 20 22 23 26 28 30 0
2 4 6 8 10 12 14 16 18 20 22 24 26 27 29 0
2 4 6 8 10 11 14 16 18 20 22 24 26 27 30 0
1 4 5 8 10 11 14 16 18 19 21 23 25 27 30 0
0 3 6 8 10 12 13 15 18 20 22 24 26 28 30 0
1 4 6 8 9 12 14 16 18 20 21 23 25 27 29 0
1 3 5 8 10 11 14 16 18 20 22 24 26 27 30 1
1 3 5 7 10 12 14 16 17 20 22 24 26 27 30 1
1 3 6 8 9 12 14 15 18 20 22 24 26 28 29 0
1 4 5 8 10 12 14 16 18 20 22 24 26 28 30 0
0 4 5 8 10 12 14 16 17 20 22 23 25 27 30 1
1 3 6 8 10 12 14 16 18 20 21 24 26 28 30 0
1 3 5 7 9 11 13 15 18 20 22 24 26 27 29 1
2 3 6 8 10 12 14 16 18 20 21 24 26 28 30 0
1 4 6 8 9 12 14 15 18 20 22 24 26 28 29 0
1 3 6 8 10 12 14 16 18 20 21 24 26 28 30 0
1 4 6 8 10 11 13 16 18 20 22 24 26 28 30 0
2 3 6 8 10 12 14 15 18 20 22 24 26 28 29 0
1 3 6 8 10 11 14 16 18 20 22 24 26 28 30 1
1 4 5 8 10 11 14 15 18 20 22 23 26 27 30 0
1 4 5 8 10 12 14 16 18 20 22 24 25 28 30 0
2 4 6 8 10 12 13 16 18 20 22 24 26 28 30 0
2 3 5 8 9 12 14 16 18 20 22 24 26 28 30 0
1 3 5 8 10 12 14 16 18 20 22 24 26 28 30 0
1 4 6 8 10 11 14 16 18 20 22 24 26 28 29 0
1 3 6 8 10 12 14 16 18 20 22 23 26 27 30 1
2 3 6 8 10 12 14 16 18 20 22 23 26 28 30 1
1 4 6 8 10 12 13 16 18 20 22 24 26 28 30 0
1 3 6 8 10 12 14 16 18 20 21 23 26 27 29 1
1 3 6 8 10 12 14 16 18 20 22 24 25 28 30 1
1 3 6 8 9 11 14 16 18 20 22 24 26 28 30 0
1 3 5 8 9 11 14 15 18 20 22 24 26 27 29 1
1 4 5 8 10 12 14 15 18 20 22 24 26 28 30 1
1 3 6 8 10 11 14 15 18 19 22 24 26 28 30 1
1 3 6 8 10 12 14 16 18 20 21 24 26 28 30 0
1 3 5 7 10 12 14 16 18 20 22 24 26 27 30 1
2 4 5 8 10 12 14 16 18 20 22 24 26 28 30 0
1 3 6 8 9 12 14 15 18 20 22 24 26 27 29 1
2 3 6 8 10 12 14 16 18 20 21 24 26 28 30 0
1 4 6 8 10 12 13 16 18 20 22 24 26 28 29 0
1 4 6 8 10 12 14 15 17 20 22 24 26 27 30 1
1 4 6 8 10 11 14 16 17 20 22 24 26 27 30 1
2 3 6 8 9 12 13 15 18 20 22 24 26 28 29 0
1 3 6 8 9 12 14 16 18 20 22 23 26 28 30 1
2 3 5 8 9 12 14 16 18 20 22 24 26 27 29 0
1 4 5 8 10 12 14 16 18 20 22 24 26 28 29 0
1 3 6 8 10 12 14 15 18 20 22 23 26 28 30 0
2 3 6 8 10 12 13 15 18 20 22 24 26 28 30 0
1 4 6 8 10 11 14 16 18 20 22 24 26 28 30 1
1 3 5 8 9 12 13 16 18 20 22 24 26 28 29 0
2 4 6 8 9 12 14 15 18 20 22 24 26 28 29 0
1 4 6 8 10 12 13 16 18 20 22 24 26 28 30 0
1 3 6 8 10 11 14 16 18 20 22 23 26 27 29 1
1 4 6 8 10 12 13 16 18 20 22 24 26 28 30 0
1 4 5 8 10 11 14 16 18 20 22 24 26 28 30 0
0 4 5 8 9 12 14 16 18 19 22 24 26 28 30 0
2 3 6 8 10 12 14 16 18 20 21 24 26 28 30 0
2 4 6 8 9 12 14 16 18 20 22 24 26 28 30 0
1 4 5 8 10 12 14 16 18 20 22 24 26 28 30 0
1 4 6 8 10 12 14 16 18 20 21 23 26 28 30 0
1 3 6 8 10 11 14 15 18 20 22 24 26 28 30 1
0 3 6 8 10 12 13 16 18 20 22 23 26 28 30 0
0 4 6 8 10 12 14 16 18 20 22 24 26 28 30 0
1 4 5 8 10 12 14 16 18 20 21 24 26 28 30 0
1 4 5 8 9 12 14 16 18 20 22 24 26 28 30 0
2 4 6 8 9 12 13 15 18 20 22 24 26 28 29 0
2 4 6 8 10 11 13 16 17 20 22 24 26 28 29 0
1 3 5 8 10 12 14 16 18 20 22 24 26 28 30 0
1 4 6 8 10 12 14 16 17 20 22 24 26 27 30 1
1 4 6 8 10 11 13 16 18 20 22 24 26 28 30 0
2 4 6 8 10 12 14 15 18 20 22 24 26 28 30 0
0 3 6 8 10 11 14 16 18 20 22 24 26 28 30 0
2 4 6 8 10 12 14 16 18 20 21 23 25 28 30 0
0 4 5 8 10 12 13 16 18 20 21 23 25 28 29 0
2 3 6 8 10 12 14 16 18 20 21 24 26 28 30 0
1 3 6 8 10 12 14 15 18 20 22 24 26 28 30 0
2 3 5 8 10 12 14 16 18 20 22 24 26 27 30 1
1 4 6 8 10 11 14 16 18 20 22 24 26 28 29 0
2 3 6 8 10 12 13 16 18 20 22 24 26 28 30 0
2 4 5 8 10 12 14 16 18 20 22 24 26 28 29 0
0 4 5 8 9 11 14 16 18 20 22 24 26 27 30 1
1 4 6 8 10 11 13 16 18 20 22 24 26 28 30 0
1 4 5 8 10 11 14 15 18 20 21 23 25 27 29 0
2 4 6 8 10 11 13 16 18 20 22 24 26 28 30 0
1 3 6 8 10 12 14 16 18 20 22 24 26 27 30 1
1 3 6 8 10 12 14 16 18 20 22 24 26 27 30 0
2 4 6 8 10 12 14 16 18 20 22 23 25 28 30 0
1 3 5 8 9 12 14 16 18 20 22 24 26 28 30 0
0 4 5 8 10 12 14 16 18 20 22 24 25 28 30 0
2 3 6 8 10 12 14 15 18 20 22 24 26 28 30 0
1 3 5 8 9 12 14 16 17 20 22 24 26 27 30 0
1 3 6 8 9 12 14 16 18 20 22 23 26 28 30 0
1 4 6 8 10 12 13 16 18 20 22 24 26 28 30 0
1 4 5 8 10 12 14 16 18 20 22 23 25 28 30 0
1 3 6 8 9 12 14 16 18 20 21 23 25 27 30 0
2 3 6 8 10 12 14 15 18 20 22 24 26 28 30 0
1 4 5 8 10 11 14 16 18 20 22 23 25 27 29 0
1 4 6 8 10 11 13 16 18 20 22 23 26 27 30 1
2 4 6 8 10 12 14 15 18 20 22 24 26 28 29 0
1 3 5 8 10 11 14 16 18 20 22 23 26 27 30 1
1 3 5 8 10 12 14 16 18 20 22 24 26 28 30 1
2 3 6 8 9 11 14 16 18 20 22 24 26 28 30 0
1 3 5 8 10 12 14 16 18 20 22 24 26 28 30 1
2 4 6 8 10 12 13 15 18 20 22 24 26 28 30 0
0 4 5 7 10 12 13 16 18 20 22 24 26 28 30 0
2 4 6 8 9 12 14 16 18 20 22 24 26 28 30 0
1 3 6 8 10 11 13 15 18 20 22 24 26 28 29 0
2 4 6 8 10 12 14 15 18 20 22 24 26 28 29 0
2 4 5 8 10 12 14 16 18 20 22 24 26 28 29 0
1 4 6 8 10 12 14 15 18 20 22 24 26 28 29 0
2 4 6 8 10 12 14 16 18 20 22 24 26 27 29 1
2 3 5 8 10 12 14 15 18 20 22 24 26 27 29 1
1 3 6 8 10 12 13 15 18 20 22 24 26 28 29 0
2 3 6 8 10 12 14 16 18 20 22 24 26 28 29 0
2 4 5 8 9 12 14 16 18 20 22 24 26 28 30 0
1 3 6 8 9 12 13 16 18 20 22 24 26 28 29 1
2 3 6 8 9 12 14 15 18 20 22 24 26 27 29 0
2 4 6 8 10 12 13 15 18 20 22 24 26 28 29 0
1 3 6 8 10 12 14 16 18 20 22 23 26 27 30 1
1 3 6 8 9 11 14 16 18 20 22 24 26 27 29 0
2 4 6 8 10 12 14 15 18 20 22 24 26 28 29 0
1 3 6 8 10 12 14 16 17 19 22 23 25 27 30 1
1 4 5 8 10 12 14 16 18 20 22 23 25 28 30 0
1 4 6 8 10 12 13 16 18 20 22 24 26 28 29 0
1 4 6 8 10 12 13 16 18 20 22 24 26 28 29 0
1 3 6 8 10 11 14 15 18 20 22 24 26 27 29 0
2 3 6 8 10 12 14 16 17 20 22 24 26 28 30 0
1 3 6 8 10 12 13 15 18 20 22 24 26 28 29 0
2 3 5 8 10 12 13 15 18 20 22 24 26 27 30 1
1 3 5 8 10 12 14 15 18 20 22 24 26 28 30 0
1 4 6 8 10 11 13 16 18 20 22 24 26 28 30 0
1 3 6 8 10 11 13 15 18 20 22 23 26 28 29 0
1 3 6 8 10 12 14 16 18 20 22 23 26 28 30 0
1 4 6 8 10 12 13 16 18 19 21 23 25 28 30 0
1 3 6 8 9 12 14 16 18 20 21 23 26 27 30 1
2 3 6 8 10 11 13 15 18 20 22 24 26 28 29 0
1 3 6 8 10 12 14 15 18 20 22 24 26 28 30 0
1 3 6 8 10 12 13 15 18 20 22 24 26 28 30 0
1 3 5 8 9 12 14 16 17 20 22 24 26 27 30 0
2 4 6 8 10 12 14 15 18 20 22 24 26 28 29 0
1 3 6 8 10 12 14 16 17 20 22 24 26 28 30 1
1 4 6 8 10 11 13 16 18 20 22 24 26 28 30 0
0 3 6 8 10 12 14 15 18 20 22 23 26 27 30 1
1 4 5 8 10 12 14 16 18 20 22 24 26 28 30 1
1 3 5 8 9 11 14 16 18 20 22 24 26 27 30 0
1 4 6 8 10 12 14 16 18 20 22 24 26 28 29 0
1 3 5 8 10 12 14 16 18 19 22 24 26 28 30 1
1 3 5 8 10 12 14 16 18 20 22 24 26 28 30 0
2 4 5 8 9 11 14 15 18 20 22 24 26 27 29 0
0 3 6 8 10 12 14 16 18 20 22 23 26 28 30 0
1 4 5 8 9 11 13 15 18 20 22 24 26 27 29 1
1 3 6 8 10 11 14 15 17 20 22 24 26 27 29 1
1 3 5 8 10 12 14 16 18 20 22 24 26 28 30 0
2 4 6 8 10 12 14 15 18 20 22 24 26 28 29 0
1 3 6 8 9 12 14 16 18 19 22 24 25 28 30 0
2 4 6 8 10 12 14 15 18 20 22 24 26 28 29 0
0 3 6 8 10 12 14 16 18 20 22 23 26 28 30 0
2 4 6 8 9 12 14 15 18 20 22 24 26 27 29 0
1 4 6 8 9 12 14 16 18 20 22 24 26 28 30 0
1 3 5 8 10 12 14 16 18 20 22 24 26 28 30 0
0 3 5 7 9 12 14 15 17 20 22 24 25 27 29 0
0 3 5 8 10 12 14 16 18 20 22 24 26 28 30 0
1 3 5 8 10 12 14 16 18 20 22 24 26 28 29 0
2 3 6 8 9 12 14 15 18 20 22 24 26 28 29 0
1 3 5 8 10 12 14 16 18 20 22 24 26 27 30 1
2 3 6 8 10 12 14 16 18 20 22 24 26 28 29 1
1 4 5 8 10 12 14 16 18 20 22 24 26 28 30 0
2 3 6 8 10 11 13 16 18 20 22 24 26 27 29 1
2 4 5 8 10 11 14 15 18 20 22 24 26 28 30 1
1 3 5 8 10 12 13 16 17 20 22 24 26 27 29 1
0 3 6 8 10 12 13 15 18 19 22 24 26 28 29 0
1 4 6 8 9 11 13 15 18 19 22 24 26 27 29 1
1 4 6 8 10 11 14 16 18 20 22 24 26 28 30 0
2 4 5 8 10 11 14 16 18 20 22 24 26 28 30 1
0 4 5 8 10 12 14 16 18 20 22 23 26 28 29 0
1 4 6 8 9 11 13 16 18 20 22 24 26 28 29 0
2 4 6 8 10 12 14 15 18 20 22 24 26 28 29 0
1 4 5 8 9 12 14 16 18 20 22 24 26 27 30 0
1 4 6 8 10 12 14 16 18 20 22 24 25 28 30 0
1 4 6 8 9 11 13 16 18 20 22 23 26 28 30 0
0 4 5 8 9 11 14 16 18 20 22 24 26 27 30 1
1 4 6 8 10 11 13 16 18 20 22 24 26 28 30 0
1 4 6 8 10 12 14 16 18 20 22 24 25 28 30 0
1 3 6 8 10 12 14 16 18 20 21 24 26 28 30 0
1 4 5 8 9 12 14 16 18 20 22 24 26 28 30 0
2 4 6 8 10 12 14 15 18 20 22 24 26 27 29 0
1 3 5 8 10 11 13 16 18 20 21 23 26 28 30 0
2 4 6 8 9 11 13 15 18 20 22 24 26 27 29 0
2 4 6 8 10 12 14 15 18 20 22 24 26 27 29 1
1 3 6 8 10 12 13 15 18 20 22 24 26 28 30 0
2 4 6 8 9 12 14 16 18 20 22 24 26 28 30 0
1 4 6 8 10 12 14 16 18 20 22 24 25 28 30 0
1 3 6 8 9 12 14 16 18 20 21 24 26 28 30 0
2 4 6 8 10 12 14 16 18 20 22 24 26 28 29 0
2 4 6 8 9 12 14 15 17 20 22 23 26 27 30 1
2 4 6 8 10 12 14 16 18 20 22 24 26 27 29 0
2 4 6 8 9 11 14 15 18 20 22 24 26 27 29 0
1 4 6 8 9 11 13 16 18 20 22 24 26 28 30 0