Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Machine Learning
avec Scikit-Learn
Voir le programme détaillé
Module « scipy.spatial.distance »

Fonction seuclidean - module scipy.spatial.distance

Signature de la fonction seuclidean

def seuclidean(u, v, V) 

Description

help(scipy.spatial.distance.seuclidean)

Return the standardized Euclidean distance between two 1-D arrays.

The standardized Euclidean distance between two n-vectors `u` and `v` is

.. math::

   \sqrt{\sum\limits_i \frac{1}{V_i} \left(u_i-v_i \right)^2}

``V`` is the variance vector; ``V[I]`` is the variance computed over all the i-th
components of the points. If not passed, it is automatically computed.

Parameters
----------
u : (N,) array_like
    Input array.
v : (N,) array_like
    Input array.
V : (N,) array_like
    `V` is an 1-D array of component variances. It is usually computed
    among a larger collection of vectors.

Returns
-------
seuclidean : double
    The standardized Euclidean distance between vectors `u` and `v`.

Examples
--------
>>> from scipy.spatial import distance
>>> distance.seuclidean([1, 0, 0], [0, 1, 0], [0.1, 0.1, 0.1])
4.4721359549995796
>>> distance.seuclidean([1, 0, 0], [0, 1, 0], [1, 0.1, 0.1])
3.3166247903553998
>>> distance.seuclidean([1, 0, 0], [0, 1, 0], [10, 0.1, 0.1])
3.1780497164141406



Vous êtes un professionnel et vous avez besoin d'une formation ? Deep Learning avec Python
et Keras et Tensorflow
Voir le programme détaillé