Initial version, all rights reserved. Updates coming soon.
- PyTorch 2.0.1
- Python 3.9.6
- scikit-learn 1.0.2
- numpy 1.21.6
- pandas 1.3.5
- h5py 3.8.0
-
src
folder contains the scripts of Gradient-based Entire Tree Optimization for oblique regression tree with constant prediction, termed asGET
.ancestorTF_File
subfolder contains the deterministic tree path routing (simply tree path of sample assignment) in h5 file format. These files can be generated by the function oftreePathCalculation
intreeFunc.py
script.treeFunc.py
includes utility functions.dataset.py
is to load the dataset.warmStart.py
generates the warm-start initialization based onCART
method.GET_IterAlp.py
includes the main functions ofGET
method.subtreePolish.py
includes the subtree polish strategy.
-
test
folder contains the script of running these algorithms.test_GET.py
is to test theGET
method without equipping subtree polish strategy.test_GETwithSubtreePolish.py
is to testGET
method with subtree polish strategy.
-
data
folder contains the datasets. These publicly-available datasets are from the UCI Machine Learning repository and OpenML. Each dataset is shuffled and split into training, validation and testing sets, and saved in the *.csv format.
The examples can be implemented via:
# test the GET method
python .\test\test_GET.py 3 3 1 1 2 3000 "cuda" 10
# test the GET method with subtree polish strategy
python .\test\test_GETwithSubtreePolish.py 3 3 1 1 2 3000 "cuda" 10
This repository is published under the terms of the GNU General Public License v3.0
.