Skip to content

Commit aa1d86e

Browse files
committed
Pushing the docs for revision for branch: master, commit 540c7c66d2d93d4e4b5d49b3309ac0050b86e5eb
1 parent 714cf1f commit aa1d86e

File tree

914 files changed

+4616
-3490
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

914 files changed

+4616
-3490
lines changed

dev/_downloads/plot_huber_vs_ridge.py

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
"""
2+
=======================================================
3+
HuberRegressor vs Ridge on dataset with strong outliers
4+
=======================================================
5+
6+
Fit Ridge and HuberRegressor on a dataset with outliers.
7+
8+
The example shows that the predictions in ridge are strongly influenced
9+
by the outliers present in the dataset. The Huber regressor is less
10+
influenced by the outliers since the model uses the linear loss for these.
11+
As the parameter epsilon is increased for the Huber regressor, the decision
12+
function approaches that of the ridge.
13+
"""
14+
15+
# Authors: Manoj Kumar mks542@nyu.edu
16+
# License: BSD 3 clause
17+
18+
print(__doc__)
19+
20+
import numpy as np
21+
import matplotlib.pyplot as plt
22+
23+
from sklearn.datasets import make_regression
24+
from sklearn.linear_model import HuberRegressor, Ridge
25+
26+
# Generate toy data.
27+
rng = np.random.RandomState(0)
28+
X, y = make_regression(n_samples=20, n_features=1, random_state=0, noise=4.0,
29+
bias=100.0)
30+
31+
# Add four strong outliers to the dataset.
32+
X_outliers = rng.normal(0, 0.5, size=(4, 1))
33+
y_outliers = rng.normal(0, 2.0, size=4)
34+
X_outliers[:2, :] += X.max() + X.mean() / 4.
35+
X_outliers[2:, :] += X.min() - X.mean() / 4.
36+
y_outliers[:2] += y.min() - y.mean() / 4.
37+
y_outliers[2:] += y.max() + y.mean() / 4.
38+
X = np.vstack((X, X_outliers))
39+
y = np.concatenate((y, y_outliers))
40+
plt.plot(X, y, 'b.')
41+
42+
# Fit the huber regressor over a series of epsilon values.
43+
colors = ['r-', 'b-', 'y-', 'm-']
44+
45+
x = np.linspace(X.min(), X.max(), 7)
46+
epsilon_values = [1.35, 1.5, 1.75, 1.9]
47+
for k, epsilon in enumerate(epsilon_values):
48+
huber = HuberRegressor(fit_intercept=True, alpha=0.0, max_iter=100,
49+
epsilon=epsilon)
50+
huber.fit(X, y)
51+
coef_ = huber.coef_ * x + huber.intercept_
52+
plt.plot(x, coef_, colors[k], label="huber loss, %s" % epsilon)
53+
54+
# Fit a ridge regressor to compare it to huber regressor.
55+
ridge = Ridge(fit_intercept=True, alpha=0.0, random_state=0, normalize=True)
56+
ridge.fit(X, y)
57+
coef_ridge = ridge.coef_
58+
coef_ = ridge.coef_ * x + ridge.intercept_
59+
plt.plot(x, coef_, 'g-', label="ridge regression")
60+
61+
plt.title("Comparison of HuberRegressor vs Ridge")
62+
plt.xlabel("X")
63+
plt.ylabel("y")
64+
plt.legend(loc=0)
65+
plt.show()

dev/_downloads/plot_robust_fit.py

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,20 @@
2222
- RANSAC is good for strong outliers in the y direction
2323
2424
- TheilSen is good for small outliers, both in direction X and y, but has
25-
a break point above which it performs worst than OLS.
25+
a break point above which it performs worse than OLS.
26+
27+
- The scores of HuberRegressor may not be compared directly to both TheilSen
28+
and RANSAC because it does not attempt to completely filter the outliers
29+
but lessen their effect.
2630
2731
"""
2832

2933
from matplotlib import pyplot as plt
3034
import numpy as np
3135

32-
from sklearn import linear_model, metrics
36+
from sklearn.linear_model import (
37+
LinearRegression, TheilSenRegressor, RANSACRegressor, HuberRegressor)
38+
from sklearn.metrics import mean_squared_error
3339
from sklearn.preprocessing import PolynomialFeatures
3440
from sklearn.pipeline import make_pipeline
3541

@@ -56,12 +62,14 @@
5662
X_errors_large = X.copy()
5763
X_errors_large[::3] = 10
5864

59-
estimators = [('OLS', linear_model.LinearRegression()),
60-
('Theil-Sen', linear_model.TheilSenRegressor(random_state=42)),
61-
('RANSAC', linear_model.RANSACRegressor(random_state=42)), ]
62-
colors = {'OLS': 'turquoise', 'Theil-Sen': 'gold', 'RANSAC': 'lightgreen'}
63-
linestyle = {'OLS': '-', 'Theil-Sen': '-.', 'RANSAC': '--'}
65+
estimators = [('OLS', LinearRegression()),
66+
('Theil-Sen', TheilSenRegressor(random_state=42)),
67+
('RANSAC', RANSACRegressor(random_state=42)),
68+
('HuberRegressor', HuberRegressor())]
69+
colors = {'OLS': 'turquoise', 'Theil-Sen': 'gold', 'RANSAC': 'lightgreen', 'HuberRegressor': 'black'}
70+
linestyle = {'OLS': '-', 'Theil-Sen': '-.', 'RANSAC': '--', 'HuberRegressor': '--'}
6471
lw = 3
72+
6573
x_plot = np.linspace(X.min(), X.max())
6674
for title, this_X, this_y in [
6775
('Modeling Errors Only', X, y),
@@ -75,7 +83,7 @@
7583
for name, estimator in estimators:
7684
model = make_pipeline(PolynomialFeatures(3), estimator)
7785
model.fit(this_X, this_y)
78-
mse = metrics.mean_squared_error(model.predict(X_test), y_test)
86+
mse = mean_squared_error(model.predict(X_test), y_test)
7987
y_plot = model.predict(x_plot[:, np.newaxis])
8088
plt.plot(x_plot, y_plot, color=colors[name], linestyle=linestyle[name],
8189
linewidth=lw, label='%s: error = %.3f' % (name, mse))
50 Bytes
50 Bytes
515 Bytes
515 Bytes
267 Bytes
267 Bytes
-334 Bytes
-334 Bytes
-381 Bytes
-381 Bytes
23 Bytes
23 Bytes
597 Bytes
597 Bytes

dev/_images/plot_compare_methods.png

192 Bytes

dev/_images/plot_compare_methods1.png

192 Bytes

dev/_images/plot_compare_methods2.png

192 Bytes
291 Bytes
291 Bytes
38 Bytes
-49 Bytes
-49 Bytes
-140 Bytes
-140 Bytes
33 Bytes
33 Bytes
174 Bytes
174 Bytes
439 Bytes
439 Bytes
-226 Bytes
-226 Bytes
-83 Bytes
-83 Bytes
222 Bytes
222 Bytes
-590 Bytes
-590 Bytes

dev/_images/plot_huber_vs_ridge.png

29.8 KB

dev/_images/plot_huber_vs_ridge1.png

29.8 KB
50.2 KB
50.2 KB

dev/_images/plot_image_denoising.png

45 Bytes

dev/_images/plot_image_denoising1.png

45 Bytes
-35 Bytes
-35 Bytes
-35 Bytes
10 Bytes
21 Bytes
-336 Bytes
-586 Bytes
391 Bytes
391 Bytes
730 Bytes
-61 Bytes
-61 Bytes
-97 Bytes
-97 Bytes
-389 Bytes
-389 Bytes
-72 Bytes
-72 Bytes
105 Bytes
105 Bytes

dev/_images/plot_lle_digits_005.png

101 Bytes

dev/_images/plot_lle_digits_0051.png

101 Bytes

dev/_images/plot_lle_digits_006.png

42 Bytes

dev/_images/plot_lle_digits_0061.png

42 Bytes

dev/_images/plot_lle_digits_007.png

261 Bytes

dev/_images/plot_lle_digits_0071.png

261 Bytes

dev/_images/plot_lle_digits_008.png

-171 Bytes

dev/_images/plot_lle_digits_0081.png

-171 Bytes

dev/_images/plot_lle_digits_009.png

-445 Bytes

dev/_images/plot_lle_digits_0091.png

-445 Bytes

dev/_images/plot_lle_digits_010.png

200 Bytes

dev/_images/plot_lle_digits_0101.png

200 Bytes

dev/_images/plot_lle_digits_011.png

-20 Bytes

dev/_images/plot_lle_digits_012.png

123 Bytes

dev/_images/plot_lle_digits_013.png

-323 Bytes

dev/_images/plot_lle_digits_0131.png

-323 Bytes
-39 Bytes
-39 Bytes
14 Bytes

dev/_images/plot_manifold_sphere.png

219 Bytes

dev/_images/plot_manifold_sphere1.png

219 Bytes
50 Bytes
-3 Bytes
-3 Bytes
-215 Bytes
-215 Bytes
-430 Bytes
-430 Bytes
-521 Bytes
-521 Bytes
388 Bytes
-839 Bytes
146 Bytes
213 Bytes
1.41 KB
1.41 KB
2.92 KB
2.92 KB
1013 Bytes
1013 Bytes
-1.1 KB
-1.1 KB
-29 Bytes
-29 Bytes

dev/_images/plot_robust_fit.png

2.94 KB

dev/_images/plot_robust_fit1.png

2.94 KB

dev/_images/plot_robust_fit_001.png

3.2 KB

dev/_images/plot_robust_fit_002.png

2.87 KB

dev/_images/plot_robust_fit_0021.png

2.87 KB

dev/_images/plot_robust_fit_003.png

4.06 KB

dev/_images/plot_robust_fit_0031.png

4.06 KB

dev/_images/plot_robust_fit_004.png

3.06 KB

dev/_images/plot_robust_fit_005.png

3.59 KB

dev/_images/plot_robust_fit_0051.png

3.59 KB

dev/_images/plot_theilsen.png

33 Bytes

dev/_images/plot_theilsen1.png

33 Bytes

dev/_images/plot_theilsen_001.png

-16 Bytes

dev/_images/plot_theilsen_0011.png

-16 Bytes

dev/_images/plot_theilsen_002.png

66 Bytes
-466 Bytes
-466 Bytes

dev/_sources/auto_examples/applications/plot_model_complexity_influence.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,91 +45,91 @@ performance (latency) and predictive power (MSE or Hamming Loss).
4545
learning_rate='optimal', loss='modified_huber', n_iter=5, n_jobs=1,
4646
penalty='elasticnet', power_t=0.5, random_state=None, shuffle=True,
4747
verbose=0, warm_start=False)
48-
Complexity: 4454 | Hamming Loss (Misclassification Ratio): 0.2501 | Pred. Time: 0.023417s
48+
Complexity: 4454 | Hamming Loss (Misclassification Ratio): 0.2501 | Pred. Time: 0.023502s
4949

5050
Benchmarking SGDClassifier(alpha=0.001, average=False, class_weight=None, epsilon=0.1,
5151
eta0=0.0, fit_intercept=True, l1_ratio=0.5, learning_rate='optimal',
5252
loss='modified_huber', n_iter=5, n_jobs=1, penalty='elasticnet',
5353
power_t=0.5, random_state=None, shuffle=True, verbose=0,
5454
warm_start=False)
55-
Complexity: 1624 | Hamming Loss (Misclassification Ratio): 0.2923 | Pred. Time: 0.017917s
55+
Complexity: 1624 | Hamming Loss (Misclassification Ratio): 0.2923 | Pred. Time: 0.018417s
5656

5757
Benchmarking SGDClassifier(alpha=0.001, average=False, class_weight=None, epsilon=0.1,
5858
eta0=0.0, fit_intercept=True, l1_ratio=0.75,
5959
learning_rate='optimal', loss='modified_huber', n_iter=5, n_jobs=1,
6060
penalty='elasticnet', power_t=0.5, random_state=None, shuffle=True,
6161
verbose=0, warm_start=False)
62-
Complexity: 873 | Hamming Loss (Misclassification Ratio): 0.3191 | Pred. Time: 0.014823s
62+
Complexity: 873 | Hamming Loss (Misclassification Ratio): 0.3191 | Pred. Time: 0.014921s
6363

6464
Benchmarking SGDClassifier(alpha=0.001, average=False, class_weight=None, epsilon=0.1,
6565
eta0=0.0, fit_intercept=True, l1_ratio=0.9, learning_rate='optimal',
6666
loss='modified_huber', n_iter=5, n_jobs=1, penalty='elasticnet',
6767
power_t=0.5, random_state=None, shuffle=True, verbose=0,
6868
warm_start=False)
69-
Complexity: 655 | Hamming Loss (Misclassification Ratio): 0.3252 | Pred. Time: 0.012530s
69+
Complexity: 655 | Hamming Loss (Misclassification Ratio): 0.3252 | Pred. Time: 0.013540s
7070

7171
Benchmarking NuSVR(C=1000.0, cache_size=200, coef0=0.0, degree=3, gamma=3.0517578125e-05,
7272
kernel='rbf', max_iter=-1, nu=0.1, shrinking=True, tol=0.001,
7373
verbose=False)
74-
Complexity: 69 | MSE: 31.8133 | Pred. Time: 0.000361s
74+
Complexity: 69 | MSE: 31.8133 | Pred. Time: 0.000405s
7575

7676
Benchmarking NuSVR(C=1000.0, cache_size=200, coef0=0.0, degree=3, gamma=3.0517578125e-05,
7777
kernel='rbf', max_iter=-1, nu=0.25, shrinking=True, tol=0.001,
7878
verbose=False)
79-
Complexity: 136 | MSE: 25.6140 | Pred. Time: 0.000650s
79+
Complexity: 136 | MSE: 25.6140 | Pred. Time: 0.000725s
8080

8181
Benchmarking NuSVR(C=1000.0, cache_size=200, coef0=0.0, degree=3, gamma=3.0517578125e-05,
8282
kernel='rbf', max_iter=-1, nu=0.5, shrinking=True, tol=0.001,
8383
verbose=False)
84-
Complexity: 243 | MSE: 22.3315 | Pred. Time: 0.001112s
84+
Complexity: 243 | MSE: 22.3315 | Pred. Time: 0.001234s
8585

8686
Benchmarking NuSVR(C=1000.0, cache_size=200, coef0=0.0, degree=3, gamma=3.0517578125e-05,
8787
kernel='rbf', max_iter=-1, nu=0.75, shrinking=True, tol=0.001,
8888
verbose=False)
89-
Complexity: 350 | MSE: 21.3679 | Pred. Time: 0.001574s
89+
Complexity: 350 | MSE: 21.3679 | Pred. Time: 0.001748s
9090

9191
Benchmarking NuSVR(C=1000.0, cache_size=200, coef0=0.0, degree=3, gamma=3.0517578125e-05,
9292
kernel='rbf', max_iter=-1, nu=0.9, shrinking=True, tol=0.001,
9393
verbose=False)
94-
Complexity: 404 | MSE: 21.0915 | Pred. Time: 0.001822s
94+
Complexity: 404 | MSE: 21.0915 | Pred. Time: 0.002107s
9595

9696
Benchmarking GradientBoostingRegressor(alpha=0.9, init=None, learning_rate=0.1, loss='ls',
9797
max_depth=3, max_features=None, max_leaf_nodes=None,
9898
min_samples_leaf=1, min_samples_split=2,
9999
min_weight_fraction_leaf=0.0, n_estimators=10, presort='auto',
100100
random_state=None, subsample=1.0, verbose=0, warm_start=False)
101-
Complexity: 10 | MSE: 28.9793 | Pred. Time: 0.000113s
101+
Complexity: 10 | MSE: 28.9793 | Pred. Time: 0.000118s
102102

103103
Benchmarking GradientBoostingRegressor(alpha=0.9, init=None, learning_rate=0.1, loss='ls',
104104
max_depth=3, max_features=None, max_leaf_nodes=None,
105105
min_samples_leaf=1, min_samples_split=2,
106106
min_weight_fraction_leaf=0.0, n_estimators=50, presort='auto',
107107
random_state=None, subsample=1.0, verbose=0, warm_start=False)
108-
Complexity: 50 | MSE: 8.3398 | Pred. Time: 0.000196s
108+
Complexity: 50 | MSE: 8.3398 | Pred. Time: 0.000200s
109109

110110
Benchmarking GradientBoostingRegressor(alpha=0.9, init=None, learning_rate=0.1, loss='ls',
111111
max_depth=3, max_features=None, max_leaf_nodes=None,
112112
min_samples_leaf=1, min_samples_split=2,
113113
min_weight_fraction_leaf=0.0, n_estimators=100,
114114
presort='auto', random_state=None, subsample=1.0, verbose=0,
115115
warm_start=False)
116-
Complexity: 100 | MSE: 7.0096 | Pred. Time: 0.000275s
116+
Complexity: 100 | MSE: 7.0096 | Pred. Time: 0.000284s
117117

118118
Benchmarking GradientBoostingRegressor(alpha=0.9, init=None, learning_rate=0.1, loss='ls',
119119
max_depth=3, max_features=None, max_leaf_nodes=None,
120120
min_samples_leaf=1, min_samples_split=2,
121121
min_weight_fraction_leaf=0.0, n_estimators=200,
122122
presort='auto', random_state=None, subsample=1.0, verbose=0,
123123
warm_start=False)
124-
Complexity: 200 | MSE: 6.1836 | Pred. Time: 0.000430s
124+
Complexity: 200 | MSE: 6.1836 | Pred. Time: 0.000965s
125125

126126
Benchmarking GradientBoostingRegressor(alpha=0.9, init=None, learning_rate=0.1, loss='ls',
127127
max_depth=3, max_features=None, max_leaf_nodes=None,
128128
min_samples_leaf=1, min_samples_split=2,
129129
min_weight_fraction_leaf=0.0, n_estimators=500,
130130
presort='auto', random_state=None, subsample=1.0, verbose=0,
131131
warm_start=False)
132-
Complexity: 500 | MSE: 6.3426 | Pred. Time: 0.000924s
132+
Complexity: 500 | MSE: 6.3426 | Pred. Time: 0.001237s
133133

134134

135135

@@ -138,6 +138,6 @@ performance (latency) and predictive power (MSE or Hamming Loss).
138138
.. literalinclude:: plot_model_complexity_influence.py
139139
:lines: 16-
140140

141-
**Total running time of the example:** 24.11 seconds
142-
( 0 minutes 24.11 seconds)
141+
**Total running time of the example:** 26.54 seconds
142+
( 0 minutes 26.54 seconds)
143143

dev/_sources/auto_examples/applications/plot_out_of_core_classification.txt

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -55,46 +55,46 @@ feeding them to the learner.
5555
**Script output**::
5656

5757
Test set is 878 documents (108 positive)
58-
Passive-Aggressive classifier : 962 train docs ( 132 positive) 878 test docs ( 108 positive) accuracy: 0.904 in 1.67s ( 576 docs/s)
59-
Perceptron classifier : 962 train docs ( 132 positive) 878 test docs ( 108 positive) accuracy: 0.921 in 1.67s ( 574 docs/s)
60-
SGD classifier : 962 train docs ( 132 positive) 878 test docs ( 108 positive) accuracy: 0.846 in 1.68s ( 573 docs/s)
61-
NB Multinomial classifier : 962 train docs ( 132 positive) 878 test docs ( 108 positive) accuracy: 0.877 in 1.71s ( 561 docs/s)
58+
Passive-Aggressive classifier : 962 train docs ( 132 positive) 878 test docs ( 108 positive) accuracy: 0.904 in 1.78s ( 540 docs/s)
59+
Perceptron classifier : 962 train docs ( 132 positive) 878 test docs ( 108 positive) accuracy: 0.921 in 1.79s ( 538 docs/s)
60+
SGD classifier : 962 train docs ( 132 positive) 878 test docs ( 108 positive) accuracy: 0.846 in 1.79s ( 537 docs/s)
61+
NB Multinomial classifier : 962 train docs ( 132 positive) 878 test docs ( 108 positive) accuracy: 0.877 in 1.83s ( 526 docs/s)
6262

6363

64-
Passive-Aggressive classifier : 3911 train docs ( 517 positive) 878 test docs ( 108 positive) accuracy: 0.948 in 5.07s ( 772 docs/s)
65-
Perceptron classifier : 3911 train docs ( 517 positive) 878 test docs ( 108 positive) accuracy: 0.926 in 5.07s ( 771 docs/s)
66-
SGD classifier : 3911 train docs ( 517 positive) 878 test docs ( 108 positive) accuracy: 0.933 in 5.07s ( 770 docs/s)
67-
NB Multinomial classifier : 3911 train docs ( 517 positive) 878 test docs ( 108 positive) accuracy: 0.885 in 5.11s ( 765 docs/s)
64+
Passive-Aggressive classifier : 3911 train docs ( 517 positive) 878 test docs ( 108 positive) accuracy: 0.948 in 5.32s ( 735 docs/s)
65+
Perceptron classifier : 3911 train docs ( 517 positive) 878 test docs ( 108 positive) accuracy: 0.926 in 5.32s ( 734 docs/s)
66+
SGD classifier : 3911 train docs ( 517 positive) 878 test docs ( 108 positive) accuracy: 0.933 in 5.33s ( 733 docs/s)
67+
NB Multinomial classifier : 3911 train docs ( 517 positive) 878 test docs ( 108 positive) accuracy: 0.885 in 5.37s ( 728 docs/s)
6868

6969

70-
Passive-Aggressive classifier : 6821 train docs ( 891 positive) 878 test docs ( 108 positive) accuracy: 0.944 in 8.46s ( 806 docs/s)
71-
Perceptron classifier : 6821 train docs ( 891 positive) 878 test docs ( 108 positive) accuracy: 0.949 in 8.46s ( 806 docs/s)
72-
SGD classifier : 6821 train docs ( 891 positive) 878 test docs ( 108 positive) accuracy: 0.950 in 8.47s ( 805 docs/s)
73-
NB Multinomial classifier : 6821 train docs ( 891 positive) 878 test docs ( 108 positive) accuracy: 0.899 in 8.50s ( 802 docs/s)
70+
Passive-Aggressive classifier : 6821 train docs ( 891 positive) 878 test docs ( 108 positive) accuracy: 0.944 in 8.82s ( 773 docs/s)
71+
Perceptron classifier : 6821 train docs ( 891 positive) 878 test docs ( 108 positive) accuracy: 0.949 in 8.83s ( 772 docs/s)
72+
SGD classifier : 6821 train docs ( 891 positive) 878 test docs ( 108 positive) accuracy: 0.950 in 8.83s ( 772 docs/s)
73+
NB Multinomial classifier : 6821 train docs ( 891 positive) 878 test docs ( 108 positive) accuracy: 0.899 in 8.87s ( 769 docs/s)
7474

7575

76-
Passive-Aggressive classifier : 9759 train docs ( 1276 positive) 878 test docs ( 108 positive) accuracy: 0.964 in 11.83s ( 825 docs/s)
77-
Perceptron classifier : 9759 train docs ( 1276 positive) 878 test docs ( 108 positive) accuracy: 0.950 in 11.83s ( 824 docs/s)
78-
SGD classifier : 9759 train docs ( 1276 positive) 878 test docs ( 108 positive) accuracy: 0.959 in 11.84s ( 824 docs/s)
79-
NB Multinomial classifier : 9759 train docs ( 1276 positive) 878 test docs ( 108 positive) accuracy: 0.909 in 11.87s ( 822 docs/s)
76+
Passive-Aggressive classifier : 9759 train docs ( 1276 positive) 878 test docs ( 108 positive) accuracy: 0.964 in 12.31s ( 792 docs/s)
77+
Perceptron classifier : 9759 train docs ( 1276 positive) 878 test docs ( 108 positive) accuracy: 0.950 in 12.31s ( 792 docs/s)
78+
SGD classifier : 9759 train docs ( 1276 positive) 878 test docs ( 108 positive) accuracy: 0.959 in 12.32s ( 792 docs/s)
79+
NB Multinomial classifier : 9759 train docs ( 1276 positive) 878 test docs ( 108 positive) accuracy: 0.909 in 12.35s ( 790 docs/s)
8080

8181

82-
Passive-Aggressive classifier : 11680 train docs ( 1499 positive) 878 test docs ( 108 positive) accuracy: 0.965 in 14.73s ( 792 docs/s)
83-
Perceptron classifier : 11680 train docs ( 1499 positive) 878 test docs ( 108 positive) accuracy: 0.951 in 14.73s ( 792 docs/s)
84-
SGD classifier : 11680 train docs ( 1499 positive) 878 test docs ( 108 positive) accuracy: 0.957 in 14.74s ( 792 docs/s)
85-
NB Multinomial classifier : 11680 train docs ( 1499 positive) 878 test docs ( 108 positive) accuracy: 0.916 in 14.77s ( 790 docs/s)
82+
Passive-Aggressive classifier : 11680 train docs ( 1499 positive) 878 test docs ( 108 positive) accuracy: 0.965 in 15.45s ( 755 docs/s)
83+
Perceptron classifier : 11680 train docs ( 1499 positive) 878 test docs ( 108 positive) accuracy: 0.951 in 15.46s ( 755 docs/s)
84+
SGD classifier : 11680 train docs ( 1499 positive) 878 test docs ( 108 positive) accuracy: 0.957 in 15.46s ( 755 docs/s)
85+
NB Multinomial classifier : 11680 train docs ( 1499 positive) 878 test docs ( 108 positive) accuracy: 0.916 in 15.50s ( 753 docs/s)
8686

8787

88-
Passive-Aggressive classifier : 14625 train docs ( 1865 positive) 878 test docs ( 108 positive) accuracy: 0.967 in 18.17s ( 805 docs/s)
89-
Perceptron classifier : 14625 train docs ( 1865 positive) 878 test docs ( 108 positive) accuracy: 0.956 in 18.17s ( 804 docs/s)
90-
SGD classifier : 14625 train docs ( 1865 positive) 878 test docs ( 108 positive) accuracy: 0.966 in 18.17s ( 804 docs/s)
91-
NB Multinomial classifier : 14625 train docs ( 1865 positive) 878 test docs ( 108 positive) accuracy: 0.926 in 18.21s ( 803 docs/s)
88+
Passive-Aggressive classifier : 14625 train docs ( 1865 positive) 878 test docs ( 108 positive) accuracy: 0.967 in 19.17s ( 762 docs/s)
89+
Perceptron classifier : 14625 train docs ( 1865 positive) 878 test docs ( 108 positive) accuracy: 0.956 in 19.18s ( 762 docs/s)
90+
SGD classifier : 14625 train docs ( 1865 positive) 878 test docs ( 108 positive) accuracy: 0.966 in 19.18s ( 762 docs/s)
91+
NB Multinomial classifier : 14625 train docs ( 1865 positive) 878 test docs ( 108 positive) accuracy: 0.926 in 19.22s ( 760 docs/s)
9292

9393

94-
Passive-Aggressive classifier : 17360 train docs ( 2179 positive) 878 test docs ( 108 positive) accuracy: 0.966 in 21.29s ( 815 docs/s)
95-
Perceptron classifier : 17360 train docs ( 2179 positive) 878 test docs ( 108 positive) accuracy: 0.957 in 21.29s ( 815 docs/s)
96-
SGD classifier : 17360 train docs ( 2179 positive) 878 test docs ( 108 positive) accuracy: 0.957 in 21.29s ( 815 docs/s)
97-
NB Multinomial classifier : 17360 train docs ( 2179 positive) 878 test docs ( 108 positive) accuracy: 0.932 in 21.33s ( 814 docs/s)
94+
Passive-Aggressive classifier : 17360 train docs ( 2179 positive) 878 test docs ( 108 positive) accuracy: 0.966 in 22.43s ( 773 docs/s)
95+
Perceptron classifier : 17360 train docs ( 2179 positive) 878 test docs ( 108 positive) accuracy: 0.957 in 22.43s ( 773 docs/s)
96+
SGD classifier : 17360 train docs ( 2179 positive) 878 test docs ( 108 positive) accuracy: 0.957 in 22.44s ( 773 docs/s)
97+
NB Multinomial classifier : 17360 train docs ( 2179 positive) 878 test docs ( 108 positive) accuracy: 0.932 in 22.48s ( 772 docs/s)
9898

9999

100100

@@ -103,6 +103,6 @@ feeding them to the learner.
103103
.. literalinclude:: plot_out_of_core_classification.py
104104
:lines: 25-
105105

106-
**Total running time of the example:** 23.31 seconds
107-
( 0 minutes 23.31 seconds)
106+
**Total running time of the example:** 24.53 seconds
107+
( 0 minutes 24.53 seconds)
108108

0 commit comments

Comments
 (0)