Ë
    ÜÍ:j
  ã                   ó&   — d Z ddlmZ ddlmZ d„ Zy)z8Utility function to get the number of bootstrap samples.é    )ÚIntegral)Úwarnc           	      óò   — |€| S t        |t        «      r|S |€	| }d|› d�}n|j                  «       }d|› d�}t        t	        ||z  «      d«      }|t        d| dz  «      k  rt        d|›d|› d	|› d
�«       |S )až  
    Get the number of samples in a bootstrap sample.

    Notes
    -----
    The frequency semantics of :term:`sample_weight` is guaranteed when
    `max_samples` is a float or integer, but not when `max_samples` is None. The
    returned `n_samples_bootstrap` will be the same between a weighted dataset
    with integer `sample_weights` and a dataset with as many rows repeated when
    `max_samples` is a float or integer. They will differ when `max_samples` is
    None (the weighted and repeated datasets do not have the same number of rows).

    Parameters
    ----------
    n_samples : int
        Number of samples in the dataset.

    max_samples : None, int or float
        The maximum number of samples to draw.

        - If None, then draw `n_samples` samples.
        - If int, then draw `max_samples` samples.
        - If float, then draw `max_samples * n_samples` unweighted samples or
          `max_samples * sample_weight.sum()` weighted samples.

    sample_weight : array of shape (n_samples,) or None
        Sample weights.

    Returns
    -------
    n_samples_bootstrap : int
        The total number of samples to draw for the bootstrap sample.
    zthe number of samples is ú z#the total sum of sample weights is é   é
   gUUUUUUÕ?z'Using the fractional value max_samples=z when zresults in a low number (zQ) of bootstrap samples. We recommend passing `max_samples` as an integer instead.)Ú
isinstancer   ÚsumÚmaxÚintr   )Ú	n_samplesÚmax_samplesÚsample_weightÚweighted_n_samplesÚweighted_n_samples_msgÚn_samples_bootstraps         úp/home/mcse/projects/srt_converter/srt-converter-venv/lib/python3.12/site-packages/sklearn/ensemble/_bootstrap.pyÚ_get_n_samples_bootstrapr   
   sÅ   € ðD ÐØÐÜ	�K¤Ô	*ØÐàÐØ&ÐØ#<Ð=OÐ<PÐPQÐ!RÑà*×.Ñ.Ó0Ðà1Ð2DÐ1EÀQÐGð 	ô
 œc +Ð0BÑ"BÓCÀQÓGÐð œS  Y°5Ñ%9Ó:Ò:ÜØ6¨+¨°vÐ>TÐ=UØ'Ð(;Ð'<ð =HðHô	
ð
 Ðó    N)Ú__doc__Únumbersr   Úwarningsr   r   © r   r   ú<module>r      s   ðÙ >õ
 Ý ó;r   