[mlpack-svn] r15453 - in mlpack/conf/jenkins-conf/benchmark: . methods/scikit methods/shogun
fastlab-svn at coffeetalk-1.cc.gatech.edu
fastlab-svn at coffeetalk-1.cc.gatech.edu
Thu Jul 11 11:46:45 EDT 2013
Author: marcus
Date: Thu Jul 11 11:46:44 2013
New Revision: 15453
Log:
Adjust functions, because Shogun libary changed some function in the new version.
Modified:
mlpack/conf/jenkins-conf/benchmark/methods/scikit/kmeans.py
mlpack/conf/jenkins-conf/benchmark/methods/shogun/allknn.py
mlpack/conf/jenkins-conf/benchmark/methods/shogun/nbc.py
mlpack/conf/jenkins-conf/benchmark/small_config.yaml
Modified: mlpack/conf/jenkins-conf/benchmark/methods/scikit/kmeans.py
==============================================================================
--- mlpack/conf/jenkins-conf/benchmark/methods/scikit/kmeans.py (original)
+++ mlpack/conf/jenkins-conf/benchmark/methods/scikit/kmeans.py Thu Jul 11 11:46:44 2013
@@ -87,10 +87,10 @@
kmeans = KMeans(k=centroids.shape[1], init=centroids, n_init=1,
max_iter=m)
elif seed:
- kmeans = KMeans(k=int(clusters.group(1)), init='random', n_init=1,
+ kmeans = KMeans(n_clusters=int(clusters.group(1)), init='random', n_init=1,
max_iter=m, random_state=int(seed.group(1)))
else:
- kmeans = KMeans(k=int(clusters.group(1)), n_init=1, max_iter=m)
+ kmeans = KMeans(n_clusters=int(clusters.group(1)), n_init=1, max_iter=m)
kmeans.fit(data)
labels = kmeans.labels_
Modified: mlpack/conf/jenkins-conf/benchmark/methods/shogun/allknn.py
==============================================================================
--- mlpack/conf/jenkins-conf/benchmark/methods/shogun/allknn.py (original)
+++ mlpack/conf/jenkins-conf/benchmark/methods/shogun/allknn.py Thu Jul 11 11:46:44 2013
@@ -20,9 +20,9 @@
from timer import *
import numpy as np
-from shogun.Features import RealFeatures, Labels
+from shogun.Features import RealFeatures, MulticlassLabels
from shogun.Classifier import KNN as SKNN
-from shogun.Distance import EuclidianDistance
+from shogun.Distance import EuclideanDistance
'''
This class implements the All K-Nearest-Neighbors benchmark.
@@ -66,7 +66,7 @@
referenceData = np.genfromtxt(self.dataset, delimiter=',')
# Labels are the last row of the dataset.
- labels = Labels(referenceData[:, (referenceData.shape[1] - 1)])
+ labels = MulticlassLabels(referenceData[:, (referenceData.shape[1] - 1)])
referenceData = referenceData[:,:-1]
with totalTimer:
@@ -83,7 +83,7 @@
return -1
referenceFeat = RealFeatures(referenceData.T)
- distance = EuclidianDistance(referenceFeat, referenceFeat)
+ distance = EuclideanDistance(referenceFeat, referenceFeat)
# Perform All K-Nearest-Neighbors.
model = SKNN(k, distance, labels)
Modified: mlpack/conf/jenkins-conf/benchmark/methods/shogun/nbc.py
==============================================================================
--- mlpack/conf/jenkins-conf/benchmark/methods/shogun/nbc.py (original)
+++ mlpack/conf/jenkins-conf/benchmark/methods/shogun/nbc.py Thu Jul 11 11:46:44 2013
@@ -20,7 +20,7 @@
from timer import *
import numpy as np
-from shogun.Features import RealFeatures, Labels
+from shogun.Features import RealFeatures, MulticlassLabels
from shogun.Classifier import GaussianNaiveBayes
'''
@@ -59,7 +59,7 @@
testData = np.genfromtxt(self.dataset[1], delimiter=',')
# Labels are the last row of the training set.
- labels = Labels(trainData[:, (trainData.shape[1] - 1)])
+ labels = MulticlassLabels(trainData[:, (trainData.shape[1] - 1)])
with totalTimer:
# Transform into features.
Modified: mlpack/conf/jenkins-conf/benchmark/small_config.yaml
==============================================================================
--- mlpack/conf/jenkins-conf/benchmark/small_config.yaml (original)
+++ mlpack/conf/jenkins-conf/benchmark/small_config.yaml Thu Jul 11 11:46:44 2013
@@ -82,7 +82,7 @@
format: [csv, txt]
datasets:
- files: ['datasets/wine.csv', 'datasets/ionosphere.csv']
- options: '-m 0 -M 20.3'
+ options: '-M 20.3'
GMM:
run: false
@@ -185,20 +185,20 @@
library: matlab
methods:
PCA:
- run: false
+ run: true
script: methods/matlab/pca.py
format: [csv, txt]
datasets:
- files: ['datasets/cities.csv', 'datasets/faces.csv', 'datasets/iris.csv' , 'datasets/wine.csv']
NMF:
- run: false
+ run: true
script: methods/matlab/nmf.py
format: [csv, txt]
datasets:
- files: ['datasets/piano_magnitude_spectogram.csv', 'datasets/wine.csv']
options: '-r 6 -s 42 -u multdist'
- KMeans:
- run: false
+ KMEANS:
+ run: true
script: methods/matlab/kmeans.py
format: [csv, txt]
datasets:
@@ -206,7 +206,7 @@
options: '-c 3'
NBC:
- run: false
+ run: true
script: methods/mlpack/nbc.py
format: [csv, txt]
datasets:
@@ -214,7 +214,7 @@
['datasets/transfusion_train.csv', 'datasets/transfusion_test.csv'] ]
ALLKNN:
- run: false
+ run: true
script: methods/mlpack/allknn.py
format: [csv, txt]
datasets:
@@ -222,7 +222,7 @@
options: '-k 3 -s 42'
RANGESEARCH:
- run: false
+ run: true
script: methods/mlpack/range_search.py
format: [csv, txt]
datasets:
More information about the mlpack-svn
mailing list