Skip to content

Commit

Permalink
Merge branch 'master' into debian
Browse files Browse the repository at this point in the history
* master:
  FIX: Decrease the noise level in the DiscreteHopfieldClassifier.
  FIX: honor MDP_DISABLE_SHOGUN env variable
  • Loading branch information
otizonaizit committed Mar 24, 2012
2 parents 9ee0e9a + a1fae87 commit af44043
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 11 additions & 10 deletions mdp/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,19 +344,20 @@ def set_configuration():
else:
if os.getenv('MDP_DISABLE_SHOGUN'):
config.ExternalDepFailed('shogun', 'disabled')
# From now on just support shogun >= 1.0
# Between 0.10 to 1.0 there are too many API changes...
try:
version = sgKernel.Version_get_version_release()
except AttributeError:
config.ExternalDepFailed('shogun',
'too old, upgrade to at least version 1.0')
else:
if not version.startswith('v1.'):
# From now on just support shogun >= 1.0
# Between 0.10 to 1.0 there are too many API changes...
try:
version = sgKernel.Version_get_version_release()
except AttributeError:
config.ExternalDepFailed('shogun',
'too old, upgrade to at least version 1.0.')
'too old, upgrade to at least version 1.0')
else:
config.ExternalDepFound('shogun', version)
if not version.startswith('v1.'):
config.ExternalDepFailed('shogun',
'too old, upgrade to at least version 1.0.')
else:
config.ExternalDepFound('shogun', version)

# libsvm
try:
Expand Down
2 changes: 1 addition & 1 deletion mdp/test/test_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def testDiscreteHopfieldClassifier():
# check, if a noisy pattern is recreated
noisy = numx.array(p)
for i in xrange(len(noisy)):
if numx.random.random() > 0.9:
if numx.random.random() > 0.95:
noisy[i] = not noisy[i]
retrieved = h.label(numx.array([noisy]))
# Hopfield nets are blind for inversion, need to check either case
Expand Down

0 comments on commit af44043

Please sign in to comment.