403Webshell
Server IP : 54.37.205.81  /  Your IP : 216.73.216.76
Web Server : nginx/1.22.1
System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64
User : debian ( 1000)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/nltk/metrics/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/nltk/metrics/__pycache__/spearman.cpython-311.pyc
�

 T�cQ��$�dZd�Zd�Zd�Zdd�ZdS)z#
Tools for comparing ranked lists.
c#�K�t|��}t|��}|D](}	|||||z
fV��#t$rY�%wxYwdS)z�Finds the difference between the values in ranks1 and ranks2 for keys
    present in both dicts. If the arguments are not dicts, they are converted
    from (key, rank) sequences.
    N)�dict�KeyError)�ranks1�ranks2�ks   �7/usr/lib/python3/dist-packages/nltk/metrics/spearman.py�_rank_distsr	
s}����
�&�\�\�F�
�&�\�\�F�
����	��V�A�Y����*�*�*�*�*�*���	�	�	��D�	�����s�<�
A	�A	c��d}d}t||��D]\}}|||zz
}|dz
}�	dd|z|||zdz
zzz
S#t$rYdSwxYw)aUReturns the Spearman correlation coefficient for two rankings, which
    should be dicts or sequences of (key, rank). The coefficient ranges from
    -1.0 (ranks are opposite) to 1.0 (ranks are identical), and is only
    calculated for keys in both rankings (for meaningful results, remove keys
    present in only one list before ranking).���g)r	�ZeroDivisionError)rr�n�resr�ds      r�spearman_correlationrs���	
�A�
�C��F�F�+�+�����1��q�1�u���	�Q������A��G�q�A��E�A�I��/�0�0�������s�s����s�=�
A�
Ac�4�d�t|��D��S)z�Given a sequence, yields each element with an increasing rank, suitable
    for use as an argument to ``spearman_correlation``.
    c3�$K�|]\}}||fV��dS)N�)�.0�irs   r�	<genexpr>z&ranks_from_sequence.<locals>.<genexpr>1s*����.�.�t�q�!�Q��F�.�.�.�.�.�.�)�	enumerate)�seqs r�ranks_from_sequencer-s��/�.�y��~�~�.�.�.�.r�V瞯�<c#�K�d}d}t|��D]:\}\}}	t||z
��|kr|}n#t$rYnwxYw||fV�|}�;dS)z�Given a sequence of (key, score) tuples, yields each key with an
    increasing rank, tying with previous key's rank if the difference between
    their scores is less than rank_gap. Suitable for use as an argument to
    ``spearman_correlation``.
    Nr)r�abs�	TypeError)�scores�rank_gap�
prev_score�rankr�key�scores       r�ranks_from_scoresr'4s������J��D�$�V�,�,�����<�C��	��5�:�%�&�&��1�1������	�	�	��D�	�����4�i�����
�
��s�8�
A�AN)r)�__doc__r	rrr'rrr�<module>r)sZ����
������$/�/�/������r

Youez - 2016 - github.com/yon3zu
LinuXploit