Skip to content

Commit

Permalink
Fixed some regression static tester issues
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Aug 14, 2012
1 parent c6a588e commit 97768b9
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/shogun/ui/GUIClassifier.cpp
Expand Up @@ -228,7 +228,7 @@ bool CGUIClassifier::new_classifier(char* name, int32_t d, int32_t from_d)
SG_INFO("created SVRlibsvm object\n") ;
}
#ifdef HAVE_LAPACK
else if (strcmp(name, "KernelRidgeRegression")==0)
else if (strcmp(name, "KERNELRIDGEREGRESSION")==0)
{
SG_UNREF(classifier);
classifier=new CKernelRidgeRegression(krr_tau, ui->ui_kernel->get_kernel(),
Expand Down
@@ -1,6 +1,6 @@
function y = preproc(filename)
function y = preprocessor(filename)
addpath('util');
addpath('../data/preproc');
addpath('../data/preprocessor');
y=true;

eval('globals'); % ugly hack to have vars from filename as globals
Expand All @@ -10,9 +10,9 @@
return;
end

pname=fix_preproc_name_inconsistency(preproc_name);
pname=fix_preproc_name_inconsistency(preprocessor_name);
if strcmp(pname, 'PRUNEVARSUBMEAN')==1
sg('add_preproc', pname, tobool(preproc_arg0_divide));
sg('add_preproc', pname, tobool(preprocessor_arg0_divide));
else
sg('add_preproc', pname);
end
Expand Down
4 changes: 2 additions & 2 deletions tests/regression/matlab_and_octave/util/set_distance.m
Expand Up @@ -10,8 +10,8 @@
elseif strcmp(dname, 'MINKOWSKI')==1
global distance_arg0_k;
sg('set_distance', dname, ftype, distance_arg0_k);
elseif strcmp(dname, 'SPARSEEUCLIDIAN')==1
sg('set_distance', 'EUCLIDIAN', 'SPARSEREAL');
elseif strcmp(dname, 'SPARSEEUCLIDEAN')==1
sg('set_distance', 'EUCLIDEAN', 'SPARSEREAL');
else
sg('set_distance', dname, ftype);
end
Expand Down
@@ -1,5 +1,5 @@
"""
Test PreProc
Test Preprocessor
"""

from sg import sg
Expand All @@ -19,7 +19,7 @@ def _evaluate (indata, prefix):
indata[prefix+'accuracy'], km_train=km_train, km_test=km_test)


def _set_preproc (indata, prefix):
def _set_preprocessor(indata, prefix):
pname=util.fix_preproc_name_inconsistency(indata[prefix+'name'])
args=util.get_args(indata, prefix)

Expand All @@ -40,7 +40,7 @@ def test (indata):
print e
return True

_set_preproc(indata, 'preproc_')
_set_preprocessor(indata, 'preprocessor_')

return _evaluate(indata, prefix)

1 change: 1 addition & 0 deletions tests/regression/python_static/regression.py
Expand Up @@ -13,6 +13,7 @@ def _set_regression (indata):
sg('set_labels', 'TRAIN', double(indata[prefix+'labels']))

rname=util.fix_regression_name_inconsistency(indata[prefix+'name'])
print rname
sg('new_regression', rname)


Expand Down
4 changes: 2 additions & 2 deletions tests/regression/python_static/test_one.py
Expand Up @@ -12,11 +12,11 @@
import clustering
import distribution
import regression
import preproc
import preprocessor
from sg import sg

SUPPORTED=['kernel', 'distance', 'classifier', 'clustering', 'distribution',
'regression', 'preproc']
'regression', 'preprocessor']

def _get_name_fun (fnam):
module=None
Expand Down
File renamed without changes.

0 comments on commit 97768b9

Please sign in to comment.