Skip to content

Commit

Permalink
pep8, history
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Jun 3, 2020
1 parent fbf54c1 commit d828df4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
History
=======

current - 2020-05-28 - 0.00Mb
current - 2020-06-01 - 0.00Mb
=============================

* `75`: Moves kmeans with constraint from papierstat. (2020-05-27)
Expand Down
2 changes: 1 addition & 1 deletion mlinsights/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@brief Module *mlinsights*.
Look for insights for machine learned models.
"""
__version__ = "0.2.444"
__version__ = "0.2.445"
__author__ = "Xavier Dupré"
__github__ = "https://github.com/sdpython/mlinsights"
__url__ = "http://www.xavierdupre.fr/app/mlinsights/helpsphinx/index.html"
Expand Down
2 changes: 1 addition & 1 deletion mlinsights/mlmodel/_kmeans_constraint_.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def _constraint_association_distance(leftover, counters, labels, leftclose, dist
labels[ind] = c
distances[ind, c] = maxi
break
elif nover > 0 and leftclose[c] == -1:
if nover > 0 and leftclose[c] == -1:
# The cluster may accept one point if the number
# of clusters does not divide the number of points in X.
counters[c] += 1
Expand Down
2 changes: 1 addition & 1 deletion mlinsights/mlmodel/categories_to_integers.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def transform(v, vec):
sch, pos, new_vector = self._schema
X = X.copy()
for c in self._fit_columns:
X[c] = X[c].apply(lambda v: transform(v, new_vector[c]))
X[c] = X[c].apply(lambda v, cv=c: transform(v, new_vector[cv]))
return X
else:
dfcat = X[self._fit_columns]
Expand Down
2 changes: 1 addition & 1 deletion mlinsights/mlmodel/kmeans_constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@brief Implémente la classe @see cl ConstraintKMeans.
"""
import numpy
from scipy.spatial import Delaunay
from scipy.spatial import Delaunay # pylint: disable=E0611
from sklearn.cluster import KMeans
from sklearn.metrics.pairwise import euclidean_distances
from ._kmeans_constraint_ import constraint_kmeans, constraint_predictions
Expand Down

0 comments on commit d828df4

Please sign in to comment.