dipaco / balu-python

Python implementation of Balu Toolbox by Domingo Mery (http://dmery.ing.puc.cl/index.php/balu/)
Other
5 stars 2 forks source link

balu-python

Python implementation of Balu Toolbox by Domingo Mery (http://dmery.ing.puc.cl/index.php/balu/)

Dependencies:

Installation:

Mac OS:

  1. Download and install pip if you haven't:

    Usually, if you use virtual environment step (1) is not required.

  2. Install balu-python using pip:    

    • pip install balu

Linux:

Usage:

All commands in Balu have their own docstring documentation with usage methods and examples:

from balu.Classification import Bcl_lda
help(Bcl_lda)

An usage example for a classification problem is:

from balu.ImagesAndData import balu_load
from balu.Classification import Bcl_lda
from balu.InputOutput import Bio_plotfeatures
from balu.PerformanceEvaluation import Bev_performance

data = balu_load('datagauss')           #simulated data (2 classes, 2 features)
X = data['X']
d = data['d']
Xt = data['Xt']
dt = data['dt']
Bio_plotfeatures(X, d)                  # plot feature space
op = {'p': []}
ds, options = Bcl_lda(X, d, Xt, op)     # LDA classifier
p = Bev_performance(ds, dt)             # performance on test data
print p

   

NOTES: