3 Commits

Author SHA1 Message Date
rasbt 642cb54a89 re-enable plotting tests 2017-06-24 01:15:51 -04:00
rasbt a64de0c3cd re-enable plotting tests 2017-06-24 01:06:19 -04:00
rasbt 31ee8abecc re-enable plotting tests 2017-06-24 00:59:44 -04:00
6 changed files with 41 additions and 23 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ fi
source activate test-environment
pip install nose nose-exclude;
pip install nose;
if [ "${COVERAGE}" = "true" ]; then
pip install coverage coveralls codecov;
+1 -3
View File
@@ -4,9 +4,7 @@ set -e
if [[ "$COVERAGE" == "true" ]]; then
nosetests -s -v --with-coverage --exclude-dir=mlxtend/tf_classifier --exclude-dir=mlxtend/tf_regressor --exclude-dir=mlxtend/tf_cluster --exclude-dir=mlxtend/plotting
else
nosetests -s -v --exclude-dir=mlxtend/tf_classifier --exclude-dir=mlxtend/tf_regressor --exclude-dir=mlxtend/tf_cluster --exclude-dir=mlxtend/plotting
nosetests -s -v --with-coverage
fi
if [[ "$NOTEBOOKS" == "true" ]]; then
+21
View File
@@ -5,6 +5,27 @@
The CHANGELOG for the current development version is available at
[https://github.com/rasbt/mlxtend/blob/master/docs/sources/CHANGELOG.md](https://github.com/rasbt/mlxtend/blob/master/docs/sources/CHANGELOG.md).
### Version 0.7.1dev (TBD)
##### Downloads
- [Source code (zip)](https://github.com/rasbt/mlxtend/archive/v0.7.1.zip)
- [Source code (tar.gz)](https://github.com/rasbt/mlxtend/archive/v0.7.1.tar.gz)
##### New Features
- /
##### Changes
- /
##### Bug Fixes
- /
### Version 0.7.0 (2017-06-22)
+1 -1
View File
@@ -4,4 +4,4 @@
#
# License: BSD 3 clause
__version__ = '0.7.0'
__version__ = '0.7.1dev'
@@ -5,8 +5,11 @@
# License: BSD 3 clause
from mlxtend.plotting import checkerboard_plot
import matplotlib.pyplot as plt
import numpy as np
plt.switch_backend('agg')
def test_runs():
+14 -18
View File
@@ -23,8 +23,8 @@ def test_training_size():
training_errors, test_errors = (plot_learning_curves(X_train, y_train,
X_test, y_test, clf, suppress_plot=True))
desired1 = [0.32, 0.33, 0.32, 0.33, 0.30, 0.31, 0.31, 0.22, 0.22, 0.22]
desired2 = [0.35, 0.35, 0.35, 0.35, 0.43, 0.45, 0.35, 0.35, 0.45, 0.45]
desired1 = [0.22, 0.22, 0.22, 0.31, 0.31, 0.3, 0.33, 0.32, 0.33, 0.32]
desired2 = [0.45, 0.45, 0.35, 0.35, 0.45, 0.43, 0.35, 0.35, 0.35, 0.35]
np.testing.assert_almost_equal(training_errors, desired1, decimal=2)
np.testing.assert_almost_equal(test_errors, desired2, decimal=2)
@@ -34,22 +34,18 @@ def test_scikit_metrics():
iris = datasets.load_iris()
X = iris.data
y = iris.target
X_train, X_test, y_train, y_test = train_test_split(X,
y,
train_size=0.6,
random_state=2)
X_train, X_test, y_train, y_test = (train_test_split(X, y,
train_size=0.6, random_state=2))
clf = DecisionTreeClassifier(max_depth=1, random_state=1)
training_errors, test_errors = plot_learning_curves(X_train,
y_train,
X_test,
y_test,
clf,
suppress_plot=True,
scoring='accuracy')
training_acc, test_acc = (plot_learning_curves(X_train, y_train,
X_test, y_test, clf,
scoring='accuracy',
suppress_plot=True))
desired1 = [0.68, 0.67, 0.68, 0.67, 0.7, 0.69, 0.69, 0.78, 0.78, 0.78]
desired2 = [0.65, 0.65, 0.65, 0.65, 0.57, 0.55, 0.65, 0.65, 0.55, 0.55]
np.testing.assert_almost_equal(training_errors, desired1, decimal=2)
np.testing.assert_almost_equal(test_errors, desired2, decimal=2)
desired1 = np.array([0.22, 0.22, 0.22, 0.31, 0.31,
0.3, 0.33, 0.32, 0.33, 0.32])
desired2 = np.array([0.45, 0.45, 0.35, 0.35, 0.45,
0.43, 0.35, 0.35, 0.35, 0.35])
np.testing.assert_almost_equal(training_acc, 1 - desired1, decimal=2)
np.testing.assert_almost_equal(test_acc, 1 - desired2, decimal=2)