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
.. \_neural\_networks\_supervised: ================================== Neural network models (supervised) ================================== .. currentmodule:: sklearn.neural\_network .. warning:: This implementation is not intended for large-scale applications. In particular, scikit-learn offers no GPU support. For muc...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neural_networks_supervised.rst
main
scikit-learn
[ -0.07056731730699539, -0.09669746458530426, -0.04441114515066147, -0.008536227978765965, 0.07561904937028885, -0.045722369104623795, -0.09047214686870575, -0.027194058522582054, -0.04741682857275009, -0.07774800807237625, -0.06693743914365768, 0.008442089892923832, -0.07527030259370804, 0....
0.16632
supports only the Cross-Entropy loss function, which allows probability estimates by running the ``predict\_proba`` method. MLP trains using Backpropagation. More precisely, it trains using some form of gradient descent and the gradients are calculated using Backpropagation. For classification, it minimizes the Cross-E...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neural_networks_supervised.rst
main
scikit-learn
[ -0.06323490291833878, -0.12143224477767944, -0.045407719910144806, -0.05113627016544342, 0.11053948104381561, 0.01597166806459427, 0.013378588482737541, 0.02393485978245735, -0.03155104070901871, -0.02461981400847435, -0.08113288879394531, -0.054418355226516724, 0.024125827476382256, -0.03...
0.06946
\cdot h \cdot h + h \cdot o))`, where :math:`i` is the number of iterations. Since backpropagation has a high time complexity, it is advisable to start with smaller number of hidden neurons and few hidden layers for training. .. dropdown:: Mathematical formulation Given a set of training examples :math:`\{(x\_1, y\_1),...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neural_networks_supervised.rst
main
scikit-learn
[ -0.08864082396030426, -0.11341901123523712, -0.00028364534955471754, 0.0017802661750465631, 0.021468231454491615, 0.026248903945088387, 0.020049868151545525, -0.04455941170454025, -0.01174095831811428, -0.028891703113913536, -0.0033760007936507463, 0.017252638936042786, 0.03536003455519676, ...
0.041174
standardize it to have mean 0 and variance 1. Note that you must apply the \*same\* scaling to the test set for meaningful results. You can use :class:`~sklearn.preprocessing.StandardScaler` for standardization. >>> from sklearn.preprocessing import StandardScaler # doctest: +SKIP >>> scaler = StandardScaler() # doctes...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neural_networks_supervised.rst
main
scikit-learn
[ 0.000490740523673594, -0.0020397291518747807, -0.02158243954181671, -0.011131995357573032, -0.057964399456977844, -0.04576728492975235, -0.040452517569065094, 0.036834631115198135, -0.10967245697975159, -0.04227130115032196, 0.0041214763186872005, -0.057498082518577576, -0.005350311752408743...
0.020061
.. \_linear\_model: ============= Linear Models ============= .. currentmodule:: sklearn.linear\_model The following are a set of methods intended for regression in which the target value is expected to be a linear combination of the features. In mathematical notation, the predicted value :math:`\hat{y}` can be written...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.05766735225915909, -0.10348507016897202, -0.06662443280220032, 0.01735454797744751, 0.09150569140911102, -0.005476490594446659, 0.030182568356394768, 0.013171227648854256, -0.05391208454966545, -0.008844935335218906, 0.03514485061168671, 0.010854939930140972, -0.031108565628528595, 0.06...
0.094369
specified, :class:`Ridge` will choose between the `"lbfgs"`, `"cholesky"`, and `"sparse\_cg"` solvers. :class:`Ridge` will begin checking the conditions shown in the following table from top to bottom. If the condition is true, the corresponding solver is chosen. +-------------+-----------------------------------------...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.10367961972951889, 0.005198994651436806, -0.0729803815484047, -0.024795860052108765, -0.021803133189678192, -0.051229219883680344, 0.01601702719926834, 0.039382364600896835, -0.05374303460121155, 0.04518202319741249, 0.06225080043077469, -0.03707707300782204, 0.01709222048521042, -0.061...
-0.036094
consists of a linear model with an added regularization term. The objective function to minimize is: .. math:: \min\_{w} P(w) = {\frac{1}{2n\_{\text{samples}}} ||X w - y||\_2 ^ 2 + \alpha ||w||\_1} The lasso estimate thus solves the least-squares with added penalty :math:`\alpha ||w||\_1`, where :math:`\alpha` is a con...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.01743023656308651, -0.04905671626329422, -0.09274324774742126, 0.034188877791166306, 0.0891127809882164, 0.00465955026447773, 0.02727002091705799, 0.017576513811945915, -0.08893506228923798, 0.03570159524679184, 0.012134484015405178, 0.0758383572101593, -0.04226545989513397, 0.004566777...
0.090285
can safely exclude, i.e., set to zero with certainty. .. dropdown:: References The first reference explains the coordinate descent solver used in scikit-learn, the others treat gap safe screening rules. \* :doi:`Friedman, Hastie & Tibshirani. (2010). Regularization Path For Generalized linear Models by Coordinate Desce...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.07396185398101807, -0.006494174711406231, -0.01375554408878088, 0.0032083173282444477, 0.1192661002278328, 0.019748980179429054, -0.04423520341515541, -0.031230401247739792, -0.07492615282535553, -0.0013825449859723449, -0.006670157890766859, 0.10009448230266571, -0.031153732910752296, ...
0.029384
discarded since it is a constant when :math:`\sigma^2` is provided. In addition, it is sometimes stated that the AIC is equivalent to the :math:`C\_p` statistic [12]\_. In a strict sense, however, it is equivalent only up to some constant and a multiplicative factor. At last, we mentioned above that :math:`\sigma^2` is...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.009275809861719608, -0.10337728261947632, 0.02556367963552475, 0.0658838078379631, 0.04602862522006035, 0.016300924122333527, 0.043116070330142975, 0.046918563544750214, -0.04216712340712547, 0.05395076423883438, 0.04891500249505043, 0.025826087221503258, -0.02418232522904873, -0.004388...
0.147501
+ \alpha \rho ||w||\_1 + \frac{\alpha(1-\rho)}{2} ||w||\_2 ^ 2} .. figure:: ../auto\_examples/linear\_model/images/sphx\_glr\_plot\_lasso\_lasso\_lars\_elasticnet\_path\_002.png :target: ../auto\_examples/linear\_model/plot\_lasso\_lasso\_lars\_elasticnet\_path.html :align: center :scale: 50% The class :class:`ElasticN...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.028187235817313194, -0.06909073144197464, -0.11695980280637741, -0.011918069794774055, 0.10495501756668091, 0.02469252608716488, 0.005755985155701637, 0.011609718203544617, -0.08006273210048676, 0.01813584379851818, 0.04341365769505501, -0.036520980298519135, 0.008107133209705353, 0.089...
0.095998
>>> from sklearn import linear\_model >>> reg = linear\_model.LassoLars(alpha=.1) >>> reg.fit([[0, 0], [1, 1]], [0, 1]) LassoLars(alpha=0.1) >>> reg.coef\_ array([0.6, 0. ]) .. rubric:: Examples \* :ref:`sphx\_glr\_auto\_examples\_linear\_model\_plot\_lasso\_lasso\_lars\_elasticnet\_path.py` The LARS algorithm provides...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.04260465130209923, -0.07496237754821777, -0.04658694937825203, -0.01728709414601326, 0.09438753873109818, -0.028162727132439613, -0.002884599147364497, -0.006739265285432339, -0.02627122402191162, 0.06559453159570694, 0.015610300935804844, 0.06411771476268768, -0.030151426792144775, -0....
0.032212
`\_\_. \* Original Algorithm is detailed in the book `Bayesian learning for neural networks `\_\_ by Radford M. Neal. .. \_bayesian\_ridge\_regression: Bayesian Ridge Regression ------------------------- :class:`BayesianRidge` estimates a probabilistic model of the regression problem as described above. The prior for t...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.13355448842048645, -0.05552781745791435, 0.015260531567037106, -0.024605754762887955, 0.010213085450232029, 0.0055811139754951, 0.05323053523898125, 0.05494336783885956, 0.032952114939689636, 0.0444125235080719, 0.09457720071077347, 0.13789822161197662, 0.039024464786052704, -0.00401451...
0.026523
View of Automatic Relevance Determination `\_ .. [3] Michael E. Tipping: `Sparse Bayesian Learning and the Relevance Vector Machine `\_ .. [4] Tristan Fletcher: `Relevance Vector Machines Explained `\_ .. \_Logistic\_regression: Logistic regression =================== The logistic regression is implemented in :class:`L...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.03101547434926033, -0.04887457564473152, -0.042115334421396255, -0.011858594603836536, 0.056364092975854874, -0.029220236465334892, 0.05499346926808357, 0.08214755356311798, 0.004228068049997091, -0.011287064291536808, -0.019162066280841827, 0.040659911930561066, 0.03472196310758591, 0....
0.125927
since then the solution may not be unique, as shown in [16]\_. .. dropdown:: Mathematical details Let :math:`y\_i \in \{1, \ldots, K\}` be the label (ordinal) encoded target variable for observation :math:`i`. Instead of a single coefficient vector, we now have a matrix of coefficients :math:`W` where each row vector :...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.07371994853019714, -0.02871795743703842, -0.04122215136885643, 0.0011729162652045488, 0.13486772775650024, -0.01180177554488182, 0.04488382488489151, -0.031095365062355995, -0.011713934130966663, 0.02472180873155594, 0.029782608151435852, -0.09728129953145981, 0.04600924998521805, -0.00...
-0.037022
sparse multinomial logistic regression. It is also the only solver that supports Elastic-Net (`0 < l1\_ratio < 1`). \* The "lbfgs" is an optimization algorithm that approximates the Broyden–Fletcher–Goldfarb–Shanno algorithm [8]\_, which belongs to quasi-Newton methods. As such, it can deal with a wide range of differe...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.05313386768102646, -0.11456461995840073, -0.037572238594293594, 0.0045334952883422375, 0.03754691779613495, -0.06425388157367706, -0.08041048049926758, 0.022567451000213623, -0.057551417499780655, 0.029277436435222626, -0.020808707922697067, 0.024939103052020073, -0.0492636114358902, -0...
0.143488
Probability Density Functions (PDF) of these distributions are illustrated in the following figure, .. figure:: ./glm\_data/poisson\_gamma\_tweedie\_distributions.png :align: center :scale: 100% PDF of a random variable Y following Poisson, Tweedie (power=1.5) and Gamma distributions with different mean values (:math:`...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ 0.041585035622119904, -0.044736072421073914, -0.013132604770362377, -0.02014286257326603, -0.0025617366190999746, -0.10402467101812363, 0.08155152946710587, -0.028076067566871643, 0.07696244865655899, 0.013939032331109047, 0.028297830373048782, -0.03894241526722908, 0.07351198047399521, 0....
-0.108953
to `TweedieRegressor(power=2, link='log')`. - ``power = 3``: Inverse Gaussian distribution. The link function is determined by the `link` parameter. Usage example:: >>> from sklearn.linear\_model import TweedieRegressor >>> reg = TweedieRegressor(power=1, alpha=0.5, link='log') >>> reg.fit([[0, 0], [0, 1], [2, 2]], [0,...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.011811355128884315, -0.0786975622177124, -0.04798592999577522, 0.026809222996234894, 0.008793207816779613, -0.07160069793462753, 0.05446483567357063, -0.009331203997135162, -0.009331203065812588, -0.012640592642128468, 0.0463394820690155, -0.0282170120626688, 0.002861975459381938, 0.034...
-0.055028
different things to keep in mind when dealing with data corrupted by outliers: .. |y\_outliers| image:: ../auto\_examples/linear\_model/images/sphx\_glr\_plot\_robust\_fit\_003.png :target: ../auto\_examples/linear\_model/plot\_robust\_fit.html :scale: 60% .. |X\_outliers| image:: ../auto\_examples/linear\_model/images...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.03127560764551163, -0.05638172850012779, 0.0271438080817461, 0.04998046159744263, 0.08605339378118515, -0.10853873938322067, -0.0033840809483081102, 0.08663191646337509, -0.07560648024082184, -0.037302322685718536, 0.10919182002544403, 0.004786805249750614, 0.0723925307393074, 0.0092232...
0.018398
These steps are performed either a maximum number of times (``max\_trials``) or until one of the special stop criteria are met (see ``stop\_n\_inliers`` and ``stop\_score``). The final model is estimated using all inlier samples (consensus set) of the previously determined best model. The ``is\_data\_valid`` and ``is\_...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.06671881675720215, -0.030790681019425392, 0.004184710793197155, 0.016128521412611008, 0.062047090381383896, -0.10041588544845581, -0.09832850098609924, 0.08287152647972107, -0.004661426413804293, -0.0059759411960840225, 0.01078044343739748, 0.0719764232635498, 0.014532629400491714, -0.0...
0.119492
by .. math:: H\_{\epsilon}(z) = \begin{cases} z^2, & \text {if } |z| < \epsilon, \\ 2\epsilon|z| - \epsilon^2, & \text{otherwise} \end{cases} It is advised to set the parameter ``epsilon`` to 1.35 to achieve 95% statistical efficiency. .. rubric:: References \* Peter J. Huber, Elvezio M. Ronchetti: Robust Statistics, C...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.032202769070863724, -0.018238386139273643, -0.017065929248929024, 0.07077783346176147, 0.011510903015732765, -0.027600688859820366, -0.01485239528119564, 0.11285927891731262, -0.005450299941003323, -0.07931900024414062, 0.07798382639884949, 0.02564440667629242, 0.1322840452194214, -0.06...
0.05064
.. \_polynomial\_regression: Polynomial regression: extending linear models with basis functions =================================================================== .. currentmodule:: sklearn.preprocessing One common pattern within machine learning is to use linear models trained on nonlinear functions of the data. Thi...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.06880504637956619, -0.04729097709059715, -0.01191532053053379, -0.016064833849668503, 0.030269775539636612, -0.04403252527117729, -0.07518471032381058, -0.025795914232730865, -0.044868819415569305, 0.015097405761480331, -0.024569928646087646, 0.037463944405317307, -0.033261921256780624, ...
0.150694
can be gotten from :class:`PolynomialFeatures` with the setting ``interaction\_only=True``. For example, when dealing with boolean features, :math:`x\_i^n = x\_i` for all :math:`n` and is therefore useless; but :math:`x\_i x\_j` represents the conjunction of two booleans. This way, we can solve the XOR problem with a l...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/linear_model.rst
main
scikit-learn
[ -0.017428064718842506, 0.0014062434202060103, -0.0283182505518198, -0.018405519425868988, 0.04632025957107544, -0.05135485529899597, 0.052624501287937164, -0.12561143934726715, -0.053775444626808167, -0.012625733390450478, 0.03259211406111717, -0.04110023379325867, 0.043822042644023895, 0....
0.019247
.. \_clustering: ========== Clustering ========== `Clustering `\_\_ of unlabeled data can be performed with the module :mod:`sklearn.cluster`. Each clustering algorithm comes in two variants: a class, that implements the ``fit`` method to learn the clusters on train data, and a function, that, given train data, returns...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.02556239441037178, -0.05363903194665909, -0.12555453181266785, 0.011049767956137657, 0.08306621760129929, 0.03907050937414169, 0.04605173319578171, -0.08472103625535965, -0.10448063164949417, -0.08665840327739716, 0.06608154624700546, 0.0013858623569831252, 0.07207535207271576, -0.04170...
0.178668
is useful when the clusters have a specific shape, i.e. a non-flat manifold, and the standard euclidean distance is not the right metric. This case arises in the two top rows of the figure above. Gaussian mixture models, useful for clustering, are described in :ref:`another chapter of the documentation ` dedicated to m...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.009736282750964165, -0.10333973169326782, 0.016703106462955475, -0.027883905917406082, 0.0888359546661377, 0.010253334417939186, -0.020652921870350838, -0.05540013313293457, 0.0073030549101531506, 0.004274341743439436, 0.06477752327919006, -0.034986089915037155, 0.08241122961044312, -0....
0.185289
Each segment in the Voronoi diagram becomes a separate cluster. Secondly, the centroids are updated to the mean of each segment. The algorithm then repeats this until a stopping criterion is fulfilled. Usually, the algorithm stops when the relative decrease in the objective function between iterations is less than the ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ 0.010270425118505955, -0.04090201109647751, 0.037438880652189255, -0.08215335756540298, -0.041926342993974686, -0.1461135894060135, -0.06668256968259811, -0.00989923533052206, 0.050278306007385254, -0.040770649909973145, 0.019332803785800934, 0.024799847975373268, 0.008687208406627178, -0....
0.085261
steps are performed until convergence or a predetermined number of iterations is reached. :class:`MiniBatchKMeans` converges faster than :class:`KMeans`, but the quality of the results is reduced. In practice this difference in quality can be quite small, as shown in the example and cited reference. .. figure:: ../auto...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.014070505276322365, -0.024729298427700996, -0.03821321949362755, 0.023394964635372162, 0.043756019324064255, -0.03386157751083374, -0.07377363741397858, 0.00845348834991455, -0.04939956218004227, 0.001982244197279215, 0.07739295065402985, -0.018732301890850067, 0.05024980753660202, -0.0...
0.137154
= \lambda\cdot r\_{t}(i, k) + (1-\lambda)\cdot r\_{t+1}(i, k) .. math:: a\_{t+1}(i, k) = \lambda\cdot a\_{t}(i, k) + (1-\lambda)\cdot a\_{t+1}(i, k) where :math:`t` indicates the iteration times. .. rubric:: Examples \* :ref:`sphx\_glr\_auto\_examples\_cluster\_plot\_affinity\_propagation.py`: Affinity Propagation on a...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.0840439423918724, -0.09180503338575363, -0.05885864794254303, 0.015304124914109707, -0.028684956952929497, -0.043593019247055054, 0.08867116272449493, -0.010396996513009071, 0.013207860291004181, -0.011165968142449856, 0.08034108579158783, -0.028152480721473694, 0.07101556658744812, 0.0...
0.191286
clusters, but is not advised for many clusters. For two clusters, SpectralClustering solves a convex relaxation of the `normalized cuts `\_ problem on the similarity graph: cutting the graph in two so that the weight of the edges cut is small compared to the weights of the edges inside each cluster. This criteria is es...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ 0.0057280040346086025, -0.08546283841133118, -0.00024366828438360244, -0.015380092896521091, 0.037667471915483475, -0.039245426654815674, -0.040812406688928604, -0.04592347517609596, -0.03303025662899017, -0.02658945508301258, 0.023129191249608994, -0.0944303572177887, 0.04125645384192467, ...
0.068781
the unique cluster that gathers all the samples, the leaves being the clusters with only one sample. See the `Wikipedia page `\_ for more details. The :class:`AgglomerativeClustering` object performs a hierarchical clustering using a bottom up approach: each observation starts in its own cluster, and clusters are succe...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ 0.007788991555571556, -0.09139620512723923, -0.00012636843894142658, -0.011346372775733471, 0.04205480217933655, -0.02695481665432453, -0.009201093576848507, 0.022935129702091217, 0.011587527580559254, -0.013193563558161259, -0.016861379146575928, -0.009780311957001686, 0.03854290395975113, ...
0.164377
at the intersection of a row and a column with indices of the dataset that should be connected. This matrix can be constructed from a-priori information: for instance, you may wish to cluster web pages by only merging pages with a link pointing from one to another. It can also be learned from the data, for instance usi...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.0032348723616451025, -0.06609781086444855, -0.08768690377473831, 0.02972455322742462, 0.12252186983823776, -0.04081897810101509, -0.03867620229721069, -0.04709051549434662, -0.043681539595127106, 0.014198551885783672, 0.06678701937198639, 0.0007293148664757609, 0.05327685922384262, -0.0...
0.049503
as accurate as picking by inertia and is faster (especially for larger amount of data points, where calculating error may be costly). Picking by largest amount of data points will also likely produce clusters of similar sizes while `KMeans` is known to produce clusters of different sizes. Difference between Bisecting K...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ 0.017594514414668083, -0.006701371632516384, -0.0030412967316806316, -0.019275857135653496, 0.07109671086072922, -0.09985046088695526, -0.004327077884227037, -0.006716150790452957, 0.08121924102306366, 0.0378069132566452, 0.051032137125730515, 0.0008693080744706094, 0.07880578190088272, -0...
0.15936
as ``-1`` for "noise"). When chosen too large, it causes close clusters to be merged into one cluster, and eventually the entire data set to be returned as a single cluster. Some heuristics for choosing this parameter have been discussed in the literature, for example based on a knee in the nearest neighbor distances p...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ 0.013537385500967503, -0.08394725620746613, -0.029217103496193886, 0.05260607600212097, 0.1318599432706833, -0.07582645118236542, 0.02523828111588955, 0.005216421093791723, -0.04996880143880844, -0.03738494962453842, 0.015779418870806694, -0.021933188661932945, 0.08900109678506851, -0.0546...
0.168771
P., & Xu, X. (2017). In ACM Transactions on Database Systems (TODS), 42(3), 19. .. \_hdbscan: HDBSCAN ======= The :class:`HDBSCAN` algorithm can be seen as an extension of :class:`DBSCAN` and :class:`OPTICS`. Specifically, :class:`DBSCAN` assumes that the clustering criterion (i.e. density requirement) is \*globally ho...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.03254014998674393, -0.0858856588602066, -0.09060903638601303, 0.03842925652861595, 0.05460968241095543, -0.044319771230220795, 0.05062412843108177, -0.06808541715145111, -0.12422644346952438, 0.0345025509595871, -0.021127596497535706, -0.03010423481464386, 0.15528719127178192, -0.038774...
0.106971
image:: ../auto\_examples/cluster/images/sphx\_glr\_plot\_hdbscan\_007.png :target: ../auto\_examples/cluster/plot\_hdbscan.html :scale: 75 .. centered:: |hdbscan\_ground\_truth| .. centered:: |hdbscan\_results| HDBSCAN can be smoothed with an additional hyperparameter `min\_cluster\_size` which specifies that during t...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.015905847772955894, -0.08913429826498032, 0.015017147175967693, 0.004328556824475527, 0.050793882459402084, -0.04749304801225662, 0.02055535465478897, -0.009586159139871597, -0.05305764451622963, -0.047169748693704605, -0.029441140592098236, -0.06102387607097626, 0.1320538967847824, -0....
0.07563
the first samples of each dense area processed by OPTICS have a large reachability value while being close to other points in their area, and will thus sometimes be marked as noise rather than periphery. This affects adjacent points when they are considered as candidates for being marked as either periphery or noise. N...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ 0.05898580327630043, -0.1095602810382843, -0.04791044443845749, -0.040684279054403305, 0.019911563023924828, -0.1216774508357048, 0.021338781341910362, -0.06016497313976288, -0.018254825845360756, 0.026278801262378693, -0.08231157809495926, 0.03911009430885315, 0.08088185638189316, -0.0182...
0.100356
Node. It is then merged with the subcluster of the root, that has the smallest radius after merging, constrained by the threshold and branching factor conditions. If the subcluster has any child node, then this is done repeatedly till it reaches a leaf. After finding the nearest subcluster in the leaf, the properties o...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.011551971547305584, -0.042260803282260895, -0.03036010079085827, -0.018509266898036003, 0.11942008137702942, -0.047555286437273026, -0.0701124295592308, 0.013459568843245506, 0.07191980630159378, 0.016985664144158363, 0.09292510896921158, -0.03733998164534569, -0.012448866851627827, -0....
0.063083
all clustering metrics, one can permute 0 and 1 in the predicted labels, rename 2 to 3, and get the same score:: >>> labels\_pred = [1, 1, 0, 0, 3, 3] >>> metrics.rand\_score(labels\_true, labels\_pred) 0.66 >>> metrics.adjusted\_rand\_score(labels\_true, labels\_pred) 0.24 Furthermore, both :func:`rand\_score` and :fu...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.005950598977506161, -0.06634208559989929, -0.06076349318027496, 0.045156653970479965, 0.02033347636461258, 0.016949381679296494, 0.06491999328136444, -0.019919658079743385, -0.028536861762404442, -0.009681479074060917, 0.017942635342478752, -0.10616790503263474, 0.05984148383140564, -0....
0.045296
elements that are in different sets in C and in different sets in K The unadjusted Rand index is then given by: .. math:: \text{RI} = \frac{a + b}{C\_2^{n\_{samples}}} where :math:`C\_2^{n\_{samples}}` is the total number of possible pairs in the dataset. It does not matter if the calculation is performed on ordered pa...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.01323841605335474, 0.008212212473154068, -0.05854412913322449, 0.02616950310766697, 0.07152842730283737, 0.013339501805603504, 0.08309914171695709, -0.06130857393145561, 0.05779363960027695, -0.026559628546237946, -0.010208089835941792, -0.05740384757518768, 0.0665186271071434, -0.10347...
0.019703
human annotators (as in the supervised learning setting). However MI-based measures can also be useful in purely unsupervised setting as a building block for a Consensus Index that can be used for clustering model selection. - NMI and MI are not adjusted against chance. .. rubric:: Examples \* :ref:`sphx\_glr\_auto\_ex...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.045478455722332, -0.05370365455746651, 0.02104453556239605, 0.042141109704971313, 0.09950131922960281, -0.018480954691767693, 0.10651597380638123, 0.022545872256159782, 0.047202594578266144, -0.0239406730979681, 0.006725021172314882, -0.03511526435613632, 0.055611640214920044, 0.0397570...
0.13684
Correction for Chance". JMLR .. [YAT2016] Yang, Algesheimer, and Tessone, (2016). "A comparative analysis of community detection algorithms on artificial networks". Scientific Reports 6: 30750. `doi:10.1038/srep30750 `\_. .. \_homogeneity\_completeness: Homogeneity, completeness and V-measure --------------------------...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.01717199943959713, -0.029809245839715004, 0.050269726663827896, -0.005807004868984222, 0.07295601069927216, 0.018722163513302803, 0.04120371490716934, -0.023597735911607742, 0.05070335790514946, -0.03434262052178383, 0.03007114864885807, -0.1068398579955101, 0.0620550699532032, 0.041201...
0.028824
100 - These metrics \*\*require the knowledge of the ground truth classes\*\* while almost never available in practice or requires manual assignment by human annotators (as in the supervised learning setting). .. rubric:: Examples \* :ref:`sphx\_glr\_auto\_examples\_cluster\_plot\_adjusted\_for\_chance\_measures.py`: A...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.03121335059404373, -0.03967985883355141, -0.012620360590517521, -0.02670157141983509, 0.006473893765360117, 0.03763888403773308, 0.0366952009499073, 0.014397423714399338, -0.03220679983496666, -0.02070038765668869, -0.007504535373300314, -0.10250555723905563, 0.05445714294910431, 0.0419...
0.11764
instance). - \*\*Upper-bounded at 1\*\*: Values close to zero indicate two label assignments that are largely independent, while values close to one indicate significant agreement. Further, values of exactly 0 indicate \*\*purely\*\* independent label assignments and a FMI of exactly 1 indicates that the two label assi...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.042552173137664795, -0.05178160220384598, -0.040530525147914886, 0.019355114549398422, -0.006530156824737787, -0.008263081312179565, 0.005315595306456089, 0.01080701407045126, 0.006733134854584932, -0.06993184983730316, 0.04025990515947342, -0.06759175658226013, 0.053286317735910416, 0....
0.211253
import metrics >>> from sklearn.metrics import pairwise\_distances >>> from sklearn import datasets >>> X, y = datasets.load\_iris(return\_X\_y=True) In normal usage, the Calinski-Harabasz index is applied to the results of a cluster analysis: >>> import numpy as np >>> from sklearn.cluster import KMeans >>> kmeans\_mo...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.0538635328412056, -0.03159136697649956, -0.08983513712882996, 0.05599580332636833, 0.055111877620220184, 0.030408097431063652, 0.0377250500023365, 0.009281893260776997, 0.02918054535984993, -0.01365773193538189, 0.015634778887033463, -0.06165758892893791, 0.04121515527367592, -0.0106192...
0.14751
simple choice to construct :math:`R\_{ij}` so that it is nonnegative and symmetric is: .. math:: R\_{ij} = \frac{s\_i + s\_j}{d\_{ij}} Then the Davies-Bouldin index is defined as: .. math:: DB = \frac{1}{k} \sum\_{i=1}^k \max\_{i \neq j} R\_{ij} .. dropdown:: References \* Davies, David L.; Bouldin, Donald W. (1979). :...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ -0.07660907506942749, -0.026756688952445984, -0.026946978643536568, -0.012958724051713943, 0.06559117138385773, -0.04238711670041084, -0.005917245056480169, -0.004466807935386896, -0.038736533373594284, -0.062475305050611496, -0.01670088805258274, -0.021892789751291275, 0.048201508820056915,...
0.112202
of actual label values:: >>> from sklearn.metrics.cluster import pair\_confusion\_matrix >>> pair\_confusion\_matrix([0, 0, 1, 1], [0, 0, 1, 1]) array([[8, 0], [0, 4]]) :: >>> pair\_confusion\_matrix([0, 0, 1, 1], [1, 1, 0, 0]) array([[8, 0], [0, 4]]) Labelings that assign all classes members to the same clusters are c...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/clustering.rst
main
scikit-learn
[ 0.03422904387116432, -0.04129946976900101, -0.09739983081817627, -0.030808517709374428, 0.007128759287297726, -0.015070208348333836, 0.05199258774518967, -0.06693265587091446, -0.017283590510487556, -0.09079775214195251, 0.013619079254567623, -0.02720041759312153, 0.00029170099878683686, 0...
0.052111
.. \_biclustering: ============ Biclustering ============ Biclustering algorithms simultaneously cluster rows and columns of a data matrix. These clusters of rows and columns are known as biclusters. Each determines a submatrix of the original data matrix with some desired properties. For instance, given a matrix of sh...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/biclustering.rst
main
scikit-learn
[ 0.02191389724612236, -0.048732683062553406, -0.05805512145161629, -0.05481002479791641, 0.031232740730047226, -0.10492484271526337, -0.08782176673412323, -0.07881806790828705, -0.039900247007608414, -0.00926363468170166, -0.05647340416908264, -0.0015629188856109977, 0.033241260796785355, -...
0.128179
the original data matrix :math:`A` has shape :math:`m \times n`, the Laplacian matrix for the corresponding bipartite graph has shape :math:`(m + n) \times (m + n)`. However, in this case it is possible to work directly with :math:`A`, which is smaller and more efficient. The input matrix :math:`A` is preprocessed as f...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/biclustering.rst
main
scikit-learn
[ -0.03818059340119362, -0.014236542396247387, -0.08835099637508392, -0.06611424684524536, -0.0192902572453022, -0.01658022776246071, -0.05697528272867203, -0.024829154834151268, -0.029822735115885735, 0.05186838284134865, 0.037968993186950684, 0.020160948857665062, -0.002322350163012743, 0....
-0.001073
v\_{p+1}` except in the case of log normalization. Given these singular vectors, they are ranked according to which can be best approximated by a piecewise-constant vector. The approximations for each vector are found using one-dimensional k-means and scored using the Euclidean distance. Some subset of the best left an...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/biclustering.rst
main
scikit-learn
[ 0.015313551761209965, -0.07345552742481232, -0.02685989812016487, -0.06176371872425079, 0.08165642619132996, -0.05151468887925148, -0.025542763993144035, 0.04714834317564964, 0.03302625194191933, 0.030672380700707436, -0.021265456452965736, 0.02485961839556694, -0.01417310070246458, 0.0165...
0.057547
.. \_naive\_bayes: =========== Naive Bayes =========== .. currentmodule:: sklearn.naive\_bayes Naive Bayes methods are a set of supervised learning algorithms based on applying Bayes' theorem with the "naive" assumption of conditional independence between every pair of features given the value of the class variable. Ba...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/naive_bayes.rst
main
scikit-learn
[ -0.08001166582107544, -0.06339988112449646, 0.021747684106230736, -0.0497889518737793, 0.1115516796708107, -0.03618147224187851, 0.10094837844371796, -0.06991829723119736, -0.0542394258081913, 0.04457476735115051, 0.0758289024233818, -0.008260533213615417, 0.05938111990690231, 0.0042500179...
-0.013449
text classification, the size of the vocabulary) and :math:`\theta\_{yi}` is the probability :math:`P(x\_i \mid y)` of feature :math:`i` appearing in a sample belonging to class :math:`y`. The parameters :math:`\theta\_y` are estimated by a smoothed version of maximum likelihood, i.e. relative frequency counting: .. ma...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/naive_bayes.rst
main
scikit-learn
[ -0.026889778673648834, -0.09217409789562225, 0.034740887582302094, 0.003733917837962508, 0.026258450001478195, 0.02792392112314701, 0.10504969954490662, 0.008819974958896637, 0.04896068572998047, -0.037981364876031876, 0.0796855241060257, 0.030147450044751167, 0.012450153939425945, 0.00217...
0.105664
time permits. .. dropdown:: References \* C.D. Manning, P. Raghavan and H. Schütze (2008). Introduction to Information Retrieval. Cambridge University Press, pp. 234-265. \* A. McCallum and K. Nigam (1998). `A comparison of event models for Naive Bayes text classification. `\_ Proc. AAAI/ICML-98 Workshop on Learning fo...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/naive_bayes.rst
main
scikit-learn
[ -0.02569580264389515, -0.0263986773788929, 0.02618648111820221, 0.005169331096112728, 0.06915214657783508, 0.006313548889011145, 0.07403223216533661, -0.028849421069025993, 0.026272300630807877, -0.03297049179673195, 0.037237975746393204, -0.02068345993757248, 0.03683003783226013, -0.04523...
0.061816
.. \_cross\_decomposition: =================== Cross decomposition =================== .. currentmodule:: sklearn.cross\_decomposition The cross decomposition module contains \*\*supervised\*\* estimators for dimensionality reduction and regression, belonging to the "Partial Least Squares" family. .. figure:: ../auto\_...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_decomposition.rst
main
scikit-learn
[ -0.06501148641109467, -0.08967917412519455, -0.034643445163965225, -0.0733325406908989, 0.1241132915019989, -0.02159169875085354, -0.042439863085746765, -0.03502042964100838, -0.02075875736773014, -0.015048995614051819, 0.035399455577135086, -0.021509820595383644, -0.034986015409231186, 0....
0.120233
:math:`\Xi` and :math:`\Omega` correspond to the projections of the training data :math:`X` and :math:`Y`, respectively. Step \*a)\* may be performed in two ways: either by computing the whole SVD of :math:`C` and only retaining the singular vectors with the biggest singular values, or by directly computing the singula...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_decomposition.rst
main
scikit-learn
[ -0.09243126213550568, 0.01998312957584858, -0.010398953221738338, -0.06161902844905853, 0.014588713645935059, -0.020647166296839714, 0.050419967621564865, -0.036515962332487106, -0.010534918867051601, -0.023790206760168076, 0.07560516893863678, -0.006922050379216671, -0.0007371331448666751, ...
-0.021239
:math:`u\_k` and :math:`v\_k` are computed in the power method of step a). Details can be found in section 10 of [1]\_. Since :class:`CCA` involves the inversion of :math:`X\_k^TX\_k` and :math:`Y\_k^TY\_k`, this estimator can be unstable if the number of features or targets is greater than the number of samples. .. ru...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/cross_decomposition.rst
main
scikit-learn
[ -0.08692425489425659, -0.021741867065429688, 0.030321363359689713, 0.009287774562835693, 0.09631801396608353, -0.0023740094620734453, -0.031037144362926483, 0.06000078096985817, -0.021219853311777115, 0.00716340122744441, -0.028012743219733238, 0.05825984850525856, 0.04836810752749443, -0....
0.013788
.. \_tree: ============== Decision Trees ============== .. currentmodule:: sklearn.tree \*\*Decision Trees (DTs)\*\* are a non-parametric supervised learning method used for :ref:`classification ` and :ref:`regression `. The goal is to create a model that predicts the value of a target variable by learning simple decis...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/tree.rst
main
scikit-learn
[ -0.08889603614807129, -0.022319884970784187, 0.007689184509217739, 0.026448234915733337, 0.1248602345585823, -0.0971420481801033, -0.02374790981411934, 0.0296317171305418, 0.004214509390294552, 0.08947049826383591, -0.04875597357749939, -0.033454541116952896, 0.023160668089985847, 0.006342...
0.148898
to fitting with the decision tree. .. \_tree\_classification: Classification ============== :class:`DecisionTreeClassifier` is a class capable of performing multi-class classification on a dataset. As with other classifiers, :class:`DecisionTreeClassifier` takes as input two arrays: an array X, sparse or dense, of shap...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/tree.rst
main
scikit-learn
[ -0.009759120643138885, -0.06195050850510597, 0.0018259672215208411, -0.034941237419843674, 0.10284904390573502, -0.07540695369243622, 0.056866686791181564, -0.06098358705639839, -0.06990982592105865, -0.03038744628429413, -0.08899031579494476, -0.05920647084712982, 0.03141574189066887, -0....
0.04941
(cm) > 0.80 | |--- petal width (cm) <= 1.75 | | |--- class: 1 | |--- petal width (cm) > 1.75 | | |--- class: 2 .. rubric:: Examples \* :ref:`sphx\_glr\_auto\_examples\_tree\_plot\_iris\_dtc.py` \* :ref:`sphx\_glr\_auto\_examples\_tree\_plot\_unveil\_tree\_structure.py` .. \_tree\_regression: Regression ========== .. fi...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/tree.rst
main
scikit-learn
[ -0.056500375270843506, -0.051154132932424545, -0.016204075887799263, 0.028887059539556503, 0.09673555195331573, -0.0004273015365470201, -0.030262582004070282, 0.05333024635910988, -0.022422166541218758, 0.06928561627864838, -0.010110671631991863, -0.030632810667157173, -0.007916788570582867,...
0.108308
.. math:: \mathcal{O}(n\_{features}n\_{samples}\log (n\_{samples})) + \mathcal{O}(n\_{features}n\_{samples}) The first term is the cost of sorting :math:`n\_{samples}` repeated for :math:`n\_{features}`. The second term is the linear scan over candidate split points to find the feature that offers the largest reduction...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/tree.rst
main
scikit-learn
[ -0.05546732246875763, 0.025211619213223457, 0.09399297833442688, 0.008518864400684834, 0.14102090895175934, -0.1401994824409485, -0.012907193042337894, 0.05051498860120773, 0.01992550864815712, 0.06485249102115631, -0.0457165353000164, -0.011626076884567738, 0.005580691620707512, -0.017381...
0.050222
the classes that are dominant. Class balancing can be done by sampling an equal number of samples from each class, or preferably by normalizing the sum of the sample weights (``sample\_weight``) for each class to the same value. Also note that weight-based pre-pruning criteria, such as ``min\_weight\_fraction\_leaf``, ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/tree.rst
main
scikit-learn
[ -0.0029452829621732235, 0.0037312000058591366, -0.004772797226905823, -0.030965695157647133, 0.08369652926921844, -0.10436394810676575, -0.029448335990309715, 0.0007938510971143842, -0.050870589911937714, 0.06655920296907425, -0.09255202114582062, -0.028869885951280594, 0.0512738861143589, ...
0.057184
.. math:: Q\_m^{left}(\theta) = \{(x, y) | x\_j \leq t\_m\} Q\_m^{right}(\theta) = Q\_m \setminus Q\_m^{left}(\theta) The quality of a candidate split of node :math:`m` is then computed using an impurity function or loss function :math:`H()`, the choice of which depends on the task being solved (classification or regre...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/tree.rst
main
scikit-learn
[ -0.09481488913297653, 0.035903654992580414, 0.05610654130578041, 0.0034886787179857492, 0.018441835418343544, -0.003138304688036442, 0.042687319219112396, 0.025380220264196396, 0.029632551595568657, 0.023722760379314423, -0.04116297885775566, 0.02019249089062214, 0.06590169668197632, -0.01...
0.068104
L1 error). MSE and Poisson deviance both set the predicted value of terminal nodes to the learned mean value :math:`\bar{y}\_m` of the node whereas the MAE sets the predicted value of terminal nodes to the median :math:`median(y)\_m`. Mean Squared Error: .. math:: \bar{y}\_m = \frac{1}{n\_m} \sum\_{y \in Q\_m} y H(Q\_m...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/tree.rst
main
scikit-learn
[ 0.030426964163780212, -0.07105883210897446, 0.005443023517727852, 0.040460653603076935, 0.05823228880763054, -0.035937923938035965, 0.013924364931881428, 0.07798044383525848, 0.06107128784060478, -0.00842240173369646, 0.05479924753308296, -0.0002635400742292404, 0.09924646466970444, -0.008...
-0.073246
The best split among these is chosen. During prediction, the treatment of missing-values is the same as that of the decision tree: - By default when predicting, the samples with missing values are classified with the class used in the split found during training. - If no missing values are seen during training for a gi...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/tree.rst
main
scikit-learn
[ -0.04866869002580643, 0.039866868406534195, -0.0208068136125803, 0.03349523991346359, 0.0834541916847229, -0.02931807190179825, -0.023783963173627853, 0.04846622794866562, -0.024788111448287964, 0.012150430120527744, -0.028008313849568367, -0.040152762085199356, -0.018832432106137276, -0.0...
0.073453
.. currentmodule:: sklearn .. \_model\_evaluation: =========================================================== Metrics and scoring: quantifying the quality of predictions =========================================================== .. \_which\_scoring\_function: Which scoring function should I use? =====================...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.025610003620386124, -0.04816023260354996, -0.07144654542207718, -0.010433397255837917, 0.015584866516292095, 0.043850161135196686, 0.04665854200720787, 0.05691798776388168, 0.023156223818659782, -0.0035359577741473913, -0.045957162976264954, -0.09755822271108627, 0.05735715851187706, 0....
0.103576
` non-negative ``predict``, strictly positive mean :ref:`Gamma deviance ` strictly positive ``predict``, strictly positive mean :ref:`Tweedie deviance ` depends on ``power`` ``predict``, depends on ``power`` median :ref:`absolute error ` all reals ``predict``, all reals quantile :ref:`pinball loss ` all reals ``predict...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.0383504256606102, -0.036594122648239136, -0.049429379403591156, 0.026122430339455605, -0.03525083512067795, -0.002379216253757477, 0.004497116897255182, 0.10516505688428879, -0.012438596226274967, -0.015461444854736328, -0.012396911159157753, -0.08361726254224777, 0.07285728305578232, 0...
-0.015291
metrics for random predictions. .. seealso:: For "pairwise" metrics, between \*samples\* and not estimators or predictions, see the :ref:`metrics` section. .. \_scoring\_parameter: The ``scoring`` parameter: defining model evaluation rules ========================================================== Model selection and e...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.06511414051055908, -0.08524397015571594, -0.10991574823856354, 0.04310058802366257, 0.06735284626483917, -0.023447219282388687, -0.0025202122051268816, 0.022051284089684486, 0.011507782153785229, -0.007083606440573931, -0.04760152846574783, -0.143066868185997, -0.0050961109809577465, -0...
0.047157
parameter for the :func:`fbeta\_score` function:: >>> from sklearn.metrics import fbeta\_score, make\_scorer >>> ftwo\_scorer = make\_scorer(fbeta\_score, beta=2) >>> from sklearn.model\_selection import GridSearchCV >>> from sklearn.svm import LinearSVC >>> grid = GridSearchCV(LinearSVC(), param\_grid={'C': [1, 10]}, ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.02501794323325157, -0.042719244956970215, -0.1263946294784546, 0.06223404034972191, 0.06836721301078796, -0.022260602563619614, 0.047398194670677185, 0.07622460275888443, 0.03189101815223694, 0.026484405621886253, -0.0370088666677475, -0.030695460736751556, -0.039389468729496, 0.0098292...
0.069323
scorer name to the scoring function:: >>> from sklearn.metrics import accuracy\_score >>> from sklearn.metrics import make\_scorer >>> scoring = {'accuracy': make\_scorer(accuracy\_score), ... 'prec': 'precision'} Note that the dict values can either be scorer functions or one of the predefined metric strings. - As a c...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.01019304059445858, -0.05765314772725105, -0.0819144994020462, -0.017586473375558853, 0.027460459619760513, -0.03757733851671219, 0.07838365435600281, 0.04167517274618149, -0.037046268582344055, 0.013104856014251709, 0.01740274392068386, -0.08785900473594666, 0.024980735033750534, 0.0299...
0.10932
multilabel settings, including multiclass classification where a majority class is to be ignored. \* ``"samples"`` applies only to multilabel problems. It does not calculate a per-class measure, instead calculating the metric over the true and predicted classes for each sample in the evaluation data, and returning thei...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.017223196104168892, -0.043892014771699905, -0.09777222573757172, -0.06075553223490715, 0.01374086644500494, -0.006732299458235502, 0.05222879722714424, 0.02497001737356186, -0.0020877947099506855, -0.042971331626176834, -0.04147447645664215, -0.12118012458086014, 0.04238519072532654, -0...
0.068873
predictions rather than scores: .. math:: \texttt{balanced-accuracy} = \frac{1}{2}\left( \frac{TP}{TP + FN} + \frac{TN}{TN + FP}\right ) If the classifier performs equally well on either class, this term reduces to the conventional accuracy (i.e., the number of correct predictions divided by the total number of predict...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.10680696368217468, 0.00579470582306385, 0.020009098574519157, 0.03252040967345238, 0.021873578429222107, -0.08246631175279617, -0.011199019849300385, 0.0775417685508728, 0.02837228775024414, 0.007104911375790834, -0.09048612415790558, -0.09448343515396118, 0.030359026044607162, -0.02934...
0.003003
with each row corresponding to the true class (Wikipedia and other references may use different convention for axes). By definition, entry :math:`i, j` in a confusion matrix is the number of observations actually in group :math:`i`, but predicted to be in group :math:`j`. Here is an example:: >>> from sklearn.metrics i...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.041235774755477905, -0.1014571487903595, -0.07000867277383804, -0.04840061813592911, 0.0009793121134862304, -0.053894106298685074, 0.05818834900856018, -0.032018207013607025, 0.042429618537425995, -0.008954757824540138, 0.03008911944925785, 0.0012990679824724793, 0.033774785697460175, 0...
0.067014
true value, :math:`n\_\text{samples}` is the number of samples and :math:`n\_\text{labels}` is the number of labels, then the Hamming loss :math:`L\_{Hamming}` is defined as: .. math:: L\_{Hamming}(y, \hat{y}) = \frac{1}{n\_\text{samples} \* n\_\text{labels}} \sum\_{i=0}^{n\_\text{samples}-1} \sum\_{j=0}^{n\_\text{labe...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.0026186667382717133, -0.029613425955176353, 0.022301049903035164, -0.045614857226610184, 0.07007156312465668, 0.07535413652658463, 0.08862464874982834, -0.030982814729213715, 0.003985519055277109, -0.011295251548290253, -0.09000261127948761, -0.06666968762874603, 0.043364185839891434, -...
0.070323
to evaluate classifier output quality. .. rubric:: References .. [Manning2008] C.D. Manning, P. Raghavan, H. Schütze, `Introduction to Information Retrieval `\_, 2008. .. [Everingham2010] M. Everingham, L. Van Gool, C.K.I. Williams, J. Winn, A. Zisserman, `The Pascal Visual Object Classes (VOC) Challenge `\_, IJCV 2010...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.0874323695898056, -0.053830478340387344, -0.09125062823295593, 0.03775149583816528, 0.03499523177742958, -0.059190407395362854, 0.006698918994516134, 0.0869661197066307, -0.02377922832965851, -0.035162121057510376, -0.08404665440320969, -0.04508170485496521, 0.07333604991436005, -0.0242...
0.109039
following behaviors when averaging: \* If all labels are included, "micro"-averaging in a multiclass setting will produce precision, recall and :math:`F` that are all identical to accuracy. \* "weighted" averaging may produce an F-score that is not between precision and recall. \* "macro" averaging for F-measures is ca...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.032260991632938385, -0.03100423328578472, -0.005191038362681866, 0.012528479099273682, -0.008316179737448692, 0.03316783532500267, -0.030323795974254608, 0.11992235481739044, 0.022942127659916878, -0.009908447042107582, 0.005154239945113659, -0.06287617236375809, 0.05640368536114693, -0...
0.048045
applies natively to binary targets. By computing it set-wise it can be extended to apply to multilabel and multiclass through the use of `average` (see :ref:`above `). In the binary case:: >>> import numpy as np >>> from sklearn.metrics import jaccard\_score >>> y\_true = np.array([[0, 1, 1], ... [1, 1, 0]]) >>> y\_pre...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ 0.046398844569921494, -0.07570472359657288, -0.07888270169496536, -0.07720185071229935, 0.043904662132263184, 0.006635074969381094, 0.01617954671382904, 0.02826867438852787, -0.025102507323026657, -0.09568192809820175, -0.030324889346957207, -0.10292597860097885, 0.1152087152004242, 0.0362...
0.119692
1)`, the log loss per sample is the negative log-likelihood of the classifier given the true label: .. math:: L\_{\log}(y, \hat{p}) = -\log \operatorname{Pr}(y|\hat{p}) = -(y \log (\hat{p}) + (1 - y) \log (1 - \hat{p})) This extends to the multiclass case as follows. Let the true labels for a set of samples be encoded ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.025281060487031937, -0.003281255951151252, 0.027858370915055275, -0.059504877775907516, 0.0736556276679039, -0.005917135626077652, 0.10343097150325775, 0.001334909931756556, 0.050331857055425644, 0.006113608833402395, -0.03195906803011894, -0.04773210361599922, 0.07525765895843506, -0.0...
0.028523
the usage of the :func:`matthews\_corrcoef` function: >>> from sklearn.metrics import matthews\_corrcoef >>> y\_true = [+1, +1, +1, -1] >>> y\_pred = [+1, -1, +1, +1] >>> matthews\_corrcoef(y\_true, y\_pred) -0.33 .. rubric:: References .. [WikipediaMCC2021] Wikipedia contributors. Phi coefficient. Wikipedia, The Free ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.06038873270153999, -0.07857934385538101, -0.051360003650188446, -0.021152887493371964, 0.0174717977643013, 0.030969709157943726, 0.03876597061753273, 0.024465594440698624, 0.041377414017915726, 0.0610806830227375, 0.05772324278950691, -0.012317745015025139, -0.019496828317642212, 0.0210...
0.079084
TPR is also known as sensitivity, and FPR is one minus the specificity or true negative rate." This function requires the true binary value and the target scores, which can either be probability estimates of the positive class or non-thresholded decision values (as returned by :term:`decision\_function` on some classif...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ 0.03276604413986206, -0.051677461713552475, -0.0783456340432167, -0.024684229865670204, 0.0660020038485527, -0.07193950563669205, 0.06573013961315155, 0.11121053993701935, 0.022549601271748543, 0.04248255491256714, 0.010964557528495789, -0.10741167515516281, -0.02454761043190956, 0.0489574...
0.121069
the prevalence: .. math:: \frac{1}{c(c-1)}\sum\_{j=1}^{c}\sum\_{k > j}^c p(j \cup k)( \text{AUC}(j | k) + \text{AUC}(k | j)) where :math:`c` is the number of classes. This algorithm is used by setting the keyword argument ``multiclass`` to ``'ovo'`` and ``average`` to ``'weighted'``. The ``'weighted'`` option returns a...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.08028508722782135, -0.013974221423268318, -0.05837387964129448, 0.04442700371146202, -0.002258569234982133, 0.008165569975972176, 0.01015700027346611, 0.05302215367555618, 0.010803239420056343, 0.013759663328528404, -0.005718209780752659, -0.10593525320291519, 0.02186649478971958, -0.00...
0.146575
importance in the critical operating region." DET curves are a variation of receiver operating characteristic (ROC) curves where False Negative Rate is plotted on the y-axis instead of True Positive Rate. DET curves are commonly plotted in normal deviate scale by transformation with :math:`\phi^{-1}` (with :math:`\phi`...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ 0.0006020029541105032, -0.08008162677288055, -0.009943729266524315, 0.0369122140109539, 0.11327234655618668, -0.028694741427898407, 0.01374753937125206, 0.08611182123422623, 0.010492471046745777, 0.019602417945861816, 0.07763629406690598, -0.01031537912786007, -0.01142415963113308, 0.04859...
0.138445
zero\_one\_loss >>> y\_pred = [1, 2, 3, 4] >>> y\_true = [2, 2, 3, 4] >>> zero\_one\_loss(y\_true, y\_pred) 0.25 >>> zero\_one\_loss(y\_true, y\_pred, normalize=False) 1.0 In the multilabel case with binary label indicators, where the first label set [0,1] has an error:: >>> zero\_one\_loss(np.array([[0, 1], [1, 1]]), ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ 0.026018312200903893, -0.03039754368364811, -0.054654497653245926, -0.051820989698171616, 0.0588996559381485, 0.02665858529508114, 0.0742732509970665, -0.03376557677984238, -0.018828609958291054, -0.05939018726348877, -0.028369130566716194, -0.11175744235515594, 0.040797069668769836, 0.028...
0.099567
perform probability calibration of classifiers. .. rubric:: References .. [Brier1950] G. Brier (1950). :doi:`"Verification of forecasts expressed in terms of probability" <10.1175/1520-0493(1950)078%3C0001:VOFEIT%3E2.0.CO;2>`. Monthly Weather Review 78(1), 1-3 .. [Murphy1973] Allan H. Murphy (1973). :doi:`"A New Vector...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.10163892060518265, -0.039014898240566254, 0.03279561549425125, 0.027652138844132423, 0.1018495112657547, -0.07831595838069916, -0.04194032400846481, 0.0020484691485762596, 0.05563616752624512, 0.0017935866490006447, 0.008715052157640457, -0.10203684866428375, 0.059046246111392975, -0.03...
-0.033852
negative likelihood ratio (`LR-`) is undefined when :math:`tn=0`. Such divergence is invalid, as :math:`LR\_- > 1.0` would indicate an increase in the odds of a sample belonging to the positive class after being classified as negative, as if the act of classifying caused the positive condition. This includes the case o...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.08499451726675034, -0.10340804606676102, 0.024002356454730034, -0.02469414845108986, 0.12240494787693024, -0.06911241263151169, -0.06451931595802307, -0.0030268318951129913, -0.003098835702985525, 0.0008897251100279391, 0.09857980906963348, -0.1018410325050354, 0.020132089033722878, 0.0...
-0.064011
y\_pred) 0.0 >>> y\_true = [1, 2, 3] >>> y\_pred = [ ... [0.98, 0.01, 0.01], ... [0.01, 0.98, 0.01], ... [0.01, 0.01, 0.98], ... ] >>> d2\_brier\_score(y\_true, y\_pred) 0.9991 >>> y\_true = [1, 2, 3] >>> y\_pred = [ ... [0.1, 0.6, 0.3], ... [0.1, 0.6, 0.3], ... [0.4, 0.5, 0.1], ... ] >>> d2\_brier\_score(y\_true, y\_p...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ 0.06554882228374481, -0.09729375690221786, 0.00505544850602746, -0.07665298879146576, -0.02843821980059147, -0.028828904032707214, 0.021662408486008644, 0.049012307077646255, 0.03816638141870499, 0.006013576872646809, -0.023564279079437256, -0.12546977400779724, 0.03187025338411331, 0.0525...
0.03257
numpy as np >>> from sklearn.metrics import label\_ranking\_average\_precision\_score >>> y\_true = np.array([[1, 0, 0], [0, 0, 1]]) >>> y\_score = np.array([[0.75, 0.5, 1], [1, 0.2, 0.1]]) >>> label\_ranking\_average\_precision\_score(y\_true, y\_score) 0.416 .. \_label\_ranking\_loss: Ranking loss ------------ The :f...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ 0.018748793751001358, -0.04986140877008438, -0.08286481350660324, -0.0276132021099329, 0.015208742581307888, 0.005457452964037657, 0.034433044493198395, 0.02170853316783905, 0.026690933853387833, -0.002008250216022134, -0.04982459917664528, -0.04109272360801697, 0.05755738541483879, 0.0363...
0.11816
number of outputs, and the prediction :math:`\hat{y}`, which induces the ranking function :math:`f`, the DCG score is .. math:: \sum\_{r=1}^{\min(K, M)}\frac{y\_{f(r)}}{\log(1 + r)} and the NDCG score is the DCG score divided by the DCG score obtained for :math:`y`. .. dropdown:: References \* `Wikipedia entry for Disc...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.07023429870605469, -0.033985260874032974, -0.05293789505958557, 0.005288504995405674, -0.01964554563164711, 0.03946114331483841, 0.018542833626270294, 0.10638850182294846, 0.09957195818424225, 0.0820915475487709, -0.10520455241203308, 0.036712177097797394, 0.1198163703083992, 0.00389505...
0.078226
``-Inf`` (imperfect predictions). Such non-finite scores may prevent correct model optimization such as grid-search cross-validation to be performed correctly. For this reason the default behaviour of :func:`r2\_score` is to replace them with 1.0 (perfect predictions) or 0.0 (imperfect predictions). If ``force\_finite`...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.04330958053469658, -0.05782295763492584, -0.04836081713438034, 0.06718739122152328, 0.0622907429933548, -0.05951755493879318, -0.06607989966869354, -0.02464449591934681, 0.009208988398313522, 0.0444718673825264, -0.03796079382300377, 0.005666759330779314, -0.0037804346065968275, 0.04395...
0.002103
the expected value of the squared logarithmic (quadratic) error or loss. If :math:`\hat{y}\_i` is the predicted value of the :math:`i`-th sample, and :math:`y\_i` is the corresponding true value, then the mean squared logarithmic error (MSLE) estimated over :math:`n\_{\text{samples}}` is defined as .. math:: \text{MSLE...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.027372412383556366, -0.026644334197044373, -0.006011848337948322, 0.022406868636608124, 0.005805927328765392, -0.036047160625457764, 0.04057498276233673, 0.1036960780620575, 0.07010679692029953, 0.03898569941520691, -0.04245343804359436, -0.033702362328767776, 0.07710493355989456, -0.00...
0.128555
\ldots, \mid y\_n - \hat{y}\_n \mid). The :func:`median\_absolute\_error` does not support multioutput. Here is a small example of usage of the :func:`median\_absolute\_error` function:: >>> from sklearn.metrics import median\_absolute\_error >>> y\_true = [3, -0.5, 2, 7] >>> y\_pred = [2.5, 0.0, 2, 8] >>> median\_abso...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.029277345165610313, -0.09152115136384964, -0.04415095970034599, -0.03922678902745247, 0.056240543723106384, -0.09862034767866135, -0.0717955082654953, 0.09211544692516327, -0.024585016071796417, -0.020472567528486252, -0.024124881252646446, -0.01616188883781433, 0.062147002667188644, -0...
0.076518
to :func:`mean\_poisson\_deviance`. - when ``power=2`` it is equivalent to :func:`mean\_gamma\_deviance`. If :math:`\hat{y}\_i` is the predicted value of the :math:`i`-th sample, and :math:`y\_i` is the corresponding true value, then the mean Tweedie deviance error (D) for power :math:`p`, estimated over :math:`n\_{\te...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ 0.012596538290381432, -0.007725727744400501, 0.040106117725372314, 0.0231864582747221, 0.028963355347514153, -0.06711161881685257, 0.08620445430278778, 0.05436386168003082, -0.006760196294635534, 0.02090253122150898, 0.007109448313713074, -0.05834442004561424, 0.04375046119093895, -0.01285...
-0.09109
or mean absolute error). D² is a form of a \*skill score\*. It is calculated as .. math:: D^2(y, \hat{y}) = 1 - \frac{\text{dev}(y, \hat{y})}{\text{dev}(y, y\_{\text{null}})} \,. Where :math:`y\_{\text{null}}` is the optimal prediction of an intercept-only model (e.g., the mean of `y\_true` for the Tweedie case, the me...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ 0.001067482284270227, -0.02218475192785263, -0.033211350440979004, 0.012085051275789738, -0.011762009933590889, -0.026825936511158943, -0.01620444655418396, 0.07849347591400146, 0.0047810920514166355, 0.005013010464608669, -0.03580745309591293, 0.005088234785944223, 0.015768801793456078, 0...
0.012315
predictions of an estimator that predicts a quantile of `y` given `X`, e.g. :class:`~sklearn.linear\_model.QuantileRegressor` or any other model minimizing the :ref:`pinball loss `, a fraction of the points are either expected to lie above or below the diagonal depending on the estimated quantile level. All in all, whi...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.07674599438905716, -0.014071667566895485, 0.026612605899572372, 0.0407024547457695, 0.0722191110253334, -0.044593002647161484, 0.03366275131702423, 0.022991430014371872, 0.11301597952842712, 0.0037864067126065493, 0.06312674283981323, 0.07647322118282318, -0.013183782808482647, 0.017440...
0.001234
= SVC(kernel='rbf', C=1).fit(X\_train, y\_train) >>> clf.score(X\_test, y\_test) 0.94 We see that the accuracy was boosted to almost 100%. A cross validation strategy is recommended for a better estimate of the accuracy, if it is not too CPU costly. For more information see the :ref:`cross\_validation` section. Moreove...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/model_evaluation.rst
main
scikit-learn
[ -0.018620025366544724, -0.08496251702308655, -0.1327289342880249, -0.0003618883201852441, 0.06062161549925804, -0.046051088720560074, 0.029553454369306564, 0.05753735825419426, -0.056190431118011475, -0.03239109367132187, -0.07835067808628082, -0.011559152975678444, -0.03851023316383362, -...
0.012555
.. \_metrics: Pairwise metrics, Affinities and Kernels ======================================== The :mod:`sklearn.metrics.pairwise` submodule implements utilities to evaluate pairwise distances or affinity of sets of samples. This module contains both distance metrics and kernels. A brief summary is given on the two he...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/metrics.rst
main
scikit-learn
[ -0.05366167426109314, -0.0784807950258255, -0.09904947876930237, -0.09609668701887131, 0.027522895485162735, -0.0506783090531826, 0.004781915340572596, -0.006040059495717287, 0.05255437269806862, -0.06350968033075333, 0.0250838790088892, -0.07801274210214615, 0.027759727090597153, 0.047603...
0.117459
polynomial kernel represents the similarity between two vectors. Conceptually, the polynomial kernel considers not only the similarity between vectors under the same dimension, but also across dimensions. When used in machine learning algorithms, this allows to account for feature interaction. The polynomial kernel is ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/metrics.rst
main
scikit-learn
[ -0.02995692379772663, -0.08493392914533615, -0.029337111860513687, -0.025981910526752472, 0.04701721668243408, -0.042506568133831024, 0.02807079255580902, 0.00914796907454729, 0.07920641452074051, -0.011616339907050133, 0.052819374948740005, -0.04297703877091408, -0.020092017948627472, -0....
0.179199
.. \_covariance: =================================================== Covariance estimation =================================================== .. currentmodule:: sklearn.covariance Many statistical problems require the estimation of a population's covariance matrix, which can be seen as an estimation of data set scatte...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/covariance.rst
main
scikit-learn
[ 0.004771838895976543, -0.03437205031514168, -0.000489337311591953, 0.0076390826143324375, 0.0483948290348053, -0.06005550175905228, 0.031175870448350906, -0.07170671224594116, -0.00682733952999115, 0.023906635120511055, 0.042615458369255066, -0.07461507618427277, 0.013527967967092991, -0.0...
0.101351
or it can be otherwise obtained by fitting a :class:`LedoitWolf` object to the same sample. .. note:: \*\*Case when population covariance matrix is isotropic\*\* It is important to note that when the number of samples is much larger than the number of features, one would expect that no shrinkage would be necessary. The...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/covariance.rst
main
scikit-learn
[ -0.0399068146944046, -0.014473658055067062, -0.004392467904835939, 0.0737822949886322, 0.021768391132354736, 0.04289747402071953, -0.03827429935336113, 0.002191380364820361, -0.03435014188289642, 0.028303682804107666, 0.10883525758981705, 0.046262335032224655, -0.003244059393182397, -0.025...
0.034543
data, they can be numerically unstable. In addition, unlike shrinkage estimators, sparse estimators are able to recover off-diagonal structure. The :class:`GraphicalLasso` estimator uses an l1 penalty to enforce sparsity on the precision matrix: the higher its ``alpha`` parameter, the more sparse the precision matrix. ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/covariance.rst
main
scikit-learn
[ -0.06467556953430176, -0.09643732756376266, -0.0378711000084877, -0.013646820560097694, 0.06660047918558121, -0.06925766915082932, -0.05399324744939804, 0.0290013886988163, -0.0406043641269207, -0.03526442497968674, 0.031950198113918304, 0.05853084474802017, -0.0007844884530641139, 0.01452...
0.033285
of the covariance matrix of the data set ("reweighting step"). Rousseeuw and Van Driessen [4]\_ developed the FastMCD algorithm in order to compute the Minimum Covariance Determinant. This algorithm is used in scikit-learn when fitting an MCD object to data. The FastMCD algorithm also computes a robust estimate of the ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/covariance.rst
main
scikit-learn
[ -0.0999489277601242, -0.023618167266249657, -0.003143287729471922, 0.0031079864129424095, 0.04878287762403488, -0.019406193867325783, -0.01310499757528305, 0.02120928466320038, -0.01906905695796013, -0.007643429096788168, 0.05717293545603752, 0.049709755927324295, 0.05509956181049347, -0.0...
0.109838
.. \_multiclass: ===================================== Multiclass and multioutput algorithms ===================================== This section of the user guide covers functionality related to multi-learning problems, including :term:`multiclass`, :term:`multilabel`, and :term:`multioutput` classification and regressi...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/multiclass.rst
main
scikit-learn
[ -0.03902139142155647, -0.05417552590370178, -0.05245625227689743, -0.053293488919734955, 0.025940896943211555, 0.003751952201128006, -0.009089103899896145, 0.004057108890265226, -0.05166773870587349, -0.02903624065220356, -0.02247459441423416, -0.01800541952252388, 0.00635518180206418, -0....
0.160042
or required computational resources). Target format ------------- Valid :term:`multiclass` representations for :func:`~sklearn.utils.multiclass.type\_of\_target` (`y`) are: - 1d or column vector containing more than two discrete values. An example of a vector ``y`` for 4 samples: >>> import numpy as np >>> y = np.array...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/multiclass.rst
main
scikit-learn
[ 0.0436098650097847, -0.08217938244342804, -0.10529646277427673, -0.08236204832792282, 0.06336044520139694, -0.019778339192271233, 0.03180798515677452, -0.12878940999507904, -0.05429486930370331, -0.02397700771689415, -0.008449895307421684, -0.03799349069595337, 0.06127415969967842, -0.0336...
0.054725