Giter Site home page Giter Site logo

andriymulyar / sklearn-oblique-tree Goto Github PK

View Code? Open in Web Editor NEW
43.0 6.0 16.0 191 KB

a python interface to OC1 and other oblique decision tree implementations

License: GNU General Public License v3.0

C 95.46% Makefile 0.29% Python 4.25%
scikit-learn oblique-decision-tree decision-tree oc1 oblique-classifier-1 cart-linear-combinations

sklearn-oblique-tree's Issues

Can't access the number of tree nodes

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.

Add visualization.

The original implementation contains an excellent visualization tool. Extend it into the python interface.

Add predict_prob

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.

Install Error

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.