Python implementation of Balu Toolbox by Domingo Mery (http://dmery.ing.puc.cl/index.php/balu/)
Download and install pip
if you haven't:
curl https://bootstrap.pypa.io/ez_setup.py -o - | sudo python
sudo easy_install pip
Usually, if you use virtual environment step (1) is not required.
Install balu-python
using pip:
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
matplotlib.use('TkAgg')
before importing any function from matplotlib.pyplot. See here