Ë `L i«ãó$—ddlmZmZdd„Zdd„Zy)é)Ú_find_matching_floating_dtypeÚget_namespace_and_deviceNc óâ—t|«\}}}t||¬«}|j|||¬«}|j|||¬«}|j}|dk(r|S|jdk(r|j |d«}|j |j k7rJ|j d|j dk(r+|j ||j ddf«j}|j|d¬«}|j||d¬«} |j d} ||d|j| |¬«f} |j|j| ««r(|j|j|«|d¬«} d| | <|j| jd¬«} |d z | d z}|dk(}|j||||dz«||<|jt!| j d«Dcgc]}|j#| |d f||«‘Œc}«}|j ddz }|j%|d|«}|j|j d|¬«}|||f}|||f}|dk(r|dS|Scc}w) a3Compute the weighted percentile with method 'inverted_cdf'. When the percentile lies between two data points of `array`, the function returns the lower value. If `array` is a 2D array, the `values` are selected along axis 0. `NaN` values are ignored by setting their weights to 0. If `array` is 2D, this is done in a column-isolated manner: a `NaN` in the second column, does not impact the percentile computed for the first column even if `sample_weight` is 1D. .. versionchanged:: 0.24 Accepts 2D `array`. .. versionchanged:: 1.7 Supports handling of `NaN` values. Parameters ---------- array : 1D or 2D array Values to take the weighted percentile of. sample_weight: 1D or 2D array Weights for each value in `array`. Must be same shape as `array` or of shape `(array.shape[0],)`. percentile_rank: int or float, default=50 The probability level of the percentile to compute, in percent. Must be between 0 and 100. xp : array_namespace, default=None The standard-compatible namespace for `array`. Default: infer. Returns ------- percentile : scalar or 0D array if `array` 1D (or 0D), array if `array` 2D Weighted percentile at the requested probability level. ©Úxp)ÚdtypeÚdeviceéé)éÿÿÿÿr )Úaxis)r .)r éd).r .)rrÚasarrayÚndimÚreshapeÚshapeÚtileÚTÚargsortÚtake_along_axisÚarangeÚanyÚisnanÚcumulative_sumÚ nextafterÚstackÚrangeÚ searchsortedÚclip)ÚarrayÚ sample_weightÚpercentile_rankrÚ_r Úfloating_dtypeÚn_dimÚ sorted_idxÚsorted_weightsÚ n_featuresÚlargest_value_per_columnÚsorted_nan_maskÚ weight_cdfÚadjusted_percentile_rankÚmaskÚ feature_idxÚpercentile_indicesÚmax_idxÚ col_indicesÚpercentile_in_sortedÚresults úY/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sklearn/utils/stats.pyÚ_weighted_percentiler5 s§€ôN-¨UÓ3M€Bˆˆ6ä2°5¸RÔ@€NØ J‰Ju N¸6ˆJÓ B€EØ—J‘J˜}°NÈ6JÓR€Mà J‰J€EØ ‚z؈ Ø ‡zzQ‚Ø— ‘ ˜5 'Ó*ˆà ‡{{m×)Ñ)Ò)¨e¯k©k¸!©nÀ ×@SÑ@SÐTUÑ@VÒ.VØŸ™  °· ± ¸A±ÀÐ/BÓC×EÑEˆ à—‘˜E¨Ó*€JØ×'Ñ'¨ °zÈÐ'ÓJ€N𗑘Q‘€JØ$Ø7јRŸY™Y z¸&˜YÓAÐAñ Ðð ‡vvˆbh‰hÐ/Ó0Ô1Ø×,Ñ,¨R¯X©X°e«_¸jÈqÐ,ÓQˆØ*+ˆÑ'ð×"Ñ" >×#3Ñ#3¸!Ð"Ó<€JØ.°Ñ4°zÀ'Ñ7JÑJÐð $ qÑ (€DØ%'§\¡\Ø  Ñ&Ð(@ÀÑ(FÈÑ(Jó&ИTÑ"ð Ÿ™ô % Z×%5Ñ%5°aÑ%8Ó9ö  ðð O‰Oؘ;¨Ð+Ñ,Ð.FÀ{Ñ.Sõ ò óÐð×јqÑ! AÑ%€GØŸ™Ð!3°Q¸Ó@Ðà—)‘)˜EŸK™K¨™N°6)Ó:€KØ%Ð&8¸+Ð&EÑFÐà Ð'¨Ð4Ñ 5€Fà š ˆ6!‰9Ð.¨Ð.ùò! sÇ%!I,cóN—t||||¬«t| |d|z |¬«z dz S)Nrrr)r5)r r!r"rs r4Ú_averaged_weighted_percentiler7vs9€ä˜U M°?ÀrÔJÜ  ˜v }°c¸OÑ6KÐPRÔ Sñ Tà ñ ð ó)é2N)Úutils._array_apirrr5r7©r8r4úr<sð÷ó g/ôX r8