Skip to content

Commit be62aa9

Browse files
committed
more fixes for docs, deprecated interfaces
1 parent c7c7ade commit be62aa9

File tree

7 files changed

+48
-43
lines changed

7 files changed

+48
-43
lines changed

doc/testimonials/testimonials.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ sodales aliquam quam.
2626
.. raw:: html
2727

2828
<div class="testimonial-website">
29+
2930
**website:** `www.inria.fr <http://www.inria.fr>`_
3031

3132
.. raw:: html
@@ -47,6 +48,7 @@ sodales aliquam quam.
4748
.. raw:: html
4849

4950
<div class="testimonial-website">
51+
5052
**website:** `www.inria.fr <http://www.inria.fr>`_
5153

5254
.. raw:: html

doc/whats_new.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ Changelog
186186
by `Arnaud Joly`_.
187187

188188
- New website design and navigation by `Gilles Louppe`_, `Nelle Varoquaux`_,
189-
`Vincent Michael`_ and `Andreas Müller`_.
189+
Vincent Michael and `Andreas Müller`_.
190190

191191

192192

sklearn/decomposition/dict_learning.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def _sparse_encode(X, dictionary, gram, cov=None, algorithm='lasso_lars',
107107
alpha = float(regularization) / n_features # account for scaling
108108
clf = Lasso(alpha=alpha, fit_intercept=False, precompute=gram,
109109
max_iter=max_iter)
110-
clf.fit(dictionary.T, X.T, Xy=cov, coef_init=init)
110+
clf.fit(dictionary.T, X.T, coef_init=init)
111111
new_code = clf.coef_
112112

113113
elif algorithm == 'lars':

sklearn/linear_model/coordinate_descent.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -563,19 +563,22 @@ def __init__(self, alpha=1.0, l1_ratio=0.5, fit_intercept=True,
563563
self.intercept_ = 0.0
564564

565565
def fit(self, X, y, Xy=None, coef_init=None):
566-
"""Fit model with coordinate descent
566+
"""Fit model with coordinate descent.
567567
568568
Parameters
569569
-----------
570-
X: ndarray or scipy.sparse matrix, (n_samples, n_features)
570+
X : ndarray or scipy.sparse matrix, (n_samples, n_features)
571571
Data
572-
y: ndarray, shape = (n_samples,) or (n_samples, n_targets)
572+
573+
y : ndarray, shape = (n_samples,) or (n_samples, n_targets)
573574
Target
575+
574576
Xy : array-like, optional
575577
Xy = np.dot(X.T, y) that can be precomputed. It is useful
576578
only when the Gram matrix is precomputed.
577579
WARNING : ignored and will be deprecated in 0.15
578-
coef_init: ndarray of shape n_features or (n_targets, n_features)
580+
581+
coef_init : ndarray of shape n_features or (n_targets, n_features)
579582
The initial coeffients to warm-start the optimization
580583
WARNING : ignored and will be deprecated in 0.15
581584

sklearn/neighbors/dist_metrics.c

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sklearn/neighbors/dist_metrics.pyx

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -126,38 +126,38 @@ cdef class DistanceMetric:
126126
127127
*Metrics intended for real-valued vector spaces:*
128128
129-
============== ==================== ======== ===========================
129+
============== ==================== ======== ============================
130130
identifier class name args distance function
131-
-------------- -------------------- -------- ---------------------------
131+
-------------- -------------------- -------- ----------------------------
132132
"euclidean" EuclideanDistance - sqrt(sum((x - y)^2))
133133
"manhattan" ManhattanDistance - sum(|x - y|)
134134
"chebyshev" ChebyshevDistance - sum(max(|x - y|))
135135
"minkowski" MinkowskiDistance p sum(|x - y|^p)^(1/p)
136136
"wminkowski" WMinkowskiDistance p, w sum(w * |x - y|^p)^(1/p)
137137
"seuclidean" SEuclideanDistance V sqrt(sum((x - y)^2 / V))
138138
"mahalanobis" MahalanobisDistance V or VI sqrt((x - y)' V^-1 (x - y))
139-
============== ==================== ======== ===========================
139+
============== ==================== ======== ============================
140140
141141
*Metrics intended for two-dimensional vector spaces:*
142-
=========== ================= =======================================
143-
identifier class name distance function
144-
----------- ----------------- ----------------------------------------
145-
"haversine" HaversineDistance 2 arcsin(sqrt(sin^2(0.5*dx)
142+
============ ================== ========================================
143+
identifier class name distance function
144+
------------ ------------------ ----------------------------------------
145+
"haversine" HaversineDistance 2 arcsin(sqrt(sin^2(0.5*dx)
146146
+ cos(x1)cos(x2)sin^2(0.5*dy)))
147-
=========== ================= ========================================
147+
============ ================== ========================================
148148
149149
150150
*Metrics intended for integer-valued vector spaces:* Though intended
151151
for integer-valued vectors, these are also valid metrics in the case of
152152
real-valued vectors.
153153
154-
============= ==================== ====================================
154+
============= ==================== =====================================
155155
identifier class name distance function
156-
------------- -------------------- ------------------------------------
156+
------------- -------------------- -------------------------------------
157157
"hamming" HammingDistance N_unequal(x, y) / N_tot
158158
"canberra" CanberraDistance sum(|x - y| / (|x| + |y|))
159159
"braycurtis" BrayCurtisDistance sum(|x - y|) / (sum(|x|) + sum(|y|))
160-
============= ==================== ====================================
160+
============= ==================== =====================================
161161
162162
*Metrics intended for boolean-valued vector spaces:* Any nonzero entry
163163
is evaluated to "True". In the listings below, the following
@@ -171,26 +171,26 @@ cdef class DistanceMetric:
171171
- NNEQ : number of non-equal dimensions, NNEQ = NTF + NFT
172172
- NNZ : number of nonzero dimensions, NNZ = NTF + NFT + NTT
173173
174-
============= ====================== =================================
175-
identifier class name distance function
176-
------------- ---------------------- ---------------------------------
177-
"jaccard" JaccardDistance NNEQ / NNZ
178-
"maching" MatchingDistance NNEQ / N
179-
"dice" DiceDistance NNEQ / (NTT + NNZ)
180-
"kulsinski" KulsinskiDistance (NNEQ + N - NTT) / (NNEQ + N)
181-
"rogerstanimoto" RogersTanimotoDistance 2 * NNEQ / (N + NNEQ)
182-
"russellrao" RussellRaoDistance NNZ / N
183-
"sokalmichener" SokalMichenerDistance 2 * NNEQ / (N + NNEQ)
184-
"sokalsneath" SokalSneathDistance NNEQ / (NNEQ + 0.5 * NTT)
185-
================ ====================== =================================
174+
================= ======================= =================================
175+
identifier class name distance function
176+
----------------- ----------------------- ---------------------------------
177+
"jaccard" JaccardDistance NNEQ / NNZ
178+
"maching" MatchingDistance NNEQ / N
179+
"dice" DiceDistance NNEQ / (NTT + NNZ)
180+
"kulsinski" KulsinskiDistance (NNEQ + N - NTT) / (NNEQ + N)
181+
"rogerstanimoto" RogersTanimotoDistance 2 * NNEQ / (N + NNEQ)
182+
"russellrao" RussellRaoDistance NNZ / N
183+
"sokalmichener" SokalMichenerDistance 2 * NNEQ / (N + NNEQ)
184+
"sokalsneath" SokalSneathDistance NNEQ / (NNEQ + 0.5 * NTT)
185+
================= ======================= =================================
186186
187187
*User-defined distance:*
188188
189-
========== ============== =======
190-
identifier class name args
191-
---------- -------------- -------
192-
"pyfunc" PyFuncDistance func
193-
========== ============== =======
189+
=========== =============== =======
190+
identifier class name args
191+
----------- --------------- -------
192+
"pyfunc" PyFuncDistance func
193+
=========== =============== =======
194194
195195
Here ``func`` is a function which takes two one-dimensional numpy
196196
arrays, and returns a distance. Note that in order to be used within

0 commit comments

Comments
 (0)