Skip to content

Commit 73f0144

Browse files
authored
style (#141)
1 parent cd1f2f5 commit 73f0144

10 files changed

+4
-19
lines changed

_doc/examples/plot_kmeans_l1.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
from sklearn.cluster import KMeans
1515
from mlinsights.mlmodel import KMeansL1L2
1616

17-
1817
######################################################################
1918
# Simple datasets
2019
# ---------------

_doc/examples/plot_piecewise_linear_regression.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from sklearn.dummy import DummyRegressor
2727
from mlinsights.mlmodel import PiecewiseRegressor
2828

29-
3029
X = npr.normal(size=(1000, 4))
3130
alpha = [4, -2]
3231
t = (X[:, 0] + X[:, 3] * 0.5) > 0

_doc/examples/plot_predictable_tsne.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
from sklearn.preprocessing import StandardScaler
2929
from mlinsights.mlmodel import PredictableTSNE
3030

31-
3231
digits = datasets.load_digits(n_class=6)
3332
Xd = digits.data
3433
yd = digits.target

_doc/examples/plot_quantile_mlpregression.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from sklearn.neural_network import MLPRegressor
1818
from mlinsights.mlmodel import QuantileMLPRegressor
1919

20-
2120
X = numpy.random.random(1000)
2221
eps1 = (numpy.random.random(900) - 0.5) * 0.1
2322
eps2 = (numpy.random.random(100)) * 10

_doc/examples/plot_regression_confidence_interval.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
from sklearn.tree import DecisionTreeRegressor
3636
from mlinsights.mlmodel import IntervalRegressor, QuantileLinearRegression
3737

38-
3938
N = 200
4039
X = rand(N, 1) * 2
4140
eps = randn(N, 1) * 0.2

_doc/examples/plot_search_images_torch.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from mlinsights.plotting import plot_gallery_images
2727
from torchvision.models.squeezenet import SqueezeNet1_0_Weights
2828

29-
3029
model = models.squeezenet1_0(weights=SqueezeNet1_0_Weights.IMAGENET1K_V1)
3130
model
3231

_doc/examples/plot_sklearn_transformed_target.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
from mlinsights.mlmodel import TransformedTargetRegressor2
3232
from mlinsights.mlmodel import TransformedTargetClassifier2
3333

34-
3534
rnd = random((1000, 1))
3635
rndn = randn(1000)
3736
X = rnd[:, :1] * 10

_doc/examples/plot_traceable_ngrams_tfidf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
TraceableTfidfVectorizer,
2323
)
2424

25-
2625
corpus = numpy.array(
2726
[
2827
"This is the first document.",

_doc/examples/plot_visualize_pipeline.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
)
3535
from mlinsights.plotting import pipeline2dot, pipeline2str
3636

37-
3837
iris = datasets.load_iris()
3938
X = iris.data[:, :4]
4039
df = pandas.DataFrame(X)

_unittests/ut_plotting/test_dot.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ def test_union_features(self):
122122
self.assertIn("MinMaxScaler", dot)
123123

124124
def test_onehotencoder_dot(self):
125-
data = dedent(
126-
"""
125+
data = dedent("""
127126
date,value,notrend,trend,weekday,lag1,lag2,lag3,lag4,lag5,lag6,lag7,lag8
128127
2017-07-10 13:27:04.669830,0.003463591425601385,0.0004596547917981044,0.0030039366338032807,
129128
###0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
@@ -151,8 +150,7 @@ def test_onehotencoder_dot(self):
151150
2017-07-21 13:27:04.669830,0.005866058541412791,0.00217339675927127,0.0036926617821415207,4,0.004773874566436903,
152151
###0.004200435956007872,0.0038464710972236286,0.0035533180858140765,0.008716378909294038,0.006336617719481035,
153152
###0.006078151848127084,0.004277700876279705
154-
"""
155-
).replace("\n###", "")
153+
""").replace("\n###", "")
156154
df = pandas.read_csv(StringIO(data))
157155
cols = ["lag1", "lag2", "lag3", "lag4", "lag5", "lag6", "lag7", "lag8"]
158156
model = make_pipeline(
@@ -180,9 +178,7 @@ def test_pipeline_tr_small(self):
180178
7.8,0.76,0.04,2.3,0.092,15.0,54.0,0.997,3.26,0.65,9.8,5,red
181179
11.2,0.28,0.56,1.9,0.075,17.0,60.0,0.998,3.16,0.58,9.8,6,white
182180
7.4,0.7,0.0,1.9,0.076,11.0,34.0,0.9978,3.51,0.56,9.4,5,red
183-
""".replace(
184-
" ", ""
185-
)
181+
""".replace(" ", "")
186182
X_train = pandas.read_csv(StringIO(buffer)).drop("quality", axis=1)
187183

188184
pipe = Pipeline(
@@ -224,9 +220,7 @@ def test_pipeline_tr(self):
224220
7.8,0.76,0.04,2.3,0.092,15.0,54.0,0.997,3.26,0.65,9.8,5,red
225221
11.2,0.28,0.56,1.9,0.075,17.0,60.0,0.998,3.16,0.58,9.8,6,white
226222
7.4,0.7,0.0,1.9,0.076,11.0,34.0,0.9978,3.51,0.56,9.4,5,red
227-
""".replace(
228-
" ", ""
229-
)
223+
""".replace(" ", "")
230224
X_train = pandas.read_csv(StringIO(buffer)).drop("quality", axis=1)
231225

232226
numeric_features = [c for c in X_train if c != "color"]

0 commit comments

Comments
 (0)