andriymulyar / sklearn-oblique-tree Goto Github PK
View Code? Open in Web Editor NEWa python interface to OC1 and other oblique decision tree implementations
License: GNU General Public License v3.0
a python interface to OC1 and other oblique decision tree implementations
License: GNU General Public License v3.0
Thank you for providing this useful package of the oblique trees. It's really useful to some academic users like me who currently try to develop a new multivariate tree model. Although you provide the classification results of the oblique tree, it is a little pity that I can't access the number of tree nodes. The number of tree nodes is a critical feature for the comparative studies of tree models. So it will be wonderful for academic users like me if you can provide the information on the number of tree nodes in future versions.
The original implementation contains an excellent visualization tool. Extend it into the python interface.
Implement predict_prob with something like laplace smoothing. This is trivial but will support the use of the classifier directly in scikit-learns random forest which averages class predictions over-top of class probability not discrete counts.
The ability to switch between impurity metrics is implemented in the underlying implementation. Interface it with python.
Windows10, 64bit, Python2.7 (anaconda)
pip install git+https://github.com/AndriyMulyar/sklearn-oblique-tree --no-deps
C:\Users\bscully1\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\ProgramData\Anaconda2\lib\site-packages\numpy\core\include -I. -IC:\ProgramData\Anaconda2\include -IC:\ProgramData\Anaconda2\PC /Tcsklearn_oblique_tree/oblique/_oblique.c /Fobuild\temp.win-amd64-2.7\Release\sklearn_oblique_tree/oblique/_oblique.obj -w
cl : Command line warning D9025 : overriding '/W3' with '/w'
_oblique.c
c:\programdata\anaconda2\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
c:\users\bscully1\appdata\local\temp\1\pip-hf3jgq-build\sklearn_oblique_tree\oblique\../../oc1_source/mktree.c(1432) : error C2059: syntax error : ')'
c:\users\bscully1\appdata\local\temp\1\pip-hf3jgq-build\sklearn_oblique_tree\oblique\../../oc1_source/mktree.c(1439) : error C2440: '=' : cannot convert from 'double *' to 'double'
error: command 'C:\\Users\\bscully1\\AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin\\amd64\\cl.exe' failed with exit status 2
Then trying python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to sklearn_oblique_tree.egg-info\requires.txt
writing sklearn_oblique_tree.egg-info\PKG-INFO
writing top-level names to sklearn_oblique_tree.egg-info\top_level.txt
writing dependency_links to sklearn_oblique_tree.egg-info\dependency_links.txt
reading manifest file 'sklearn_oblique_tree.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'sklearn_oblique_tree.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
building 'sklearn_oblique_tree.oblique._oblique' extension
C:\Users\bscully1\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -IC:\ProgramData\Anaconda2\lib\site-packages\numpy\core\include -I. -IC:\ProgramData\Anaconda2\include -IC:\ProgramData\Anaconda2\PC /Tcsklearn_oblique_tree/oblique/_oblique.c /Fobuild\temp.win-amd64-2.7\Release\sklearn_oblique_tree/oblique/_oblique.obj -w
cl : Command line warning D9025 : overriding '/W3' with '/w'
_oblique.c
c:\programdata\anaconda2\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
c:\users\bscully1\downloads\sklearn-oblique-tree-master\sklearn-oblique-tree\sklearn_oblique_tree\oblique../../oc1_source/mktree.c(1432) : error C2059: syntax error : ')'
c:\users\bscully1\downloads\sklearn-oblique-tree-master\sklearn-oblique-tree\sklearn_oblique_tree\oblique../../oc1_source/mktree.c(1439) : error C2440: '=' : cannot convert from 'double *' to 'double'
error: command 'C:\Users\bscully1\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe' failed with exit status 2
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.