This package implements several machine learning algorithms in a regularised empirical risk minimisation framework (SVMs, LogReg, Linear Regression) in Julia.
Some examples:
# define some toy data (XOR - example)
np = 100
nn = 100
X = [randn(int(np/2),1)+1 randn(int(np/2),1)+1; randn(int(np/2-0.5),1)-1 randn(int(np/2-0.5),1)-1;
randn(int(nn/2),1)+1 randn(int(nn/2),1)-1; randn(int(nn/2-0.5),1)-1 randn(int(nn/2-0.5),1)+1] # examples with 2 features
y = vec([ones(np,1); -ones(nn,1)]) # binary class values
# choose SVM as learning algorithm
svm = SVM(X, y; kernel=:rbf)
# get solution (regularization parameter is 0.1)
regParam = 0.1
model = optimize(svm, regParam)
# make predictions and compute accuracy
ybar = predict(model, X)
acc = mean(ybar .== y)
Full documentation available at Read the Docs.