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 ? Sensibilisation à
l'Intelligence Artificielle
Voir le programme détaillé
Module « scipy.spatial.distance »

Fonction kulczynski1 - module scipy.spatial.distance

Signature de la fonction kulczynski1

def kulczynski1(u, v, *, w=None) 

Description

help(scipy.spatial.distance.kulczynski1)

Compute the Kulczynski 1 dissimilarity between two boolean 1-D arrays.

.. deprecated:: 1.15.0
   This function is deprecated and will be removed in SciPy 1.17.0.
   Replace usage of ``kulczynski1(u, v)`` with ``1/jaccard(u, v) - 1``.

The Kulczynski 1 dissimilarity between two boolean 1-D arrays `u` and `v`
of length ``n``, is defined as

.. math::

     \frac{c_{11}}
          {c_{01} + c_{10}}

where :math:`c_{ij}` is the number of occurrences of
:math:`\mathtt{u[k]} = i` and :math:`\mathtt{v[k]} = j` for
:math:`k \in {0, 1, ..., n-1}`.

Parameters
----------
u : (N,) array_like, bool
    Input array.
v : (N,) array_like, bool
    Input array.
w : (N,) array_like, optional
    The weights for each value in `u` and `v`. Default is None,
    which gives each value a weight of 1.0

Returns
-------
kulczynski1 : float
    The Kulczynski 1 distance between vectors `u` and `v`.

Notes
-----
This measure has a minimum value of 0 and no upper limit.
It is un-defined when there are no non-matches.

.. versionadded:: 1.8.0

References
----------
.. [1] Kulczynski S. et al. Bulletin
       International de l'Academie Polonaise des Sciences
       et des Lettres, Classe des Sciences Mathematiques
       et Naturelles, Serie B (Sciences Naturelles). 1927;
       Supplement II: 57-203.

Examples
--------
>>> from scipy.spatial import distance
>>> distance.kulczynski1([1, 0, 0], [0, 1, 0])
0.0
>>> distance.kulczynski1([True, False, False], [True, True, False])
1.0
>>> distance.kulczynski1([True, False, False], [True])
0.5
>>> distance.kulczynski1([1, 0, 0], [3, 1, 0])
-3.0



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