Quick Start¶
Programming Language: Python 3.7, Cython (Python bindings for C++), C++ 17
Python Packages: numpy, scipy, scikit-learn
You just want to use it (Python)¶
pip installation¶
The koho
package is available through PyPi and
can be installed using pip:
$: pip install koho
Read the Docs¶
The koho documentation is hosted on Read the Docs:
Firefox: http://koho.readthedocs.io
Jupyter notebook¶
The koho
package can be used with jupyter notebook:
$: conda install jupyter
$: conda install tornado=5.1.1 # downgrade if connection problems with jupyter
$: jupyter notebook
[] from koho.sklearn import DecisionTreeClassifier, DecisionForestClassifier
[] ...
Download¶
Download repository¶
Clone the koho repository from GitHub:
$: sudo apt install git
$: git clone https://github.com/aiwerkstatt/koho.git
Python¶
Build & Install
Option 1: Build and install the koho
package including Cython:
$: sudo apt install cmake
$: pip install cython
koho$: python setup.py build_ext --inplace --use-cython
koho$: pip install -e .
Option 2: Build and install the koho
package using the C++ file previously generated by Cython (no Cython needed):
koho$: python setup.py build_ext --inplace
koho$: pip install -e .
Generate the documentation
Generate the koho
documentation,
including the Python API documentation, using sphinx and napoleon (NumPy Style Python Docstrings)
and the C++ API documentation using doxygen:
$: sudo apt install doxygen
$: conda install -c conda-forge sphinx sphinx-gallery sphinx_rtd_theme matplotlib pillow
koho/doc$: make html
View the koho
documentation:
Firebox: file:///home/<user>/<...>/koho/doc/_build/html/index.html
Run tests
Test the koho
package using pytest with pytest-cov plugin:
$: conda install pytest pytest-cov
$: conda install python-graphviz
koho$: pytest --disable-pytest-warnings -v --cov=koho --pyargs koho/sklearn
C++¶
Build & Install
Build the koho
C++ library:
$: sudo apt install cmake
koho/koho/cpp/$: mkdir ./cmake-build-release
koho/koho/cpp/cmake-build-release$: cmake .. -DCMAKE_BUILD_TYPE=Release
koho/koho/cpp/cmake-build-release$: make
Generate the documentation
Generate the koho
C++ API documentation using doxygen:
$: sudo apt install doxygen
koho/cpp$: doxygen
View the koho
C++ API documentation:
Firebox: file:///home/<user>/<...>/koho/cpp/html/index.html
Run tests
Test the koho
C++ library using catch:
koho/koho/cpp/cmake-build-release$: ./test_decision_tree_classifier
koho/koho/cpp/cmake-build-release$: ./test_decision_forest_classifier