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
classifiers. Since it requires to fit ``n\_classes \* (n\_classes - 1) / 2`` classifiers, this method is usually slower than one-vs-the-rest, due to its O(n\_classes^2) complexity. However, this method may be advantageous for algorithms such as kernel algorithms which don't scale well with ``n\_samples``. This is becau...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/multiclass.rst
main
scikit-learn
[ -0.038974978029727936, -0.04934484511613846, 0.0009272522293031216, -0.04361054301261902, 0.0867234617471695, -0.0762844979763031, -0.03764834254980087, -0.0010918986517935991, 0.04286007955670357, 0.010644263587892056, -0.046380892395973206, -0.002306736074388027, -0.005431641358882189, -...
0.084303
"error-correcting". In practice, however, this may not happen as classifier mistakes will typically be correlated. The error-correcting output codes have a similar effect to bagging. Below is an example of multiclass learning using Output-Codes:: >>> from sklearn import datasets >>> from sklearn.multiclass import Outpu...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/multiclass.rst
main
scikit-learn
[ -0.016302987933158875, -0.09045982360839844, -0.02697022072970867, 0.012003986164927483, 0.01821676269173622, -0.07585347443819046, 0.03703272342681885, -0.09079112857580185, -0.08681043237447739, -0.03488186001777649, -0.013025122694671154, -0.0021682502701878548, 0.04456047713756561, -0....
-0.066833
classification support can be added to any classifier with :class:`~sklearn.multioutput.MultiOutputClassifier`. This strategy consists of fitting one classifier per target. This allows multiple target variable classifications. The purpose of this class is to extend estimators to be able to estimate a series of target f...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/multiclass.rst
main
scikit-learn
[ -0.04156525060534477, -0.10288549214601517, -0.1025211438536644, -0.06563904136419296, 0.08154556155204773, 0.03943847864866257, -0.0425582155585289, -0.07477836310863495, -0.04170401021838188, -0.06575816869735718, -0.06387955695390701, -0.03969411924481392, 0.013512888923287392, -0.02370...
0.125896
= X.shape # 10,100 >>> n\_outputs = Y.shape[1] # 3 >>> n\_classes = 3 >>> forest = RandomForestClassifier(random\_state=1) >>> multi\_target\_forest = MultiOutputClassifier(forest, n\_jobs=2) >>> multi\_target\_forest.fit(X, Y).predict(X) array([[2, 2, 0], [1, 2, 1], [2, 1, 0], [0, 0, 2], [0, 2, 1], [0, 0, 2], [1, 1, 0...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/multiclass.rst
main
scikit-learn
[ 0.04941064119338989, -0.09432701766490936, -0.0716315433382988, -0.025557376444339752, 0.10391583293676376, -0.05454606935381889, 0.022372353821992874, -0.11904866248369217, -0.05888160318136215, -0.0451447069644928, -0.08193869888782501, -0.08213687688112259, -0.005363473668694496, 0.0111...
0.052128
.. \_neighbors: ================= Nearest Neighbors ================= .. currentmodule:: sklearn.neighbors :mod:`sklearn.neighbors` provides functionality for unsupervised and supervised neighbors-based learning methods. Unsupervised nearest neighbors is the foundation of many other learning methods, notably manifold l...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neighbors.rst
main
scikit-learn
[ -0.07528987526893616, -0.10802856832742691, -0.08096390962600708, -0.04993090033531189, 0.09371444582939148, 0.04652651026844978, -0.0797230526804924, -0.0550246387720108, -0.002847459865733981, 0.008046361617743969, 0.025043677538633347, 0.024228105321526527, 0.04378978908061981, 0.042137...
0.078108
[0., 0., 0., 1., 1., 0.], [0., 0., 0., 0., 1., 1.]]) The dataset is structured such that points nearby in index order are nearby in parameter space, leading to an approximately block-diagonal matrix of K-nearest neighbors. Such a sparse graph is useful in a variety of circumstances which make use of spatial relationshi...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neighbors.rst
main
scikit-learn
[ -0.014481717720627785, -0.014188365079462528, -0.02389267459511757, -0.04503374546766281, 0.05599550902843475, 0.04119931906461716, -0.057460229843854904, -0.0838947743177414, -0.013934338465332985, 0.005566364154219627, 0.029256770387291908, -0.0049523222260177135, 0.023604054003953934, -...
0.012722
function of the distance can be supplied to compute the weights. .. |classification\_1| image:: ../auto\_examples/neighbors/images/sphx\_glr\_plot\_classification\_001.png :target: ../auto\_examples/neighbors/plot\_classification.html :scale: 75 .. centered:: |classification\_1| .. rubric:: Examples \* :ref:`sphx\_glr\...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neighbors.rst
main
scikit-learn
[ -0.09910985827445984, -0.06678111851215363, -0.09397927671670914, -0.04486525431275368, 0.07451803237199783, -0.01100854016840458, 0.010230423882603645, 0.00583452545106411, -0.03111661598086357, -0.06733569502830505, -0.013473239727318287, -0.026785798370838165, 0.06746216863393784, 0.007...
0.068986
data structure (short for \*K-dimensional tree\*), which generalizes two-dimensional \*Quad-trees\* and 3-dimensional \*Oct-trees\* to an arbitrary number of dimensions. The KD tree is a binary tree structure which recursively partitions the parameter space along the data axes, dividing it into nested orthotropic regio...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neighbors.rst
main
scikit-learn
[ -0.030974535271525383, -0.0034847380593419075, 0.034172818064689636, -0.05869390815496445, -0.0011173486709594727, -0.08185843378305435, -0.07063523679971695, -0.05221525952219963, 0.07151001691818237, 0.05305012688040733, -0.00007803357584634796, 0.005854747258126736, 0.013980269432067871, ...
0.012014
efficient than a tree-based approach. Both :class:`KDTree` and :class:`BallTree` address this through providing a \*leaf size\* parameter: this controls the number of samples at which a query switches to brute-force. This allows both algorithms to approach the efficiency of a brute-force computation for small :math:`N`...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neighbors.rst
main
scikit-learn
[ 0.007571517955511808, -0.005846042651683092, 0.008668843656778336, 0.011896828189492226, -0.017306985333561897, -0.07191383093595505, 0.010570223443210125, -0.06216838210821152, 0.022226925939321518, 0.015077166259288788, -0.026733390986919403, -0.05287094786763191, 0.033310454338788986, 0...
0.058779
be specified with the parameter ``leaf\_size``. This parameter choice has many effects: \*\*construction time\*\* A larger ``leaf\_size`` leads to a faster tree construction time, because fewer nodes need to be created \*\*query time\*\* Both a large or small ``leaf\_size`` can lead to suboptimal query cost. For ``leaf...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neighbors.rst
main
scikit-learn
[ 0.03168439865112305, 0.050820425152778625, -0.019279465079307556, 0.04312041029334068, 0.024085482582449913, -0.013479946181178093, -0.014019893482327461, 0.058159489184617996, -0.033805448561906815, 0.03535681962966919, 0.0017455113120377064, -0.014118173159658909, 0.026053687557578087, -...
0.072384
can compute internally the nearest neighbors, but most of them also accept precomputed nearest neighbors :term:`sparse graph`, as given by :func:`~sklearn.neighbors.kneighbors\_graph` and :func:`~sklearn.neighbors.radius\_neighbors\_graph`. With mode `mode='connectivity'`, these functions return a binary adjacency spar...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neighbors.rst
main
scikit-learn
[ -0.029246129095554352, -0.055313486605882645, -0.11578379571437836, -0.007003339938819408, 0.022849004715681076, -0.06001165509223938, -0.061695195734500885, -0.04409623146057129, -0.09490560740232468, 0.015792785212397575, 0.023704133927822113, -0.025068284943699837, 0.0362812764942646, -...
0.037062
of the neighbors graph during a hyper-parameter grid-search. .. \_nca: Neighborhood Components Analysis ================================ Neighborhood Components Analysis (NCA, :class:`NeighborhoodComponentsAnalysis`) is a distance metric learning algorithm which aims to improve the accuracy of nearest neighbors classif...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neighbors.rst
main
scikit-learn
[ -0.029557324945926666, -0.038498103618621826, -0.07151705771684647, -0.06474447250366211, 0.04918957129120827, -0.01600620709359646, -0.060290977358818054, -0.04827147722244263, -0.022843012586236, -0.006363170687109232, -0.005524270236492157, 0.005218070466071367, 0.030196435749530792, 0....
0.092315
and a test set of equal size, then standardized. For evaluation the 3-nearest neighbor classification accuracy is computed on the 2-dimensional projected points found by each method. Each data sample belongs to one of 10 classes. .. |nca\_dim\_reduction\_1| image:: ../auto\_examples/neighbors/images/sphx\_glr\_plot\_nc...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/neighbors.rst
main
scikit-learn
[ -0.028045030310750008, -0.0960984081029892, -0.029943617060780525, -0.09039716422557831, 0.07190209627151489, -0.02532970905303955, -0.07709220051765442, -0.020131077617406845, -0.06639255583286285, 0.012842024676501751, -0.014662847854197025, -0.07380588352680206, 0.028315387666225433, 0....
0.040183
.. \_preprocessing: ================== Preprocessing data ================== .. currentmodule:: sklearn.preprocessing The ``sklearn.preprocessing`` package provides several common utility functions and transformer classes to change raw feature vectors into a representation that is more suitable for the downstream estim...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing.rst
main
scikit-learn
[ -0.058875419199466705, -0.08393914252519608, -0.02430952526628971, 0.018486926332116127, 0.0545445941388607, -0.02207619696855545, -0.04589581489562988, 0.030426891520619392, -0.05331945791840553, 0.01036023162305355, 0.016857046633958817, 0.024382147938013077, -0.047192662954330444, 0.005...
0.103289
absolute value of each feature is scaled to unit size. This can be achieved using :class:`MinMaxScaler` or :class:`MaxAbsScaler`, respectively. The motivation to use this scaling includes robustness to very small standard deviations of features and preserving zero entries in sparse data. Here is an example to scale a t...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing.rst
main
scikit-learn
[ 0.06414514034986496, -0.021459117531776428, -0.034046370536088943, -0.009214196354150772, -0.0032148626632988453, -0.026149246841669083, -0.06666789948940277, 0.01755865477025509, -0.11588272452354431, -0.08834918588399887, -0.020005537196993828, -0.028219418600201607, 0.02118869684636593, ...
-0.016626
with outliers -------------------------- If your data contains many outliers, scaling using the mean and variance of the data is likely to not work very well. In these cases, you can use :class:`RobustScaler` as a drop-in replacement instead. It uses more robust estimates for the center and range of your data. .. dropd...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing.rst
main
scikit-learn
[ 0.01923869363963604, -0.051182232797145844, 0.00587534811347723, 0.011740457266569138, 0.027732117101550102, -0.050219982862472534, -0.03970147296786308, 0.052345551550388336, -0.07297662645578384, -0.05222305655479431, 0.004929913207888603, 0.0422714501619339, -0.011913551948964596, 0.008...
-0.051415
distribution :math:`G`. This formula is using the two following facts: (i) if :math:`X` is a random variable with a continuous cumulative distribution function :math:`F` then :math:`F(X)` is uniformly distributed on :math:`[0,1]`; (ii) if :math:`U` is a random variable with uniform distribution on :math:`[0,1]` then :m...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing.rst
main
scikit-learn
[ -0.10901600867509842, -0.01143339741975069, 0.00839606299996376, -0.013033025898039341, -0.04807112365961075, -0.0929998829960823, 0.005043727811425924, -0.03356770798563957, 0.05535447224974632, -0.0063204108737409115, 0.05482158437371254, 0.036435242742300034, 0.08162462711334229, 0.0073...
0.050547
by default. Below are examples of Box-Cox and Yeo-Johnson applied to various probability distributions. Note that when applied to certain distributions, the power transforms achieve very Gaussian-like results, but with others, they are ineffective. This highlights the importance of visualizing the data before and after...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing.rst
main
scikit-learn
[ 0.036950163543224335, 0.015394879505038261, -0.06415198743343353, -0.0014716492732986808, -0.02252242900431156, -0.08510922640562057, -0.014129454270005226, -0.001809297944419086, 0.007669377140700817, -0.016850966960191727, 0.0655701756477356, 0.03718527778983116, 0.0030053684022277594, 0...
0.076079
transforms each categorical feature to one new feature of integers (0 to n\_categories - 1):: >>> enc = preprocessing.OrdinalEncoder() >>> X = [['male', 'from US', 'uses Safari'], ['female', 'from Europe', 'uses Firefox']] >>> enc.fit(X) OrdinalEncoder() >>> enc.transform([['female', 'from US', 'uses Safari']]) array([...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing.rst
main
scikit-learn
[ 0.0763128325343132, -0.01813848689198494, -0.03504907712340355, -0.002192710991948843, 0.046832744032144547, -0.03224709630012512, -0.01850018836557865, -0.0959123820066452, -0.03440823405981064, -0.047586098313331604, -0.03861802816390991, -0.060729317367076874, -0.03660858795046806, 0.02...
0.003684
'uses Safari'], ['female', 'from Europe', 'uses Firefox']] >>> enc.fit(X) OneHotEncoder(handle\_unknown='infrequent\_if\_exist') >>> enc.transform([['female', 'from Asia', 'uses Chrome']]).toarray() array([[1., 0., 0., 0., 0., 0.]]) It is also possible to encode each column into ``n\_categories - 1`` columns instead of...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing.rst
main
scikit-learn
[ -0.005698412656784058, -0.043689269572496414, -0.09079758077859879, 0.06492513418197632, 0.07830220460891724, -0.006582679692655802, -0.013236560858786106, -0.1523008793592453, -0.05147663131356239, -0.07489728182554245, 0.036586128175258636, -0.06300537288188934, -0.03823992237448692, 0.0...
-0.017591
If `min\_frequency` is an integer, categories with a cardinality smaller than `min\_frequency` will be considered infrequent. If `min\_frequency` is a float, categories with a cardinality smaller than this fraction of the total number of samples will be considered infrequent. The default value is 1, which means every c...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing.rst
main
scikit-learn
[ 0.06977249681949615, -0.022356826812028885, -0.03443995490670204, 0.03183591365814209, 0.009152485057711601, -0.00841083750128746, -0.060560211539268494, -0.04285614937543869, -0.021794268861413002, -0.06449675559997559, -0.030192846432328224, -0.08218434453010559, 0.0053174602799117565, -...
0.022854
>>> enc = preprocessing.OneHotEncoder(min\_frequency=4, max\_categories=3, sparse\_output=False) >>> enc = enc.fit(X) >>> enc.transform([['dog'], ['cat'], ['rabbit'], ['snake']]) array([[0., 0., 1.], [1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]) If there are infrequent categories with the same cardinality at the cutoff of...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing.rst
main
scikit-learn
[ 0.10636244714260101, -0.028228633105754852, -0.0002903554996009916, -0.02500843070447445, -0.008783724159002304, -0.024510765448212624, -0.02131064236164093, -0.0905199721455574, -0.03120896965265274, -0.007647369522601366, 0.004293819423764944, -0.0511639229953289, 0.011526981368660927, 0...
0.00872
diagram shows the :term:`cross fitting` scheme in :meth:`~TargetEncoder.fit\_transform` with the default `cv=5`: .. image:: ../images/target\_encoder\_cross\_validation.svg :width: 600 :align: center The :meth:`~TargetEncoder.fit` method does \*\*not\*\* use any :term:`cross fitting` schemes and learns one encoding on ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing.rst
main
scikit-learn
[ -0.06080179288983345, -0.07104811072349548, -0.05954465642571449, 0.006839490029960871, 0.06867770105600357, -0.05304684117436409, -0.07985593378543854, 0.011281481944024563, -0.07342669367790222, -0.04940430074930191, -0.0034592922311276197, -0.13482064008712769, -0.02348942682147026, -0....
0.004327
:func:`pandas.cut`:: >>> import pandas as pd >>> import numpy as np >>> from sklearn import preprocessing >>> >>> bins = [0, 1, 13, 20, 60, np.inf] >>> labels = ['infant', 'kid', 'teen', 'adult', 'senior citizen'] >>> transformer = preprocessing.FunctionTransformer( ... pd.cut, kw\_args={'bins': bins, 'labels': labels,...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing.rst
main
scikit-learn
[ -0.0007999209337867796, 0.04785553738474846, -0.07617677748203278, -0.06799889355897903, 0.049255214631557465, 0.02583133429288864, -0.030110787600278854, -0.05771268159151077, -0.0625111386179924, 0.03922733664512634, 0.06660252809524536, -0.08010353147983551, -0.03985641151666641, -0.006...
0.035949
2], [3, 4, 5], [6, 7, 8]]) >>> poly = PolynomialFeatures(degree=3, interaction\_only=True) >>> poly.fit\_transform(X) array([[ 1., 0., 1., 2., 0., 0., 2., 0.], [ 1., 3., 4., 5., 12., 15., 20., 60.], [ 1., 6., 7., 8., 42., 48., 56., 336.]]) The features of X have been transformed from :math:`(X\_1, X\_2, X\_3)` to :math...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing.rst
main
scikit-learn
[ -0.017870021983981133, 0.013575640507042408, 0.006525685545057058, -0.04170466959476471, 0.024966513738036156, -0.013155966065824032, 0.03205173462629318, -0.07170005887746811, -0.05050456151366234, -0.020887786522507668, 0.04493943974375725, -0.02833511121571064, -0.005391476210206747, -0...
0.038304
a log transformation in a pipeline, do:: >>> import numpy as np >>> from sklearn.preprocessing import FunctionTransformer >>> transformer = FunctionTransformer(np.log1p, validate=True) >>> X = np.array([[0, 1], [2, 3]]) >>> # Since FunctionTransformer is no-op during fit, we can call transform directly >>> transformer....
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/preprocessing.rst
main
scikit-learn
[ -0.0768207460641861, -0.020068222656846046, -0.04250044748187065, -0.02324610762298107, 0.047318581491708755, -0.1448938101530075, 0.010387098416686058, -0.015891138464212418, -0.017648104578256607, -0.01548495888710022, -0.03508233278989792, -0.04558440297842026, -0.02291000634431839, 0.0...
0.091384
.. \_mixture: .. \_gmm: ======================= Gaussian mixture models ======================= .. currentmodule:: sklearn.mixture ``sklearn.mixture`` is a package which enables one to learn Gaussian Mixture Models (diagonal, spherical, tied and full covariance matrices supported), sample them, and estimate them from d...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/mixture.rst
main
scikit-learn
[ 0.03827058523893356, -0.14156268537044525, 0.006165196653455496, -0.059283897280693054, 0.09584016352891922, 0.012920984998345375, 0.08137741684913635, -0.008948959410190582, -0.04092387482523918, -0.05283186212182045, 0.054047178477048874, -0.0725696012377739, 0.050786737352609634, -0.000...
0.067344
difficulty in learning Gaussian mixture models from unlabeled data is that one usually doesn't know which points came from which latent component (if one has access to this information it gets very easy to fit a separate Gaussian distribution to each set of points). `Expectation-maximization `\_ is a well-founded stati...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/mixture.rst
main
scikit-learn
[ 0.030707335099577904, -0.10524823516607285, 0.04576911777257919, -0.023170648142695427, 0.030497858300805092, 0.011504944413900375, 0.05928691104054451, -0.055349040776491165, 0.0005942682037129998, -0.0362776443362236, 0.040133509784936905, -0.0117301344871521, 0.08583580702543259, 0.0128...
0.001922
active in the mixture. The parameters implementation of the :class:`BayesianGaussianMixture` class proposes two types of prior for the weights distribution: a finite mixture model with Dirichlet distribution and an infinite mixture model with the Dirichlet Process. In practice Dirichlet Process inference algorithm is a...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/mixture.rst
main
scikit-learn
[ -0.019125450402498245, -0.13617953658103943, 0.07637427002191544, -0.008478150703012943, 0.042586736381053925, 0.0017482730327174067, 0.08955186605453491, 0.08556347340345383, 0.0570128969848156, -0.004223431460559368, 0.025863830000162125, 0.0474492646753788, 0.05892200022935867, -0.03719...
0.061131
hence will produce wildly different solutions for different numbers of components, the variational inference with a Dirichlet process prior (``weight\_concentration\_prior\_type='dirichlet\_process'``) won't change much with changes to the parameters, leading to more stability and less tuning. :Regularization: Due to t...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/mixture.rst
main
scikit-learn
[ -0.04293849319219589, -0.14528238773345947, 0.057175274938344955, -0.03376021236181259, 0.04773196578025818, 0.05516408383846283, 0.0077421762980520725, 0.030941344797611237, -0.002795402193441987, -0.03381579741835594, -0.04465649649500847, 0.05525238439440727, 0.0030381272081285715, 0.00...
0.036438
.. \_partial\_dependence: =============================================================== Partial Dependence and Individual Conditional Expectation plots =============================================================== .. currentmodule:: sklearn.inspection Partial dependence plots (PDP) and individual conditional expect...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/partial_dependence.rst
main
scikit-learn
[ -0.08118787407875061, -0.04124707356095314, 0.09971583634614944, 0.043704554438591, 0.14379380643367767, 0.011309641413390636, 0.010733507573604584, 0.00011238826118642464, 0.009885194711387157, -0.04436662793159485, 0.0007441829075105488, -0.020508764311671257, 0.030398491770029068, 0.003...
-0.025652
classification, you need to set the class label for which the PDPs should be created via the ``target`` argument:: >>> from sklearn.datasets import load\_iris >>> iris = load\_iris() >>> mc\_clf = GradientBoostingClassifier(n\_estimators=10, ... max\_depth=1).fit(iris.data, iris.target) >>> features = [3, 2, (3, 2)] >>...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/partial_dependence.rst
main
scikit-learn
[ -0.0411725789308548, -0.12364161759614944, 0.012953424826264381, -0.03234224393963814, 0.055444758385419846, 0.0038551168981939554, -0.002197003923356533, -0.0027757338248193264, -0.09349940717220306, -0.029003245756030083, -0.02889353595674038, -0.08505167067050934, -0.016210978850722313, ...
-0.054307
heterogeneous relationships. cICE plots can be plotted by setting `centered=True`: >>> PartialDependenceDisplay.from\_estimator(clf, X, features, ... kind='both', centered=True) <...> Mathematical Definition ======================= Let :math:`X\_S` be the set of input features of interest (i.e. the `features` parameter...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/partial_dependence.rst
main
scikit-learn
[ -0.035888515412807465, -0.06490553915500641, 0.064105324447155, -0.04130511358380318, -0.011124993674457073, 0.008711644448339939, 0.000571867567487061, 0.08610309660434723, 0.024765633046627045, 0.032264478504657745, -0.009198921732604504, -0.10415481775999069, 0.03616556525230408, -0.065...
0.065238
class (the positive class for binary classification), or the decision function. .. rubric:: References .. [H2009] T. Hastie, R. Tibshirani and J. Friedman, `The Elements of Statistical Learning `\_, Second Edition, Section 10.13.2, Springer, 2009. .. [M2019] C. Molnar, `Interpretable Machine Learning `\_, Section 5.1, ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/partial_dependence.rst
main
scikit-learn
[ -0.04110012575984001, -0.042652491480112076, 0.0070032598450779915, -0.00425674906000495, 0.08817509561777115, -0.04782814905047417, 0.04160831496119499, -0.014296302571892738, 0.021980546414852142, 0.01934078522026539, -0.08445198833942413, 0.02202252484858036, 0.08537953346967697, -0.022...
0.08969
.. \_data\_reduction: ===================================== Unsupervised dimensionality reduction ===================================== If your number of features is high, it may be useful to reduce it with an unsupervised step prior to supervised steps. Many of the :ref:`unsupervised-learning` methods implement a ``tr...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/unsupervised_reduction.rst
main
scikit-learn
[ -0.08162905275821686, 0.018173277378082275, 0.06886368244886398, -0.014104539528489113, 0.024361737072467804, -0.027981039136648178, -0.056408222764730453, -0.029535779729485512, -0.06282778829336166, -0.006781009025871754, -0.016953714191913605, -0.0041685584001243114, -0.03887851908802986,...
-0.006759
.. \_random\_projection: ================== Random Projection ================== .. currentmodule:: sklearn.random\_projection The :mod:`sklearn.random\_projection` module implements a simple and computationally efficient way to reduce the dimensionality of the data by trading a controlled amount of accuracy (as additi...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/random_projection.rst
main
scikit-learn
[ -0.08328422158956528, 0.0041399444453418255, -0.07653825730085373, -0.04639608785510063, 0.034683436155319214, -0.04414323717355728, 0.029589014127850533, -0.07616254687309265, 0.030731791630387306, -0.018079368397593498, 0.01495350245386362, 0.0449124276638031, 0.11242390424013138, -0.016...
0.087202
1 / s \\ +\sqrt{\frac{s}{n\_{\text{components}}}} & & 1 / 2s\\ \end{array} \right. where :math:`n\_{\text{components}}` is the size of the projected subspace. By default the density of non zero elements is set to the minimum density as recommended by Ping Li et al.: :math:`1 / \sqrt{n\_{\text{features}}}`. Here is a sm...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/random_projection.rst
main
scikit-learn
[ -0.01807197742164135, -0.05782594531774521, -0.03251122683286667, -0.03577451407909393, 0.03917283937335014, 0.02281426452100277, 0.037896931171417236, -0.05351010337471962, -0.04459358751773834, -0.007634984329342842, -0.03960577771067619, 0.001311191008426249, 0.10734330862760544, -0.019...
-0.052538
.. \_calibration: ======================= Probability calibration ======================= .. currentmodule:: sklearn.calibration When performing classification you often want not only to predict the class label, but also obtain a probability of the respective label. This probability gives you some kind of confidence on...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/calibration.rst
main
scikit-learn
[ -0.07595499604940414, -0.05994608253240585, -0.10255628824234009, -0.004192402586340904, 0.1034107431769371, -0.025550970807671547, 0.08360994607210159, 0.0024199718609452248, -0.0027199885807931423, -0.02551424503326416, -0.004871731158345938, -0.06710757315158844, 0.08497254550457001, -0...
0.089319
consistent with the :class:`LogisticRegression` model (the model is 'well specified'), and the value of the regularization parameter `C` is tuned to be appropriate (neither too strong nor too low). As a consequence, this model returns accurate predictions from its `predict\_proba` method. In contrast to that, the other...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/calibration.rst
main
scikit-learn
[ -0.018649781122803688, -0.09921790659427643, -0.06219160556793213, -0.007002928294241428, 0.07695785164833069, -0.038056742399930954, 0.04107692837715149, 0.02301357127726078, -0.03963834047317505, 0.02999526634812355, -0.010118878446519375, -0.032772429287433624, 0.07738631218671799, -0.0...
0.026577
(default), the following procedure is repeated independently for each cross-validation split: 1. a clone of `base\_estimator` is trained on the train subset 2. the trained `base\_estimator` makes predictions on the test subset 3. the predictions are used to fit a calibrator (either a sigmoid or isotonic regressor) (whe...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/calibration.rst
main
scikit-learn
[ -0.0970216691493988, -0.07893390953540802, -0.02104109525680542, 0.01718132011592388, 0.10170913487672806, -0.006891990080475807, 0.006646479479968548, -0.02253366820514202, -0.0006256431806832552, -0.03793012723326683, -0.021685287356376648, -0.14806869626045227, 0.08691729605197906, -0.0...
0.11391
works best if the calibration error is symmetrical, meaning the classifier output for each binary class is normally distributed with the same variance [7]\_. This can be a problem for highly imbalanced classification problems, where outputs do not have equal variance. In general this method is most effective for small ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/calibration.rst
main
scikit-learn
[ -0.07401641458272934, -0.07006096839904785, 0.031765539199113846, -0.039886269718408585, 0.04025329649448395, -0.04639916121959686, -0.03145681694149971, 0.011777810752391815, -0.012558786198496819, -0.020146651193499565, 0.0013461436610668898, 0.009126446209847927, 0.04168093949556351, -0...
0.133359
parameters for each single class. .. rubric:: Examples \* :ref:`sphx\_glr\_auto\_examples\_calibration\_plot\_calibration\_curve.py` \* :ref:`sphx\_glr\_auto\_examples\_calibration\_plot\_calibration\_multiclass.py` \* :ref:`sphx\_glr\_auto\_examples\_calibration\_plot\_calibration.py` \* :ref:`sphx\_glr\_auto\_example...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/calibration.rst
main
scikit-learn
[ -0.07621919363737106, -0.08324762433767319, -0.06621788442134857, -0.034019485116004944, 0.04914228990674019, -0.04056783393025398, -0.001192603842355311, 0.08542715758085251, -0.03119802474975586, -0.03858364373445511, 0.01432959083467722, -0.06948455423116684, 0.050915833562612534, -0.00...
0.063723
.. \_permutation\_importance: Permutation feature importance ============================== .. currentmodule:: sklearn.inspection Permutation feature importance is a model inspection technique that measures the contribution of each feature to a :term:`fitted` model's statistical performance on a given tabular dataset. ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/permutation_importance.rst
main
scikit-learn
[ -0.00590089475736022, -0.0011031687026843429, 0.04780792444944382, -0.044643547385931015, 0.12548235058784485, -0.032665055245161057, 0.07745220512151718, -0.04252288490533829, -0.030585909262299538, 0.022097930312156677, -0.013027939014136791, 0.04704574868083, 0.036139413714408875, 0.027...
0.075524
set. Using a held-out set makes it possible to highlight which features contribute the most to the generalization power of the inspected model. Features that are important on the training set but not on the held-out set might cause the model to overfit. The permutation feature importance depends on the score function t...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/permutation_importance.rst
main
scikit-learn
[ 0.03136860206723213, -0.006434097420424223, 0.00020685904019046575, -0.033832862973213196, 0.06784062087535858, 0.04442180320620537, 0.031236795708537102, 0.04958605021238327, -0.03150545805692673, 0.00014815728354733437, -0.040639474987983704, 0.024441130459308624, -0.010315664112567902, ...
0.052543
to permutation-based feature importance: :ref:`sphx\_glr\_auto\_examples\_inspection\_plot\_permutation\_importance.py`. Misleading values on strongly correlated features ------------------------------------------------- When two features are correlated and one of the features is permuted, the model still has access to...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/permutation_importance.rst
main
scikit-learn
[ -0.006624940782785416, -0.05742249637842178, 0.04083574190735817, -0.04684671387076378, 0.10892682522535324, -0.03553390130400658, 0.07458264380693436, -0.05121629312634468, -0.06609758734703064, -0.01974238082766533, 0.004167995415627956, 0.0389757864177227, 0.0074005890637636185, 0.06217...
-0.045357
.. currentmodule:: sklearn.feature\_selection .. \_feature\_selection: ================= Feature selection ================= The classes in the :mod:`sklearn.feature\_selection` module can be used for feature selection/dimensionality reduction on sample sets, either to improve estimators' accuracy scores or to boost th...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_selection.rst
main
scikit-learn
[ -0.021147368475794792, 0.018595661967992783, 0.09542923420667648, 0.04770808294415474, 0.10463594645261765, -0.04074154421687126, 0.06335478276014328, -0.06274248659610748, -0.06385040283203125, -0.04060953110456467, 0.01771959662437439, -0.0025618094950914383, -0.019021887332201004, -0.02...
0.030866
scores. .. rubric:: Examples \* :ref:`sphx\_glr\_auto\_examples\_feature\_selection\_plot\_feature\_selection.py` \* :ref:`sphx\_glr\_auto\_examples\_feature\_selection\_plot\_f\_test\_vs\_mi.py` .. \_rfe: Recursive feature elimination ============================= Given an external estimator that assigns weights to fe...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_selection.rst
main
scikit-learn
[ -0.08567259460687637, -0.08709418028593063, 0.056301265954971313, 0.06482435762882233, 0.07153359800577164, -0.033587466925382614, 0.0383523590862751, 0.08674406260251999, -0.0563359297811985, 0.031612664461135864, 0.00992318894714117, 0.03564348816871643, 0.02003171108663082, 0.0420379750...
0.093181
certain specific conditions are met. In particular, the number of samples should be "sufficiently large", or L1 models will perform at random, where "sufficiently large" depends on the number of non-zero coefficients, the logarithm of the number of features, the amount of noise, the smallest absolute value of non-zero ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_selection.rst
main
scikit-learn
[ -0.0403686985373497, -0.07903177291154861, -0.08045230060815811, 0.014616523869335651, 0.08933787792921066, 0.019028177484869957, 0.004969260189682245, 0.008923998102545738, -0.004549302160739899, 0.02957153134047985, -0.01200819294899702, 0.07523953169584274, -0.013545762747526169, 0.0120...
-0.026362
to the other approaches. For example in backward selection, the iteration going from `m` features to `m - 1` features using k-fold cross-validation requires fitting `m \* k` models, while :class:`~sklearn.feature\_selection.RFE` would require only a single fit, and :class:`~sklearn.feature\_selection.SelectFromModel` a...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_selection.rst
main
scikit-learn
[ -0.0821206197142601, -0.10959811508655548, 0.041787587106227875, 0.0825544223189354, 0.05674197897315025, -0.03896350413560867, -0.0008257038425654173, 0.06269662082195282, -0.10260394215583801, -0.011293965391814709, -0.039131831377744675, -0.013852804899215698, -0.034723877906799316, -0....
0.025501
.. \_outlier\_detection: =================================================== Novelty and Outlier Detection =================================================== .. currentmodule:: sklearn Many applications require being able to decide whether a new observation belongs to the same distribution as existing observations (it...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/outlier_detection.rst
main
scikit-learn
[ -0.09471627324819565, -0.057562265545129776, 0.024700822308659554, 0.037492793053388596, 0.13460074365139008, -0.04872830957174301, 0.09582271426916122, -0.038401391357183456, -0.003992673475295305, -0.039687637239694595, 0.03076893836259842, -0.0038533282931894064, 0.0609789714217186, -0....
0.133021
data ``score\_samples`` Use ``negative\_outlier\_factor\_`` Use only on new data ``negative\_outlier\_factor\_`` OK OK ============================ ================================ ===================== Overview of outlier detection methods ===================================== A comparison of the outlier detection alg...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/outlier_detection.rst
main
scikit-learn
[ -0.00043016590643674135, -0.08498452603816986, 0.014273924753069878, 0.00908956490457058, 0.10624625533819199, -0.09627977758646011, 0.020878300070762634, 0.06242266297340393, -0.046757034957408905, -0.03435122221708298, 0.10321702808141708, -0.02117428183555603, 0.03138815239071846, -0.00...
0.032751
SVM ---------------------------- An online linear version of the One-Class SVM is implemented in :class:`linear\_model.SGDOneClassSVM`. This implementation scales linearly with the number of samples and can be used with a kernel approximation to approximate the solution of a kernelized :class:`svm.OneClassSVM` whose co...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/outlier_detection.rst
main
scikit-learn
[ -0.07726308703422546, -0.12460944056510925, -0.04648391902446747, 0.02046378329396248, 0.10703077167272568, -0.08949948102235794, -0.02817988023161888, 0.08472806215286255, -0.025720465928316116, -0.015679804608225822, 0.032732486724853516, 0.04681238904595375, 0.008204313926398754, -0.057...
0.052142
allows you to add more trees to an already fitted model:: >>> from sklearn.ensemble import IsolationForest >>> import numpy as np >>> X = np.array([[-1, -1], [-2, -1], [-3, -2], [0, 0], [-20, 50], [3, 5]]) >>> clf = IsolationForest(n\_estimators=10, warm\_start=True) >>> clf.fit(X) # fit 10 trees # doctest: +SKIP >>> c...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/outlier_detection.rst
main
scikit-learn
[ -0.05714321881532669, -0.10391885787248611, -0.011241656728088856, 0.0570686012506485, 0.1677199900150299, -0.049119047820568085, 0.014627208933234215, -0.017876988276839256, -0.06957074999809265, 0.009322214871644974, 0.03917103260755539, -0.056013889610767365, 0.02425016649067402, -0.025...
0.05105
../auto\_examples/neighbors/plot\_lof\_outlier\_detection.html :align: center :scale: 75% .. rubric:: Examples \* See :ref:`sphx\_glr\_auto\_examples\_neighbors\_plot\_lof\_outlier\_detection.py` for an illustration of the use of :class:`neighbors.LocalOutlierFactor`. \* See :ref:`sphx\_glr\_auto\_examples\_miscellaneo...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/outlier_detection.rst
main
scikit-learn
[ -0.06383808702230453, -0.10600101947784424, -0.012031296268105507, -0.011845162138342857, 0.1385488361120224, -0.04735524207353592, 0.04120975732803345, 0.06697094440460205, -0.058273397386074066, -0.04299544170498848, 0.06798524409532547, 0.0010382250184193254, 0.05376758426427841, 0.0385...
0.13217
.. currentmodule:: sklearn.manifold .. \_manifold: ================= Manifold learning ================= | Look for the bare necessities | The simple bare necessities | Forget about your worries and your strife | I mean the bare necessities | Old Mother Nature's recipes | That bring the bare necessities of life | | -- ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/manifold.rst
main
scikit-learn
[ -0.056898199021816254, 0.016152961179614067, 0.010743762366473675, -0.02903534099459648, 0.08932673931121826, -0.01751212775707245, -0.05594624578952789, 0.017787912860512733, -0.06709179282188416, -0.012977725826203823, 0.05638093873858452, -0.11120223253965378, -0.01925223506987095, -0.0...
0.1002
comprises three stages: 1. \*\*Nearest neighbor search.\*\* Isomap uses :class:`~sklearn.neighbors.BallTree` for efficient neighbor search. The cost is approximately :math:`O[D \log(k) N \log(N)]`, for :math:`k` nearest neighbors of :math:`N` points in :math:`D` dimensions. 2. \*\*Shortest-path graph search.\*\* The mo...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/manifold.rst
main
scikit-learn
[ -0.012363094836473465, 0.006413325201719999, -0.0581427738070488, -0.08340435475111008, 0.024404842406511307, -0.07569907605648041, -0.08956929296255112, -0.0683518499135971, -0.06087174639105797, -0.021583247929811478, 0.022941954433918, -0.018833015114068985, 0.010321329347789288, -0.041...
0.064199
performed with function :func:`locally\_linear\_embedding` or its object-oriented counterpart :class:`LocallyLinearEmbedding`, with the keyword ``method = 'modified'``. It requires ``n\_neighbors > n\_components``. .. figure:: ../auto\_examples/manifold/images/sphx\_glr\_plot\_lle\_digits\_007.png :target: ../auto\_exa...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/manifold.rst
main
scikit-learn
[ -0.06433772295713425, -0.0867224633693695, -0.013397200033068657, -0.09564090520143509, 0.030261268839240074, -0.07982266694307327, -0.0584101565182209, -0.0066662197932600975, 0.003602210897952318, -0.04238279163837433, -0.016732238233089447, -0.018911870196461678, 0.04273774102330208, -0...
0.010732
representation. 2. \*\*Graph Laplacian Construction\*\*. unnormalized Graph Laplacian is constructed as :math:`L = D - A` for and normalized one as :math:`L = D^{-\frac{1}{2}} (D - A) D^{-\frac{1}{2}}`. 3. \*\*Partial Eigenvalue Decomposition\*\*. Eigenvalue decomposition is done on graph Laplacian. The overall complex...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/manifold.rst
main
scikit-learn
[ -0.022336125373840332, -0.06049170717597008, -0.041304849088191986, -0.06850896030664444, 0.013106582686305046, -0.00861474871635437, -0.08730746805667877, -0.0698617473244667, -0.008658001199364662, -0.018382666632533073, 0.030513448640704155, 0.0031837462447583675, 0.0055257524363696575, ...
-0.066521
f(\delta\_{ij})` are some transformation of the dissimilarities. The MDS objective, called the raw stress, is then defined by :math:`\sum\_{i < j} (\hat{d}\_{ij} - d\_{ij}(Z))^2`, where :math:`d\_{ij}(Z)` are the pairwise distances between the coordinates :math:`Z` of the embedded points. .. dropdown:: Metric MDS In th...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/manifold.rst
main
scikit-learn
[ -0.05782698839902878, -0.019412856549024582, 0.008166030049324036, -0.07036557793617249, 0.014918691478669643, -0.00911154318600893, -0.008065426722168922, 0.03659696504473686, 0.04861756041646004, -0.016186699271202087, -0.03814282268285751, -0.04574984312057495, 0.055910397320985794, 0.0...
0.12449
Revealing data that lie in multiple, different, manifolds or clusters \* Reducing the tendency to crowd points together at the center While Isomap, LLE and variants are best suited to unfold a single continuous low dimensional manifold, t-SNE will focus on the local structure of the data and will tend to extract cluste...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/manifold.rst
main
scikit-learn
[ -0.08875299245119095, -0.045191116631031036, 0.044359128922224045, -0.04661426320672035, 0.0009200404747389257, 0.06855175644159317, -0.07677669078111649, -0.017505871132016182, 0.10723011940717697, -0.05255132541060448, -0.044341374188661575, 0.010699748992919922, 0.06514590233564377, -0....
0.079736
is too low gradient descent will get stuck in a bad local minimum. If it is too high the KL divergence will increase during optimization. A heuristic suggested in Belkina et al. (2019) is to set the learning rate to the sample size divided by the early exaggeration factor. We implement this heuristic as `learning\_rate...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/manifold.rst
main
scikit-learn
[ -0.035158757120370865, 0.012597724795341492, 0.010048866271972656, -0.03798810765147209, -0.017839474603533745, 0.02485192008316517, -0.10025198012590408, 0.047632746398448944, -0.015133748762309551, 0.003108255797997117, -0.04101023077964783, 0.03616427630186081, 0.0688251182436943, 0.014...
0.011506
5415 (2019). Tips on practical use ===================== \* Make sure the same scale is used over all features. Because manifold learning methods are based on a nearest-neighbor search, the algorithm may perform poorly otherwise. See :ref:`StandardScaler ` for convenient ways of scaling heterogeneous data. \* The recon...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/manifold.rst
main
scikit-learn
[ -0.05929054319858551, -0.023975903168320656, 0.08815094083547592, 0.007366550154983997, -0.03225845843553543, -0.06946378946304321, -0.06548944115638733, -0.048095881938934326, -0.05461617559194565, -0.05141676962375641, -0.053676996380090714, 0.04912281781435013, 0.06465685367584229, -0.0...
0.031911
.. currentmodule:: sklearn.model\_selection .. \_grid\_search: =========================================== Tuning the hyper-parameters of an estimator =========================================== Hyper-parameters are parameters that are not directly learnt within estimators. In scikit-learn they are passed as arguments ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/grid_search.rst
main
scikit-learn
[ -0.06406011432409286, -0.07071683555841446, -0.07477688789367676, -0.006395278498530388, 0.06707572937011719, -0.033827487379312515, 0.0445929653942585, -0.014453843235969543, -0.05080299824476242, 0.02605762891471386, -0.015975525602698326, -0.03830624744296074, -0.004177418537437916, -0....
0.090211
in :class:`GridSearchCV`. The example shows how this interface adds a certain amount of flexibility in identifying the "best" estimator. This interface can also be used in multiple metrics evaluation. - See :ref:`sphx\_glr\_auto\_examples\_model\_selection\_plot\_grid\_search\_stats.py` for an example of how to do a st...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/grid_search.rst
main
scikit-learn
[ -0.07757914811372757, 0.0031278072856366634, -0.08608733862638474, 0.03703669086098671, 0.04202057421207428, -0.017991209402680397, 0.018437568098306656, 0.042879801243543625, 0.0031462127808481455, 0.01253002230077982, -0.07295016199350357, -0.02122119627892971, 0.059190016239881516, -0.0...
0.062246
of training samples, but it can also be an arbitrary numeric parameter such as `n\_estimators` in a random forest. .. note:: The resource increase chosen should be large enough so that a large improvement in scores is obtained when taking into account statistical significance. As illustrated in the figure below, only a...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/grid_search.rst
main
scikit-learn
[ -0.00973639264702797, -0.07203605026006699, -0.046138957142829895, 0.06911777704954147, 0.15947507321834564, -0.022168638184666634, 0.0016812172252684832, 0.01826675795018673, 0.031663764268159866, -0.006197236478328705, -0.0566151924431324, 0.014970988035202026, 0.009066876024007797, -0.0...
0.117634
ideal: it means that many candidates will run with the full resources, basically reducing the procedure to standard search. In the case of :class:`HalvingRandomSearchCV`, the number of candidates is set by default such that the last iteration uses as much of the available resources as possible. For :class:`HalvingGridS...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/grid_search.rst
main
scikit-learn
[ -0.06724045425653458, 0.06949923932552338, -0.07496333122253418, 0.010273911990225315, 0.06677618622779846, -0.03706047311425209, -0.003955950029194355, 0.04770490899682045, 0.040651626884937286, -0.008892749436199665, -0.03303663432598114, 0.0011341448407620192, 0.016403349116444588, -0.0...
0.051897
candidates: the best candidate is the best out of these 2 candidates. It is not necessary to run an additional iteration, since it would only evaluate one candidate (namely the best one, which we have already identified). For this reason, in general, we want the last iteration to run at most ``factor`` candidates. If t...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/grid_search.rst
main
scikit-learn
[ -0.06903348863124847, -0.008715028874576092, -0.054822687059640884, 0.054655082523822784, 0.10285239666700363, -0.007887573912739754, 0.017277687788009644, -0.012087239883840084, -0.010582136921584606, -0.029113484546542168, -0.04935944452881813, -0.025346023961901665, 0.04474802687764168, ...
-0.027824
candidates ------------------------------------ Using the ``aggressive\_elimination`` parameter, you can force the search process to end up with less than ``factor`` candidates at the last iteration. .. dropdown:: Code example of aggressive elimination Ideally, we want the last iteration to evaluate ``factor`` candidat...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/grid_search.rst
main
scikit-learn
[ -0.014796246774494648, -0.010239101946353912, -0.05346173048019409, 0.0088317496702075, 0.09673740714788437, -0.04959378391504288, -0.03871581703424454, -0.028143571689724922, -0.04550565406680107, 0.010605032555758953, 0.004265068098902702, -0.010267390869557858, 0.016236815601587296, -0....
-0.068155
search ========================= .. \_gridsearch\_scoring: Specifying an objective metric ------------------------------ By default, parameter search uses the ``score`` function of the estimator to evaluate a parameter setting. These are the :func:`sklearn.metrics.accuracy\_score` for classification and :func:`sklearn....
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/grid_search.rst
main
scikit-learn
[ -0.10574311017990112, -0.018242396414279938, -0.11666902154684067, 0.012041694484651089, 0.020502032712101936, -0.019621651619672775, -0.00009855652751866728, 0.015175874345004559, -0.009677063673734665, -0.025634299963712692, -0.06459332257509232, -0.06350000947713852, 0.023347947746515274,...
0.101447
will be `np.nan`. This can be controlled by setting `error\_score="raise"` to raise an exception if one fit fails, or for example `error\_score=0` to set another value for the score of failing parameter combinations. .. \_alternative\_cv: Alternatives to brute force parameter search ====================================...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/grid_search.rst
main
scikit-learn
[ -0.06525734812021255, -0.03036469779908657, -0.042552754282951355, 0.014079288579523563, 0.08197272568941116, 0.046237438917160034, 0.021604398265480995, -0.007127811666578054, -0.10262418538331985, -0.02974672242999077, 0.021275173872709274, -0.09134874492883682, 0.01956724375486374, -0.0...
0.148786
.. \_feature\_extraction: ================== Feature extraction ================== .. currentmodule:: sklearn.feature\_extraction The :mod:`sklearn.feature\_extraction` module can be used to extract features in a format supported by machine learning algorithms from datasets consisting of formats such as text and image....
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_extraction.rst
main
scikit-learn
[ -0.09747269749641418, 0.015128346160054207, 0.020787997171282768, 0.008294324390590191, 0.13219602406024933, -0.08677376061677933, 0.0337626114487648, -0.04818582534790039, -0.09016168117523193, -0.048221755772829056, -0.02435699664056301, 0.0291560310870409, -0.042248643934726715, 0.02714...
0.104141
of the time. So as to make the resulting data structure able to fit in memory the ``DictVectorizer`` class uses a ``scipy.sparse`` matrix by default instead of a ``numpy.ndarray``. .. \_feature\_hashing: Feature hashing =============== .. currentmodule:: sklearn.feature\_extraction The class :class:`FeatureHasher` is a...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_extraction.rst
main
scikit-learn
[ -0.03342873230576515, -0.014754089526832104, 0.0027429847978055477, -0.02042795531451702, 0.06432291120290756, -0.07572956383228302, -0.026424486190080643, -0.056626658886671066, -0.02065187506377697, -0.04581763222813606, 0.0029443849343806505, 0.1133168414235115, -0.0001250156929017976, ...
0.027976
a simple modulo is used to transform the hash function to a column index, it is advisable to use a power of two as the ``n\_features`` parameter; otherwise the features will not be mapped evenly to the columns. .. rubric:: References \* `MurmurHash3 `\_. .. rubric:: References \* Kilian Weinberger, Anirban Dasgupta, Jo...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_extraction.rst
main
scikit-learn
[ -0.0482562780380249, -0.0005242021288722754, -0.04678313806653023, -0.04175005480647087, 0.04353618621826172, -0.022805549204349518, 0.015977848321199417, -0.012205061502754688, 0.005525624379515648, -0.029558034613728523, 0.02603609673678875, 0.043916940689086914, 0.05394416302442551, -0....
0.084771
2 letters. The specific function that does this step can be requested explicitly:: >>> analyze = vectorizer.build\_analyzer() >>> analyze("This is a text document to analyze.") == ( ... ['this', 'is', 'text', 'document', 'to', 'analyze']) True Each term found by the analyzer during the fit is assigned a unique integer ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_extraction.rst
main
scikit-learn
[ 0.0007226120796985924, 0.03804900497198105, -0.10679536312818527, 0.052098337560892105, 0.059784747660160065, -0.0021575712598860264, 0.050450731068849564, -0.08334003388881683, -0.07551240175962448, -0.02792021818459034, 0.001768451533280313, -0.015470498241484165, 0.012209518812596798, -...
0.004956
by CountVectorizer's default tokenizer, so if \*we've\* is in ``stop\_words``, but \*ve\* is not, \*ve\* will be retained from \*we've\* in transformed text. Our vectorizers will try to identify and warn about some kinds of inconsistencies. .. rubric:: References .. [NQY18] J. Nothman, H. Qin and R. Yurchak (2018). `"S...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_extraction.rst
main
scikit-learn
[ -0.03151006996631622, -0.05167499557137489, 0.023631684482097626, 0.050705231726169586, 0.033727016299963, 0.0470491424202919, 0.014411375857889652, -0.02046259492635727, 0.05667626112699509, 0.02092832140624523, 0.01015729084610939, 0.006634147372096777, 0.07466476410627365, -0.0177355054...
0.026441
= \log \frac{n}{\text{df}(t)} + 1 = \log(1)+1 = 1` :math:`\text{tf-idf}\_{\text{term1}} = \text{tf} \times \text{idf} = 3 \times 1 = 3` Now, if we repeat this computation for the remaining 2 terms in the document, we get :math:`\text{tf-idf}\_{\text{term2}} = 0 \times (\log(6/1)+1) = 0` :math:`\text{tf-idf}\_{\text{ter...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_extraction.rst
main
scikit-learn
[ 0.011599907651543617, -0.07557991147041321, -0.03729390725493431, -0.10820452123880386, 0.06244352459907532, -0.05182483419775963, 0.026497986167669296, -0.004420056007802486, 0.10845550894737244, 0.05610186979174614, 0.06538563221693039, -0.02861621044576168, 0.026790738105773926, 0.02183...
0.029291
The vectorizers can be told to be silent about decoding errors by setting the ``decode\_error`` parameter to either ``"ignore"`` or ``"replace"``. See the documentation for the Python function ``bytes.decode`` for more details (type ``help(bytes.decode)`` at the Python prompt). .. dropdown:: Troubleshooting decoding te...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_extraction.rst
main
scikit-learn
[ 0.0025032912380993366, -0.0005262199556455016, -0.030279411002993584, 0.02656915783882141, -0.01935858093202114, -0.09227998554706573, 0.02708342671394348, -0.021616190671920776, -0.048369940370321274, -0.06970404833555222, -0.06248006224632263, 0.0075157396495342255, 0.0198706965893507, -...
-0.10192
A collection of unigrams (what bag of words is) cannot capture phrases and multi-word expressions, effectively disregarding any word order dependence. Additionally, the bag of words model doesn't account for potential misspellings or word derivations. N-grams to the rescue! Instead of building a simple collection of un...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_extraction.rst
main
scikit-learn
[ -0.08272339403629303, -0.05421273782849312, 0.022680841386318207, -0.0022182699758559465, 0.015455411747097969, 0.07888158410787582, -0.00926154013723135, 0.0031455825082957745, 0.07370585948228836, -0.03541325032711029, 0.002161620184779167, 0.03385065123438835, 0.0450427420437336, -0.006...
0.061192
the same size), - it is not easily possible to split the vectorization work into concurrent sub tasks as the ``vocabulary\_`` attribute would have to be a shared state with a fine grained synchronization barrier: the mapping from token string to feature index is dependent on the ordering of the first occurrence of each...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_extraction.rst
main
scikit-learn
[ -0.049864619970321655, -0.03846997395157814, 0.03744862601161003, -0.01131823193281889, 0.022726673632860184, -0.031193219125270844, -0.013277816586196423, -0.06092926487326622, -0.03417343646287918, -0.044571198523044586, 0.034157197922468185, 0.04754190519452095, -0.00752082047984004, -0...
-0.003947
:ref:`sphx\_glr\_auto\_examples\_applications\_plot\_out\_of\_core\_classification.py`. Customizing the vectorizer classes ---------------------------------- It is possible to customize the behavior by passing a callable to the vectorizer constructor:: >>> def my\_tokenizer(s): ... return s.split() ... >>> vectorizer =...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_extraction.rst
main
scikit-learn
[ -0.05274226516485214, 0.03777891397476196, 0.020471755415201187, 0.011664902791380882, 0.03001045249402523, 0.01348141673952341, 0.05197751894593239, 0.02026781626045704, -0.03541845455765724, -0.03780209273099899, -0.01003773882985115, 0.02119605615735054, -0.010639342479407787, 0.0088047...
0.040431
6, 9], [12, 15, 18, 21], [24, 27, 30, 33], [36, 39, 42, 45]]) >>> patches = image.extract\_patches\_2d(one\_image, (2, 2), max\_patches=2, ... random\_state=0) >>> patches.shape (2, 2, 2, 3) >>> patches[:, :, :, 0] array([[[ 0, 3], [12, 15]], [[15, 18], [27, 30]]]) >>> patches = image.extract\_patches\_2d(one\_image, (...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/modules/feature_extraction.rst
main
scikit-learn
[ -0.047645535320043564, 0.018724817782640457, 0.09409671276807785, -0.03772318363189697, 0.03441071882843971, -0.06026696786284447, 0.013724695891141891, -0.08384823799133301, -0.08313227444887161, -0.044584762305021286, -0.06056548282504082, 0.02863369695842266, 0.047659896314144135, 0.046...
0.033248
.. \_contributing: .. raw:: html ### ⚠️ NOTE FOR AI TOOLS AND THEIR USERS: Opening a PR on scikit-learn requires \*\*human judgment, contextual understanding\*\*, and \*\*familiarity with scikit-learn’s structure and goals\*\*. It is \*\*not suitable for automatic processing\*\* by AI tools or casual code assistant usa...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.10342933982610703, 0.03467128053307533, -0.02865491807460785, 0.02714480459690094, 0.13407498598098755, -0.008586964569985867, 0.05124221369624138, 0.02233009971678257, 0.01997341960668564, 0.08874966204166412, 0.0313669852912426, -0.0990121141076088, 0.04070848971605301, -0.03324044123...
0.203883
work on, including smaller projects such as: \* `scikit-learn-contrib `\_\_ \* `joblib `\_\_ \* `sphinx-gallery `\_\_ \* `numpydoc `\_\_ \* `liac-arff `\_\_ and larger projects: \* `numpy `\_\_ \* `scipy `\_\_ \* `matplotlib `\_\_ \* and so on. Look for issues marked "help wanted" or similar. Helping these projects may...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.02965855970978737, -0.04825809225440025, 0.004350390750914812, -0.0004922260413877666, 0.10363508015871048, -0.027679305523633957, -0.0008725301595404744, 0.02502492070198059, -0.1118762418627739, 0.0639151856303215, 0.01236603781580925, -0.03543006628751755, -0.018703695386648178, 0.03...
0.173419
implemented. In case you experience issues using this package, do not hesitate to submit a ticket to the `Bug Tracker `\_. You are also welcome to post feature requests or pull requests. It is recommended to check that your issue complies with the following rules before submitting: - Verify that your issue is not being...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.11605160683393478, 0.01574612595140934, 0.027364512905478477, 0.005529009271413088, 0.061504580080509186, 0.02312937192618847, -0.046435821801424026, 0.037589702755212784, -0.171089768409729, 0.022220220416784286, 0.010116331279277802, -0.051662471145391464, 0.013237458653748035, -0.012...
0.098765
locally `, before submitting a PR. .. note:: To avoid duplicating work, it is highly advised that you search through the `issue tracker `\_ and the `PR list `\_. If in doubt about duplicated work, or if you want to work on a non-trivial feature, it's recommended to first open an issue in the `issue tracker `\_ to get s...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.1640792191028595, -0.007300903555005789, -0.02653302624821663, 0.04386371374130249, 0.059372030198574066, 0.019967172294855118, -0.029222475364804268, 0.02691909670829773, -0.07835126668214798, 0.04026046395301819, 0.0671241357922554, -0.02533208578824997, 0.0020802330691367388, 0.02642...
0.015119
https://try.github.io are excellent resources to get started with git, and understanding all of the commands shown here. .. \_pr\_checklist: Pull request checklist ---------------------- Before a PR can be merged, it needs to be approved by two core developers. An incomplete contribution -- where you expect to do more ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.10285097360610962, -0.010139006190001965, -0.056756943464279175, 0.027050165459513664, 0.06347072124481201, -0.003926360048353672, 0.024825163185596466, 0.04565289989113808, 0.004689712077379227, 0.07583408802747726, 0.032588891685009, -0.004947353154420853, -0.01483649481087923, -0.026...
0.055003
accepted\*\*. Bug-fixes or new features should be provided with non-regression tests. These tests verify the correct behavior of the fix or feature. In this manner, further modifications on the code base are granted to be consistent with the desired behavior. In the case of bug fixes, at the time of the PR, the non-reg...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.0931822657585144, -0.03620719909667969, -0.030265245586633682, 0.011039149016141891, 0.07948453724384308, -0.02838035672903061, -0.01719067618250847, 0.00925561785697937, -0.09715781360864639, 0.04295920580625534, 0.060879047960042953, 0.01166615355759859, -0.014889896847307682, -0.0454...
0.033153
viewing. .. \_commit\_markers: Commit message markers ^^^^^^^^^^^^^^^^^^^^^^ Please note that if one of the following markers appears in the latest commit message, the following actions are taken. ====================== =================== Commit Message Marker Action Taken by CI ====================== ================...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.030697399750351906, -0.031043831259012222, 0.006130509544163942, 0.005007662810385227, 0.08474034070968628, -0.08404513448476791, -0.0005242610932327807, -0.004796558525413275, -0.017137080430984497, 0.03519008308649063, 0.1359589695930481, -0.08871565759181976, -0.004841692745685577, -...
0.1125
\_stalled\_unclaimed\_issues: Stalled and Unclaimed Issues ---------------------------- Generally speaking, issues which are up for grabs will have a `"help wanted" `\_. tag. However, not all issues which need contributors will have this tag, as the "help wanted" tag is not always up-to-date with the state of the issue...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.13948920369148254, -0.0314117856323719, -0.011196531355381012, 0.030494559556245804, 0.0787552073597908, -0.004237771965563297, 0.013276847079396248, 0.0037895755376666784, -0.02511230669915676, 0.03894920274615288, 0.022422274574637413, -0.04205986112356186, -0.02644215151667595, 0.065...
0.063731
the use of scikit-learn modules, compare different algorithms or discuss their interpretation, etc. Examples live in `examples/ `\_. \* \*\*Other reStructuredText documents:\*\* These provide various other useful information (e.g., the :ref:`contributing` guide) and live in `doc/ `\_. .. dropdown:: Guidelines for writi...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.009790153242647648, 0.03971405327320099, -0.06670373678207397, 0.021959135308861732, 0.11077367514371872, -0.049048908054828644, -0.0405539907515049, 0.04471953958272934, -0.032118573784828186, 0.026226410642266273, -0.016317732632160187, -0.024257143959403038, 0.031065290793776512, -0....
0.125745
attribute, but in that case it requires using the `.. rubric:: Note` directive. \* Add one or two \*\*snippets\*\* of code in "Example" section to show how it can be used. The code should be runnable as is, i.e. it should include all required imports. Keep this section as brief as possible. .. dropdown:: Guidelines for...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.08127056807279587, 0.052223335951566696, -0.03388908505439758, -0.02771858312189579, 0.015195971354842186, -0.028711944818496704, -0.01050275657325983, -0.02944621816277504, -0.13887664675712585, -0.018832219764590263, -0.04761146754026413, 0.008446228690445423, 0.09870578348636627, -0....
0.158358
would break existing cross references and external links pointing to specific sections in the scikit-learn documentation. \* \*\*Glossary:\*\* linking to a term in the :ref:`glossary`: .. code-block:: rst :term:`cross\_validation` \* \*\*Function:\*\* to link to the documentation of a function, use the full import path...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.1045050248503685, -0.05743292719125748, -0.010263554751873016, 0.026356855407357216, 0.07429756224155426, 0.012054492719471455, -0.007931899279356003, 0.007375054992735386, -0.04416720196604729, 0.014469601213932037, -0.002597293583676219, -0.09283647686243057, -0.03232421353459358, -0....
0.047915
improving test coverage =================================== High-quality `unit testing `\_ is a corner-stone of the scikit-learn development process. For this purpose, we use the `pytest `\_ package. The tests are functions appropriately named, located in `tests` subdirectories, that check the validity of the algorithm...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ 0.009434816427528858, -0.014785481616854668, 0.015191318467259407, -0.026383336633443832, 0.06291736662387848, -0.15644024312496185, -0.014446154236793518, 0.02943546511232853, -0.0834692046046257, 0.024755986407399178, -0.008036872372031212, -0.016241908073425293, -0.04037266969680786, 0....
0.011182
benchmark suite, simply remove the `-b` flag : .. prompt:: bash asv continuous upstream/main HEAD However this can take up to two hours. The `-b` flag also accepts a regular expression for a more complex subset of benchmarks to run. To run the benchmarks without comparing to another branch, use the `run` command: .. pr...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ 0.057494573295116425, -0.029067058116197586, -0.07985781878232956, 0.04477892816066742, 0.04702230170369148, -0.07366519421339035, -0.11046656221151352, 0.009588741697371006, -0.07195913791656494, -0.009631576016545296, -0.07466887682676315, -0.027254560962319374, 0.0034051716793328524, -0...
-0.021256
zero\_one\_loss(y\_true, y\_pred, normalize) One also needs to move ``zero\_one`` from ``API\_REFERENCE`` to ``DEPRECATED\_API\_REFERENCE`` and add ``zero\_one\_loss`` to ``API\_REFERENCE`` in the ``doc/api\_reference.py`` file to reflect the changes in :ref:`api\_ref`. .. rubric:: Deprecating an attribute or a method ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.033903513103723526, 0.07871869206428528, -0.015138923190534115, 0.03563598915934563, 0.0022525631356984377, 0.046111445873975754, -0.021439984440803528, 0.03959148749709129, -0.027179215103387833, 0.014980926178395748, 0.012540224008262157, -0.014227310195565224, 0.01754646934568882, 0....
-0.019123
\_\_init\_\_(self, n\_clusters="warn"): self.n\_clusters = n\_clusters def fit(self, X, y): if self.n\_clusters == "warn": warnings.warn( "The default value of `n\_clusters` will change from 5 to 10 in 0.22.", FutureWarning, ) self.\_n\_clusters = 5 Similar to deprecations, the warning message should always give both t...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.0123855359852314, 0.014442290179431438, 0.016096364706754684, 0.07237325608730316, 0.0958225429058075, -0.012554099783301353, -0.04286406189203262, 0.04530180245637894, -0.03741803020238876, 0.0009466152987442911, 0.029252612963318825, -0.056986160576343536, 0.017218925058841705, -0.013...
0.089489
in the continuous integration build? If appropriate, help the contributor understand why tests failed. - Do the tests cover every line of code (see the coverage report in the build log)? If not, are the lines missing coverage good exceptions? - Is the code easy to read and low on redundancy? Should variable names be im...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.14615416526794434, 0.013919348828494549, -0.01817498169839382, 0.017594510689377785, 0.04180873557925224, 0.006428197026252747, -0.05224642530083656, 0.06333527714014053, -0.047255102545022964, 0.0354154072701931, 0.03497336059808731, 0.011775636114180088, 0.006340677384287119, -0.01393...
0.048234
of the code is doing the actual job. For example looking at the :meth:`~linear\_model.LinearRegression.fit` method of :class:`~linear\_model.LinearRegression`, what you're looking for might just be the call the :func:`scipy.linalg.lstsq`, but it is buried into multiple lines of input checking and the handling of differ...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/contributing.rst
main
scikit-learn
[ -0.11233507096767426, -0.035500649362802505, -0.05809038504958153, 0.07531267404556274, 0.02658149041235447, -0.07213154435157776, -0.03149694949388504, 0.0693657323718071, -0.061035219579935074, 0.0025834019761532545, 0.012538480572402477, 0.055812060832977295, 0.014366794377565384, -0.05...
0.116227
.. \_developing\_callbacks: ==================== Developing callbacks ==================== .. currentmodule:: sklearn.callback The callback protocol --------------------- To be compatible with scikit-learn estimators, :term:`callbacks` must implement the :class:`FitCallback` `protocol `\_\_: .. code-block:: python clas...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/developing_callbacks.rst
main
scikit-learn
[ -0.03729385510087013, -0.06973978877067566, -0.1043916717171669, 0.025226308032870293, 0.013454627245664597, -0.10233751684427261, -0.0032720898743718863, -0.022836970165371895, -0.02820868045091629, -0.009496423415839672, 0.009352827444672585, -0.07911575585603714, 0.0002818852663040161, ...
0.123231
levels. Auto-propagated callbacks should be registered on the top-level estimator. If the top-level estimator does not support callbacks, they can be registered on sub-estimators and are expected to work, though possibly not at full capacity. .. note:: The :meth:`~FitCallback.setup` and :meth:`~FitCallback.teardown` ho...
https://github.com/scikit-learn/scikit-learn/blob/main/doc/developers/developing_callbacks.rst
main
scikit-learn
[ -0.0904284343123436, -0.06654224544763565, 0.006303997244685888, 0.04609161987900734, 0.03183221071958542, -0.06991471350193024, -0.03420991450548172, 0.09483614563941956, -0.04441008344292641, -0.04565439373254776, -0.01973607763648033, -0.005038371775299311, 0.03826802968978882, -0.02626...
0.028547