Ë
    uwj?¨  ã                   ó`  — d dl Z d dlmZmZ d dlmZmZ d dlZd dl	m
Z d dlmZmZmZ d dlmZmZ d dlmZ d dlmZ d dlmZ d d	lmZ d d
lmZmZmZm Z  d dl!m"Z"m#Z# d dl$m%Z% d dl&m'Z' d dl(m)Z)m*Z* d dl+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1 g d¢Z2d„ Z3 G d„ dee¬«      Z4 G d„ dee4e¬«      Z5d„ Z6	 	 	 	 	 dd„Z7y)é    N)ÚABCMetaÚabstractmethod)ÚIntegralÚReal)ÚBaseEstimatorÚClassifierMixinÚ_fit_context)ÚConvergenceWarningÚNotFittedError)ÚLabelEncoder)Ú
_liblinear)Ú_libsvm)Ú_libsvm_sparse)Úcheck_arrayÚcheck_random_stateÚcolumn_or_1dÚcompute_class_weight)ÚIntervalÚ
StrOptions)Úsafe_sparse_dot)Úavailable_if)Ú_ovr_decision_functionÚcheck_classification_targets)Ú_check_large_sparseÚ_check_sample_weightÚ_num_samplesÚcheck_consistent_lengthÚcheck_is_fittedÚvalidate_data)Úc_svcÚnu_svcÚ	one_classÚepsilon_svrÚnu_svrc           	      óº  — | j                   d   dz   }g }t        j                  t        j                  dg|g«      «      }t	        |«      D ]�  }|||   ||dz      …dd…f   }t	        |dz   |«      D ]e  }|||   ||dz      …dd…f   }	| |dz
  ||   ||dz      …f   }
| |||   ||dz      …f   }|j                  t        |
|«      t        ||	«      z   «       Œg Œ� |S )z�Generate primal coefficients from dual coefficients
    for the one-vs-one multi class LibSVM in the case
    of a linear kernel.r   é   N)ÚshapeÚnpÚcumsumÚhstackÚrangeÚappendr   )Ú	dual_coefÚ	n_supportÚsupport_vectorsÚn_classÚcoefÚsv_locsÚclass1Úsv1Úclass2Úsv2Úalpha1Úalpha2s               úV/var/www/html/newmanjeet/manjet/venv/lib/python3.12/site-packages/sklearn/svm/_base.pyÚ_one_vs_one_coefr:   -   s  € ð �o‰o˜aÑ  1Ñ$€Gð €DÜ�i‰iœŸ	™	 A 3¨	Ð"2Ó3Ó4€GÜ˜–.ˆà˜g f™o°¸À¹
Ñ0CÐCÂQÐFÑGˆÜ˜F Q™J¨Ö0ˆFà! '¨&¡/°G¸FÀQ¹JÑ4GÐ"GÊÐ"JÑKˆCð ˜v¨™z¨7°6©?¸WÀVÈaÁZÑ=PÐ+PÐPÑQˆFà˜v w¨v¡¸ÀÈ!ÁÑ9LÐ'LÐLÑMˆFð �K‰Kœ¨°Ó4´ÀvÈsÓ7SÑSÕTñ 1ð !ð €Kó    c                   ó   ‡ — e Zd ZU dZ eh d£«      eg eeddd¬«      g eddh«       eed	dd¬«      g eeddd
¬«      g eed	dd
¬«      g eed	dd¬«      g eed	dd¬«      g eed	dd¬«      gdgdg eeddd
¬«      g edh«      e	dgdg eeddd¬«      gdgdœZ
e	ed<   g d¢Zed„ «       Zˆ fd„Z ed¬«      d)d„«       Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd „ Zd!„ Zd"„ Zd#„ Zd$„ Zd%„ Zed&„ «       Zd'„ Z ed(„ «       Z!ˆ xZ"S )*Ú
BaseLibSVMzÉBase class for estimators that use libsvm as backing library.

    This implements support vector machine classification and regression.

    Parameter documentation is in the derived `SVC` class.
    >   ÚrbfÚpolyÚlinearÚsigmoidÚprecomputedr   NÚleft)ÚclosedÚscaleÚautoç        ÚneitherÚrightç      ð?ÚbooleanÚbalancedÚverboseéÿÿÿÿÚrandom_state©ÚkernelÚdegreeÚgammaÚcoef0ÚtolÚCÚnuÚepsilonÚ	shrinkingÚprobabilityÚ
cache_sizeÚclass_weightrM   Úmax_iterrO   Ú_parameter_constraints)r@   r?   r>   rA   rB   c                 ó:  — | j                   t        vr t        dt        ›d| j                   ›d�«      ‚|| _        || _        || _        || _        || _        || _        || _	        || _
        |	| _        |
| _        || _        || _        || _        || _        || _        y )Nzimpl should be one of z, z
 was given)Ú_implÚLIBSVM_IMPLÚ
ValueErrorrQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   rM   r]   rO   )ÚselfrQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   rM   r]   rO   s                   r9   Ú__init__zBaseLibSVM.__init__r   s—   € ð& �:‰:œ[Ñ(ÝÞ<GÈÏËÐTóð ð ˆŒØˆŒØˆŒ
ØˆŒ
ØˆŒØˆŒØˆŒØˆŒØ"ˆŒØ&ˆÔØ$ˆŒØ(ˆÔØˆŒØ ˆŒØ(ˆÕr;   c                 óœ   •— t         ‰| �  «       }| j                  dk(  |j                  _        | j                  dk7  |j                  _        |S ©NrB   )ÚsuperÚ__sklearn_tags__rQ   Ú
input_tagsÚpairwiseÚsparse©rc   ÚtagsÚ	__class__s     €r9   rh   zBaseLibSVM.__sklearn_tags__š   s?   ø€ Ü‰wÑ'Ó)ˆà#'§;¡;°-Ñ#?ˆ�‰Ô Ø!%§¡°Ñ!=ˆ�‰ÔØˆr;   T)Úprefer_skip_nested_validationc           	      ó¾	  — t        | j                  «      }t        j                  |«      }|r| j                  dk(  rt        d«      ‚|xr t        | j                  «       | _        t        | j                  «      rt        ||«       n#t        | ||t        j                  ddd¬«      \  }}| j                  |«      }t        j                  |€g n|t        j                  ¬«      }t        j                  | j                   «      }t#        |«      }|dk7  r4||j$                  d	   k7  r"t'        d
d|›d|j$                  d	   ›d�z   «      ‚| j                  dk(  rG||j$                  d   k7  r5t'        dj)                  |j$                  d	   |j$                  d   «      «      ‚|j$                  d	   d	kD  r8|j$                  d	   |k7  r&t'        d|j$                  ›d|j$                  ›d�«      ‚t        | j                  «      rdn| j                  }|dk(  rd| _        nât-        | j.                  t0        «      r�| j.                  dk(  rg|r3|j3                  |«      j5                  «       |j5                  «       dz  z
  n|j7                  «       }	|	d	k7  rd|j$                  d   |	z  z  nd| _        nR| j.                  dk(  rCd|j$                  d   z  | _        n+t-        | j.                  t8        «      r| j.                  | _        | j                  r| j:                  n| j<                  }
| j>                  rtA        dd¬«       |jC                  t        jD                  d«      jF                  «      } |
||||||¬«       tI        |d«      r|j$                  n|f| _%        | jL                  jO                  «       | _(        | jR                  | _*        | j                   dv r?tW        | jX                  «      dk(  r'| xjL                  dz  c_&        | jR                   | _)        | j                  r| jT                  jZ                  n| jT                  }t        j\                  | jP                  «      j_                  «       }t        j\                  |«      j_                  «       }|r|st'        d«      ‚| j                   dv r| j`                  | _1        | S | j`                  je                  «       | _1        | S ) a•  Fit the SVM model according to the given training data.

        Parameters
        ----------
        X : {array-like, sparse matrix} of shape (n_samples, n_features)                 or (n_samples, n_samples)
            Training vectors, where `n_samples` is the number of samples
            and `n_features` is the number of features.
            For kernel="precomputed", the expected shape of X is
            (n_samples, n_samples).

        y : array-like of shape (n_samples,)
            Target values (class labels in classification, real numbers in
            regression).

        sample_weight : array-like of shape (n_samples,), default=None
            Per-sample weights. Rescale C per sample. Higher weights
            force the classifier to put more emphasis on these points.

        Returns
        -------
        self : object
            Fitted estimator.

        Notes
        -----
        If X and y are not C-ordered and contiguous arrays of np.float64 and
        X is not a scipy.sparse.csr_matrix, X and/or y may be copied.

        If X is a dense array, then the other methods will not support sparse
        matrices as input.
        rB   z-Sparse precomputed kernels are not supported.rV   ÚcsrF)ÚdtypeÚorderÚaccept_sparseÚaccept_large_sparse©rr   é   r   z"X and y have incompatible shapes.
zX has z samples, but y has Ú.r&   zDPrecomputed matrix must be a square matrix. Input is a {}x{} matrix.z.sample_weight and X have incompatible shapes: z vs zT
Note: Sparse matrices cannot be indexed w/boolean masks (use `indices=True` in CV).rG   rE   rJ   rF   z[LibSVM]Ú ©ÚendÚi)Úrandom_seedr'   ©r    r!   rN   zxThe dual coefficients or intercepts are not finite. The input data may contain large values and need to be preprocessed.)3r   rO   ÚspÚissparserQ   Ú	TypeErrorÚcallableÚ_sparser   r   r(   Úfloat64Ú_validate_targetsÚasarrayra   Úindexr`   r   r'   rb   ÚformatÚ_gammaÚ
isinstancerS   ÚstrÚmultiplyÚmeanÚvarr   Ú_sparse_fitÚ
_dense_fitrM   ÚprintÚrandintÚiinfoÚmaxÚhasattrÚ
shape_fit_Ú
intercept_ÚcopyÚ_intercept_Ú
dual_coef_Ú_dual_coef_ÚlenÚclasses_ÚdataÚisfiniteÚallÚ	_num_iterÚn_iter_Úitem)rc   ÚXÚyÚsample_weightÚrndrk   Úsolver_typeÚ	n_samplesrQ   ÚX_varÚfitÚseedr-   Úintercept_finitenessÚdual_coef_finitenesss                  r9   r«   zBaseLibSVM.fit¡   sù  € ôD ! ×!2Ñ!2Ó3ˆä—‘˜Q“ˆÙ�d—k‘k ]Ò2ÜÐKÓLÐLØÒ;¤h¨t¯{©{Ó&;Ð";ˆŒä�D—K‘KÔ Ü# A qÕ)ä ØØØÜ—j‘jØØ#Ø$)ô‰DˆAˆqð ×"Ñ" 1Ó%ˆäŸ
™
ØÐ'‰B¨]Ä"Ç*Á*ô
ˆô "×'Ñ'¨¯
©
Ó3ˆô ! “Oˆ	Ø˜!Ò 	¨Q¯W©W°Q©ZÒ 7ÜÙ5Ú7@À!Ç'Á'È!Ã*ÐMñNóð ð
 �;‰;˜-Ò'¨I¸¿¹À¹Ò,CÜð,ß,2©F°1·7±7¸1±:¸q¿w¹wÀq¹zÓ,Jóð ð
 ×Ñ˜qÑ! AÒ%¨-×*=Ñ*=¸aÑ*@ÀIÒ*MÝð
 !×&Ó&¨¯«ð	1óð ô #+¨4¯;©;Ô"7‘¸T¿[¹[ˆà�]Ò"ð ˆD�KÜ˜Ÿ
™
¤CÔ(Ø�z‰z˜WÒ$áDJ˜Ÿ™ A›×,Ñ,Ó.°!·&±&³(¸q±Ò@ÐPQ×PUÑPUÓPW�Ø<AÀQºJ˜c Q§W¡W¨Q¡Z°%Ñ%7Ò8ÈC�•Ø—‘˜vÒ%Ø! A§G¡G¨A¡JÑ.�•Ü˜Ÿ
™
¤DÔ)ØŸ*™*ˆDŒKà"&§,¢,ˆd×Ò°D·O±OˆØ�<Š<Ü�* "Õ%à�{‰{œ2Ÿ8™8 C›=×,Ñ,Ó-ˆÙˆAˆq�- ¨fÀ$ÕGô &-¨Q°Ô%8˜!Ÿ'š'¸y¸lˆŒð
  Ÿ?™?×/Ñ/Ó1ˆÔØŸ?™?ˆÔØ�:‰:Ð,Ñ,´°T·]±]Ó1CÀqÒ1HØ�OŠO˜rÑ!�OØ#Ÿ™Ð.ˆDŒOà-1¯\ª\�D×$Ñ$×)Ò)¸t×?OÑ?Oˆ	Ü!Ÿ{™{¨4×+;Ñ+;Ó<×@Ñ@ÓBÐÜ!Ÿ{™{¨9Ó5×9Ñ9Ó;ÐÙ$Ñ)=Üð!óð ð �:‰:Ð,Ñ,ØŸ>™>ˆDŒLð ˆð  Ÿ>™>×.Ñ.Ó0ˆDŒLàˆr;   c                 óZ   — t        |d¬«      j                  t        j                  d¬«      S )zxValidation of y and class_weight.

        Default implementation for SVR and one-class; overridden in BaseSVC.
        T©ÚwarnF)r˜   )r   Úastyper(   r„   )rc   r¥   s     r9   r…   zBaseLibSVM._validate_targets/  s%   € ô
 ˜A DÔ)×0Ñ0´·±À%Ð0ÓHÐHr;   c                 ó’   — | j                   dv sJ ‚| j                   dk(  r(t        j                  d| j                  z  t        «       y y )N©r   r&   r&   znSolver terminated early (max_iter=%i).  Consider pre-processing your data with StandardScaler or MinMaxScaler.)Úfit_status_Úwarningsr±   r]   r
   ©rc   s    r9   Ú_warn_from_fit_statusz BaseLibSVM._warn_from_fit_status6  sL   € Ø×Ñ 6Ñ)Ð)Ð)Ø×Ñ˜qÒ Ü�M‰Mð3à59·]±]ñCô #õ	ð !r;   c                 ó   — t        | j                  «      rB|| _        | j                  |«      }|j                  d   |j                  d   k7  rt        d«      ‚t        j                  | j                  «       t        j                  ||fi d|“d|“dt        | dt        j                  d«      «      “d|“d	| j                  “d
| j                  “d| j                  “d| j                   “d| j"                  “d| j$                  “d| j&                  “d| j(                  “d| j*                  “d| j,                  “d| j.                  “d|“Ž\	  | _        | _        | _        | _        | _        | _        | _        | _        | _         | jC                  «        y )Nr   r&   z(X.shape[0] should be equal to X.shape[1]Úsvm_typer¦   r\   Úclass_weight_rQ   rV   rW   rZ   rR   rY   rU   r[   rT   rS   rX   r]   r}   )"r‚   rQ   Ú_BaseLibSVM__XfitÚ_compute_kernelr'   rb   ÚlibsvmÚset_verbosity_wraprM   r«   Úgetattrr(   ÚemptyrV   rW   rZ   rR   rY   rU   r[   rT   r‰   rX   r]   Úsupport_Úsupport_vectors_Ú
_n_supportrš   r—   Ú_probAÚ_probBrµ   r¡   r¸   )rc   r¤   r¥   r¦   r¨   rQ   r}   s          r9   r�   zBaseLibSVM._dense_fit@  s’  € Ü�D—K‘KÔ ð ˆDŒKØ×$Ñ$ QÓ'ˆAà�w‰w�q‰z˜QŸW™W Q™ZÒ'Ü Ð!KÓLÐLä×!Ñ! $§,¡,Ô/ô �J‰JØØò
ñ !ð
ñ (ð	
ô
 !  ¼¿¹À»ÔDð
ñ ð
ð �fŠfð
ð �wŠwð
ð ×(Ò(ð
ð —;’;ð
ð —n’nð
ð —’ð
ð —’ð
ð —*’*ð
ð —+’+ð
ð  —L’Lð!
ð" —]’]ð#
ñ$ $ð%
ñ
	
ØŒMØÔ!ØŒOØŒOØŒOØŒKØŒKØÔØŒNð, 	×"Ñ"Õ$r;   c                 ó  — t        j                  |j                  t         j                  d¬«      |_        |j	                  «        | j
                  j                  |«      }t        j                  | j                  «       t        j                  |j                  d   |j                  |j                  |j                  |||| j                  | j                  | j                   | j"                  | j$                  t'        | dt        j(                  d«      «      || j*                  | j,                  | j.                  t1        | j2                  «      t1        | j4                  «      | j6                  |«      \	  | _        | _        }| _        | _        | _         | _!        | _"        | _#        | jI                  «        tK        | d«      rtM        | jN                  «      dz
  }	nd}	| j:                  j                  d   }
t        jP                  t        jR                  |
«      |	«      }|
stU        jV                  g «      | _,        y t        jR                  d|jZ                  dz   |jZ                  |	z  «      }tU        jV                  |||f|	|
f«      | _,        y )NrV   ©rr   rs   r&   r»   r   r�   ).r(   r†   rž   r„   Úsort_indicesÚ_sparse_kernelsr‡   Úlibsvm_sparser¿   rM   Úlibsvm_sparse_trainr'   ÚindicesÚindptrrR   r‰   rT   rU   rV   rÀ   rÁ   rW   r[   rX   ÚintrY   rZ   r]   rÂ   rÃ   r—   rÄ   rÅ   rÆ   rµ   r¡   r¸   r•   rœ   r�   ÚtileÚaranger   Ú
csr_matrixrš   Úsize)rc   r¤   r¥   r¦   r¨   rQ   r}   Úkernel_typeÚdual_coef_datar0   Ún_SVÚdual_coef_indicesÚdual_coef_indptrs                r9   r�   zBaseLibSVM._sparse_fito  só  € Ü—‘˜AŸF™F¬"¯*©*¸CÔ@ˆŒØ	�‰Ôà×*Ñ*×0Ñ0°Ó8ˆä×(Ñ(¨¯©Ô6ô ×-Ñ-Ø�G‰G�A‰JØ�F‰FØ�I‰IØ�H‰HØØØØ�K‰KØ�K‰KØ�J‰JØ�H‰HØ�F‰FÜ�D˜/¬2¯8©8°A«;Ó7ØØ�G‰GØ�O‰OØ�L‰LÜ�—‘ÓÜ�× Ñ Ó!Ø�M‰MØó+
ñ
	
ØŒMØÔ!ØØŒOØŒOØŒKØŒKØÔØŒNð2 	×"Ñ"Ô$ä�4˜Ô$Ü˜$Ÿ-™-Ó(¨1Ñ,‰GàˆGØ×$Ñ$×*Ñ*¨1Ñ-ˆäŸG™G¤B§I¡I¨d£O°WÓ=ÐÙÜ Ÿm™m¨BÓ/ˆD�Oä!Ÿy™yØÐ$×)Ñ)¨AÑ-Ð/@×/EÑ/EÈÑ/Oó Ðô !Ÿm™mØÐ!2Ð4DÐEÈÐQUÀóˆD�Or;   c                 ó|   — | j                  |«      }| j                  r| j                  n| j                  } ||«      S )aÇ  Perform regression on samples in X.

        For a one-class model, +1 (inlier) or -1 (outlier) is returned.

        Parameters
        ----------
        X : {array-like, sparse matrix} of shape (n_samples, n_features)
            For kernel="precomputed", the expected shape of X is
            (n_samples_test, n_samples_train).

        Returns
        -------
        y_pred : ndarray of shape (n_samples,)
            The predicted values.
        )Ú_validate_for_predictrƒ   Ú_sparse_predictÚ_dense_predict)rc   r¤   Úpredicts      r9   rÝ   zBaseLibSVM.predict¬  s7   € ð  ×&Ñ& qÓ)ˆØ*.¯,ª,�$×&Ò&¸D×<OÑ<OˆÙ�q‹zÐr;   c                 ó–  — | j                  |«      }|j                  dk(  rt        |dd¬«      }| j                  }t	        | j                  «      rKd}|j
                  d   | j                  d   k7  r*t        d|j
                  d   | j                  d   fz  «      ‚t        j                  | j                  «      }t        j                  || j                  | j                  | j                  | j                   | j"                  | j$                  | j&                  ||| j(                  | j*                  | j,                  | j.                  ¬«      S )	Nr&   rV   F)rs   ru   rB   r   úMX.shape[1] = %d should be equal to %d, the number of samples at training time)rº   rQ   rR   rT   rS   r[   )r½   Úndimr   rQ   r‚   r'   r–   rb   ra   r‡   r`   r¾   rÝ   rÂ   rÃ   rÄ   r›   r™   rÅ   rÆ   rR   rT   r‰   r[   )rc   r¤   rQ   rº   s       r9   rÜ   zBaseLibSVM._dense_predictÀ  s  € Ø× Ñ  Ó#ˆØ�6‰6�QŠ;Ü˜A S¸eÔDˆAà—‘ˆÜ�D—K‘KÔ Ø"ˆFØ�w‰w�q‰z˜TŸ_™_¨QÑ/Ò/Ü ð=à—w‘w˜q‘z 4§?¡?°1Ñ#5Ð6ñ7óð ô ×$Ñ$ T§Z¡ZÓ0ˆä�~‰~ØØ�M‰MØ×!Ñ!Ø�O‰OØ×ÑØ×ÑØ�K‰KØ�K‰KØØØ—;‘;Ø—*‘*Ø—+‘+Ø—‘ô
ð 	
r;   c                 ó  — | j                   }t        |«      rd}| j                  j                  |«      }d}t	        j
                  |j                  |j                  |j                  | j                  j                  | j                  j                  | j                  j                  | j                  j                  | j                  t        j                  | j                  «      || j                  | j                  | j                   | j"                  |t%        | dt'        j(                  d«      «      | j*                  | j,                  | j.                  | j0                  | j2                  | j4                  | j6                  «      S )NrB   rG   r»   r   )rQ   r‚   rÊ   r‡   rË   Úlibsvm_sparse_predictrž   rÍ   rÎ   rÃ   r›   r™   ra   r`   rR   r‰   rT   rU   rÀ   r(   rÁ   rW   rX   rY   rZ   rÄ   rÅ   rÆ   )rc   r¤   rQ   rÔ   rV   s        r9   rÛ   zBaseLibSVM._sparse_predictâ  s  € à—‘ˆÜ�FÔØ"ˆFà×*Ñ*×0Ñ0°Ó8ˆàˆä×2Ñ2Ø�F‰FØ�I‰IØ�H‰HØ×!Ñ!×&Ñ&Ø×!Ñ!×)Ñ)Ø×!Ñ!×(Ñ(Ø×Ñ×!Ñ!Ø×ÑÜ×Ñ˜dŸj™jÓ)ØØ�K‰KØ�K‰KØ�J‰JØ�H‰HØÜ�D˜/¬2¯8©8°A«;Ó7Ø�G‰GØ�L‰LØ�N‰NØ×ÑØ�O‰OØ�K‰KØ�K‰Kó/
ð 	
r;   c                 óþ   — t        | j                  «      rg| j                  || j                  «      }t        j                  |«      r|j                  «       }t        j                  |t        j                  d¬«      }|S )z0Return the data transformed by a callable kernelrV   rÈ   )	r‚   rQ   r¼   r   r€   Útoarrayr(   r†   r„   ©rc   r¤   rQ   s      r9   r½   zBaseLibSVM._compute_kernel  sW   € ä�D—K‘KÔ ð —[‘[  D§K¡KÓ0ˆFÜ�{‰{˜6Ô"ØŸ™Ó)�Ü—
‘
˜6¬¯©¸3Ô?ˆAØˆr;   c                 ó  — | j                  |«      }| j                  |«      }| j                  r| j                  |«      }n| j	                  |«      }| j
                  dv r)t        | j                  «      dk(  r|j                  «        S |S )af  Evaluates the decision function for the samples in X.

        Parameters
        ----------
        X : array-like of shape (n_samples, n_features)

        Returns
        -------
        X : array-like of shape (n_samples, n_class * (n_class-1) / 2)
            Returns the decision function of the sample for each class
            in the model.
        r~   rw   )	rÚ   r½   rƒ   Ú_sparse_decision_functionÚ_dense_decision_functionr`   rœ   r�   Úravel)rc   r¤   Údec_funcs      r9   Ú_decision_functionzBaseLibSVM._decision_function  s   € ð ×&Ñ& qÓ)ˆØ× Ñ  Ó#ˆà�<Š<Ø×5Ñ5°aÓ8‰Hà×4Ñ4°QÓ7ˆHð �:‰:Ð,Ñ,´°T·]±]Ó1CÀqÒ1HØ—N‘NÓ$Ð$Ð$àˆr;   c                 óÊ  — t        |t        j                  dd¬«      }| j                  }t	        |«      rd}t        j                  || j                  | j                  | j                  | j                  | j                  | j                  | j                  t        j                  | j                   «      || j"                  | j$                  | j&                  | j(                  ¬«      S )NrV   F)rr   rs   ru   rB   ©rº   rQ   rR   r[   rT   rS   )r   r(   r„   rQ   r‚   r¾   Údecision_functionrÂ   rÃ   rÄ   r›   r™   rÅ   rÆ   ra   r‡   r`   rR   r[   rT   r‰   rå   s      r9   rè   z#BaseLibSVM._dense_decision_function/  sª   € Ü˜¤§¡°3ÈEÔRˆà—‘ˆÜ�FÔØ"ˆFä×'Ñ'ØØ�M‰MØ×!Ñ!Ø�O‰OØ×ÑØ×ÑØ�K‰KØ�K‰KÜ ×&Ñ& t§z¡zÓ2ØØ—;‘;Ø—‘Ø—*‘*Ø—+‘+ô
ð 	
r;   c                 ó‚  — t        j                  |j                  t         j                  d¬«      |_        | j                  }t        |d«      rd}| j                  j                  |«      }t        j                  |j                  |j                  |j                  | j                  j                  | j                  j                  | j                  j                  | j                  j                  | j                  t        j                  | j                   «      || j"                  | j$                  | j&                  | j(                  | j*                  t-        | dt        j.                  d«      «      | j0                  | j2                  | j4                  | j6                  | j8                  | j:                  | j<                  «      S )NrV   rÈ   Ú__call__rB   r»   r   )r(   r†   rž   r„   rQ   r•   rÊ   r‡   rË   Úlibsvm_sparse_decision_functionrÍ   rÎ   rÃ   r›   r™   ra   r`   rR   r‰   rT   rU   rV   rÀ   rÁ   rW   rX   rY   rZ   rÄ   rÅ   rÆ   ©rc   r¤   rQ   rÔ   s       r9   rç   z$BaseLibSVM._sparse_decision_functionG  s8  € Ü—‘˜AŸF™F¬"¯*©*¸CÔ@ˆŒà—‘ˆÜ�6˜:Ô&Ø"ˆFà×*Ñ*×0Ñ0°Ó8ˆä×<Ñ<Ø�F‰FØ�I‰IØ�H‰HØ×!Ñ!×&Ñ&Ø×!Ñ!×)Ñ)Ø×!Ñ!×(Ñ(Ø×Ñ×!Ñ!Ø×ÑÜ×Ñ˜dŸj™jÓ)ØØ�K‰KØ�K‰KØ�J‰JØ�H‰HØ�F‰FÜ�D˜/¬2¯8©8°A«;Ó7Ø�G‰GØ�L‰LØ�N‰NØ×ÑØ�O‰OØ�K‰KØ�K‰Kó/
ð 	
r;   c           	      óp  — t        | «       t        | j                  «      s t        | |dt        j
                  ddd¬«      }| j                  r*t        j                  |«      st        j                  |«      }| j                  r|j                  «        t        j                  |«      rB| j                  s6t        | j                  «      s!t        dt        | «      j                  z  «      ‚| j                  dk(  rI|j                  d   | j                  d   k7  r*t        d	|j                  d   | j                  d   fz  «      ‚| j                   }| j                  s\|j"                  dkD  rM| j$                  j'                  «       |j                  d   k7  r#t        d
| j(                  j                  › d�«      ‚|S )Nrq   rV   F)rt   rr   rs   ru   Úresetz3cannot use sparse input in %r trained on dense datarB   r&   r   rß   zThe internal representation of z was altered)r   r‚   rQ   r   r(   r„   rƒ   r   r€   rÒ   rÉ   rb   ÚtypeÚ__name__r'   r–   rÃ   rÓ   Ú
n_support_Úsumrn   )rc   r¤   Úsvs      r9   rÚ   z BaseLibSVM._validate_for_predictj  sf  € Ü˜Ôä˜Ÿ™Ô$ÜØØØ#Ü—j‘jØØ$)ØôˆAð �<Š<¤§¡¨A¤Ü—‘˜aÓ ˆAØ�<Š<Ø�N‰NÔä�;‰;�qŒ> $§,¢,´xÀÇÁÔ7LÜØEÜ�t“*×%Ñ%ñ&óð ð
 �;‰;˜-Ò'Ø�w‰w�q‰z˜TŸ_™_¨QÑ/Ò/Ü ð=à—w‘w˜q‘z 4§?¡?°1Ñ#5Ð6ñ7óð ð ×"Ñ"ˆØ�|Š| §¡¨!¢°·±×0CÑ0CÓ0EÈÏÉÐRSÉÒ0TÜØ1°$·.±.×2IÑ2IÐ1JÈ,ÐWóð ð ˆr;   c                 óà   — | j                   dk7  rt        d«      ‚| j                  «       }t        j                  |«      rd|j
                  j                  _        |S d|j                  _        |S )z“Weights assigned to the features when `kernel="linear"`.

        Returns
        -------
        ndarray of shape (n_features, n_classes)
        r@   z2coef_ is only available when using a linear kernelF)rQ   ÚAttributeErrorÚ	_get_coefr   r€   rž   ÚflagsÚ	writeable©rc   r1   s     r9   Úcoef_zBaseLibSVM.coef_“  s`   € ð �;‰;˜(Ò"Ü Ð!UÓVÐVà�~‰~Óˆô �;‰;�tÔà(-ˆD�I‰I�O‰OÔ%ð ˆð $)ˆD�J‰JÔ Øˆr;   c                 óB   — t        | j                  | j                  «      S ©N)r   r›   rÃ   r·   s    r9   rü   zBaseLibSVM._get_coefª  s   € Ü˜t×/Ñ/°×1FÑ1FÓGÐGr;   c                 óä   — 	 t        | «       t        j	                  | j
                  «      }|dv r| j                  S t        j                  | j                  d   g«      S # t        $ r t        ‚w xY w)z)Number of support vectors for each class.r´   r   )	r   r   rû   ra   r‡   r`   rÄ   r(   Úarray)rc   rº   s     r9   r÷   zBaseLibSVM.n_support_­  sk   € ð	!Ü˜DÔ!ô ×$Ñ$ T§Z¡ZÓ0ˆØ�vÑØ—?‘?Ð"ô —8‘8˜TŸ_™_¨QÑ/Ð0Ó1Ð1øô ò 	!Ü Ð ð	!ús   ‚A ÁA/r  )#rö   Ú
__module__Ú__qualname__Ú__doc__r   r‚   r   r   r   Údictr^   Ú__annotations__rÊ   r   rd   rh   r	   r«   r…   r¸   r�   r�   rÝ   rÜ   rÛ   r½   rë   rè   rç   rÚ   Úpropertyr   rü   r÷   Ú__classcell__©rn   s   @r9   r=   r=   M   s©  ø… ññ ÒJÓKØð
ñ ˜H a¨°fÔ=Ð>á˜ Ð(Ó)Ù�T˜3 ¨VÔ4ð
ñ ˜4  t°IÔ>Ð?Ù˜˜s D°Ô;Ð<Ù�t˜S $¨wÔ7Ð8Ù˜˜c 3¨wÔ7Ð8Ù˜T 3¨°VÔ<Ð=Ø�[Ø!�{Ù  a¨°iÔ@ÐAÙ# Z LÓ1°4¸Ð>Ø�;Ù˜h¨¨D¸Ô@ÐAØ'Ð(ñ+$Ð˜Dó ò6 J€Oàñ%)ó ð%)ôNñ °Ô5òKó 6ðKòZIòò-%ò^;òzò( 
òD"
òH	òò<
ò0!
òF'ðR ñó ðò,Hð ñ2ó ô2r;   r=   )Ú	metaclassc                   ó2  ‡ — e Zd ZU dZi ej
                  ¥ eddh«      gdgdœ¥Zeed<   dD ]  Z	ej                  e	«       Œ eˆ fd„«       Zd	„ Zd
„ Zˆ fd„Zd„ Z ee«      d„ «       Z ee«      d„ «       Zd„ Zd„ Zd„ Zed„ «       Zed„ «       Zˆ fd„Zˆ xZS )ÚBaseSVCz!ABC for LibSVM-based classifiers.ÚovrÚovorK   )Údecision_function_shapeÚ
break_tiesr^   )rX   rW   c                 ó^   •— || _         || _        t        ‰| �  |||||||d||	|
||||¬«       y )NrG   rP   )r  r  rg   rd   )rc   rQ   rR   rS   rT   rU   rV   rW   rY   rZ   r[   r\   rM   r]   r  rO   r  rn   s                    €r9   rd   zBaseSVC.__init__É  sS   ø€ ð( (?ˆÔ$Ø$ˆŒÜ‰ÑØØØØØØØØØØ#Ø!Ø%ØØØ%ð 	õ 	
r;   c                 óD  — t        |d¬«      }t        |«       t        j                  |d¬«      \  }}t	        | j
                  ||¬«      | _        t        |«      dk  rt        dt        |«      z  «      ‚|| _	        t        j                  |t        j                  d¬«      S )	NTr°   )Úreturn_inverse)Úclassesr¥   rw   z>The number of classes has to be greater than one; got %d classrV   rÈ   )r   r   r(   Úuniquer   r\   r»   rœ   rb   r�   r†   r„   )rc   r¥   Úy_Úclss       r9   r…   zBaseSVC._validate_targetsñ  s‰   € Ü˜! $Ô'ˆÜ$ QÔ'Ü—‘˜2¨dÔ3‰ˆˆQÜ1°$×2CÑ2CÈSÐTVÔWˆÔÜˆs‹8�aŠ<ÜØPÜ�c“(ñóð ð
 ˆŒä�z‰z˜!¤2§:¡:°SÔ9Ð9r;   c                 ó¾   — | j                  |«      }| j                  dk(  r<t        | j                  «      dkD  r$t	        |dk  | t        | j                  «      «      S |S )a4  Evaluate the decision function for the samples in X.

        Parameters
        ----------
        X : array-like of shape (n_samples, n_features)
            The input samples.

        Returns
        -------
        X : ndarray of shape (n_samples, n_classes * (n_classes-1) / 2)
            Returns the decision function of the sample for each class
            in the model.
            If decision_function_shape='ovr', the shape is (n_samples,
            n_classes).

        Notes
        -----
        If decision_function_shape='ovo', the function values are proportional
        to the distance of the samples X to the separating hyperplane. If the
        exact distances are required, divide the function values by the norm of
        the weight vector (``coef_``). See also `this question
        <https://stats.stackexchange.com/questions/14876/
        interpreting-distance-from-hyperplane-in-svm>`_ for further details.
        If decision_function_shape='ovr', the decision function is a monotonic
        transformation of ovo decision function.
        r  rw   r   )rë   r  rœ   r�   r   )rc   r¤   Údecs      r9   rî   zBaseSVC.decision_function   sU   € ð6 ×%Ñ% aÓ(ˆØ×'Ñ'¨5Ò0´S¸¿¹Ó5GÈ!Ò5KÜ)¨#°©'°C°4¼¸T¿]¹]Ó9KÓLÐLØˆ
r;   c                 ó´  •— t        | «       | j                  r| j                  dk(  rt        d«      ‚| j                  rN| j                  dk(  r?t	        | j
                  «      dkD  r't        j                  | j                  |«      d¬«      }nt        ‰| �)  |«      }| j
                  j                  t        j                  |t        j                  ¬«      «      S )aö  Perform classification on samples in X.

        For a one-class model, +1 or -1 is returned.

        Parameters
        ----------
        X : {array-like, sparse matrix} of shape (n_samples, n_features) or                 (n_samples_test, n_samples_train)
            For kernel="precomputed", the expected shape of X is
            (n_samples_test, n_samples_train).

        Returns
        -------
        y_pred : ndarray of shape (n_samples,)
            Class labels for samples in X.
        r  z>break_ties must be False when decision_function_shape is 'ovo'r  rw   r&   )Úaxisrv   )r   r  r  rb   rœ   r�   r(   Úargmaxrî   rg   rÝ   Útaker†   Úintp)rc   r¤   r¥   rn   s      €r9   rÝ   zBaseSVC.predict   s¦   ø€ ô" 	˜ÔØ�?Š?˜t×;Ñ;¸uÒDÜØPóð ð
 �OŠOØ×,Ñ,°Ò5Ü�D—M‘MÓ" QÒ&ä—	‘	˜$×0Ñ0°Ó3¸!Ô<‰Aä‘‘ Ó"ˆAØ�}‰}×!Ñ!¤"§*¡*¨Q´b·g±gÔ">Ó?Ð?r;   c                 ód   — | j                   st        d«      ‚| j                  dvrt        d«      ‚y)Nz5predict_proba is not available when probability=Falser~   z0predict_proba only implemented for SVC and NuSVCT)rZ   rû   r`   r·   s    r9   Ú_check_probazBaseSVC._check_probaE  s9   € Ø×ÒÜ ØGóð ð �:‰:Ð0Ñ0Ü Ð!SÓTÐTØr;   c                 óö   — | j                  |«      }| j                  j                  dk(  s| j                  j                  dk(  rt	        d«      ‚| j
                  r| j                  n| j                  } ||«      S )aÄ  Compute probabilities of possible outcomes for samples in X.

        The model needs to have probability information computed at training
        time: fit with attribute `probability` set to True.

        Parameters
        ----------
        X : array-like of shape (n_samples, n_features)
            For kernel="precomputed", the expected shape of X is
            (n_samples_test, n_samples_train).

        Returns
        -------
        T : ndarray of shape (n_samples, n_classes)
            Returns the probability of the sample for each class in
            the model. The columns correspond to the classes in sorted
            order, as they appear in the attribute :term:`classes_`.

        Notes
        -----
        The probability model is created using cross validation, so
        the results can be slightly different than those obtained by
        predict. Also, it will produce meaningless results on very small
        datasets.
        r   zApredict_proba is not available when fitted with probability=False)rÚ   ÚprobA_rÓ   ÚprobB_r   rƒ   Ú_sparse_predict_probaÚ_dense_predict_proba)rc   r¤   Ú
pred_probas      r9   Úpredict_probazBaseSVC.predict_probaN  sq   € ð6 ×&Ñ& qÓ)ˆØ�;‰;×Ñ˜qÒ  D§K¡K×$4Ñ$4¸Ò$9Ü ØSóð ð +/¯,ª,ˆD×&Ò&¸D×<UÑ<Uð 	ñ ˜!‹}Ðr;   c                 óJ   — t        j                  | j                  |«      «      S )a  Compute log probabilities of possible outcomes for samples in X.

        The model need to have probability information computed at training
        time: fit with attribute `probability` set to True.

        Parameters
        ----------
        X : array-like of shape (n_samples, n_features) or                 (n_samples_test, n_samples_train)
            For kernel="precomputed", the expected shape of X is
            (n_samples_test, n_samples_train).

        Returns
        -------
        T : ndarray of shape (n_samples, n_classes)
            Returns the log-probabilities of the sample for each class in
            the model. The columns correspond to the classes in sorted
            order, as they appear in the attribute :term:`classes_`.

        Notes
        -----
        The probability model is created using cross validation, so
        the results can be slightly different than those obtained by
        predict. Also, it will produce meaningless results on very small
        datasets.
        )r(   Úlogr*  )rc   r¤   s     r9   Úpredict_log_probazBaseSVC.predict_log_probas  s   € ô8 �v‰v�d×(Ñ(¨Ó+Ó,Ð,r;   c                 óº  — | j                  |«      }| j                  }t        |«      rd}t        j	                  | j
                  «      }t        j                  || j                  | j                  | j                  | j                  | j                  | j                  | j                  ||| j                  | j                   | j"                  | j$                  ¬«      }|S )NrB   rí   )r½   rQ   r‚   ra   r‡   r`   r¾   r*  rÂ   rÃ   rÄ   r›   r™   rÅ   rÆ   rR   r[   rT   r‰   )rc   r¤   rQ   rº   Úpprobs        r9   r(  zBaseSVC._dense_predict_proba‘  s¯   € Ø× Ñ  Ó#ˆà—‘ˆÜ�FÔØ"ˆFä×$Ñ$ T§Z¡ZÓ0ˆÜ×$Ñ$ØØ�M‰MØ×!Ñ!Ø�O‰OØ×ÑØ×ÑØ�K‰KØ�K‰KØØØ—;‘;Ø—‘Ø—*‘*Ø—+‘+ô
ˆð" ˆr;   c                 ó€  — t        j                  |j                  t         j                  d¬«      |_        | j                  }t        |«      rd}| j                  j                  |«      }t        j                  |j                  |j                  |j                  | j                  j                  | j                  j                  | j                  j                  | j                  j                  | j                  t        j                  | j                   «      || j"                  | j$                  | j&                  | j(                  | j*                  t-        | dt        j.                  d«      «      | j0                  | j2                  | j4                  | j6                  | j8                  | j:                  | j<                  «      S )NrV   rÈ   rB   r»   r   )r(   r†   rž   r„   rQ   r‚   rÊ   r‡   rË   Úlibsvm_sparse_predict_probarÍ   rÎ   rÃ   r›   r™   ra   r`   rR   r‰   rT   rU   rV   rÀ   rÁ   rW   rX   rY   rZ   rÄ   rÅ   rÆ   rò   s       r9   r'  zBaseSVC._sparse_predict_proba¬  s6  € Ü—‘˜AŸF™F¬"¯*©*¸CÔ@ˆŒà—‘ˆÜ�FÔØ"ˆFà×*Ñ*×0Ñ0°Ó8ˆä×8Ñ8Ø�F‰FØ�I‰IØ�H‰HØ×!Ñ!×&Ñ&Ø×!Ñ!×)Ñ)Ø×!Ñ!×(Ñ(Ø×Ñ×!Ñ!Ø×ÑÜ×Ñ˜dŸj™jÓ)ØØ�K‰KØ�K‰KØ�J‰JØ�H‰HØ�F‰FÜ�D˜/¬2¯8©8°A«;Ó7Ø�G‰GØ�L‰LØ�N‰NØ×ÑØ�O‰OØ�K‰KØ�K‰Kó/
ð 	
r;   c                 ó|  — | j                   j                  d   dk(  r"t        | j                   | j                  «      }|S t	        | j                   | j
                  | j                  «      }t        j                  |d   «      r%t        j                  |«      j                  «       }|S t        j                  |«      }|S )Nr   r&   )rš   r'   r   rÃ   r:   rÄ   r   r€   ÚvstackÚtocsrr(   rÿ   s     r9   rü   zBaseSVC._get_coefÏ  sš   € Ø�?‰?× Ñ  Ñ# qÒ(ä" 4§?¡?°D×4IÑ4IÓJˆDð ˆô $Ø—‘ §¡°$×2GÑ2GóˆDô �{‰{˜4 ™7Ô#Ü—y‘y “×,Ñ,Ó.�ð ˆô —y‘y “�àˆr;   c                 ó   — | j                   S ©z¡Parameter learned in Platt scaling when `probability=True`.

        Returns
        -------
        ndarray of shape  (n_classes * (n_classes - 1) / 2)
        )rÅ   r·   s    r9   r%  zBaseSVC.probA_ß  ó   € ð �{‰{Ðr;   c                 ó   — | j                   S r6  )rÆ   r·   s    r9   r&  zBaseSVC.probB_é  r7  r;   c                 ó`   •— t         ‰| �  «       }| j                  dk7  |j                  _        |S rf   )rg   rh   rQ   ri   rk   rl   s     €r9   rh   zBaseSVC.__sklearn_tags__ó  s*   ø€ Ü‰wÑ'Ó)ˆØ!%§¡°Ñ!=ˆ�‰ÔØˆr;   )rö   r  r  r  r=   r^   r   r  r	  Úunused_paramÚpopr   rd   r…   rî   rÝ   r#  r   r*  r-  r(  r'  rü   r
  r%  r&  rh   r  r  s   @r9   r  r  ¾  s÷   ø… Ù+ð$Ø
×
+Ñ
+ð$á$.°°u¨~Ó$>Ð#?Ø �kò$Ð˜Dó ó
 *ˆØ×"Ñ" <Õ0ð *ð ó%
ó ð%
òN:òô@@òJñ �,Óñ"ó  ð"ñH �,Óñ-ó  ð-ò:ò6!
òFð  ñó ðð ñó ð÷ð r;   r  c           
      ój  — ddidddœdœddd	iidd
idddœdœdddiiddddœiddœ}| dk(  r||    S | dk7  rt        d| z  «      ‚|j                  |d«      }|€d|z  }n@|j                  |d«      }|€
d|›d|›d�}n"|j                  |d«      }|€d|›d|›d|›�}n|S t        d|›d|›d|›d|›�«      ‚)a  Find the liblinear magic number for the solver.

    This number depends on the values of the following attributes:
      - multi_class
      - penalty
      - loss
      - dual

    The same number is also internally used by LibLinear to determine
    which solver to use.
    Fé   r   é   )FT)Úl1Úl2r@  Té   é   rw   r&   é   é   é   é   )Úlogistic_regressionÚhingeÚsquared_hingeÚepsilon_insensitiveÚsquared_epsilon_insensitiveÚcrammer_singerrL  r  z<`multi_class` must be one of `ovr`, `crammer_singer`, got %rNzloss='%s' is not supportedzThe combination of penalty='z' and loss='z' is not supportedz' are not supported when dual=zUnsupported set of arguments: z, Parameters: penalty=z, loss=z, dual=)rb   Úget)	Úmulti_classÚpenaltyÚlossÚdualÚ_solver_type_dictÚ_solver_penÚerror_stringÚ_solver_dualÚ
solver_nums	            r9   Ú_get_liblinear_solver_typerW  ù  s(  € ð" (-¨a jÀÈÑ8KÑLØ˜˜q˜	Ð"Ø!&¨ 
¸!À1Ñ2EÑFØ $ t¨R jÐ1Ø(,°bÀÑ.CÐ'DØñÐð Ð&Ò&Ø  Ñ-Ð-Ø	˜Ò	ÜØJÈ[ÑXó
ð 	
ð $×'Ñ'¨¨dÓ3€KØÐØ3°dÑ:‰à"—‘ w°Ó5ˆØÑò šDð"ñ ð
 &×)Ñ)¨$°Ó5ˆJØÑ!ò CJÊ4ÑQUðWñ ð
 "Ð!Ý
âš¢$©ð	.óð r;   c                 ó˜  — |dvrVt        «       }|j                  |«      }|j                  }t        |«      dk  rt	        d|d   z  «      ‚t        ||||¬«      }n't        j                  dt        j                  ¬«      }|}t        j                  |«       t        |«      }|rt        dd¬	«       d
}|r|dk  rt	        d|z  «      ‚|}t        j                  |«       t        j                  |«       t        j                  |«       t        j                   | «      rt#        | «       t        j$                  |t        j                  ¬«      j'                  «       }t        j(                  |d¬«      }t+        || t        j                  ¬«      }t-        ||||«      }t        j.                  | |t        j                   | «      ||
||||	|j1                  t        j2                  d«      j4                  «      ||«      \  }}t5        |«      }||	k\  rt7        j8                  dt:        «       |r|dd…dd…f   }||dd…df   z  }n|}d}|||fS )a  Used by Logistic Regression (and CV) and LinearSVC/LinearSVR.

    Preprocessing is done in this function before supplying it to liblinear.

    Parameters
    ----------
    X : {array-like, sparse matrix} of shape (n_samples, n_features)
        Training vector, where `n_samples` is the number of samples and
        `n_features` is the number of features.

    y : array-like of shape (n_samples,)
        Target vector relative to X

    C : float
        Inverse of cross-validation parameter. The lower the C, the higher
        the penalization.

    fit_intercept : bool
        Whether or not to fit an intercept. If set to True, the feature vector
        is extended to include an intercept term: ``[x_1, ..., x_n, 1]``, where
        1 corresponds to the intercept. If set to False, no intercept will be
        used in calculations (i.e. data is expected to be already centered).

    intercept_scaling : float
        Liblinear internally penalizes the intercept, treating it like any
        other term in the feature vector. To reduce the impact of the
        regularization on the intercept, the `intercept_scaling` parameter can
        be set to a value greater than 1; the higher the value of
        `intercept_scaling`, the lower the impact of regularization on it.
        Then, the weights become `[w_x_1, ..., w_x_n,
        w_intercept*intercept_scaling]`, where `w_x_1, ..., w_x_n` represent
        the feature weights and the intercept weight is scaled by
        `intercept_scaling`. This scaling allows the intercept term to have a
        different regularization behavior compared to the other features.

    class_weight : dict or 'balanced', default=None
        Weights associated with classes in the form ``{class_label: weight}``.
        If not given, all classes are supposed to have weight one. For
        multi-output problems, a list of dicts can be provided in the same
        order as the columns of y.

        The "balanced" mode uses the values of y to automatically adjust
        weights inversely proportional to class frequencies in the input data
        as ``n_samples / (n_classes * np.bincount(y))``

    penalty : {'l1', 'l2'}
        The norm of the penalty used in regularization.

    dual : bool
        Dual or primal formulation,

    verbose : int
        Set verbose to any positive number for verbosity.

    max_iter : int
        Number of iterations.

    tol : float
        Stopping condition.

    random_state : int, RandomState instance or None, default=None
        Controls the pseudo random number generation for shuffling the data.
        Pass an int for reproducible output across multiple function calls.
        See :term:`Glossary <random_state>`.

    multi_class : {'ovr', 'crammer_singer'}, default='ovr'
        `ovr` trains n_classes one-vs-rest classifiers, while `crammer_singer`
        optimizes a joint objective over all classes.
        While `crammer_singer` is interesting from a theoretical perspective
        as it is consistent it is seldom used in practice and rarely leads to
        better accuracy and is more expensive to compute.
        If `crammer_singer` is chosen, the options loss, penalty and dual will
        be ignored.

    loss : {'logistic_regression', 'hinge', 'squared_hinge',             'epsilon_insensitive', 'squared_epsilon_insensitive},             default='logistic_regression'
        The loss function used to fit the model.

    epsilon : float, default=0.1
        Epsilon parameter in the epsilon-insensitive loss function. Note
        that the value of this parameter depends on the scale of the target
        variable y. If unsure, set epsilon=0.

    sample_weight : array-like of shape (n_samples,), default=None
        Weights assigned to each sample.

    Returns
    -------
    coef_ : ndarray of shape (n_features, n_features + 1)
        The coefficient vector got by minimizing the objective function.

    intercept_ : float
        The intercept term added to the vector.

    n_iter_ : array of int
        Number of iterations run across for each class.
    )rJ  rK  rw   zeThis solver needs samples of at least 2 classes in the data, but the data contains only one class: %rr   )r  r¥   r¦   rv   z[LibLinear]ry   rz   g      ð¿zqIntercept scaling is %r but needs to be greater than 0. To disable fitting an intercept, set fit_intercept=False.ÚW)Úrequirementsr|   z@Liblinear failed to converge, increase the number of iterations.NrN   rG   )r   Úfit_transformr�   rœ   rb   r   r(   rÁ   r„   Ú	liblinearr¿   r   r‘   r¾   rË   r   r€   r   r†   ré   Úrequirer   rW  Ú
train_wrapr’   r“   r”   r¶   r±   r
   )r¤   r¥   rV   Úfit_interceptÚintercept_scalingr\   rO  rQ  rM   r]   rU   rO   rN  rP  rX   r¦   ÚencÚy_indr�   r»   r§   Úbiasr¨   Ú	raw_coef_r¢   Ú
n_iter_maxr   r—   s                               r9   Ú_fit_liblinearrf  2  s/  € ðh ÐIÑIÜ‹nˆØ×!Ñ! !Ó$ˆØ—<‘<ˆÜˆx‹=˜1ÒÜðà'¨™{ñ+óð ô
 -Ø (¨a¸}ô
‰ô Ÿ™ ¬"¯*©*Ô5ˆØˆÜ× Ñ  Ô)Ü
˜\Ó
*€CÙÜˆm Õ$ð €DÙØ Ò!Üð,à.?ñ@óð ð %ˆDä
×Ñ˜gÔ&Ü×$Ñ$ WÔ-Ü× Ñ  Ô)ô 
‡{�{�1„~Ü˜AÔô �J‰J�u¤B§J¡JÔ/×5Ñ5Ó7€EÜ�J‰J�u¨3Ô/€Eä(¨¸ÄÇÁÔL€Mä,¨[¸'À4ÈÓN€KÜ"×-Ñ-Ø	ØÜ
�‰�A‹ØØØØ	ØØØ�‰”B—H‘H˜S“M×%Ñ%Ó&ØØóÑ€Iˆwô$ �W“€JØ�XÒÜ�‰ØNÜô	
ñ
 Øš!˜S˜b˜S˜&Ñ!ˆØ&¨²1°b°5Ñ)9Ñ9‰
àˆØˆ
à�*˜gÐ%Ð%r;   )Nr  rG  gš™™™™™¹?N)8r¶   Úabcr   r   Únumbersr   r   Únumpyr(   Úscipy.sparserk   r   Úsklearn.baser   r   r	   Úsklearn.exceptionsr
   r   Úsklearn.preprocessingr   Úsklearn.svmr   r\  r   r¾   r   rË   Úsklearn.utilsr   r   r   r   Úsklearn.utils._param_validationr   r   Úsklearn.utils.extmathr   Úsklearn.utils.metaestimatorsr   Úsklearn.utils.multiclassr   r   Úsklearn.utils.validationr   r   r   r   r   r   ra   r:   r=   r  rW  rf  © r;   r9   Ú<module>rv     s¡   ðó ß 'ß "ã Ý ç EÑ Eß AÝ .Ý /õ *Ý 7÷ó ÷ AÝ 1Ý 5÷÷÷ ò H€òô@n	2�¨'õ n	2ôbxˆo˜z°Wõ xòv	6ðJ ØØ	ØØô!D&r;   