content large_stringlengths 3 20.5k | url large_stringlengths 53 192 ⌀ | branch large_stringclasses 4
values | source large_stringclasses 51
values | embeddings listlengths 384 384 | score float64 -0.21 0.65 |
|---|---|---|---|---|---|
to remarkably different, yet properly labeled examples when they come late in the stream as their learning rate decreases over time. Examples .......... Finally, we have a full-fledged example of :ref:`sphx\_glr\_auto\_examples\_applications\_plot\_out\_of\_core\_classification.py`. It is aimed at providing a starting ... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/computing/scaling_strategies.rst | main | scikit-learn | [
-0.07934537529945374,
-0.07475617527961731,
-0.03691018372774124,
-0.017939291894435883,
0.1554810255765915,
-0.07962991297245026,
-0.004753114655613899,
0.09066396951675415,
0.0060254354029893875,
-0.03289151191711426,
-0.05530379340052605,
0.05064830183982849,
-0.004996141418814659,
0.03... | 0.153583 |
.. \_df\_output\_transform: =========================================================== Pandas/Polars Output for Transformers with `set\_output` API =========================================================== .. currentmodule:: sklearn This part of the user guide explains how scikit-learn supports tabular data. Propaga... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/df_output_transform.rst | main | scikit-learn | [
-0.0390046089887619,
-0.057761963456869125,
-0.07954031974077225,
-0.06887385249137878,
0.044071998447179794,
-0.06784594804048538,
-0.015286890789866447,
-0.03696037083864212,
-0.02103717252612114,
0.048292919993400574,
0.010633707046508789,
-0.028787104412913322,
-0.01908813789486885,
0.... | 0.048172 |
detailed example can be found in :ref:`sphx\_glr\_auto\_examples\_miscellaneous\_plot\_set\_output.py`. | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/df_output_transform.rst | main | scikit-learn | [
-0.03877690061926842,
-0.07516966015100479,
-0.05710547789931297,
-0.010479054413735867,
0.017101721838116646,
-0.019053330644965172,
0.02996714971959591,
0.08039777725934982,
-0.05254949629306793,
-0.05837130919098854,
0.0841832235455513,
0.004636025987565517,
-0.021965596824884415,
0.007... | 0.097901 |
.. \_kernel\_approximation: Kernel Approximation ==================== This submodule contains functions that approximate the feature mappings that correspond to certain kernels, as they are used for example in support vector machines (see :ref:`svm`). The following feature functions perform non-linear transformations o... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/kernel_approximation.rst | main | scikit-learn | [
-0.09763592481613159,
-0.09918724000453949,
0.010881624184548855,
-0.005069673992693424,
0.10726756602525711,
-0.04482250660657883,
-0.050042808055877686,
0.010230259969830513,
-0.024521637707948685,
-0.0008869483135640621,
0.029426652938127518,
0.031972963362932205,
-0.05326547101140022,
... | 0.118233 |
:ref:`sphx\_glr\_auto\_examples\_applications\_plot\_cyclical\_feature\_engineering.py`, that shows an efficient machine learning pipeline that uses a :class:`Nystroem` kernel. \* See :ref:`sphx\_glr\_auto\_examples\_miscellaneous\_plot\_kernel\_approximation.py` for a comparison of :class:`Nystroem` kernel with :class... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/kernel_approximation.rst | main | scikit-learn | [
-0.04318631812930107,
-0.09627614170312881,
-0.042517226189374924,
-0.02272806130349636,
0.0715053379535675,
-0.07243790477514267,
-0.040193457156419754,
0.06441377848386765,
-0.026189487427473068,
-0.05133889243006706,
-0.0002689650864340365,
0.017473476007580757,
-0.03530869260430336,
-0... | 0.148373 |
kernel often used in computer vision, but allows for a simple Monte Carlo approximation of the feature map. The usage of the :class:`SkewedChi2Sampler` is the same as the usage described above for the :class:`RBFSampler`. The only difference is in the free parameter, that is called :math:`c`. For a motivation for this ... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/kernel_approximation.rst | main | scikit-learn | [
-0.06829135119915009,
-0.07376720756292343,
-0.03714986518025398,
-0.04823723062872887,
0.08053403347730637,
-0.03951716050505638,
0.03369009867310524,
0.06442799419164658,
-0.010624835267663002,
-0.03703590855002403,
0.05756375193595886,
-0.008969702757894993,
0.019356239587068558,
-0.029... | 0.167867 |
`"Random features for large-scale kernel machines" `\_ Rahimi, A. and Recht, B. - Advances in neural information processing 2007, .. [LS2010] `"Random Fourier approximations for skewed multiplicative histogram kernels" `\_ Li, F., Ionescu, C., and Sminchisescu, C. - Pattern Recognition, DAGM 2010, Lecture Notes in Comp... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/kernel_approximation.rst | main | scikit-learn | [
-0.04411735758185387,
-0.06490661948919296,
-0.0035570969339460135,
-0.05526449903845787,
0.10517674684524536,
-0.006974216550588608,
0.047311361879110336,
-0.03894074261188507,
-0.03605100139975548,
-0.06324237585067749,
0.028895527124404907,
0.0045968713238835335,
0.041448306292295456,
0... | 0.121383 |
.. \_combining\_estimators: ================================== Pipelines and composite estimators ================================== To build a composite estimator, transformers are usually combined with other transformers or with :term:`predictors` (such as classifiers or regressors). The most common tool used for com... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/compose.rst | main | scikit-learn | [
-0.08867518603801727,
-0.05797417461872101,
-0.016100147739052773,
0.04572106897830963,
0.01132723968476057,
-0.017932353541254997,
-0.10627079755067825,
0.03140793368220329,
-0.023337893187999725,
0.033980850130319595,
-0.04562073200941086,
-0.06059116870164871,
0.04697280749678612,
-0.00... | 0.11207 |
as lists or strings (although only a step of 1 is permitted). This is convenient for performing only some of the transformations (or their inverse): >>> pipe[:1] Pipeline(steps=[('reduce\_dim', PCA())]) >>> pipe[-1:] Pipeline(steps=[('clf', SVC())]) .. dropdown:: Accessing a step by name or position A specific step can... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/compose.rst | main | scikit-learn | [
-0.03196842968463898,
0.03230305388569832,
-0.026933103799819946,
0.008670453913509846,
-0.039113979786634445,
-0.04500969126820564,
0.023803984746336937,
0.03888557851314545,
-0.017216354608535767,
-0.02635909616947174,
-0.019173627719283104,
-0.016715869307518005,
-0.050275158137083054,
... | 0.026741 |
>>> X\_digits, y\_digits = load\_digits(return\_X\_y=True) >>> pca1 = PCA(n\_components=10) >>> svm1 = SVC() >>> pipe = Pipeline([('reduce\_dim', pca1), ('clf', svm1)]) >>> pipe.fit(X\_digits, y\_digits) Pipeline(steps=[('reduce\_dim', PCA(n\_components=10)), ('clf', SVC())]) >>> # The pca instance can be inspected dir... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/compose.rst | main | scikit-learn | [
-0.0819469541311264,
-0.013822013512253761,
-0.042520321905612946,
-0.0534331314265728,
-0.0022121791262179613,
-0.07081177830696106,
-0.031005363911390305,
0.05192267522215843,
-0.04741506278514862,
-0.06958723068237305,
-0.01175510510802269,
0.015898939222097397,
-0.07766252756118774,
-0... | -0.031857 |
serves the same purposes as :class:`Pipeline` - convenience and joint parameter estimation and validation. :class:`FeatureUnion` and :class:`Pipeline` can be combined to create complex models. (A :class:`FeatureUnion` has no way of checking whether two transformers might produce identical features. It only produces a u... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/compose.rst | main | scikit-learn | [
-0.09115653485059738,
-0.004008561372756958,
-0.04721246659755707,
-0.028926588594913483,
-0.02923833206295967,
-0.06165940314531326,
-0.021218497306108475,
0.001776331220753491,
-0.03356199711561203,
-0.06876460462808609,
-0.007040216587483883,
-0.04354573041200638,
0.0048241219483315945,
... | 0.058123 |
0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1]]...) In the above example, the :class:`~sklearn.feature\_extraction.text.CountVectorizer` expects a 1D array as input and therefore the columns were specified as a string (``'title'``). However, :class:`~sklearn.preprocessing.OneHotEncoder` as most of other transformers expe... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/compose.rst | main | scikit-learn | [
0.015948064625263214,
-0.0055498345755040646,
-0.09261307120323181,
0.044480446726083755,
-0.01076893974095583,
-0.022190473973751068,
0.00040574654121883214,
-0.005463641602545977,
-0.06901616603136063,
-0.0381210595369339,
0.06557662785053253,
-0.08323429524898529,
-0.005475286860018969,
... | -0.030828 |
An example of the HTML output can be seen in the \*\*HTML representation of Pipeline\*\* section of :ref:`sphx\_glr\_auto\_examples\_compose\_plot\_column\_transformer\_mixed\_types.py`. As an alternative, the HTML can be written to a file using :func:`~sklearn.utils.estimator\_html\_repr`:: >>> from sklearn.utils impo... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/compose.rst | main | scikit-learn | [
-0.06982516497373581,
-0.063414566218853,
-0.07302181422710419,
0.030039960518479347,
0.11676456034183502,
-0.018865449354052544,
-0.03840041905641556,
0.022197533398866653,
-0.016712050884962082,
0.005324786528944969,
0.01571422629058361,
-0.028418121859431267,
0.0008658776059746742,
-0.0... | 0.052375 |
.. \_isotonic: =================== Isotonic regression =================== .. currentmodule:: sklearn.isotonic The class :class:`IsotonicRegression` fits a non-decreasing real function to 1-dimensional data. It solves the following problem: .. math:: \min \sum\_i w\_i (y\_i - \hat{y}\_i)^2 subject to :math:`\hat{y}\_i ... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/isotonic.rst | main | scikit-learn | [
-0.08043421804904938,
-0.08056388050317764,
0.059820763766765594,
-0.0035072844475507736,
-0.030580170452594757,
0.010809839703142643,
0.03948099911212921,
-0.015390840359032154,
0.020000837743282318,
-0.01355904620140791,
0.05584603548049927,
-0.011872166767716408,
0.013561324216425419,
0... | 0.086914 |
.. \_neural\_networks\_unsupervised: ==================================== Neural network models (unsupervised) ==================================== .. currentmodule:: sklearn.neural\_network .. \_rbm: Restricted Boltzmann machines ============================= Restricted Boltzmann machines (RBM) are unsupervised nonlin... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neural_networks_unsupervised.rst | main | scikit-learn | [
-0.09546107053756714,
-0.13418662548065186,
-0.024582626298069954,
0.059526342898607254,
0.13363027572631836,
0.01128623727709055,
-0.0695701390504837,
-0.04409092292189598,
-0.014504484832286835,
-0.06628236174583435,
-0.022412655875086784,
-0.03564231097698212,
0.050087057054042816,
-0.0... | 0.119105 |
because of the form of the data likelihood: .. math:: \log P(v) = \log \sum\_h e^{-E(v, h)} - \log \sum\_{x, y} e^{-E(x, y)} For simplicity the equation above is written for a single training example. The gradient with respect to the weights is formed of two terms corresponding to the ones above. They are usually known... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neural_networks_unsupervised.rst | main | scikit-learn | [
-0.03628209978342056,
-0.10157961398363113,
0.030721202492713928,
0.028583718463778496,
0.035693250596523285,
-0.04470999166369438,
0.00517440028488636,
0.03269805759191513,
0.13950705528259277,
0.018399585038423538,
-0.040775686502456665,
0.047323714941740036,
0.05525944381952286,
-0.0030... | 0.084126 |
.. \_learning\_curves: ===================================================== Validation curves: plotting scores to evaluate models ===================================================== .. currentmodule:: sklearn.model\_selection Every estimator has its advantages and drawbacks. Its generalization error can be decompose... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/learning_curve.rst | main | scikit-learn | [
-0.11321820318698883,
-0.061294738203287125,
-0.022546891123056412,
0.05011799558997154,
0.10861162096261978,
-0.009356766939163208,
0.024336693808436394,
-0.004632085096091032,
0.03360167518258095,
-0.01842307671904564,
0.005452616605907679,
-0.027510421350598335,
0.01098551880568266,
-0.... | 0.200535 |
, 1 , 0.9 ]]) If you intend to plot the validation curves only, the class :class:`~sklearn.model\_selection.ValidationCurveDisplay` is more direct than using matplotlib manually on the results of a call to :func:`validation\_curve`. You can use the method :meth:`~sklearn.model\_selection.ValidationCurveDisplay.from\_es... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/learning_curve.rst | main | scikit-learn | [
-0.020013868808746338,
-0.11220323294401169,
-0.08689787238836288,
-0.03710553050041199,
0.10070151835680008,
-0.04705936834216118,
0.015819059684872627,
0.015465044416487217,
-0.002800988033413887,
-0.047251246869564056,
-0.008981691673398018,
-0.06669843941926956,
-0.029240956529974937,
... | 0.029263 |
.. \_svm: ======================= Support Vector Machines ======================= .. TODO: Describe tol parameter .. TODO: Describe max\_iter parameter .. currentmodule:: sklearn.svm \*\*Support vector machines (SVMs)\*\* are a set of supervised learning methods used for :ref:`classification `, :ref:`regression ` and :... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/svm.rst | main | scikit-learn | [
-0.0885516107082367,
-0.04698936641216278,
-0.058055292814970016,
0.016623124480247498,
0.11082026362419128,
0.02309662103652954,
0.055771179497241974,
0.0793703943490982,
-0.05041979253292084,
0.00032586377346888185,
-0.05169512704014778,
0.04137806594371796,
-0.005229472182691097,
-0.006... | 0.216939 |
from two classes. Internally, the solver always uses this "ovo" strategy to train the models. However, by default, the `decision\_function\_shape` parameter is set to `"ovr"` ("one-vs-rest"), to have a consistent interface with other classifiers by monotonically transforming the "ovo" decision function into an "ovr" de... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/svm.rst | main | scikit-learn | [
-0.017592599615454674,
-0.11759057641029358,
-0.00687027582898736,
0.0006954038981348276,
0.054621800780296326,
-0.10427076369524002,
-0.030637226998806,
-0.0021715578623116016,
0.012526755221188068,
0.0025435765273869038,
-0.04335826262831688,
0.01027980912476778,
-0.016072310507297516,
-... | 0.021605 |
case). When the constructor option ``probability`` is set to ``True``, class membership probability estimates (from the methods ``predict\_proba`` and ``predict\_log\_proba``) are enabled. In the binary case, the probabilities are calibrated using Platt scaling [#1]\_: logistic regression on the SVM's scores, fit by an... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/svm.rst | main | scikit-learn | [
-0.011222239583730698,
-0.10133755207061768,
-0.07722781598567963,
-0.04009301960468292,
0.05578337609767914,
-0.07391230016946793,
-0.0011629321379587054,
0.019294630736112595,
-0.03549860045313835,
0.027128344401717186,
0.019383499398827553,
-0.11459052562713623,
0.032649021595716476,
-0... | 0.016062 |
training data, because the cost function ignores samples whose prediction is close to their target. There are three different implementations of Support Vector Regression: :class:`SVR`, :class:`NuSVR` and :class:`LinearSVR`. :class:`LinearSVR` provides a faster implementation than :class:`SVR` but only considers the li... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/svm.rst | main | scikit-learn | [
-0.05876331776380539,
-0.06595907360315323,
-0.04534933343529701,
-0.004282702226191759,
0.16385230422019958,
0.032877348363399506,
0.00042830687016248703,
-0.005206845235079527,
0.002570929704234004,
0.034374434500932693,
-0.04239727929234505,
0.03770286962389946,
-0.05498943850398064,
-0... | 0.023377 |
:class:`LinearSVR` are less sensitive to ``C`` when it becomes large, and prediction results stop improving after a certain threshold. Meanwhile, larger ``C`` values will take more time to train, sometimes up to 10 times longer, as shown in [#3]\_. \* Support Vector Machine algorithms are not scale invariant, so \*\*it... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/svm.rst | main | scikit-learn | [
-0.01540304347872734,
-0.043727852404117584,
-0.042069729417562485,
-0.00500481715425849,
0.018175257369875908,
-0.04706471785902977,
-0.049132030457258224,
0.0015251449076458812,
-0.06116417050361633,
-0.010582491755485535,
-0.05252343416213989,
-0.006680969148874283,
-0.04465285316109657,
... | 0.010937 |
much faster and more scalable. Parameters of the RBF Kernel ---------------------------- When training an SVM with the \*Radial Basis Function\* (RBF) kernel, two parameters must be considered: ``C`` and ``gamma``. The parameter ``C``, common to all SVM kernels, trades off misclassification of training examples against... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/svm.rst | main | scikit-learn | [
-0.043243132531642914,
-0.11935906857252121,
-0.1222187727689743,
0.01699577085673809,
0.04115764796733856,
-0.003877673763781786,
0.06474384665489197,
0.08207155019044876,
-0.012161478400230408,
-0.04797361418604851,
0.023269763216376305,
0.016410207375884056,
0.03435596451163292,
-0.0156... | 0.089498 |
as good references for the theory and practicalities of SVMs. SVC --- Given training vectors :math:`x\_i \in \mathbb{R}^p`, i=1,..., n, in two classes, and a vector :math:`y \in \{1, -1\}^n`, our goal is to find :math:`w \in \mathbb{R}^p` and :math:`b \in \mathbb{R}` such that the prediction given by :math:`\text{sign}... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/svm.rst | main | scikit-learn | [
-0.05717703700065613,
-0.07860039919614792,
0.004678871016949415,
0.0033519011922180653,
0.08159630745649338,
-0.025839991867542267,
0.03677188232541084,
0.03787281736731529,
-0.0015813332283869386,
0.06632456183433533,
-0.08122341334819794,
0.09305183589458466,
0.00977406557649374,
-0.000... | -0.043208 |
formulation [#7]\_ is a reparameterization of the :math:`C`-SVC and therefore mathematically equivalent. We introduce a new parameter :math:`\nu` (instead of :math:`C`) which controls the number of support vectors and \*margin errors\*: :math:`\nu \in (0, 1]` is an upper bound on the fraction of margin errors and a low... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/svm.rst | main | scikit-learn | [
-0.08753825724124908,
-0.04415050521492958,
-0.03209054842591286,
-0.03384463116526604,
0.06770346313714981,
-0.029384059831500053,
0.0006669755093753338,
0.027027949690818787,
0.011451618745923042,
-0.002470999723300338,
-0.06277324259281158,
0.039485473185777664,
0.02929406799376011,
0.0... | 0.074286 |
2004, p. 199-222. .. [#7] Schölkopf et. al `New Support Vector Algorithms `\_, Neural Computation 12, 1207-1245 (2000). .. [#8] Crammer and Singer `On the Algorithmic Implementation of Multiclass Kernel-based Vector Machines `\_, JMLR 2001. | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/svm.rst | main | scikit-learn | [
-0.09974212199449539,
-0.043624695390462875,
0.02007242478430271,
-0.11583496630191803,
0.06734322756528854,
0.04141450673341751,
0.006994070950895548,
-0.035983163863420486,
-0.09334717690944672,
-0.03159604221582413,
-0.04187502712011337,
0.007661779876798391,
0.009422630071640015,
-0.06... | 0.083289 |
.. \_density\_estimation: ================== Density Estimation ================== Density estimation walks the line between unsupervised learning, feature engineering, and data modeling. Some of the most popular and useful density estimation techniques are mixture models such as Gaussian Mixtures (:class:`~sklearn.mix... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/density.rst | main | scikit-learn | [
0.0180926863104105,
-0.10196604579687119,
-0.014124452136456966,
0.03555574640631676,
0.0766843631863594,
0.03052516095340252,
0.05660224333405495,
-0.02743992954492569,
-0.08243469893932343,
-0.049424923956394196,
0.036543332040309906,
-0.03913178667426109,
0.10660870373249054,
0.01397579... | 0.104312 |
Here we have used ``kernel='gaussian'``, as seen above. Mathematically, a kernel is a positive function :math:`K(x;h)` which is controlled by the bandwidth parameter :math:`h`. Given this kernel form, the density estimate at a point :math:`y` within a group of points :math:`x\_i; i=1, \cdots, N` is given by: .. math:: ... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/density.rst | main | scikit-learn | [
-0.024693509563803673,
-0.08648229390382767,
-0.017806662246584892,
0.011345596052706242,
0.04530065134167671,
-0.0646418109536171,
0.08961602300405502,
-0.020736221224069595,
0.005702044814825058,
0.0027262491639703512,
-0.0018557891016826034,
0.017852481454610825,
0.09781792759895325,
-0... | 0.072126 |
.. \_gaussian\_process: ================== Gaussian Processes ================== .. currentmodule:: sklearn.gaussian\_process \*\*Gaussian Processes (GP)\*\* are a nonparametric supervised learning method used to solve \*regression\* and \*probabilistic classification\* problems. The advantages of Gaussian processes ar... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/gaussian_process.rst | main | scikit-learn | [
-0.14184944331645966,
-0.1247568354010582,
-0.004009552299976349,
-0.001137965708039701,
0.08885965496301651,
-0.05928182601928711,
0.03270294889807701,
0.037590738385915756,
-0.015495049767196178,
0.015049890615046024,
-0.053129758685827255,
0.028344931080937386,
0.049770236015319824,
-0.... | 0.2214 |
class probabilities. GaussianProcessClassifier places a GP prior on a latent function :math:`f`, which is then squashed through a link function :math:`\pi` to obtain the probabilistic classification. The latent function :math:`f` is a so-called nuisance function, whose values are not observed and are not relevant by th... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/gaussian_process.rst | main | scikit-learn | [
-0.08151236921548843,
-0.04049821197986603,
-0.050374191254377365,
-0.04461104795336723,
0.08535488694906235,
-0.022295160219073296,
0.03155365213751793,
0.028752099722623825,
-0.004088874440640211,
0.04807540029287338,
0.027038775384426117,
0.06838030368089676,
0.06514395028352737,
-0.032... | 0.101755 |
figure shows that this is because they exhibit a steep change of the class probabilities at the class boundaries (which is good) but have predicted probabilities close to 0.5 far away from the class boundaries (which is bad). This undesirable effect is caused by the Laplace approximation used internally by GPC. The sec... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/gaussian_process.rst | main | scikit-learn | [
-0.06172211840748787,
-0.11372900009155273,
0.04092099145054817,
0.0017825362738221884,
0.11503136157989502,
-0.09101416170597076,
0.0211293026804924,
0.028018223121762276,
0.012594794854521751,
-0.017782660201191902,
0.023550624027848244,
0.011577094905078411,
0.013258402235805988,
-0.057... | -0.001765 |
kernels support computing analytic gradients of the kernel's auto-covariance with respect to :math:`log(\theta)` via setting ``eval\_gradient=True`` in the ``\_\_call\_\_`` method. That is, a ``(len(X), len(X), len(theta))`` array is returned where the entry ``[i, j, l]`` contains :math:`\frac{\partial k\_\theta(x\_i, ... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/gaussian_process.rst | main | scikit-learn | [
-0.09342975914478302,
-0.10570970922708511,
-0.03421347215771675,
-0.03275168314576149,
0.028467882424592972,
-0.06911543011665344,
0.03542831540107727,
0.006076071877032518,
0.06801651418209076,
-0.006152149755507708,
0.039129890501499176,
0.0635596290230751,
0.0420430488884449,
-0.038047... | 0.178281 |
process. It depends on a parameter :math:`constant\\_value`. It is defined as: .. math:: k(x\_i, x\_j) = constant\\_value \;\forall\; x\_i, x\_j The main use-case of the :class:`WhiteKernel` kernel is as part of a sum-kernel where it explains the noise-component of the signal. Tuning its parameter :math:`noise\\_level`... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/gaussian_process.rst | main | scikit-learn | [
-0.05592400208115578,
-0.011683421209454536,
0.01025378331542015,
0.016160322353243828,
-0.001971747726202011,
-0.06739881634712219,
0.06623728573322296,
-0.015976952388882637,
-0.0013665745500475168,
-0.0805351510643959,
-0.0293504036962986,
-0.00313646555878222,
0.04261929914355278,
-0.0... | 0.170124 |
3/2`) or twice differentiable (:math:`\nu = 5/2`). The flexibility of controlling the smoothness of the learned function via :math:`\nu` allows adapting to the properties of the true underlying functional relation. The prior and posterior of a GP resulting from a Matérn kernel are shown in the following figure: .. figu... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/gaussian_process.rst | main | scikit-learn | [
-0.10083723813295364,
-0.15042442083358765,
-0.0255175419151783,
-0.022239210084080696,
-0.010115078650414944,
-0.0009851689683273435,
0.02933925949037075,
0.045976486057043076,
0.050348054617643356,
-0.0170463714748621,
0.07882999628782272,
0.015247971750795841,
-0.0026466939598321915,
0.... | 0.13509 |
.. \_impute: ============================ Imputation of missing values ============================ .. currentmodule:: sklearn.impute For various reasons, many real world datasets contain missing values, often encoded as blanks, NaNs or other placeholders. Such datasets however are incompatible with scikit-learn estima... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/impute.rst | main | scikit-learn | [
-0.04640425369143486,
0.004591502249240875,
0.0163921806961298,
0.010102150030434132,
0.041048407554626465,
-0.09088412672281265,
0.01997651904821396,
0.002395505318418145,
-0.005278297699987888,
-0.023159107193350792,
0.02585228532552719,
0.0023268312215805054,
0.005475516431033611,
-0.07... | 0.046934 |
\*\*experimental\*\* for now: default parameters or details of behaviour might change without any deprecation cycle. Resolving the following issues would help stabilize :class:`IterativeImputer`: convergence criteria (:issue:`14338`) and default estimators (:issue:`13286`). To use it, you need to explicitly import ``en... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/impute.rst | main | scikit-learn | [
-0.06971768289804459,
-0.08603672683238983,
0.026189293712377548,
-0.02838638238608837,
0.05532994493842125,
-0.10167849808931351,
-0.027216603979468346,
-0.03756313398480415,
-0.11590051651000977,
-0.0009482451132498682,
0.002087955130264163,
0.0376364104449749,
0.03265818580985069,
-0.06... | 0.061554 |
missing, then the neighbors for that sample can be different depending on the particular feature being imputed. When the number of available neighbors is less than `n\_neighbors` and there are no defined distances to the training set, the training set average for that feature is used during imputation. If there is at l... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/impute.rst | main | scikit-learn | [
-0.06553405523300171,
-0.009119771420955658,
0.08112934976816177,
-0.0074792965315282345,
0.07662127912044525,
-0.04955018311738968,
-0.051190976053476334,
-0.02605479769408703,
-0.042492009699344635,
-0.04261936992406845,
0.014031137339770794,
0.01819552108645439,
0.05087253078818321,
-0.... | 0.006936 |
the features containing missing values at ``fit`` time:: >>> indicator.features\_ array([0, 1, 3]) The ``features`` parameter can be set to ``'all'`` to return all features whether or not they contain missing values:: >>> indicator = MissingIndicator(missing\_values=-1, features="all") >>> mask\_all = indicator.fit\_tr... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/impute.rst | main | scikit-learn | [
0.029995068907737732,
0.006512004416435957,
0.010153002105653286,
0.04004117473959923,
0.06500574946403503,
0.01566026732325554,
0.025738254189491272,
-0.07252605259418488,
-0.029896341264247894,
-0.06787838786840439,
0.03295000270009041,
-0.13382798433303833,
-0.011079759337008,
-0.086607... | -0.012821 |
.. \_lda\_qda: ========================================== Linear and Quadratic Discriminant Analysis ========================================== .. currentmodule:: sklearn Linear Discriminant Analysis (:class:`~discriminant\_analysis.LinearDiscriminantAnalysis`) and Quadratic Discriminant Analysis (:class:`~discriminant... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/lda_qda.rst | main | scikit-learn | [
-0.09641604870557785,
-0.08529116958379745,
-0.049235258251428604,
-0.10162857919931412,
-0.0483085997402668,
0.04579874128103256,
-0.018717190250754356,
-0.01204791758209467,
-0.03891674801707268,
0.02183745615184307,
0.045755114406347275,
-0.028313107788562775,
-0.05338798463344574,
0.07... | 0.028585 |
:math:`(x-\mu\_k)^T \Sigma^{-1} (x-\mu\_k)` corresponds to the `Mahalanobis Distance `\_ between the sample :math:`x` and the mean :math:`\mu\_k`. The Mahalanobis distance tells how close :math:`x` is from :math:`\mu\_k`, while also accounting for the variance of each feature. We can thus interpret LDA as assigning :ma... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/lda_qda.rst | main | scikit-learn | [
-0.027434388175606728,
-0.07295415550470352,
0.033660151064395905,
-0.06548119336366653,
-0.010853092186152935,
-0.023022644221782684,
0.013672727160155773,
0.078033946454525,
0.030633963644504547,
0.00205570668913424,
0.09255096316337585,
-0.02336391620337963,
0.02394523285329342,
-0.0719... | 0.037553 |
covariance matrix will be used) and a value of 1 corresponds to complete shrinkage (which means that the diagonal matrix of variances will be used as an estimate for the covariance matrix). Setting this parameter to a value between these two extrema will estimate a shrunk version of the covariance matrix. The shrunk Le... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/lda_qda.rst | main | scikit-learn | [
-0.023542648181319237,
-0.008835064247250557,
-0.05491993576288223,
0.02371031604707241,
0.016712594777345657,
-0.002732304623350501,
-0.05270165950059891,
0.07079910486936569,
-0.017923777922987938,
0.019606435671448708,
0.057884104549884796,
0.05494704842567444,
-0.023019080981612206,
-0... | 0.040072 |
Honey, I Shrunk the Sample Covariance Matrix. The Journal of Portfolio Management 30(4), 110-119, 2004. .. [3] R. O. Duda, P. E. Hart, D. G. Stork. Pattern Classification (Second Edition), section 2.6.2. | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/lda_qda.rst | main | scikit-learn | [
-0.00008909562166081741,
-0.04571859911084175,
-0.06757409125566483,
-0.04684218019247055,
-0.002150261076167226,
0.040259990841150284,
0.0375034362077713,
-0.06860808283090591,
0.03181837871670723,
0.010820973664522171,
0.008418451063334942,
0.05528739467263222,
-0.09703173488378525,
-0.0... | 0.082004 |
.. \_cross\_validation: =================================================== Cross-validation: evaluating estimator performance =================================================== .. currentmodule:: sklearn.model\_selection Learning the parameters of a prediction function and testing it on the same data is a methodologi... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_validation.rst | main | scikit-learn | [
-0.08386753499507904,
-0.06845244765281677,
0.018407441675662994,
0.1080942153930664,
0.13324642181396484,
-0.030939746648073196,
0.0008202157914638519,
-0.024208877235651016,
-0.04467488080263138,
-0.011302342638373375,
-0.02298821322619915,
-0.08967996388673782,
0.029526708647608757,
-0.... | 0.069526 |
is then the average of the values computed in the loop. This approach can be computationally expensive, but does not waste too much data (as is the case when fixing an arbitrary validation set), which is a major advantage in problems such as inverse inference where the number of samples is very small. .. image:: ../ima... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_validation.rst | main | scikit-learn | [
-0.05506205931305885,
-0.04387262091040611,
-0.06065249815583229,
-0.042565420269966125,
0.07637085765600204,
-0.05536910519003868,
-0.000939090212341398,
0.02725156396627426,
-0.043985847383737564,
-0.06287969648838043,
-0.055892132222652435,
-0.053672343492507935,
0.029107512906193733,
-... | 0.003241 |
The :func:`cross\_validate` function differs from :func:`cross\_val\_score` in two ways: - It allows specifying multiple metrics for evaluation. - It returns a dict containing fit-times, score-times (and optionally training scores, fitted estimators, train-test split indices) in addition to the test score. For single m... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_validation.rst | main | scikit-learn | [
-0.0579567551612854,
-0.07494482398033142,
-0.1006135419011116,
0.014634862542152405,
0.029336733743548393,
-0.024587268009781837,
0.030319103971123695,
0.02172861061990261,
-0.04425140842795372,
-0.05349593982100487,
0.002851886907592416,
-0.0943189263343811,
-0.01798606663942337,
-0.0019... | 0.043106 |
data is a common assumption in machine learning theory, it rarely holds in practice. If one knows that the samples have been generated using a time-dependent process, it is safer to use a :ref:`time-series aware cross-validation scheme `. Similarly, if we know that the generative process has a group structure (samples ... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_validation.rst | main | scikit-learn | [
-0.15754932165145874,
-0.04832054302096367,
0.009427422657608986,
0.003807474160566926,
0.08429000526666641,
-0.002613066928461194,
-0.05761263146996498,
-0.02367187663912773,
-0.013731160201132298,
0.0281022060662508,
-0.02158663235604763,
-0.06502226740121841,
-0.03028061054646969,
-0.04... | 0.106693 |
the test error. Intuitively, since :math:`n - 1` of the :math:`n` samples are used to build each model, models constructed from folds are virtually identical to each other and to the model built from the entire training set. However, if the learning curve is steep for the training size in question, then 5 or 10-fold cr... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_validation.rst | main | scikit-learn | [
-0.10754674673080444,
-0.06552624702453613,
0.03458971157670021,
0.033660922199487686,
0.12569579482078552,
0.019300933927297592,
-0.03529568389058113,
0.08844927698373795,
-0.03645911067724228,
-0.04434230923652649,
-0.017637168988585472,
-0.0027489992789924145,
-0.0018062925664708018,
0.... | 0.064732 |
This typically leads to undefined classification metrics (e.g. ROC AUC), exceptions raised when attempting to call :term:`fit` or missing columns in the output of the `predict\_proba` or `decision\_function` methods of multiclass classifiers trained on different folds. To mitigate such problems, splitters such as :clas... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_validation.rst | main | scikit-learn | [
-0.05037201568484306,
-0.05364040285348892,
-0.04261036962270737,
0.0004427144885994494,
0.10409580171108246,
-0.021814635023474693,
-0.045119959861040115,
0.032685551792383194,
-0.043055109679698944,
-0.03602750599384308,
-0.01724402606487274,
-0.10969807952642441,
-0.03908534720540047,
-... | 0.000974 |
data is likely to be dependent on the individual group. In our example, the patient id for each sample will be its group identifier. In this case we would like to know if a model trained on a particular set of groups generalizes well to the unseen groups. To measure this, we need to ensure that all the samples in the v... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_validation.rst | main | scikit-learn | [
-0.0610843226313591,
-0.028361111879348755,
0.0073321545496582985,
0.017389468848705292,
0.08786921203136444,
-0.010357868857681751,
-0.023020271211862564,
-0.046451471745967865,
-0.022794445976614952,
-0.049570273607969284,
-0.026853736490011215,
-0.0498364232480526,
-0.04675376042723656,
... | 0.018234 |
10 15 16 17] [ 1 2 3 8 9 10 12 13 14 15 16 17] [ 0 4 5 6 7 11] .. dropdown:: Implementation notes - With the current implementation full shuffle is not possible in most scenarios. When shuffle=True, the following happens: 1. All groups are shuffled. 2. Groups are sorted by standard deviation of classes using stable sor... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_validation.rst | main | scikit-learn | [
-0.09111734479665756,
-0.0008816253975965083,
0.037526391446590424,
-0.032604772597551346,
0.05136728659272194,
-0.03975512832403183,
-0.039023950695991516,
0.030514735728502274,
-0.05677930265665054,
-0.013327659107744694,
-0.03299368545413017,
0.03128095716238022,
-0.02080702595412731,
-... | 0.014941 |
and generates a sequence of randomized partitions in which a subset of groups are held out for each split. Each train/test split is performed independently meaning there is no guaranteed relationship between successive test sets. Here is a usage example:: >>> from sklearn.model\_selection import GroupShuffleSplit >>> X... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_validation.rst | main | scikit-learn | [
-0.059548184275627136,
-0.026590365916490555,
0.03341513127088547,
0.04687918350100517,
0.04828958585858345,
0.01561661809682846,
-0.0015940621960908175,
-0.08891652524471283,
-0.05822692811489105,
-0.06082842871546745,
0.0013055885210633278,
-0.013521225191652775,
0.01161119807511568,
-0.... | 0.057564 |
same duration, in order to have comparable metrics across folds. Example of 3-split time series cross-validation on a dataset with 6 samples:: >>> from sklearn.model\_selection import TimeSeriesSplit >>> X = np.array([[1, 2], [3, 4], [1, 2], [3, 4], [1, 2], [3, 4]]) >>> y = np.array([1, 2, 3, 4, 5, 6]) >>> tscv = TimeS... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_validation.rst | main | scikit-learn | [
-0.05181961879134178,
-0.14067837595939636,
0.021079810336232185,
-0.030765946954488754,
0.07705550640821457,
-0.0025144771207123995,
-0.07839065790176392,
0.007737522479146719,
0.008146222680807114,
-0.08880240470170975,
-0.07574335485696793,
-0.04746851325035095,
-0.11812727898359299,
0.... | 0.074322 |
one of these: - a lack of dependency between features and targets (i.e., there is no systematic relationship and any observed patterns are likely due to random chance) - \*\*or\*\* because the estimator was not able to use the dependency in the data (for instance because it underfit). In the latter case, using a more a... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_validation.rst | main | scikit-learn | [
-0.03298240527510643,
-0.12810541689395905,
0.03654314577579498,
0.03169918805360794,
0.1702430248260498,
-0.011156951077282429,
-0.02424994483590126,
0.02044016122817993,
0.02698056772351265,
-0.020140042528510094,
-0.015864457935094833,
-0.0719861388206482,
-0.007976075634360313,
-0.0202... | 0.005806 |
.. currentmodule:: sklearn.preprocessing .. \_preprocessing\_targets: ========================================== Transforming the prediction target (``y``) ========================================== These are transformers that are not intended to be used on features, only on supervised learning targets. See also :ref:`... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing_targets.rst | main | scikit-learn | [
-0.055145926773548126,
-0.02711663953959942,
-0.08604104816913605,
-0.035524882376194,
0.05346878990530968,
0.06143099442124367,
0.05782125145196915,
-0.015250854194164276,
-0.08185944706201553,
-0.04240892827510834,
0.022311093285679817,
-0.10076668858528137,
-0.02065679058432579,
0.01994... | 0.078658 |
.. \_sgd: =========================== Stochastic Gradient Descent =========================== .. currentmodule:: sklearn.linear\_model \*\*Stochastic Gradient Descent (SGD)\*\* is a simple yet very efficient approach to fitting linear classifiers and regressors under convex loss functions such as (linear) `Support Vect... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/sgd.rst | main | scikit-learn | [
-0.13399629294872284,
-0.059581346809864044,
-0.02553606778383255,
0.010198775678873062,
0.0784359872341156,
0.0032509788870811462,
-0.035657744854688644,
-0.0035857888869941235,
-0.04045846313238144,
-0.04972301423549652,
0.004725810140371323,
0.06469698995351791,
0.007632046472281218,
-0... | 0.05021 |
and all regression losses below. In this case the target is encoded as :math:`-1` or :math:`1`, and the problem is treated as a regression problem. The predicted class then corresponds to the sign of the predicted target. Please refer to the :ref:`mathematical section below ` for formulas. The first two loss functions ... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/sgd.rst | main | scikit-learn | [
-0.031836219131946564,
-0.0401027537882328,
-0.035684339702129364,
0.05365753918886185,
0.15695908665657043,
-0.007224753964692354,
-0.010517103597521782,
0.07003102451562881,
0.013897942379117012,
0.01571866311132908,
-0.006244208663702011,
-0.016544990241527557,
0.09900301694869995,
-0.0... | 0.030867 |
Regression ========== The class :class:`SGDRegressor` implements a plain stochastic gradient descent learning routine which supports different loss functions and penalties to fit linear regression models. :class:`SGDRegressor` is well suited for regression problems with a large number of training samples (> 10.000), fo... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/sgd.rst | main | scikit-learn | [
-0.04112710431218147,
-0.03641277179121971,
-0.019368678331375122,
0.01785794459283352,
0.05946415662765503,
0.056183651089668274,
-0.03954996541142464,
0.08394879102706909,
-0.04031994938850403,
0.017664648592472076,
0.010002749040722847,
0.06332496553659439,
0.05772387608885765,
-0.02868... | 0.070196 |
The sparse implementation produces slightly different results from the dense implementation, due to a shrunk learning rate for the intercept. See :ref:`implementation\_details`. There is built-in support for sparse data given in any matrix in a format supported by `scipy.sparse `\_. For maximum efficiency, however, use... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/sgd.rst | main | scikit-learn | [
-0.08586014062166214,
-0.08398769050836563,
-0.0727691650390625,
0.02842317335307598,
0.05593777447938919,
-0.0771191418170929,
-0.04568755254149437,
0.018016062676906586,
-0.04582501947879791,
-0.03292137756943703,
0.000888270151335746,
0.06554345786571503,
-0.003971024416387081,
-0.00825... | -0.036931 |
SGD works best with a larger number of features and a higher `eta0`. .. rubric:: References \* `"Efficient BackProp" `\_ Y. LeCun, L. Bottou, G. Orr, K. Müller - In Neural Networks: Tricks of the Trade 1998. .. \_sgd\_mathematical\_formulation: Mathematical formulation ======================== We describe here the math... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/sgd.rst | main | scikit-learn | [
-0.08828761428594589,
-0.12259003520011902,
-0.010941551066935062,
-0.03935815766453743,
0.07471048086881638,
0.03316660597920418,
0.006673725787550211,
-0.022698136046528816,
-0.044406965374946594,
-0.062376029789447784,
-0.015257853083312511,
0.1024991050362587,
0.04198858514428139,
-0.0... | -0.006585 |
step-size in the parameter space. The intercept :math:`b` is updated similarly but without regularization (and with additional decay for sparse matrices, as detailed in :ref:`implementation\_details`). The learning rate :math:`\eta` can be either constant or gradually decaying. For classification, the default learning ... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/sgd.rst | main | scikit-learn | [
-0.06905706226825714,
-0.05588751658797264,
-0.025147918611764908,
0.053600870072841644,
0.042905379086732864,
-0.026067819446325302,
-0.07940816879272461,
0.0008358936756849289,
0.012575644068419933,
0.016191260889172554,
0.01996035873889923,
0.09816093742847443,
-0.056992799043655396,
-0... | 0.106972 |
.. \_semi\_supervised: =================================================== Semi-supervised learning =================================================== .. currentmodule:: sklearn.semi\_supervised `Semi-supervised learning `\_ is a situation in which in your training data some of the samples are not labeled. The semi-su... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/semi_supervised.rst | main | scikit-learn | [
-0.04380118101835251,
-0.040115341544151306,
-0.004464255180209875,
0.03415679559111595,
0.15073661506175995,
0.010009980760514736,
0.061087507754564285,
-0.08691751211881638,
-0.08424971252679825,
-0.046761564910411835,
0.03466561436653137,
-0.05794551596045494,
0.004659350495785475,
-0.0... | 0.117396 |
clamping factor can be relaxed, to say :math:`\alpha=0.2`, which means that we will always retain 80 percent of our original label distribution, but the algorithm gets to change its confidence of the distribution within 20 percent. :class:`LabelPropagation` uses the raw similarity matrix constructed from the data with ... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/semi_supervised.rst | main | scikit-learn | [
-0.01830308884382248,
-0.08562533557415009,
-0.06868290901184082,
-0.07737993448972702,
0.0693824291229248,
0.008885260671377182,
0.03071596659719944,
0.015409665182232857,
-0.025435341522097588,
-0.10919728875160217,
0.07375406473875046,
0.03811274841427803,
0.044794514775276184,
-0.01099... | 0.029 |
.. \_decompositions: ================================================================= Decomposing signals in components (matrix factorization problems) ================================================================= .. currentmodule:: sklearn.decomposition .. \_PCA: Principal component analysis (PCA) ===============... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/decomposition.rst | main | scikit-learn | [
-0.03684031218290329,
-0.06268782168626785,
-0.00993876438587904,
-0.028679123148322105,
0.05109117180109024,
-0.0032836697064340115,
0.02473965287208557,
0.016751712188124657,
0.01764003373682499,
0.03317004069685936,
0.012810803018510342,
-0.03339441865682602,
0.0010856387671083212,
0.01... | -0.046234 |
instance). The PCA algorithm can be used to linearly transform the data while both reducing the dimensionality and preserving most of the explained variance at the same time. The class :class:`PCA` used with the optional parameter ``svd\_solver='randomized'`` is very useful in that case: since we are going to drop most... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/decomposition.rst | main | scikit-learn | [
-0.0811968743801117,
0.012286192737519741,
0.004605728201568127,
-0.06473790854215622,
0.04227783530950546,
-0.06579336524009705,
-0.08905255794525146,
-0.00942954234778881,
0.03985770791769028,
0.006239264737814665,
0.006890543736517429,
0.04109559580683708,
-0.09970134496688843,
-0.05314... | 0.029036 |
and different kinds of structure; see [Jen09]\_ for a review of such methods. For more details on how to use Sparse PCA, see the Examples section, below. .. |spca\_img| image:: ../auto\_examples/decomposition/images/sphx\_glr\_plot\_faces\_decomposition\_005.png :target: ../auto\_examples/decomposition/plot\_faces\_dec... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/decomposition.rst | main | scikit-learn | [
-0.07270952314138412,
-0.014084173366427422,
-0.021533869206905365,
-0.06893929094076157,
-0.00008609931683167815,
-0.09648188948631287,
0.01800127513706684,
0.0024829658214002848,
-0.031204167753458023,
0.013206075876951218,
0.004436340648680925,
0.03438655659556389,
0.019514193758368492,
... | -0.023787 |
the number of samples. It relies on randomized decomposition methods to find an approximate solution in a shorter time. The time complexity of the randomized :class:`KernelPCA` is :math:`O(n\_{\mathrm{samples}}^2 \cdot n\_{\mathrm{components}})` instead of :math:`O(n\_{\mathrm{samples}}^3)` for the exact method impleme... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/decomposition.rst | main | scikit-learn | [
-0.057981353253126144,
-0.031060228124260902,
-0.05572197958827019,
0.023247720673680305,
0.03469084948301315,
-0.13687248528003693,
-0.041267115622758865,
0.01417634915560484,
0.04938928037881851,
0.033431991934776306,
0.025034241378307343,
0.042709313333034515,
-0.03985084220767021,
-0.0... | 0.01531 |
a Gaussian distribution, compensating for LSA's erroneous assumptions about textual data. .. rubric:: Examples \* :ref:`sphx\_glr\_auto\_examples\_text\_plot\_document\_clustering.py` .. rubric:: References \* Christopher D. Manning, Prabhakar Raghavan and Hinrich Schütze (2008), \*Introduction to Information Retrieval... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/decomposition.rst | main | scikit-learn | [
-0.03786846622824669,
-0.06840569525957108,
-0.09949425607919693,
0.034958284348249435,
0.06175008788704872,
0.062063638120889664,
0.04749174788594246,
-0.04028681665658951,
-0.021595807746052742,
0.009387527592480183,
0.11362607032060623,
0.05176149681210518,
0.05644410103559494,
0.044647... | 0.103677 |
sparse coding step that shares the same implementation with all dictionary learning objects (see :ref:`SparseCoder`). It is also possible to constrain the dictionary and/or code to be positive to match constraints that may be present in the data. Below are the faces with different positivity constraints applied. Red in... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/decomposition.rst | main | scikit-learn | [
-0.04766840115189552,
0.0037488348316401243,
-0.017289044335484505,
-0.030985558405518532,
0.038862213492393494,
-0.07574868947267532,
0.02938855066895485,
-0.05628128722310066,
-0.07366060465574265,
-0.00787180196493864,
0.0521162748336792,
-0.054448749870061874,
0.057793863117694855,
0.0... | -0.01726 |
without any further assumptions the idea of having a latent variable :math:`h` would be superfluous -- :math:`x` can be completely modelled with a mean and a covariance. We need to impose some more specific structure on one of these two parameters. A simple additional assumption regards the structure of the error covar... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/decomposition.rst | main | scikit-learn | [
-0.025157185271382332,
-0.11198952794075012,
-0.021004172042012215,
0.03465244546532631,
0.0037424794863909483,
0.03951670229434967,
0.009419907815754414,
-0.006229887250810862,
0.04527128487825394,
-0.01033796090632677,
0.09402262419462204,
0.031209662556648254,
-0.009640530683100224,
0.0... | -0.021355 |
:math:`WH`. The most widely used distance function is the squared Frobenius norm, which is an obvious extension of the Euclidean norm to matrices: .. math:: d\_{\mathrm{Fro}}(X, Y) = \frac{1}{2} ||X - Y||\_{\mathrm{Fro}}^2 = \frac{1}{2} \sum\_{i,j} (X\_{ij} - {Y}\_{ij})^2 Unlike :class:`PCA`, the representation of a ve... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/decomposition.rst | main | scikit-learn | [
-0.053731732070446014,
-0.05056434124708176,
-0.10185831785202026,
-0.044723644852638245,
0.07714265584945679,
0.0003302463155705482,
-0.060703620314598083,
-0.022856002673506737,
0.06244940310716629,
-0.04136679321527481,
0.05982581153512001,
0.02444940246641636,
0.021235903725028038,
0.0... | 0.086874 |
as, for example, the (generalized) Kullback-Leibler (KL) divergence, also referred as I-divergence: .. math:: d\_{KL}(X, Y) = \sum\_{i,j} (X\_{ij} \log(\frac{X\_{ij}}{Y\_{ij}}) - X\_{ij} + Y\_{ij}) Or, the Itakura-Saito (IS) divergence: .. math:: d\_{IS}(X, Y) = \sum\_{i,j} (\frac{X\_{ij}}{Y\_{ij}} - \log(\frac{X\_{ij}... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/decomposition.rst | main | scikit-learn | [
-0.07100366055965424,
-0.09384847432374954,
-0.007731180172413588,
-0.05589741840958595,
-0.03079560585319996,
0.013354693539440632,
0.025114640593528748,
0.0352763868868351,
0.12075087428092957,
-0.0793561115860939,
0.04860714450478554,
0.010968327522277832,
-0.0333065465092659,
0.0401667... | 0.124435 |
factorization with the beta-divergence" <1010.1763>` C. Fevotte, J. Idier, 2011 .. [7] :arxiv:`"Online algorithms for nonnegative matrix factorization with the Itakura-Saito divergence" <1106.4198>` A. Lefevre, F. Bach, C. Fevotte, 2011 .. \_LatentDirichletAllocation: Latent Dirichlet Allocation (LDA) =================... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/decomposition.rst | main | scikit-learn | [
-0.033825214952230453,
-0.11302930116653442,
-0.08021390438079834,
-0.01092715747654438,
0.07667616754770279,
0.0749945268034935,
0.024412473663687706,
0.013037443161010742,
0.052718985825777054,
-0.01985197328031063,
0.059903841465711594,
0.06645923852920532,
0.037282492965459824,
0.06032... | 0.041953 |
is used when data can be fetched sequentially. .. rubric:: Examples \* :ref:`sphx\_glr\_auto\_examples\_applications\_plot\_topics\_extraction\_with\_nmf\_lda.py` .. rubric:: References \* `"Latent Dirichlet Allocation" `\_ D. Blei, A. Ng, M. Jordan, 2003 \* `"Online Learning for Latent Dirichlet Allocation” `\_ M. Hof... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/decomposition.rst | main | scikit-learn | [
-0.04700421914458275,
-0.0918898954987526,
-0.07063999027013779,
-0.03172305226325989,
0.06578430533409119,
0.1153821051120758,
0.01487761177122593,
0.031069884076714516,
0.045746803283691406,
-0.03316158428788185,
0.11723639070987701,
0.13367889821529388,
0.020712468773126602,
-0.00928351... | 0.104564 |
.. \_ensemble: =========================================================================== Ensembles: Gradient boosting, random forests, bagging, voting, stacking =========================================================================== .. currentmodule:: sklearn.ensemble \*\*Ensemble methods\*\* combine the predicti... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.09956887364387512,
-0.10874049365520477,
-0.010870425030589104,
0.05194336920976639,
0.06462769210338593,
0.009950493462383747,
-0.003366154385730624,
0.00350636662915349,
-0.051920000463724136,
-0.005682784598320723,
-0.12235803157091141,
-0.08759615570306778,
0.06150403618812561,
-0.0... | 0.100535 |
loss version is selected based on :term:`y` passed to :term:`fit`. The size of the trees can be controlled through the ``max\_leaf\_nodes``, ``max\_depth``, and ``min\_samples\_leaf`` parameters. The number of bins used to bin the data is controlled with the ``max\_bins`` parameter. Using less bins acts as a form of re... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
0.05690394341945648,
0.01603829301893711,
0.016457853838801384,
0.02605072408914566,
0.11926008015871048,
0.02669598162174225,
-0.01025361567735672,
0.014438199810683727,
-0.05267554149031639,
0.010743574239313602,
-0.035345274955034256,
-0.03522924333810806,
0.04183317720890045,
-0.091524... | 0.041466 |
HistGradientBoostingClassifier(min\_samples\_leaf=1).fit(X, y) >>> gbdt.predict(X) array([0, 0, 1, 1]) When the missingness pattern is predictive, the splits can be performed on whether the feature value is missing or not:: >>> X = np.array([0, np.nan, 1, 2, np.nan]).reshape(-1, 1) >>> y = [0, 1, 0, 0, 1] >>> gbdt = Hi... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.019705316051840782,
-0.0714949369430542,
0.014990836381912231,
0.00832286011427641,
0.13445861637592316,
0.041556622833013535,
-0.0055306158028542995,
-0.04203280061483383,
-0.1733388602733612,
-0.012513688765466213,
-0.053708530962467194,
-0.08105607330799103,
0.03467053920030594,
-0.0... | -0.012688 |
the :math:`2^{K - 1} - 1` partitions, where :math:`K` is the number of categories. This can quickly become prohibitive when :math:`K` is large. Fortunately, since gradient boosting trees are always regression trees (even for classification problems), there exists a faster strategy that can yield equivalent splits. Firs... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.028816252946853638,
-0.035736650228500366,
0.06734434515237808,
0.005630994215607643,
0.00054958276450634,
-0.01930948719382286,
-0.05804574117064476,
-0.03928282484412193,
-0.0006317013176158071,
0.04103011637926102,
-0.08644530922174454,
-0.011306648142635822,
-0.018118275329470634,
0... | -0.049093 |
may interact with each other, as well as features 1 and 2. But note that features 0 and 2 are forbidden to interact. The following depicts a tree and the possible splits of the tree: .. code-block:: none 1 <- Both constraint groups could be applied from now on / \ 1 2 <- Left split still fulfills both constraint groups... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.050427086651325226,
-0.04171590134501457,
-0.02477935142815113,
0.08480317890644073,
0.062495965510606766,
0.0032977897208184004,
0.023891840130090714,
0.003472972195595503,
-0.08775656670331955,
-0.04925161600112915,
0.0631217360496521,
-0.05578409135341644,
-0.0042466167360544205,
-0.... | 0.051068 |
789-798. :class:`GradientBoostingClassifier` and :class:`GradientBoostingRegressor` ---------------------------------------------------------------------------- The usage and the parameters of :class:`GradientBoostingClassifier` and :class:`GradientBoostingRegressor` are described below. The 2 most important parameters... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.11834178119897842,
-0.12211008369922638,
-0.06630084663629532,
-0.005645420867949724,
0.043513279408216476,
0.027134062722325325,
0.029661178588867188,
0.03365794196724892,
-0.1206764504313469,
-0.0006926270434632897,
-0.05043312534689903,
-0.10194997489452362,
0.05535295233130455,
-0.0... | 0.024647 |
boosting model. In general, a tree of depth ``h`` can capture interactions of order ``h`` . There are two ways in which the size of the individual regression trees can be controlled. If you specify ``max\_depth=h`` then complete binary trees of depth ``h`` will be grown. Such trees will have (at most) ``2\*\*h`` leaf n... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.07306451350450516,
0.01559432689100504,
0.015599190257489681,
-0.004992783069610596,
0.07066433131694794,
-0.05003616586327553,
-0.05929325520992279,
0.020529575645923615,
-0.017284104600548744,
0.009194585494697094,
-0.03442160785198212,
-0.042675331234931946,
0.009740808047354221,
-0.... | 0.048643 |
some kind of gradient descent in a functional space. .. note:: For some losses, e.g. ``'absolute\_error'`` where the gradients are :math:`\pm 1`, the values predicted by a fitted :math:`h\_m` are not accurate enough: the tree can only output integer values. As a result, the leaves values of the tree :math:`h\_m` are mo... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.10433825105428696,
-0.033054567873477936,
0.017444361001253128,
0.0386677011847496,
0.08906809985637665,
0.03195784613490105,
-0.026507152244448662,
0.03693084418773651,
0.050568580627441406,
0.055411774665117264,
-0.03845198452472687,
-0.009883973747491837,
0.04924847558140755,
-0.0662... | 0.140611 |
strongly interacts with the parameter ``n\_estimators``, the number of weak learners to fit. Smaller values of ``learning\_rate`` require larger numbers of weak learners to maintain a constant training error. Empirical evidence suggests that small values of ``learning\_rate`` favor better test error. [HTF]\_ recommend ... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.11713138967752457,
-0.09818286448717117,
0.0052547878585755825,
0.06331999599933624,
0.118157759308815,
-0.008672378025949001,
-0.04280881583690643,
0.06513282656669617,
-0.03716844320297241,
-0.04398399591445923,
-0.0004264838935341686,
0.0834030881524086,
0.016419872641563416,
-0.0582... | 0.029962 |
y) >>> clf.feature\_importances\_ array([0.107, 0.105, 0.113, 0.0987, 0.0947, 0.107, 0.0916, 0.0972, 0.0958, 0.0906]) Note that this computation of feature importance is based on entropy, and it is distinct from :func:`sklearn.inspection.permutation\_importance` which is based on permutation of the features. .. rubric:... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.08697874844074249,
-0.05259239301085472,
-0.011077932082116604,
-0.0622064545750618,
0.10196643322706223,
0.018487531691789627,
0.05695479363203049,
0.03733300417661667,
-0.054124731570482254,
-0.002260895213112235,
-0.023942070081830025,
0.055567722767591476,
0.022593991830945015,
0.03... | 0.064277 |
fit and predict. - Sequential boosting: In HGBT, the decision trees are built sequentially, where each tree is trained to correct the errors made by the previous ones. This allows them to iteratively improve the model's performance using relatively few trees. In contrast, random forests use a majority vote to predict t... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.03455273434519768,
-0.02143549919128418,
-0.015086970292031765,
0.021319517865777016,
0.12120974808931351,
-0.011845393106341362,
-0.021949680522084236,
0.028318993747234344,
-0.011438550427556038,
0.0026495272759348154,
-0.09115370362997055,
0.013430987484753132,
-0.09385132044553757,
... | 0.007818 |
mind though that these values are usually not optimal, and might result in models that consume a lot of RAM. The best parameter values should always be cross-validated. In addition, note that in random forests, bootstrap samples are used by default (``bootstrap=True``) while the default strategy for extra-trees is to u... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
0.03921174257993698,
0.005798506550490856,
0.004059457685798407,
0.09024135768413544,
0.11268290132284164,
-0.0771966278553009,
-0.05013618618249893,
0.06095574423670769,
-0.03897637873888016,
0.02892850898206234,
-0.06363902986049652,
-0.03182322159409523,
-0.022449316456913948,
-0.038348... | -0.023969 |
estimates are stored as an attribute named ``feature\_importances\_`` on the fitted model. This is an array with shape ``(n\_features,)`` whose values are positive and sum to 1.0. The higher the value, the more important is the contribution of the matching feature to the prediction function. .. rubric:: Examples \* :re... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.046986017376184464,
0.003014080459252,
0.055797699838876724,
0.049503978341817856,
0.12977570295333862,
-0.03567860648036003,
0.024212120100855827,
-0.0030877606477588415,
-0.03172862157225609,
0.020113715901970863,
-0.07885083556175232,
-0.025304006412625313,
0.00929251778870821,
0.006... | 0.041528 |
model, without making it necessary to adapt the underlying base algorithm. As they provide a way to reduce overfitting, bagging methods work best with strong and complex models (e.g., fully developed decision trees), in contrast with boosting methods which usually work best with weak models (e.g., shallow decision tree... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.07443500310182571,
-0.014123027212917805,
0.06260960549116135,
-0.0006967730005271733,
0.12033900618553162,
-0.04650183022022247,
0.007862471044063568,
-0.00025437265867367387,
0.03550079092383385,
-0.006006930023431778,
-0.05155991017818451,
0.04912463575601578,
0.02401849627494812,
-0... | 0.13138 |
example shows how to fit the majority rule classifier:: >>> from sklearn import datasets >>> from sklearn.model\_selection import cross\_val\_score >>> from sklearn.linear\_model import LogisticRegression >>> from sklearn.naive\_bayes import GaussianNB >>> from sklearn.ensemble import RandomForestClassifier >>> from sk... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
0.01096834521740675,
-0.10145198553800583,
0.01714226044714451,
-0.08435552567243576,
0.13180407881736755,
-0.08718670159578323,
-0.03010292910039425,
-0.0001812318223528564,
-0.09630659967660904,
0.045411497354507446,
-0.00508423987776041,
-0.111470066010952,
0.0667557418346405,
-0.142177... | -0.026388 |
set of equally well performing models in order to balance out their individual weaknesses. Usage ----- The following example shows how to fit the VotingRegressor:: >>> from sklearn.datasets import load\_diabetes >>> from sklearn.ensemble import GradientBoostingRegressor >>> from sklearn.ensemble import RandomForestRegr... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.050492312759160995,
-0.09120240807533264,
-0.022073183208703995,
0.052983127534389496,
0.04664396122097969,
0.01460884977132082,
-0.06176550313830376,
0.05725886672735214,
-0.03966183215379715,
-0.04797857999801636,
-0.1417832225561142,
-0.029118381440639496,
0.05551774799823761,
-0.112... | -0.041705 |
predicted by each estimator are perfectly collinear. .. note:: Multiple stacking layers can be achieved by assigning `final\_estimator` to a :class:`StackingClassifier` or :class:`StackingRegressor`:: >>> final\_layer\_rfr = RandomForestRegressor( ... n\_estimators=10, max\_features=1, max\_leaf\_nodes=5,random\_state=... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.04585257172584534,
-0.19342710077762604,
0.013391983695328236,
0.0444972962141037,
0.08996748924255371,
0.011608597822487354,
-0.07096751034259796,
-0.056854862719774246,
-0.006640494801104069,
0.009166250936686993,
0.014245189726352692,
-0.08851651847362518,
0.027864353731274605,
-0.05... | -0.108146 |
"Multi-class AdaBoost", 2009. .. [D1997] H. Drucker. "Improving Regressors using Boosting Techniques", 1997. .. [HTF] T. Hastie, R. Tibshirani and J. Friedman, "Elements of Statistical Learning Ed. 2", Springer, 2009. | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/ensemble.rst | main | scikit-learn | [
-0.15833978354930878,
-0.07965286076068878,
-0.01934637688100338,
0.04568104073405266,
0.07463105022907257,
0.03183441236615181,
-0.006340601947158575,
0.007550220470875502,
-0.060998886823654175,
-0.007039729971438646,
-0.029028235003352165,
0.05841232091188431,
0.04641683027148247,
-0.05... | 0.054897 |
.. \_array\_api: ================================ Array API support (experimental) ================================ .. currentmodule:: sklearn The `array API `\_\_ specification defines a standard API for all array manipulation libraries with a NumPy-like API. Some scikit-learn estimators that primarily rely on NumPy (... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/array_api.rst | main | scikit-learn | [
-0.09749629348516464,
-0.0253704022616148,
-0.06941546499729156,
0.010465006344020367,
0.026320666074752808,
-0.13221177458763123,
-0.06315501034259796,
-0.050968725234270096,
-0.06623948365449905,
-0.01498019602149725,
-0.07588329911231995,
-0.03988693282008171,
-0.013782897032797337,
-0.... | 0.236354 |
X\_np, y\_np = make\_classification(random\_state=0) >>> X\_torch = torch.asarray(X\_np, device="cuda", dtype=torch.float32) >>> y\_torch = torch.asarray(y\_np, device="cuda", dtype=torch.float32) >>> with config\_context(array\_api\_dispatch=True): ... lda = LinearDiscriminantAnalysis() ... X\_trans = lda.fit\_transfo... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/array_api.rst | main | scikit-learn | [
-0.07739032059907913,
-0.06218920275568962,
-0.017616087570786476,
-0.020018691197037697,
0.008642509579658508,
-0.0350215844810009,
0.039453864097595215,
-0.04723052680492401,
-0.08741798996925354,
-0.05160563066601753,
0.004555398132652044,
-0.04719939082860947,
-0.11342109739780426,
0.0... | 0.089109 |
scoring functions the rule is \*\*"everything follows\*\* `y\_pred` \*\*"\*\* - mixed array inputs are converted so that they all match the array library and device of `y\_pred`. When a function or method has been called with array API compatible inputs, the convention is to return arrays from the same array library an... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/array_api.rst | main | scikit-learn | [
-0.017685560509562492,
-0.04112599417567253,
-0.014857728965580463,
0.00047095061745494604,
0.07929728180170059,
-0.09082591533660889,
0.023774711415171623,
-0.03181219846010208,
-0.010977853089571,
-0.023479724302887917,
-0.05214358866214752,
-0.025853684172034264,
-0.01508813165128231,
0... | 0.143696 |
that it supports the array API. This will enable dedicated checks as part of the common tests to verify that the estimators' results are the same when using vanilla NumPy and array API inputs. To run these checks you need to install `array-api-strict `\_\_ in your test environment. This allows you to run checks without... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/array_api.rst | main | scikit-learn | [
0.030734756961464882,
-0.03225520998239517,
-0.058188196271657944,
0.009447856806218624,
0.10593032836914062,
-0.1145358756184578,
-0.0446016862988472,
-0.028739318251609802,
-0.08521691709756851,
-0.012940909713506699,
-0.06974786520004272,
-0.01277933269739151,
-0.03813429921865463,
0.02... | 0.163438 |
.. currentmodule:: sklearn.model\_selection .. \_threshold\_tuning: ================================================== Tuning the decision threshold for class prediction ================================================== Classification is best divided into two parts: \* the statistical problem of learning a model to pr... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/classification_threshold.rst | main | scikit-learn | [
-0.08039921522140503,
-0.03143833950161934,
-0.008704247884452343,
0.03549159690737724,
0.08888706564903259,
-0.07458311319351196,
0.05647639185190201,
0.06159765645861626,
-0.0014646505005657673,
0.008610754273831844,
-0.0657646656036377,
-0.0917482003569603,
0.0650365799665451,
-0.040889... | 0.108943 |
class of interest for a very low probability (around 0.02). This decision threshold optimizes a utility metric defined by the business (in this case an insurance company). .. figure:: ../auto\_examples/model\_selection/images/sphx\_glr\_plot\_cost\_sensitive\_learning\_002.png :target: ../auto\_examples/model\_selectio... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/classification_threshold.rst | main | scikit-learn | [
-0.060940779745578766,
-0.025669286027550697,
-0.06278136372566223,
-0.06316132098436356,
0.04819256439805031,
-0.0894695296883583,
0.08140929788351059,
0.05745331197977066,
0.05103307589888573,
0.06566382944583893,
-0.033482037484645844,
-0.05775746703147888,
0.028204595670104027,
-0.0104... | 0.100384 |
tuning. | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/classification_threshold.rst | main | scikit-learn | [
-0.027866121381521225,
0.004934312310069799,
-0.026651864871382713,
0.0167776457965374,
-0.0912560299038887,
-0.04720284789800644,
0.09715487062931061,
-0.02498621679842472,
-0.010094063356518745,
-0.02867765538394451,
-0.036017484962940216,
0.040487807244062424,
-0.007433295249938965,
-0.... | 0.178613 |
.. \_kernel\_ridge: =========================== Kernel ridge regression =========================== .. currentmodule:: sklearn.kernel\_ridge Kernel ridge regression (KRR) [M2012]\_ combines :ref:`ridge\_regression` (linear least squares with :math:`L\_2`-norm regularization) with the `kernel trick `\_. It thus learns a... | https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/kernel_ridge.rst | main | scikit-learn | [
-0.1338331401348114,
-0.08445383608341217,
-0.0330464132130146,
0.0036645811051130295,
0.10162992775440216,
0.006419527810066938,
-0.012385213747620583,
0.011506200768053532,
0.03968784958124161,
0.057544611394405365,
0.008709771558642387,
0.08939172327518463,
-0.0009330221218988299,
-0.02... | 0.083738 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.