a
    h                     @   s  d dl Zd dlZd dlmZmZmZmZ dd Zdd Z	ej
ddd	d
ddddddeddfdeddfdeddfdeddfde	ddfde	ddfde	ddfde	ddfgdd Zej
dedddddfeddd ddfed dddd fg d!d"d#fgd$d% Zej
d&d'd(d)d*d+id'd(d+d,fd'd-d.d/d+d0d/d+d.fd1d2d3d4d5d6id1d2d6d4fi i i fi d+d/d7d8d(d9d'dd:d+d/d7d8d(d9d'dd;fgd<d= Zej
d>i d(d?d@fi dAd'dBfgdCdD ZdEdF ZdS )G    N)_despine_interval_max_min_ratio_validate_score_name_validate_style_kwargsc                   C   s   d S N r   r   r   ]/var/www/html/assistant/venv/lib/python3.9/site-packages/sklearn/utils/tests/test_plotting.pymetric   s    r	   c                   C   s   d S r   r   r   r   r   r   
neg_metric   s    r
   z6score_name, scoring, negate_score, expected_score_name)accuracyNFr   )Nr   FZAccuracy)Nr   TzNegative accuracy)Nneg_mean_absolute_errorFzNegative mean absolute error)Nr   TzMean absolute error)MAEr   Tr   )NNFZScore)NNTzNegative scorezSome metricFTZMetriczNegative metricc                 C   s   t | |||ksJ dS )z*Check that we return the right score name.N)r   )Z
score_nameZscoringZnegate_scoreZexpected_score_namer   r   r   test_validate_score_name   s    r   zdata, lower_bound, upper_boundg?         
         g?g?)r      r   r      2   r   (   c                 C   s"   |t |   k r|k sn J d S r   )r   )datalower_boundupper_boundr   r   r   test_inverval_max_min_ratio4   s    r   z%default_kwargs, user_kwargs, expectedbluer   )color	linewidth	linestyleZdashed)r   r   r    Zsolid)r   r    red)clsZxxxkz--)labelr   r    r#   z-.blackyellowgreen)r#   r"   ecfcZlwZmecZmfcaltms)r    r   Z	edgecolorZ	facecolorr   ZmarkeredgecolorZmarkerfacecoloraltZ
markersizec                 C   s,   t | |}||ks(J d| d| ddS )zLCheck the behaviour of `validate_style_kwargs` with various type of entries.zLThe validation of style keywords does not provide the expected results: Got z instead of .N)r   )default_kwargsuser_kwargsexpectedresultr   r   r   test_validate_style_kwargsG   s    .

r1   zdefault_kwargs, user_kwargs   )r#   r    r)r"   r   c                 C   s8   t t t| | W d   n1 s*0    Y  dS )z3Check that `validate_style_kwargs` raises TypeErrorN)pytestZraises	TypeErrorr   )r-   r.   r   r   r    test_validate_style_kwargs_error|   s    r6   c                 C   sl   |   }t| |jd  du s&J |jd  du s<J |jd  dksRJ |jd  dkshJ d S )NtopFrightbottom)r   r   left)Zgcar   ZspinesZget_visibleZ
get_bounds)Zpyplotaxr   r   r   test_despine   s    r<   )numpynpr4   Zsklearn.utils._plottingr   r   r   r   r	   r
   markZparametrizer   Z	geomspaceZlinspacer   r1   r6   r<   r   r   r   r   <module>   s   












,
	
