id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
322,700 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_huber.py | sklearn.linear_model._huber.HuberRegressor | import numpy as np
from numbers import Integral, Real
from ..utils.optimize import _check_optimize_result
from ..utils._param_validation import Interval
from ..utils.validation import _check_sample_weight, validate_data
from ..utils.fixes import _get_additional_lbfgs_options_dict
from ..utils.extmath import safe_sparse... |
class HuberRegressor(LinearModel, RegressorMixin, BaseEstimator):
'''L2-regularized linear regression model that is robust to outliers.
The Huber Regressor optimizes the squared loss for the samples where
``|(y - Xw - c) / sigma| < epsilon`` and the absolute loss for the samples
where ``|(y - Xw - c) /... | 5 | 2 | 34 | 4 | 23 | 7 | 2 | 1.45 | 3 | 3 | 0 | 0 | 3 | 11 | 3 | 60 | 235 | 39 | 80 | 31 | 66 | 116 | 37 | 21 | 33 | 5 | 4 | 2 | 7 |
322,701 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_least_angle.py | sklearn.linear_model._least_angle.Lars | from ..utils import Bunch, arrayfuncs, as_float_array, check_random_state
from ..utils.validation import validate_data
from numbers import Integral, Real
from ..base import MultiOutputMixin, RegressorMixin, _fit_context
from ..utils._param_validation import Hidden, Interval, StrOptions, validate_params
import numpy as ... |
class Lars(MultiOutputMixin, RegressorMixin, LinearModel):
'''Least Angle Regression model a.k.a. LAR.
Read more in the :ref:`User Guide <least_angle_regression>`.
Parameters
----------
fit_intercept : bool, default=True
Whether to calculate the intercept for this model. If set
to f... | 7 | 3 | 40 | 5 | 31 | 5 | 4 | 0.73 | 3 | 3 | 0 | 2 | 3 | 14 | 4 | 62 | 288 | 48 | 139 | 48 | 120 | 102 | 65 | 34 | 60 | 9 | 4 | 2 | 15 |
322,702 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_least_angle.py | sklearn.linear_model._least_angle.LarsCV | from ..utils._metadata_requests import MetadataRouter, MethodMapping, _raise_for_params, _routing_enabled, process_routing
from numbers import Integral, Real
from ..base import MultiOutputMixin, RegressorMixin, _fit_context
from ..utils._param_validation import Hidden, Interval, StrOptions, validate_params
from ..utils... |
class LarsCV(Lars):
'''Cross-validated Least Angle Regression model.
See glossary entry for :term:`cross-validation estimator`.
Read more in the :ref:`User Guide <least_angle_regression>`.
Parameters
----------
fit_intercept : bool, default=True
Whether to calculate the intercept for th... | 6 | 3 | 40 | 4 | 26 | 10 | 2 | 1.23 | 1 | 10 | 4 | 1 | 4 | 10 | 4 | 66 | 314 | 55 | 116 | 44 | 98 | 143 | 59 | 29 | 54 | 6 | 5 | 2 | 9 |
322,703 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_least_angle.py | sklearn.linear_model._least_angle.LassoLars | from ..utils._param_validation import Hidden, Interval, StrOptions, validate_params
import numpy as np
from numbers import Integral, Real
class LassoLars(Lars):
"""Lasso model fit with Least Angle Regression a.k.a. Lars.
It is a Linear Model trained with an L1 prior as regularizer.
The optimization objec... |
class LassoLars(Lars):
'''Lasso model fit with Least Angle Regression a.k.a. Lars.
It is a Linear Model trained with an L1 prior as regularizer.
The optimization objective for Lasso is::
(1 / (2 * n_samples)) * ||y - Xw||^2_2 + alpha * ||w||_1
Read more in the :ref:`User Guide <least_angle_regressi... | 2 | 1 | 26 | 0 | 26 | 0 | 1 | 3.14 | 1 | 2 | 0 | 1 | 1 | 11 | 1 | 63 | 177 | 32 | 35 | 29 | 19 | 110 | 16 | 15 | 14 | 1 | 5 | 0 | 1 |
322,704 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_least_angle.py | sklearn.linear_model._least_angle.LassoLarsCV | import numpy as np
class LassoLarsCV(LarsCV):
"""Cross-validated Lasso, using the LARS algorithm.
See glossary entry for :term:`cross-validation estimator`.
The optimization objective for Lasso is::
(1 / (2 * n_samples)) * ||y - Xw||^2_2 + alpha * ||w||_1
Read more in the :ref:`User Guide <leas... |
class LassoLarsCV(LarsCV):
'''Cross-validated Lasso, using the LARS algorithm.
See glossary entry for :term:`cross-validation estimator`.
The optimization objective for Lasso is::
(1 / (2 * n_samples)) * ||y - Xw||^2_2 + alpha * ||w||_1
Read more in the :ref:`User Guide <least_angle_regression>`.
... | 2 | 1 | 24 | 0 | 24 | 0 | 1 | 4.17 | 1 | 2 | 0 | 0 | 1 | 10 | 1 | 67 | 194 | 39 | 30 | 27 | 15 | 125 | 14 | 14 | 12 | 1 | 6 | 0 | 1 |
322,705 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_least_angle.py | sklearn.linear_model._least_angle.LassoLarsIC | from numbers import Integral, Real
from ..base import MultiOutputMixin, RegressorMixin, _fit_context
from ..utils._param_validation import Hidden, Interval, StrOptions, validate_params
from math import log
from ._base import LinearModel, LinearRegression, _preprocess_data
from ..utils.validation import validate_data
im... |
class LassoLarsIC(LassoLars):
'''Lasso model fit with Lars using BIC or AIC for model selection.
The optimization objective for Lasso is::
(1 / (2 * n_samples)) * ||y - Xw||^2_2 + alpha * ||w||_1
AIC is the Akaike information criterion [2]_ and BIC is the Bayes
Information criterion [3]_. Such crit... | 6 | 3 | 38 | 5 | 24 | 9 | 3 | 1.46 | 1 | 7 | 1 | 0 | 4 | 16 | 4 | 67 | 318 | 57 | 106 | 49 | 88 | 155 | 55 | 36 | 50 | 7 | 6 | 2 | 11 |
322,706 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_linear_loss.py | sklearn.linear_model._linear_loss.LinearModelLoss | import numpy as np
from ..utils.extmath import squared_norm
from scipy import sparse
class LinearModelLoss:
"""General class for loss functions with raw_prediction = X @ coef + intercept.
Note that raw_prediction is also known as linear predictor.
The loss is the average of per sample losses and includes... |
class LinearModelLoss:
'''General class for loss functions with raw_prediction = X @ coef + intercept.
Note that raw_prediction is also known as linear predictor.
The loss is the average of per sample losses and includes a term for L2
regularization::
loss = 1 / s_sum * sum_i s_i loss(y_i, X_i ... | 13 | 10 | 62 | 5 | 32 | 26 | 6 | 0.99 | 0 | 3 | 0 | 0 | 10 | 2 | 10 | 10 | 789 | 81 | 359 | 108 | 306 | 356 | 218 | 68 | 205 | 24 | 0 | 4 | 69 |
322,707 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_logistic.py | sklearn.linear_model._logistic.LogisticRegression | import numpy as np
from ..utils.extmath import row_norms, softmax
from ..utils.parallel import Parallel, delayed
from ..svm._base import _fit_liblinear
from numbers import Integral, Real
from ..base import _fit_context
from ..utils._param_validation import Hidden, Interval, StrOptions
from ..utils.multiclass import che... |
class LogisticRegression(LinearClassifierMixin, SparseCoefMixin, BaseEstimator):
'''
Logistic Regression (aka logit, MaxEnt) classifier.
This class implements regularized logistic regression using the
'liblinear' library, 'newton-cg', 'sag', 'saga' and 'lbfgs' solvers. **Note
that regularization is... | 7 | 4 | 68 | 7 | 47 | 14 | 6 | 1.19 | 3 | 6 | 1 | 3 | 5 | 19 | 5 | 43 | 669 | 99 | 261 | 62 | 236 | 310 | 107 | 43 | 101 | 23 | 2 | 2 | 29 |
322,708 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_logistic.py | sklearn.linear_model._logistic.LogisticRegressionCV | from ..utils.extmath import row_norms, softmax
from ..utils import Bunch, check_array, check_consistent_length, check_random_state, compute_class_weight
from ..base import _fit_context
import numpy as np
from ..utils.validation import _check_method_params, _check_sample_weight, check_is_fitted, validate_data
from numbe... |
class LogisticRegressionCV(LogisticRegression, LinearClassifierMixin, BaseEstimator):
'''Logistic Regression CV (aka logit, MaxEnt) classifier.
See glossary entry for :term:`cross-validation estimator`.
This class implements logistic regression using liblinear, newton-cg, sag
or lbfgs optimizer. The ne... | 8 | 5 | 85 | 9 | 60 | 17 | 6 | 0.9 | 3 | 14 | 5 | 0 | 6 | 27 | 6 | 49 | 828 | 114 | 375 | 91 | 347 | 339 | 167 | 70 | 160 | 29 | 3 | 3 | 36 |
322,709 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_omp.py | sklearn.linear_model._omp.OrthogonalMatchingPursuit | from numbers import Integral, Real
from ._base import LinearModel, _pre_fit
import numpy as np
from ..utils._param_validation import Interval, StrOptions, validate_params
from ..base import MultiOutputMixin, RegressorMixin, _fit_context
from ..utils.validation import validate_data
class OrthogonalMatchingPursuit(Multi... |
class OrthogonalMatchingPursuit(MultiOutputMixin, RegressorMixin, LinearModel):
'''Orthogonal Matching Pursuit model (OMP).
Read more in the :ref:`User Guide <omp>`.
Parameters
----------
n_nonzero_coefs : int, default=None
Desired number of non-zero entries in the solution. Ignored if `tol... | 4 | 2 | 37 | 4 | 26 | 7 | 4 | 1.44 | 3 | 1 | 0 | 0 | 2 | 7 | 2 | 60 | 172 | 28 | 59 | 22 | 48 | 85 | 24 | 14 | 21 | 6 | 4 | 1 | 7 |
322,710 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_omp.py | sklearn.linear_model._omp.OrthogonalMatchingPursuitCV | import numpy as np
from ..utils._param_validation import Interval, StrOptions, validate_params
from ..base import MultiOutputMixin, RegressorMixin, _fit_context
from ..utils.metadata_routing import MetadataRouter, MethodMapping, _raise_for_params, _routing_enabled, process_routing
from ..model_selection import check_cv... |
class OrthogonalMatchingPursuitCV(RegressorMixin, LinearModel):
'''Cross-validated Orthogonal Matching Pursuit model (OMP).
See glossary entry for :term:`cross-validation estimator`.
Read more in the :ref:`User Guide <omp>`.
Parameters
----------
copy : bool, default=True
Whether the de... | 5 | 3 | 35 | 4 | 21 | 10 | 2 | 1.59 | 2 | 6 | 5 | 0 | 3 | 10 | 3 | 60 | 228 | 39 | 73 | 34 | 59 | 116 | 32 | 24 | 28 | 3 | 4 | 1 | 5 |
322,711 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_passive_aggressive.py | sklearn.linear_model._passive_aggressive.PassiveAggressiveClassifier | from numbers import Real
from ..base import _fit_context
from ..utils._param_validation import Interval, StrOptions
from ._stochastic_gradient import DEFAULT_EPSILON, BaseSGDClassifier, BaseSGDRegressor
class PassiveAggressiveClassifier(BaseSGDClassifier):
"""Passive Aggressive Classifier.
Read more in the :r... |
class PassiveAggressiveClassifier(BaseSGDClassifier):
'''Passive Aggressive Classifier.
Read more in the :ref:`User Guide <passive_aggressive>`.
Parameters
----------
C : float, default=1.0
Maximum step size (regularization). Defaults to 1.0.
fit_intercept : bool, default=True
W... | 6 | 3 | 43 | 4 | 27 | 12 | 2 | 1.8 | 1 | 2 | 0 | 0 | 3 | 2 | 3 | 79 | 301 | 55 | 88 | 29 | 64 | 158 | 17 | 9 | 13 | 4 | 5 | 2 | 7 |
322,712 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_passive_aggressive.py | sklearn.linear_model._passive_aggressive.PassiveAggressiveRegressor | from ..base import _fit_context
from ._stochastic_gradient import DEFAULT_EPSILON, BaseSGDClassifier, BaseSGDRegressor
from ..utils._param_validation import Interval, StrOptions
from numbers import Real
class PassiveAggressiveRegressor(BaseSGDRegressor):
"""Passive Aggressive Regressor.
Read more in the :ref:... |
class PassiveAggressiveRegressor(BaseSGDRegressor):
'''Passive Aggressive Regressor.
Read more in the :ref:`User Guide <passive_aggressive>`.
Parameters
----------
C : float, default=1.0
Maximum step size (regularization). Defaults to 1.0.
fit_intercept : bool, default=True
Whet... | 6 | 3 | 35 | 3 | 22 | 9 | 2 | 1.81 | 1 | 1 | 0 | 0 | 3 | 2 | 3 | 77 | 260 | 49 | 75 | 28 | 52 | 136 | 15 | 9 | 11 | 3 | 5 | 1 | 6 |
322,713 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_perceptron.py | sklearn.linear_model._perceptron.Perceptron | from ..utils._param_validation import Interval, StrOptions
from numbers import Real
from ._stochastic_gradient import BaseSGDClassifier
class Perceptron(BaseSGDClassifier):
"""Linear perceptron classifier.
The implementation is a wrapper around :class:`~sklearn.linear_model.SGDClassifier`
by fixing the `l... |
class Perceptron(BaseSGDClassifier):
'''Linear perceptron classifier.
The implementation is a wrapper around :class:`~sklearn.linear_model.SGDClassifier`
by fixing the `loss` and `learning_rate` parameters as::
SGDClassifier(loss="perceptron", learning_rate="constant")
Other available parameter... | 2 | 1 | 41 | 0 | 41 | 0 | 1 | 2.26 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 77 | 217 | 44 | 53 | 22 | 32 | 120 | 7 | 3 | 5 | 1 | 5 | 0 | 1 |
322,714 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_quantile.py | sklearn.linear_model._quantile.QuantileRegressor | from numbers import Real
from ..utils._param_validation import Interval, StrOptions
from scipy.optimize import linprog
from ..utils.fixes import parse_version, sp_version
from ..exceptions import ConvergenceWarning
from ..utils.validation import _check_sample_weight, validate_data
from ._base import LinearModel
from sc... |
class QuantileRegressor(LinearModel, RegressorMixin, BaseEstimator):
'''Linear regression model that predicts conditional quantiles.
The linear :class:`QuantileRegressor` optimizes the pinball loss for a
desired `quantile` and is robust to outliers.
This model uses an L1 regularization like
:class:... | 5 | 2 | 57 | 5 | 37 | 16 | 5 | 0.88 | 3 | 3 | 1 | 0 | 3 | 8 | 3 | 60 | 282 | 41 | 129 | 38 | 116 | 113 | 62 | 29 | 58 | 12 | 4 | 2 | 14 |
322,715 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_ransac.py | sklearn.linear_model._ransac.RANSACRegressor | from ..utils.random import sample_without_replacement
from ..utils._bunch import Bunch
import numpy as np
from ..utils.validation import _check_method_params, _check_sample_weight, check_is_fitted, has_fit_parameter, validate_data
from ..base import BaseEstimator, MetaEstimatorMixin, MultiOutputMixin, RegressorMixin, _... |
class RANSACRegressor(MetaEstimatorMixin, RegressorMixin, MultiOutputMixin, BaseEstimator):
'''RANSAC (RANdom SAmple Consensus) algorithm.
RANSAC is an iterative algorithm for the robust estimation of parameters
from a subset of inliers from the complete data set.
Read more in the :ref:`User Guide <ran... | 12 | 5 | 72 | 11 | 44 | 18 | 6 | 0.79 | 4 | 9 | 5 | 0 | 6 | 18 | 6 | 40 | 646 | 110 | 300 | 86 | 270 | 238 | 148 | 63 | 141 | 28 | 2 | 2 | 36 |
322,716 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_ridge.py | sklearn.linear_model._ridge.Ridge | from ..utils._array_api import _is_numpy_namespace, _ravel, device, get_namespace, get_namespace_and_device
from ..utils.validation import _check_sample_weight, check_is_fitted, validate_data
from scipy import linalg, optimize, sparse
from ..base import MultiOutputMixin, RegressorMixin, _fit_context, is_classifier
cla... |
class Ridge(MultiOutputMixin, RegressorMixin, _BaseRidge):
'''Linear least squares with l2 regularization.
Minimizes the objective function::
||y - Xw||^2_2 + alpha * ||w||^2_2
This model solves a regression model where the loss function is
the linear least squares function and regularization is gi... | 5 | 2 | 21 | 1 | 14 | 5 | 1 | 3.31 | 3 | 1 | 0 | 0 | 3 | 0 | 3 | 63 | 245 | 51 | 45 | 19 | 29 | 149 | 13 | 7 | 9 | 1 | 5 | 0 | 3 |
322,717 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_ridge.py | sklearn.linear_model._ridge.RidgeCV | from ..base import MultiOutputMixin, RegressorMixin, _fit_context, is_classifier
class RidgeCV(MultiOutputMixin, RegressorMixin, _BaseRidgeCV):
"""Ridge regression with built-in cross-validation.
See glossary entry for :term:`cross-validation estimator`.
By default, it performs efficient Leave-One-Out Cr... |
class RidgeCV(MultiOutputMixin, RegressorMixin, _BaseRidgeCV):
'''Ridge regression with built-in cross-validation.
See glossary entry for :term:`cross-validation estimator`.
By default, it performs efficient Leave-One-Out Cross-Validation.
Read more in the :ref:`User Guide <ridge_regression>`.
Para... | 3 | 2 | 41 | 7 | 3 | 31 | 1 | 27.4 | 3 | 1 | 0 | 0 | 1 | 0 | 1 | 64 | 181 | 39 | 5 | 3 | 2 | 137 | 4 | 2 | 2 | 1 | 5 | 0 | 1 |
322,718 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_ridge.py | sklearn.linear_model._ridge.RidgeClassifier | from ..utils._param_validation import Interval, StrOptions, validate_params
from ..base import MultiOutputMixin, RegressorMixin, _fit_context, is_classifier
class RidgeClassifier(_RidgeClassifierMixin, _BaseRidge):
"""Classifier using Ridge regression.
This classifier first converts the target values into ``{... |
class RidgeClassifier(_RidgeClassifierMixin, _BaseRidge):
'''Classifier using Ridge regression.
This classifier first converts the target values into ``{-1, 1}`` and
then treats the problem as a regression task (multi-output regression in
the multiclass case).
Read more in the :ref:`User Guide <rid... | 5 | 2 | 19 | 2 | 11 | 6 | 1 | 3.48 | 2 | 1 | 0 | 0 | 3 | 1 | 3 | 69 | 230 | 51 | 40 | 21 | 23 | 139 | 13 | 8 | 9 | 1 | 5 | 0 | 3 |
322,719 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_ridge.py | sklearn.linear_model._ridge.RidgeClassifierCV | from ..utils._param_validation import Interval, StrOptions, validate_params
from ..base import MultiOutputMixin, RegressorMixin, _fit_context, is_classifier
class RidgeClassifierCV(_RidgeClassifierMixin, _BaseRidgeCV):
"""Ridge classifier with built-in cross-validation.
See glossary entry for :term:`cross-val... |
class RidgeClassifierCV(_RidgeClassifierMixin, _BaseRidgeCV):
'''Ridge classifier with built-in cross-validation.
See glossary entry for :term:`cross-validation estimator`.
By default, it performs Leave-One-Out Cross-Validation. Currently,
only the n_features > n_samples case is handled efficiently.
... | 4 | 2 | 32 | 4 | 12 | 17 | 2 | 4.23 | 2 | 1 | 0 | 0 | 2 | 1 | 2 | 71 | 202 | 40 | 31 | 18 | 18 | 131 | 12 | 8 | 9 | 2 | 5 | 1 | 3 |
322,720 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_ridge.py | sklearn.linear_model._ridge._BaseRidge | from ..utils.validation import _check_sample_weight, check_is_fitted, validate_data
from numbers import Integral, Real
import numpy as np
from ..utils._array_api import _is_numpy_namespace, _ravel, device, get_namespace, get_namespace_and_device
import warnings
from ..utils._param_validation import Interval, StrOptions... |
class _BaseRidge(LinearModel, metaclass=ABCMeta):
@abstractmethod
def __init__(self, alpha=1.0, *, fit_intercept=True, copy_X=True, max_iter=None, tol=0.0001, solver='auto', positive=False, random_state=None):
pass
def fit(self, X, y, sample_weight=None):
pass | 4 | 0 | 60 | 5 | 53 | 2 | 6 | 0.03 | 2 | 1 | 0 | 2 | 2 | 12 | 2 | 57 | 138 | 12 | 122 | 29 | 107 | 4 | 39 | 17 | 36 | 11 | 4 | 2 | 12 |
322,721 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_ridge.py | sklearn.linear_model._ridge._BaseRidgeCV | from functools import partial
from ..metrics import check_scoring, get_scorer_names
from numbers import Integral, Real
from ._base import LinearClassifierMixin, LinearModel, _preprocess_data, _rescale_data
import numbers
from ..model_selection import GridSearchCV
from ..base import MultiOutputMixin, RegressorMixin, _fi... |
class _BaseRidgeCV(LinearModel):
def __init__(self, alphas=(0.1, 1.0, 10.0), *, fit_intercept=True, scoring=None, cv=None, gcv_mode=None, store_cv_results=False, alpha_per_target=False):
pass
def fit(self, X, y, sample_weight=None, **params):
'''Fit Ridge regression model with cv.
Par... | 6 | 2 | 40 | 4 | 26 | 9 | 5 | 0.33 | 1 | 14 | 7 | 2 | 5 | 14 | 5 | 60 | 214 | 26 | 141 | 46 | 125 | 47 | 73 | 36 | 67 | 18 | 4 | 3 | 23 |
322,722 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_ridge.py | sklearn.linear_model._ridge._IdentityClassifier | from sklearn.base import BaseEstimator
from ._base import LinearClassifierMixin, LinearModel, _preprocess_data, _rescale_data
class _IdentityClassifier(LinearClassifierMixin, BaseEstimator):
"""Fake classifier which will directly output the prediction.
We inherit from LinearClassifierMixin to get the proper s... |
class _IdentityClassifier(LinearClassifierMixin, BaseEstimator):
'''Fake classifier which will directly output the prediction.
We inherit from LinearClassifierMixin to get the proper shape for the
output `y`.
'''
def __init__(self, classes):
pass
def decision_function(self, y_predict)... | 3 | 1 | 2 | 0 | 2 | 0 | 1 | 0.8 | 2 | 0 | 0 | 0 | 2 | 1 | 2 | 38 | 12 | 3 | 5 | 4 | 2 | 4 | 5 | 4 | 2 | 1 | 2 | 0 | 2 |
322,723 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_ridge.py | sklearn.linear_model._ridge._IdentityRegressor | from sklearn.base import BaseEstimator
from ..base import MultiOutputMixin, RegressorMixin, _fit_context, is_classifier
class _IdentityRegressor(RegressorMixin, BaseEstimator):
"""Fake regressor which will directly output the prediction."""
def decision_function(self, y_predict):
return y_predict
... |
class _IdentityRegressor(RegressorMixin, BaseEstimator):
'''Fake regressor which will directly output the prediction.'''
def decision_function(self, y_predict):
pass
def predict(self, y_predict):
pass | 3 | 1 | 2 | 0 | 2 | 0 | 1 | 0.2 | 2 | 0 | 0 | 0 | 2 | 0 | 2 | 35 | 8 | 2 | 5 | 3 | 2 | 1 | 5 | 3 | 2 | 1 | 2 | 0 | 2 |
322,724 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_ridge.py | sklearn.linear_model._ridge._RidgeClassifierMixin | from ..preprocessing import LabelBinarizer
from scipy import linalg, optimize, sparse
from ..utils import Bunch, check_array, check_consistent_length, check_scalar, column_or_1d, compute_sample_weight
from ..utils.validation import _check_sample_weight, check_is_fitted, validate_data
from ._base import LinearClassifier... |
class _RidgeClassifierMixin(LinearClassifierMixin):
def _prepare_data(self, X, y, sample_weight, solver):
'''Validate `X` and `y` and binarize `y`.
Parameters
----------
X : {ndarray, sparse matrix} of shape (n_samples, n_features)
Training data.
y : ndarray of ... | 6 | 3 | 21 | 3 | 8 | 10 | 2 | 1.21 | 1 | 2 | 1 | 2 | 4 | 1 | 4 | 9 | 88 | 15 | 33 | 11 | 27 | 40 | 24 | 10 | 19 | 3 | 2 | 1 | 7 |
322,725 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_ridge.py | sklearn.linear_model._ridge._RidgeGCV | from ..utils.extmath import row_norms, safe_sparse_dot
from scipy.sparse import linalg as sp_linalg
from ._base import LinearClassifierMixin, LinearModel, _preprocess_data, _rescale_data
from ..utils.validation import _check_sample_weight, check_is_fitted, validate_data
import numpy as np
from scipy import linalg, opti... |
class _RidgeGCV(LinearModel):
'''Ridge regression with built-in Leave-one-out Cross-Validation.
This class is not intended to be used directly. Use RidgeCV instead.
`_RidgeGCV` uses a Generalized Cross-Validation for model selection. It's an
efficient approximation of leave-one-out cross-validation (LO... | 21 | 14 | 29 | 3 | 17 | 9 | 3 | 0.66 | 1 | 8 | 3 | 0 | 16 | 13 | 18 | 73 | 597 | 87 | 308 | 127 | 272 | 204 | 224 | 110 | 205 | 23 | 4 | 4 | 58 |
322,726 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_ridge.py | sklearn.linear_model._ridge._XT_CenterStackOp | import numpy as np
from ..utils.extmath import row_norms, safe_sparse_dot
from scipy import linalg, optimize, sparse
class _XT_CenterStackOp(sparse.linalg.LinearOperator):
"""Behaves as transposed centered and scaled X with an intercept column.
This operator behaves as
np.hstack([X - sqrt_sw[:, None] * X_... |
class _XT_CenterStackOp(sparse.linalg.LinearOperator):
'''Behaves as transposed centered and scaled X with an intercept column.
This operator behaves as
np.hstack([X - sqrt_sw[:, None] * X_mean, sqrt_sw[:, None]]).T
'''
def __init__(self, X, X_mean, sqrt_sw):
pass
def _matvec(self, v)... | 4 | 1 | 8 | 0 | 8 | 0 | 1 | 0.17 | 1 | 1 | 0 | 0 | 3 | 3 | 3 | 3 | 32 | 4 | 24 | 12 | 20 | 4 | 20 | 12 | 16 | 1 | 1 | 0 | 3 |
322,727 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_ridge.py | sklearn.linear_model._ridge._X_CenterStackOp | from ..utils.extmath import row_norms, safe_sparse_dot
from scipy import linalg, optimize, sparse
class _X_CenterStackOp(sparse.linalg.LinearOperator):
"""Behaves as centered and scaled X with an added intercept column.
This operator behaves as
np.hstack([X - sqrt_sw[:, None] * X_mean, sqrt_sw[:, None]])
... |
class _X_CenterStackOp(sparse.linalg.LinearOperator):
'''Behaves as centered and scaled X with an added intercept column.
This operator behaves as
np.hstack([X - sqrt_sw[:, None] * X_mean, sqrt_sw[:, None]])
'''
def __init__(self, X, X_mean, sqrt_sw):
pass
def _matvec(self, v):
... | 5 | 1 | 5 | 0 | 5 | 0 | 1 | 0.18 | 1 | 2 | 1 | 0 | 4 | 3 | 4 | 4 | 31 | 5 | 22 | 9 | 17 | 4 | 14 | 9 | 9 | 1 | 1 | 0 | 4 |
322,728 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_stochastic_gradient.py | sklearn.linear_model._stochastic_gradient.BaseSGD | from numbers import Integral, Real
from ..base import BaseEstimator, OutlierMixin, RegressorMixin, _fit_context, clone, is_classifier
from ..model_selection import ShuffleSplit, StratifiedShuffleSplit
from abc import ABCMeta, abstractmethod
from ._base import LinearClassifierMixin, SparseCoefMixin, make_dataset
from ..... |
class BaseSGD(SparseCoefMixin, BaseEstimator, metaclass=ABCMeta):
'''Base class for SGD classification and regression.'''
def __init__(self, loss, *, penalty='l2', alpha=0.0001, C=1.0, l1_ratio=0.15, fit_intercept=True, max_iter=1000, tol=0.001, shuffle=True, verbose=0, epsilon=0.1, random_state=None, learnin... | 12 | 6 | 23 | 1 | 19 | 3 | 3 | 0.13 | 3 | 5 | 3 | 3 | 10 | 27 | 10 | 63 | 252 | 24 | 201 | 80 | 156 | 27 | 108 | 46 | 97 | 14 | 3 | 3 | 34 |
322,729 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_stochastic_gradient.py | sklearn.linear_model._stochastic_gradient.BaseSGDClassifier | from ..utils.validation import _check_sample_weight, check_is_fitted, validate_data
import numpy as np
from ..utils.parallel import Parallel, delayed
from ..utils._param_validation import Hidden, Interval, StrOptions
from .._loss._loss import CyHalfBinomialLoss, CyHalfSquaredError, CyHuberLoss
import warnings
from ..ex... |
class BaseSGDClassifier(LinearClassifierMixin, BaseSGD, metaclass=ABCMeta):
@abstractmethod
def __init__(self, loss='hinge', *, penalty='l2', alpha=0.0001, l1_ratio=0.15, fit_intercept=True, max_iter=1000, tol=0.001, shuffle=True, verbose=0, epsilon=DEFAULT_EPSILON, n_jobs=None, random_state=None, learning_ra... | 12 | 4 | 49 | 5 | 36 | 8 | 3 | 0.21 | 3 | 5 | 2 | 3 | 8 | 17 | 8 | 76 | 426 | 45 | 314 | 91 | 254 | 67 | 92 | 35 | 83 | 7 | 4 | 2 | 26 |
322,730 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_stochastic_gradient.py | sklearn.linear_model._stochastic_gradient.BaseSGDRegressor | from ..utils import check_random_state, compute_class_weight
from numbers import Integral, Real
from ._sgd_fast import EpsilonInsensitive, Hinge, ModifiedHuber, SquaredEpsilonInsensitive, SquaredHinge, _plain_sgd32, _plain_sgd64
from ..base import BaseEstimator, OutlierMixin, RegressorMixin, _fit_context, clone, is_cla... |
class BaseSGDRegressor(RegressorMixin, BaseSGD):
@abstractmethod
def __init__(self, loss='squared_error', *, penalty='l2', alpha=0.0001, l1_ratio=0.15, fit_intercept=True, max_iter=1000, tol=0.001, shuffle=True, verbose=0, epsilon=DEFAULT_EPSILON, random_state=None, learning_rate='invscaling', eta0=0.01, powe... | 13 | 4 | 38 | 4 | 27 | 7 | 2 | 0.24 | 2 | 3 | 1 | 2 | 9 | 10 | 9 | 74 | 372 | 49 | 262 | 90 | 202 | 63 | 82 | 37 | 72 | 6 | 4 | 2 | 21 |
322,731 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_stochastic_gradient.py | sklearn.linear_model._stochastic_gradient.SGDClassifier | import numpy as np
from ..utils._param_validation import Hidden, Interval, StrOptions
from ..utils.validation import _check_sample_weight, check_is_fitted, validate_data
from ..utils.metaestimators import available_if
from numbers import Integral, Real
class SGDClassifier(BaseSGDClassifier):
"""Linear classifiers ... |
class SGDClassifier(BaseSGDClassifier):
'''Linear classifiers (SVM, logistic regression, etc.) with SGD training.
This estimator implements regularized linear models with stochastic
gradient descent (SGD) learning: the gradient of the loss is estimated
each sample at a time and the model is updated alo... | 7 | 3 | 39 | 5 | 22 | 12 | 3 | 2.53 | 1 | 3 | 0 | 3 | 4 | 0 | 4 | 80 | 443 | 76 | 104 | 38 | 73 | 263 | 34 | 12 | 29 | 6 | 5 | 3 | 10 |
322,732 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_stochastic_gradient.py | sklearn.linear_model._stochastic_gradient.SGDOneClassSVM | from numbers import Integral, Real
from ..utils.validation import _check_sample_weight, check_is_fitted, validate_data
from ..utils.extmath import safe_sparse_dot
from ..exceptions import ConvergenceWarning
import warnings
from ._base import LinearClassifierMixin, SparseCoefMixin, make_dataset
from ..utils._param_valid... |
class SGDOneClassSVM(OutlierMixin, BaseSGD):
'''Solves linear One-Class SVM using Stochastic Gradient Descent.
This implementation is meant to be used with a kernel approximation
technique (e.g. `sklearn.kernel_approximation.Nystroem`) to obtain results
similar to `sklearn.svm.OneClassSVM` which uses a... | 13 | 7 | 39 | 5 | 25 | 9 | 2 | 0.77 | 2 | 5 | 1 | 1 | 10 | 11 | 10 | 75 | 553 | 87 | 265 | 87 | 217 | 204 | 96 | 48 | 85 | 5 | 4 | 2 | 23 |
322,733 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_stochastic_gradient.py | sklearn.linear_model._stochastic_gradient.SGDRegressor | from ..utils._param_validation import Hidden, Interval, StrOptions
from numbers import Integral, Real
class SGDRegressor(BaseSGDRegressor):
"""Linear model fitted by minimizing a regularized empirical loss with SGD.
SGD stands for Stochastic Gradient Descent: the gradient of the loss is
estimated each sam... |
class SGDRegressor(BaseSGDRegressor):
'''Linear model fitted by minimizing a regularized empirical loss with SGD.
SGD stands for Stochastic Gradient Descent: the gradient of the loss is
estimated each sample at a time and the model is updated along the way with
a decreasing strength schedule (aka learn... | 2 | 1 | 44 | 0 | 44 | 0 | 1 | 3.22 | 1 | 1 | 0 | 2 | 1 | 0 | 1 | 75 | 293 | 48 | 58 | 25 | 34 | 187 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
322,734 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_stochastic_gradient.py | sklearn.linear_model._stochastic_gradient._ValidationScoreCallback | import numpy as np
from ..base import BaseEstimator, OutlierMixin, RegressorMixin, _fit_context, clone, is_classifier
class _ValidationScoreCallback:
"""Callback for early stopping based on validation score"""
def __init__(self, estimator, X_val, y_val, sample_weight_val, classes=None):
self.estimator... |
class _ValidationScoreCallback:
'''Callback for early stopping based on validation score'''
def __init__(self, estimator, X_val, y_val, sample_weight_val, classes=None):
pass
def __call__(self, coef, intercept):
pass | 3 | 1 | 7 | 0 | 7 | 1 | 2 | 0.14 | 0 | 0 | 0 | 0 | 2 | 4 | 2 | 2 | 17 | 2 | 14 | 8 | 11 | 2 | 14 | 8 | 11 | 2 | 0 | 1 | 3 |
322,735 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/linear_model/_theil_sen.py | sklearn.linear_model._theil_sen.TheilSenRegressor | from ._base import LinearModel
from ..utils._param_validation import Hidden, Interval, StrOptions
from ..utils.parallel import Parallel, delayed
from itertools import combinations
from joblib import effective_n_jobs
from ..utils import check_random_state
from numbers import Integral, Real
import numpy as np
from ..util... |
class TheilSenRegressor(RegressorMixin, LinearModel):
'''Theil-Sen Estimator: robust multivariate regression model.
The algorithm calculates least square solutions on subsets with size
n_subsamples of the samples in X. Any value of n_subsamples between the
number of features and samples leads to an est... | 5 | 2 | 41 | 4 | 33 | 5 | 5 | 0.98 | 2 | 7 | 1 | 0 | 3 | 14 | 3 | 60 | 261 | 40 | 112 | 45 | 95 | 110 | 58 | 31 | 54 | 8 | 4 | 3 | 14 |
322,736 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/manifold/_isomap.py | sklearn.manifold._isomap.Isomap | from scipy.sparse.csgraph import connected_components, shortest_path
from ..utils.graph import _fix_connected_components
from ..neighbors import NearestNeighbors, kneighbors_graph, radius_neighbors_graph
from ..base import BaseEstimator, ClassNamePrefixFeaturesOutMixin, TransformerMixin, _fit_context
from ..decompositi... |
class Isomap(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstimator):
'''Isomap Embedding.
Non-linear dimensionality reduction through Isometric Mapping
Read more in the :ref:`User Guide <isomap>`.
Parameters
----------
n_neighbors : int or None, default=5
Number of neighbors ... | 10 | 5 | 35 | 4 | 21 | 10 | 2 | 1.03 | 3 | 7 | 3 | 0 | 7 | 19 | 7 | 43 | 415 | 72 | 169 | 62 | 140 | 174 | 72 | 41 | 64 | 7 | 2 | 2 | 16 |
322,737 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/manifold/_locally_linear.py | sklearn.manifold._locally_linear.LocallyLinearEmbedding | from numbers import Integral, Real
from ..neighbors import NearestNeighbors
from ..base import BaseEstimator, ClassNamePrefixFeaturesOutMixin, TransformerMixin, _fit_context, _UnstableArchMixin
from ..utils._param_validation import Interval, StrOptions, validate_params
import numpy as np
from ..utils.validation import ... |
class LocallyLinearEmbedding(ClassNamePrefixFeaturesOutMixin, TransformerMixin, _UnstableArchMixin, BaseEstimator):
'''Locally Linear Embedding.
Read more in the :ref:`User Guide <locally_linear_embedding>`.
Parameters
----------
n_neighbors : int, default=5
Number of neighbors to consider ... | 8 | 4 | 24 | 2 | 14 | 8 | 1 | 1.58 | 4 | 3 | 1 | 0 | 5 | 16 | 5 | 42 | 278 | 43 | 91 | 49 | 63 | 144 | 37 | 27 | 31 | 2 | 2 | 1 | 6 |
322,738 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/manifold/_mds.py | sklearn.manifold._mds.MDS | import warnings
from ..utils._param_validation import Interval, StrOptions, validate_params
from ..utils.validation import validate_data
from numbers import Integral, Real
from ..metrics import euclidean_distances
from ..base import BaseEstimator, _fit_context
class MDS(BaseEstimator):
"""Multidimensional scaling.... |
class MDS(BaseEstimator):
'''Multidimensional scaling.
Read more in the :ref:`User Guide <multidimensional_scaling>`.
Parameters
----------
n_components : int, default=2
Number of dimensions in which to immerse the dissimilarities.
metric : bool, default=True
If ``True``, perfor... | 6 | 3 | 30 | 3 | 17 | 10 | 2 | 1.85 | 1 | 2 | 0 | 0 | 4 | 15 | 4 | 35 | 284 | 53 | 81 | 34 | 62 | 150 | 33 | 20 | 28 | 5 | 2 | 1 | 8 |
322,739 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/manifold/_spectral_embedding.py | sklearn.manifold._spectral_embedding.SpectralEmbedding | from ..base import BaseEstimator, _fit_context
from ..utils import check_array, check_random_state, check_symmetric
from ..utils._param_validation import Interval, StrOptions, validate_params
import warnings
from ..metrics.pairwise import rbf_kernel
from ..utils.validation import validate_data
from scipy import sparse
... |
class SpectralEmbedding(BaseEstimator):
'''Spectral embedding for non-linear dimensionality reduction.
Forms an affinity matrix given by the specified function and
applies spectral decomposition to the corresponding graph laplacian.
The resulting transformation is given by the value of the
eigenvec... | 7 | 4 | 29 | 3 | 16 | 10 | 2 | 1.52 | 1 | 3 | 1 | 0 | 5 | 12 | 5 | 36 | 307 | 47 | 103 | 36 | 85 | 157 | 48 | 24 | 42 | 8 | 2 | 2 | 12 |
322,740 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/manifold/_t_sne.py | sklearn.manifold._t_sne.TSNE | from ..utils._openmp_helpers import _openmp_effective_n_threads
from time import time
from scipy.sparse import csr_matrix, issparse
import numpy as np
from ..metrics.pairwise import _VALID_METRICS, pairwise_distances
from ..decomposition import PCA
from ..utils.validation import _num_samples, check_non_negative, valida... |
class TSNE(ClassNamePrefixFeaturesOutMixin, TransformerMixin, BaseEstimator):
'''T-distributed Stochastic Neighbor Embedding.
t-SNE [1] is a tool to visualize high-dimensional data. It converts
similarities between data points to joint probabilities and tries
to minimize the Kullback-Leibler divergence... | 12 | 6 | 45 | 4 | 31 | 10 | 4 | 0.94 | 3 | 8 | 2 | 0 | 8 | 19 | 8 | 44 | 625 | 89 | 277 | 85 | 235 | 259 | 130 | 52 | 121 | 21 | 2 | 3 | 33 |
322,741 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_pairwise_distances_reduction/_dispatcher.py | sklearn.metrics._pairwise_distances_reduction._dispatcher.ArgKmin | import numpy as np
from ._argkmin import ArgKmin32, ArgKmin64
class ArgKmin(BaseDistancesReductionDispatcher):
"""Compute the argkmin of row vectors of X on the ones of Y.
For each row vector of X, computes the indices of k first the rows
vectors of Y with the smallest distances.
ArgKmin is typically... |
class ArgKmin(BaseDistancesReductionDispatcher):
'''Compute the argkmin of row vectors of X on the ones of Y.
For each row vector of X, computes the indices of k first the rows
vectors of Y with the smallest distances.
ArgKmin is typically used to perform
bruteforce k-nearest neighbors queries.
... | 3 | 2 | 119 | 19 | 37 | 63 | 3 | 1.85 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 4 | 134 | 23 | 39 | 13 | 26 | 72 | 7 | 2 | 5 | 3 | 1 | 1 | 3 |
322,742 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_pairwise_distances_reduction/_dispatcher.py | sklearn.metrics._pairwise_distances_reduction._dispatcher.ArgKminClassMode | from typing import List
from ._argkmin_classmode import ArgKminClassMode32, ArgKminClassMode64
import numpy as np
class ArgKminClassMode(BaseDistancesReductionDispatcher):
"""Compute the argkmin of row vectors of X on the ones of Y with labels.
For each row vector of X, computes the indices of k first the row... |
class ArgKminClassMode(BaseDistancesReductionDispatcher):
'''Compute the argkmin of row vectors of X on the ones of Y with labels.
For each row vector of X, computes the indices of k first the rows
vectors of Y with the smallest distances. Computes weighted mode of labels.
ArgKminClassMode is typically... | 5 | 2 | 72 | 10 | 27 | 35 | 3 | 1.4 | 1 | 4 | 0 | 0 | 0 | 0 | 2 | 5 | 162 | 25 | 57 | 18 | 40 | 80 | 12 | 4 | 9 | 4 | 1 | 1 | 5 |
322,743 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_pairwise_distances_reduction/_dispatcher.py | sklearn.metrics._pairwise_distances_reduction._dispatcher.BaseDistancesReductionDispatcher | from .._dist_metrics import BOOL_METRICS, METRIC_MAPPING64, DistanceMetric
from scipy.sparse import issparse
from typing import List
from ... import get_config
from abc import abstractmethod
import numpy as np
class BaseDistancesReductionDispatcher:
"""Abstract base dispatcher for pairwise distance computation & r... |
class BaseDistancesReductionDispatcher:
'''Abstract base dispatcher for pairwise distance computation & reduction.
Each dispatcher extending the base :class:`BaseDistancesReductionDispatcher`
dispatcher must implement the :meth:`compute` classmethod.
'''
@classmethod
def valid_metrics(cls) ... | 10 | 3 | 22 | 3 | 11 | 9 | 1 | 1 | 0 | 3 | 0 | 4 | 0 | 0 | 3 | 3 | 110 | 17 | 47 | 16 | 32 | 47 | 14 | 8 | 8 | 2 | 0 | 1 | 6 |
322,744 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_pairwise_distances_reduction/_dispatcher.py | sklearn.metrics._pairwise_distances_reduction._dispatcher.RadiusNeighbors | from ._radius_neighbors import RadiusNeighbors32, RadiusNeighbors64
import numpy as np
class RadiusNeighbors(BaseDistancesReductionDispatcher):
"""Compute radius-based neighbors for two sets of vectors.
For each row-vector X[i] of the queries X, find all the indices j of
row-vectors in Y such that:
... |
class RadiusNeighbors(BaseDistancesReductionDispatcher):
'''Compute radius-based neighbors for two sets of vectors.
For each row-vector X[i] of the queries X, find all the indices j of
row-vectors in Y such that:
dist(X[i], Y[j]) <= radius
The distance function `dist` depends on... | 3 | 2 | 127 | 20 | 40 | 67 | 3 | 1.83 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 4 | 144 | 25 | 42 | 14 | 28 | 77 | 7 | 2 | 5 | 3 | 1 | 1 | 3 |
322,745 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_pairwise_distances_reduction/_dispatcher.py | sklearn.metrics._pairwise_distances_reduction._dispatcher.RadiusNeighborsClassMode | import numpy as np
from ._radius_neighbors_classmode import RadiusNeighborsClassMode32, RadiusNeighborsClassMode64
from typing import List
class RadiusNeighborsClassMode(BaseDistancesReductionDispatcher):
"""Compute radius-based class modes of row vectors of X using the
those of Y.
For each row-vector X[i... |
class RadiusNeighborsClassMode(BaseDistancesReductionDispatcher):
'''Compute radius-based class modes of row vectors of X using the
those of Y.
For each row-vector X[i] of the queries X, find all the indices j of
row-vectors in Y such that:
dist(X[i], Y[j]) <= radius
RadiusN... | 5 | 2 | 63 | 1 | 29 | 34 | 3 | 1.33 | 1 | 3 | 0 | 0 | 0 | 0 | 2 | 5 | 148 | 8 | 60 | 19 | 42 | 80 | 12 | 4 | 9 | 4 | 1 | 1 | 5 |
322,746 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_plot/confusion_matrix.py | sklearn.metrics._plot.confusion_matrix.ConfusionMatrixDisplay | from ...utils._optional_dependencies import check_matplotlib_support
from ...utils._plotting import _validate_style_kwargs
import numpy as np
from ...base import is_classifier
from itertools import product
from ...utils.multiclass import unique_labels
from .. import confusion_matrix
class ConfusionMatrixDisplay:
"... |
class ConfusionMatrixDisplay:
'''Confusion Matrix visualization.
It is recommended to use
:func:`~sklearn.metrics.ConfusionMatrixDisplay.from_estimator` or
:func:`~sklearn.metrics.ConfusionMatrixDisplay.from_predictions` to
create a :class:`ConfusionMatrixDisplay`. All parameters are stored as
... | 7 | 4 | 103 | 18 | 37 | 48 | 4 | 1.66 | 0 | 5 | 0 | 0 | 2 | 6 | 4 | 4 | 485 | 86 | 150 | 77 | 96 | 249 | 61 | 29 | 55 | 10 | 0 | 5 | 16 |
322,747 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_plot/det_curve.py | sklearn.metrics._plot.det_curve.DetCurveDisplay | import numpy as np
from ...utils._plotting import _BinaryClassifierCurveDisplayMixin
import scipy as sp
from .._ranking import det_curve
class DetCurveDisplay(_BinaryClassifierCurveDisplayMixin):
"""Detection Error Tradeoff (DET) curve visualization.
It is recommended to use :func:`~sklearn.metrics.DetCurveDi... |
class DetCurveDisplay(_BinaryClassifierCurveDisplayMixin):
'''Detection Error Tradeoff (DET) curve visualization.
It is recommended to use :func:`~sklearn.metrics.DetCurveDisplay.from_estimator`
or :func:`~sklearn.metrics.DetCurveDisplay.from_predictions` to create a
visualizer. All parameters are stor... | 7 | 4 | 72 | 11 | 25 | 36 | 2 | 1.94 | 1 | 1 | 0 | 0 | 2 | 7 | 4 | 10 | 361 | 61 | 102 | 49 | 71 | 198 | 38 | 23 | 33 | 5 | 1 | 1 | 8 |
322,748 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_plot/precision_recall_curve.py | sklearn.metrics._plot.precision_recall_curve.PrecisionRecallDisplay | from ...utils._plotting import _BinaryClassifierCurveDisplayMixin, _despine, _validate_style_kwargs
from collections import Counter
from .._ranking import average_precision_score, precision_recall_curve
class PrecisionRecallDisplay(_BinaryClassifierCurveDisplayMixin):
"""Precision Recall visualization.
It is ... |
class PrecisionRecallDisplay(_BinaryClassifierCurveDisplayMixin):
'''Precision Recall visualization.
It is recommended to use
:func:`~sklearn.metrics.PrecisionRecallDisplay.from_estimator` or
:func:`~sklearn.metrics.PrecisionRecallDisplay.from_predictions` to create
a :class:`~sklearn.metrics.Preci... | 7 | 4 | 109 | 19 | 42 | 49 | 3 | 1.63 | 1 | 2 | 0 | 0 | 2 | 10 | 4 | 10 | 542 | 98 | 169 | 77 | 114 | 275 | 46 | 27 | 41 | 10 | 1 | 2 | 13 |
322,749 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_plot/regression.py | sklearn.metrics._plot.regression.PredictionErrorDisplay | from ...utils._plotting import _validate_style_kwargs
import numpy as np
import numbers
from ...utils._optional_dependencies import check_matplotlib_support
from ...utils import _safe_indexing, check_random_state
class PredictionErrorDisplay:
"""Visualization of the prediction error of a regression model.
Thi... |
class PredictionErrorDisplay:
'''Visualization of the prediction error of a regression model.
This tool can display "residuals vs predicted" or "actual vs predicted"
using scatter plots to qualitatively assess the behavior of a regressor,
preferably on held-out data points.
See the details in the d... | 7 | 4 | 82 | 15 | 31 | 37 | 4 | 1.6 | 0 | 4 | 0 | 0 | 2 | 6 | 4 | 4 | 401 | 75 | 126 | 56 | 88 | 201 | 59 | 24 | 53 | 6 | 0 | 2 | 14 |
322,750 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_plot/roc_curve.py | sklearn.metrics._plot.roc_curve.RocCurveDisplay | import warnings
from ...utils._plotting import _BinaryClassifierCurveDisplayMixin, _check_param_lengths, _convert_to_list_leaving_none, _deprecate_estimator_name, _despine, _validate_style_kwargs
from ...utils._response import _get_response_values_binary
import numpy as np
from ...utils import _safe_indexing
from .._ra... |
class RocCurveDisplay(_BinaryClassifierCurveDisplayMixin):
'''ROC Curve visualization.
It is recommended to use
:func:`~sklearn.metrics.RocCurveDisplay.from_estimator` or
:func:`~sklearn.metrics.RocCurveDisplay.from_predictions` or
:func:`~sklearn.metrics.RocCurveDisplay.from_cv_results` to create
... | 10 | 5 | 109 | 17 | 44 | 49 | 4 | 1.44 | 1 | 6 | 0 | 0 | 3 | 9 | 6 | 12 | 774 | 128 | 265 | 112 | 187 | 381 | 77 | 41 | 70 | 11 | 1 | 2 | 21 |
322,751 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_scorer.py | sklearn.metrics._scorer._BaseScorer | from functools import partial
from ..utils.metadata_routing import MetadataRequest, MetadataRouter, MethodMapping, _MetadataRequester, _raise_for_params, _routing_enabled, get_routing_for_object, process_routing
import copy
from inspect import signature
import warnings
class _BaseScorer(_MetadataRequester):
"""Bas... |
class _BaseScorer(_MetadataRequester):
'''Base scorer that is used as `scorer(estimator, X, y_true)`.
Parameters
----------
score_func : callable
The score function to use. It will be called as
`score_func(y_true, y_pred, **kwargs)`.
sign : int
Either 1 or -1 to returns the ... | 8 | 4 | 17 | 2 | 9 | 6 | 2 | 0.89 | 1 | 6 | 1 | 2 | 7 | 6 | 7 | 22 | 143 | 28 | 61 | 22 | 53 | 54 | 42 | 22 | 34 | 3 | 1 | 1 | 16 |
322,752 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_scorer.py | sklearn.metrics._scorer._CurveScorer | import numpy as np
from numbers import Integral
class _CurveScorer(_BaseScorer):
"""Scorer taking a continuous response and output a score for each threshold.
Parameters
----------
score_func : callable
The score function to use. It will be called as
`score_func(y_true, y_pred, **kwarg... |
class _CurveScorer(_BaseScorer):
'''Scorer taking a continuous response and output a score for each threshold.
Parameters
----------
score_func : callable
The score function to use. It will be called as
`score_func(y_true, y_pred, **kwargs)`.
sign : int
Either 1 or -1 to ret... | 5 | 3 | 25 | 3 | 14 | 8 | 1 | 0.98 | 1 | 2 | 0 | 0 | 2 | 2 | 3 | 25 | 103 | 16 | 44 | 13 | 39 | 43 | 17 | 11 | 13 | 2 | 2 | 1 | 4 |
322,753 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_scorer.py | sklearn.metrics._scorer._MultimetricScorer | from traceback import format_exc
from collections import Counter
from ..utils import Bunch
from ..utils.metadata_routing import MetadataRequest, MetadataRouter, MethodMapping, _MetadataRequester, _raise_for_params, _routing_enabled, get_routing_for_object, process_routing
from functools import partial
from ..utils.vali... |
class _MultimetricScorer:
'''Callable for multimetric scoring used to avoid repeated calls
to `predict_proba`, `predict`, and `decision_function`.
`_MultimetricScorer` will return a dictionary of scores corresponding to
the scorers in the dictionary. Note that `_MultimetricScorer` can be
created wi... | 7 | 4 | 15 | 1 | 10 | 4 | 3 | 0.59 | 0 | 7 | 4 | 0 | 6 | 2 | 6 | 6 | 112 | 16 | 61 | 19 | 54 | 36 | 41 | 18 | 34 | 10 | 0 | 4 | 17 |
322,754 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_scorer.py | sklearn.metrics._scorer._PassthroughScorer | from inspect import signature
import copy
from ..utils.metadata_routing import MetadataRequest, MetadataRouter, MethodMapping, _MetadataRequester, _raise_for_params, _routing_enabled, get_routing_for_object, process_routing
class _PassthroughScorer(_MetadataRequester):
def __init__(self, estimator):
self.... |
class _PassthroughScorer(_MetadataRequester):
def __init__(self, estimator):
pass
def __call__(self, estimator, *args, **kwargs):
'''Method that wraps estimator.score'''
pass
def __repr__(self):
pass
def _accept_sample_weight(self):
pass
def get_metadata... | 7 | 3 | 10 | 2 | 5 | 4 | 2 | 0.8 | 1 | 3 | 1 | 0 | 6 | 2 | 6 | 21 | 69 | 15 | 30 | 11 | 23 | 24 | 26 | 11 | 19 | 3 | 1 | 2 | 10 |
322,755 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/metrics/_scorer.py | sklearn.metrics._scorer._Scorer | from ..utils.validation import _check_response_method
from ..base import is_regressor
class _Scorer(_BaseScorer):
def _score(self, method_caller, estimator, X, y_true, **kwargs):
"""Evaluate the response method of `estimator` on `X` and `y_true`.
Parameters
----------
method_calle... |
class _Scorer(_BaseScorer):
def _score(self, method_caller, estimator, X, y_true, **kwargs):
'''Evaluate the response method of `estimator` on `X` and `y_true`.
Parameters
----------
method_caller : callable
Returns predictions given an estimator, method name, and other... | 2 | 1 | 49 | 8 | 19 | 22 | 2 | 1.1 | 1 | 0 | 0 | 1 | 1 | 0 | 1 | 23 | 50 | 8 | 20 | 6 | 18 | 22 | 8 | 6 | 6 | 2 | 2 | 0 | 2 |
322,756 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/mixture/_base.py | sklearn.mixture._base.BaseMixture | from ..cluster import kmeans_plusplus
import numpy as np
from ..utils import check_random_state
import warnings
from numbers import Integral, Real
from ..utils._param_validation import Interval, StrOptions
from ..exceptions import ConvergenceWarning
from abc import ABCMeta, abstractmethod
from .. import cluster
from sc... |
class BaseMixture(DensityMixin, BaseEstimator, metaclass=ABCMeta):
'''Base class for mixture models.
This abstract class specifies an interface for all mixture classes and
provides basic common methods for mixture models.
'''
def __init__(self, n_components, tol, reg_covar, max_iter, n_init, init_... | 31 | 20 | 22 | 3 | 10 | 9 | 2 | 0.76 | 3 | 8 | 2 | 2 | 22 | 16 | 22 | 75 | 530 | 89 | 250 | 94 | 207 | 191 | 151 | 73 | 128 | 11 | 3 | 4 | 47 |
322,757 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/mixture/_bayesian_mixture.py | sklearn.mixture._bayesian_mixture.BayesianGaussianMixture | from scipy.special import betaln, digamma, gammaln
from ..utils import check_array
from ._base import BaseMixture, _check_shape
import numpy as np
from numbers import Real
from ..utils._param_validation import Interval, StrOptions
from ._gaussian_mixture import _check_precision_matrix, _check_precision_positivity, _com... |
class BayesianGaussianMixture(BaseMixture):
'''Variational Bayesian estimation of a Gaussian mixture.
This class allows to infer an approximate posterior distribution over the
parameters of a Gaussian mixture distribution. The effective number of
components can be inferred from the data.
This class... | 21 | 16 | 25 | 3 | 15 | 7 | 2 | 1.1 | 1 | 3 | 0 | 0 | 20 | 20 | 20 | 95 | 818 | 145 | 321 | 89 | 280 | 352 | 129 | 69 | 108 | 4 | 4 | 1 | 36 |
322,758 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/mixture/_gaussian_mixture.py | sklearn.mixture._gaussian_mixture.GaussianMixture | import numpy as np
from ..utils._param_validation import StrOptions
from ._base import BaseMixture, _check_shape
class GaussianMixture(BaseMixture):
"""Gaussian Mixture.
Representation of a Gaussian mixture model probability distribution.
This class allows to estimate the parameters of a Gaussian mixture
... |
class GaussianMixture(BaseMixture):
'''Gaussian Mixture.
Representation of a Gaussian mixture model probability distribution.
This class allows to estimate the parameters of a Gaussian mixture
distribution.
Read more in the :ref:`User Guide <gmm>`.
.. versionadded:: 0.18
Parameters
----... | 14 | 7 | 16 | 2 | 11 | 3 | 2 | 1.34 | 1 | 3 | 0 | 0 | 13 | 9 | 13 | 88 | 420 | 76 | 147 | 51 | 116 | 197 | 69 | 34 | 55 | 6 | 4 | 2 | 29 |
322,759 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_classification_threshold.py | sklearn.model_selection._classification_threshold.BaseThresholdClassifier | from ..utils.metadata_routing import MetadataRouter, MethodMapping, _raise_for_params, process_routing
from ..utils._param_validation import HasMethods, Interval, RealNotInt, StrOptions
from ..utils.multiclass import type_of_target
from ..utils import _safe_indexing, get_tags
from ..base import BaseEstimator, Classifie... |
class BaseThresholdClassifier(ClassifierMixin, MetaEstimatorMixin, BaseEstimator):
'''Base class for binary classifiers that set a non-default decision threshold.
In this base class, we define the following interface:
- the validation of common parameters in `fit`;
- the different prediction methods th... | 14 | 7 | 13 | 2 | 5 | 6 | 2 | 1.23 | 3 | 2 | 0 | 2 | 8 | 4 | 8 | 41 | 157 | 30 | 57 | 27 | 41 | 70 | 41 | 20 | 32 | 4 | 2 | 1 | 12 |
322,760 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_classification_threshold.py | sklearn.model_selection._classification_threshold.FixedThresholdClassifier | from ..utils.validation import _check_method_params, _estimator_has, _num_samples, check_is_fitted, indexable
from ..utils._param_validation import HasMethods, Interval, RealNotInt, StrOptions
from numbers import Integral, Real
from ..exceptions import NotFittedError
from ..utils._response import _get_response_values_b... |
class FixedThresholdClassifier(BaseThresholdClassifier):
'''Binary classifier that manually sets the decision threshold.
This classifier allows to change the default decision threshold used for
converting posterior probability estimates (i.e. output of `predict_proba`) or
decision scores (i.e. output o... | 7 | 4 | 19 | 2 | 10 | 7 | 2 | 1.91 | 1 | 5 | 3 | 0 | 5 | 4 | 5 | 46 | 193 | 33 | 55 | 25 | 41 | 105 | 29 | 15 | 23 | 3 | 3 | 1 | 9 |
322,761 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_classification_threshold.py | sklearn.model_selection._classification_threshold.TunedThresholdClassifierCV | import numpy as np
from ..utils.validation import _check_method_params, _estimator_has, _num_samples, check_is_fitted, indexable
from ..metrics._scorer import _CurveScorer, _threshold_scores_to_class_labels
from numbers import Integral, Real
from ..utils._param_validation import HasMethods, Interval, RealNotInt, StrOpt... |
class TunedThresholdClassifierCV(BaseThresholdClassifier):
'''Classifier that post-tunes the decision threshold using cross-validation.
This estimator post-tunes the decision threshold (cut-off point) that is
used for converting posterior probability estimates (i.e. output of
`predict_proba`) or decisi... | 6 | 5 | 40 | 4 | 28 | 8 | 3 | 1.12 | 1 | 12 | 6 | 0 | 5 | 13 | 5 | 46 | 386 | 51 | 158 | 50 | 140 | 177 | 67 | 36 | 61 | 12 | 3 | 2 | 16 |
322,762 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_plot.py | sklearn.model_selection._plot.LearningCurveDisplay | from ._validation import learning_curve, validation_curve
from ..utils._optional_dependencies import check_matplotlib_support
from ..utils._plotting import _interval_max_min_ratio, _validate_score_name
import numpy as np
class LearningCurveDisplay(_BaseCurveDisplay):
"""Learning Curve visualization.
It is rec... |
class LearningCurveDisplay(_BaseCurveDisplay):
'''Learning Curve visualization.
It is recommended to use
:meth:`~sklearn.model_selection.LearningCurveDisplay.from_estimator` to
create a :class:`~sklearn.model_selection.LearningCurveDisplay` instance.
All parameters are stored as attributes.
Rea... | 5 | 3 | 100 | 14 | 31 | 56 | 1 | 2.45 | 1 | 0 | 0 | 0 | 2 | 4 | 3 | 4 | 383 | 59 | 94 | 48 | 52 | 230 | 16 | 10 | 12 | 1 | 1 | 0 | 3 |
322,763 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_plot.py | sklearn.model_selection._plot.ValidationCurveDisplay | from ._validation import learning_curve, validation_curve
import numpy as np
from ..utils._plotting import _interval_max_min_ratio, _validate_score_name
from ..utils._optional_dependencies import check_matplotlib_support
class ValidationCurveDisplay(_BaseCurveDisplay):
"""Validation Curve visualization.
It is... |
class ValidationCurveDisplay(_BaseCurveDisplay):
'''Validation Curve visualization.
It is recommended to use
:meth:`~sklearn.model_selection.ValidationCurveDisplay.from_estimator` to
create a :class:`~sklearn.model_selection.ValidationCurveDisplay` instance.
All parameters are stored as attributes.... | 5 | 3 | 96 | 13 | 30 | 52 | 1 | 2.41 | 1 | 0 | 0 | 0 | 2 | 5 | 3 | 4 | 375 | 58 | 93 | 49 | 51 | 224 | 17 | 11 | 13 | 1 | 1 | 0 | 3 |
322,764 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_plot.py | sklearn.model_selection._plot._BaseCurveDisplay | from ..utils._plotting import _interval_max_min_ratio, _validate_score_name
from ..utils._optional_dependencies import check_matplotlib_support
class _BaseCurveDisplay:
def _plot_curve(self, x_data, *, ax=None, negate_score=False, score_name=None, score_type='test', std_display_style='fill_between', line_kw=None,... |
class _BaseCurveDisplay:
def _plot_curve(self, x_data, *, ax=None, negate_score=False, score_name=None, score_type='test', std_display_style='fill_between', line_kw=None, fill_between_kw=None, errorbar_kw=None):
pass | 2 | 0 | 112 | 16 | 92 | 6 | 19 | 0.06 | 0 | 1 | 0 | 2 | 1 | 5 | 1 | 1 | 113 | 16 | 93 | 26 | 78 | 6 | 48 | 14 | 45 | 19 | 0 | 2 | 19 |
322,765 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_search.py | sklearn.model_selection._search.BaseSearchCV | from ..exceptions import NotFittedError
from ._validation import _aggregate_score_dicts, _fit_and_score, _insert_error_scores, _normalize_score_results, _warn_or_raise_about_fit_failures
from ._split import check_cv
from ..base import BaseEstimator, MetaEstimatorMixin, _fit_context, clone, is_classifier
from scipy.stat... |
class BaseSearchCV(MetaEstimatorMixin, BaseEstimator, metaclass=ABCMeta):
'''Abstract base class for hyper parameter search with cross-validation.'''
@abstractmethod
def __init__(self, estimator, *, scoring=None, n_jobs=None, refit=True, cv=None, verbose=0, pre_dispatch='2*n_jobs', error_score=np.nan, retu... | 39 | 19 | 34 | 4 | 19 | 11 | 3 | 0.67 | 3 | 21 | 7 | 6 | 22 | 19 | 23 | 74 | 807 | 120 | 411 | 123 | 357 | 276 | 233 | 95 | 206 | 8 | 3 | 3 | 68 |
322,766 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_search.py | sklearn.model_selection._search.GridSearchCV | import numpy as np
class GridSearchCV(BaseSearchCV):
"""Exhaustive search over specified parameter values for an estimator.
Important members are fit, predict.
GridSearchCV implements a "fit" and a "score" method.
It also implements "score_samples", "predict", "predict_proba",
"decision_function"... |
class GridSearchCV(BaseSearchCV):
'''Exhaustive search over specified parameter values for an estimator.
Important members are fit, predict.
GridSearchCV implements a "fit" and a "score" method.
It also implements "score_samples", "predict", "predict_proba",
"decision_function", "transform" and "in... | 3 | 2 | 15 | 0 | 14 | 1 | 1 | 7.79 | 1 | 2 | 1 | 0 | 2 | 1 | 2 | 76 | 364 | 74 | 33 | 18 | 17 | 257 | 7 | 5 | 4 | 1 | 4 | 0 | 2 |
322,767 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_search.py | sklearn.model_selection._search.ParameterGrid | import operator
from collections.abc import Iterable, Mapping, Sequence
from itertools import product
import numpy as np
from functools import partial, reduce
class ParameterGrid:
"""Grid of parameters with a discrete number of values for each.
Can be used to iterate over parameter value combinations with the... |
class ParameterGrid:
'''Grid of parameters with a discrete number of values for each.
Can be used to iterate over parameter value combinations with the
Python built-in function iter.
The order of the generated parameter combinations is deterministic.
Read more in the :ref:`User Guide <grid_search>`... | 5 | 4 | 26 | 2 | 17 | 7 | 5 | 0.91 | 0 | 12 | 0 | 0 | 4 | 1 | 4 | 4 | 151 | 21 | 68 | 21 | 63 | 62 | 47 | 21 | 42 | 9 | 0 | 3 | 21 |
322,768 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_search.py | sklearn.model_selection._search.ParameterSampler | from ..utils.random import sample_without_replacement
import warnings
from collections.abc import Iterable, Mapping, Sequence
from ..utils import Bunch, check_random_state
class ParameterSampler:
"""Generator on parameters sampled from given distributions.
Non-deterministic iterable over random candidate comb... |
class ParameterSampler:
'''Generator on parameters sampled from given distributions.
Non-deterministic iterable over random candidate combinations for hyper-
parameter search. If all parameters are presented as a list,
sampling without replacement is performed. If at least one parameter
is given as... | 5 | 2 | 19 | 1 | 16 | 2 | 4 | 0.84 | 0 | 8 | 1 | 0 | 4 | 3 | 4 | 4 | 134 | 16 | 64 | 21 | 59 | 54 | 42 | 21 | 37 | 7 | 0 | 4 | 17 |
322,769 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_search.py | sklearn.model_selection._search.RandomizedSearchCV | from ..utils._param_validation import HasMethods, Interval, StrOptions
import numpy as np
import numbers
class RandomizedSearchCV(BaseSearchCV):
"""Randomized search on hyper parameters.
RandomizedSearchCV implements a "fit" and a "score" method.
It also implements "score_samples", "predict", "predict_pro... |
class RandomizedSearchCV(BaseSearchCV):
'''Randomized search on hyper parameters.
RandomizedSearchCV implements a "fit" and a "score" method.
It also implements "score_samples", "predict", "predict_proba",
"decision_function", "transform" and "inverse_transform" if they are
implemented in the estim... | 3 | 2 | 19 | 0 | 18 | 1 | 1 | 6.21 | 1 | 2 | 1 | 0 | 2 | 3 | 2 | 76 | 389 | 79 | 43 | 22 | 25 | 267 | 9 | 7 | 6 | 1 | 4 | 0 | 2 |
322,770 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_search_successive_halving.py | sklearn.model_selection._search_successive_halving.BaseSuccessiveHalving | from ..metrics._scorer import get_scorer_names
from ..utils._param_validation import Interval, StrOptions
from ._split import _yields_constant_splits, check_cv
from ..utils.validation import _num_samples, validate_data
from abc import abstractmethod
from numbers import Integral, Real
from ..utils.multiclass import chec... |
class BaseSuccessiveHalving(BaseSearchCV):
'''Implements successive halving.
Ref:
Almost optimal exploration in multi-armed bandits, ICML 13
Zohar Karnin, Tomer Koren, Oren Somekh
'''
def __init__(self, estimator, *, scoring=None, n_jobs=None, refit=True, cv=5, verbose=0, random_state=None, er... | 10 | 3 | 45 | 6 | 30 | 9 | 5 | 0.3 | 1 | 6 | 2 | 2 | 5 | 18 | 6 | 80 | 307 | 46 | 202 | 69 | 173 | 61 | 108 | 46 | 101 | 12 | 4 | 3 | 27 |
322,771 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_search_successive_halving.py | sklearn.model_selection._search_successive_halving.HalvingGridSearchCV | import numpy as np
from . import ParameterGrid, ParameterSampler
class HalvingGridSearchCV(BaseSuccessiveHalving):
"""Search over specified parameter values with successive halving.
The search strategy starts evaluating all the candidates with a small
amount of resources and iteratively selects the best c... |
class HalvingGridSearchCV(BaseSuccessiveHalving):
'''Search over specified parameter values with successive halving.
The search strategy starts evaluating all the candidates with a small
amount of resources and iteratively selects the best candidates, using
more and more resources.
Read more in the... | 3 | 1 | 19 | 0 | 19 | 0 | 1 | 5.51 | 1 | 2 | 1 | 0 | 2 | 1 | 2 | 82 | 344 | 64 | 43 | 23 | 22 | 237 | 7 | 5 | 4 | 1 | 5 | 0 | 2 |
322,772 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_search_successive_halving.py | sklearn.model_selection._search_successive_halving.HalvingRandomSearchCV | from numbers import Integral, Real
import numpy as np
from ..utils._param_validation import Interval, StrOptions
from . import ParameterGrid, ParameterSampler
class HalvingRandomSearchCV(BaseSuccessiveHalving):
"""Randomized search on hyper parameters.
The search strategy starts evaluating all the candidates ... |
class HalvingRandomSearchCV(BaseSuccessiveHalving):
'''Randomized search on hyper parameters.
The search strategy starts evaluating all the candidates with a small
amount of resources and iteratively selects the best candidates, using more
and more resources.
The candidates are sampled at random fr... | 3 | 1 | 25 | 0 | 24 | 1 | 2 | 4.54 | 1 | 2 | 1 | 0 | 2 | 2 | 2 | 82 | 376 | 66 | 56 | 26 | 34 | 254 | 11 | 7 | 8 | 2 | 5 | 1 | 3 |
322,773 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_search_successive_halving.py | sklearn.model_selection._search_successive_halving._SubsampleMetaSplitter | from ..utils import resample
class _SubsampleMetaSplitter:
"""Splitter that subsamples a given fraction of the dataset"""
def __init__(self, *, base_cv, fraction, subsample_test, random_state):
self.base_cv = base_cv
self.fraction = fraction
self.subsample_test = subsample_test
... |
class _SubsampleMetaSplitter:
'''Splitter that subsamples a given fraction of the dataset'''
def __init__(self, *, base_cv, fraction, subsample_test, random_state):
pass
def split(self, X, y, **kwargs):
pass | 3 | 1 | 11 | 0 | 11 | 0 | 2 | 0.05 | 0 | 1 | 0 | 0 | 2 | 4 | 2 | 2 | 25 | 2 | 22 | 8 | 19 | 1 | 12 | 8 | 9 | 3 | 0 | 2 | 4 |
322,774 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.BaseShuffleSplit | from ..utils.validation import _num_samples, check_array, column_or_1d
from ..utils import _safe_indexing, check_random_state, indexable, metadata_routing
from abc import ABCMeta, abstractmethod
from ..utils.metadata_routing import _MetadataRequester
class BaseShuffleSplit(_MetadataRequester, metaclass=ABCMeta):
"... |
class BaseShuffleSplit(_MetadataRequester, metaclass=ABCMeta):
'''Base class for *ShuffleSplit.
Parameters
----------
n_splits : int, default=10
Number of re-shuffling & splitting iterations.
test_size : float or int, default=None
If float, should be between 0.0 and 1.0 and represen... | 6 | 4 | 16 | 2 | 6 | 8 | 1 | 2 | 2 | 1 | 0 | 3 | 5 | 5 | 5 | 40 | 117 | 21 | 32 | 22 | 24 | 64 | 25 | 20 | 19 | 2 | 3 | 1 | 7 |
322,775 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.GroupKFold | from ..utils import _safe_indexing, check_random_state, indexable, metadata_routing
from ..utils.validation import _num_samples, check_array, column_or_1d
import numpy as np
class GroupKFold(GroupsConsumerMixin, _BaseKFold):
"""K-fold iterator variant with non-overlapping groups.
Each group will appear exactl... |
class GroupKFold(GroupsConsumerMixin, _BaseKFold):
'''K-fold iterator variant with non-overlapping groups.
Each group will appear exactly once in the test set across all folds (the
number of distinct groups has to be at least equal to the number of folds).
The folds are approximately balanced in the se... | 4 | 2 | 25 | 5 | 12 | 8 | 3 | 2.31 | 2 | 4 | 0 | 0 | 3 | 0 | 3 | 46 | 152 | 33 | 36 | 17 | 32 | 83 | 32 | 17 | 28 | 7 | 5 | 2 | 9 |
322,776 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.GroupShuffleSplit | from ..utils.validation import _num_samples, check_array, column_or_1d
import numpy as np
class GroupShuffleSplit(GroupsConsumerMixin, BaseShuffleSplit):
"""Shuffle-Group(s)-Out cross-validation iterator.
Provides randomized train/test indices to split data according to a
third-party provided group. This ... |
class GroupShuffleSplit(GroupsConsumerMixin, BaseShuffleSplit):
'''Shuffle-Group(s)-Out cross-validation iterator.
Provides randomized train/test indices to split data according to a
third-party provided group. This group information can be used to encode
arbitrary domain specific stratifications of th... | 4 | 2 | 18 | 3 | 7 | 8 | 2 | 4.36 | 2 | 2 | 0 | 0 | 3 | 1 | 3 | 43 | 144 | 26 | 22 | 11 | 16 | 96 | 15 | 9 | 11 | 3 | 4 | 1 | 5 |
322,777 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.GroupsConsumerMixin | from ..utils.metadata_routing import _MetadataRequester
class GroupsConsumerMixin(_MetadataRequester):
"""A Mixin to ``groups`` by default.
This Mixin makes the object to request ``groups`` by default as ``True``.
.. versionadded:: 1.3
"""
__metadata_request__split = {'groups': True} |
class GroupsConsumerMixin(_MetadataRequester):
'''A Mixin to ``groups`` by default.
This Mixin makes the object to request ``groups`` by default as ``True``.
.. versionadded:: 1.3
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 7 | 0 | 0 | 0 | 15 | 9 | 3 | 2 | 2 | 1 | 4 | 2 | 2 | 1 | 0 | 1 | 0 | 0 |
322,778 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.KFold | from ..utils import _safe_indexing, check_random_state, indexable, metadata_routing
import numpy as np
from ..utils.validation import _num_samples, check_array, column_or_1d
class KFold(_UnsupportedGroupCVMixin, _BaseKFold):
"""K-Fold cross-validator.
Provides train/test indices to split data in train/test se... |
class KFold(_UnsupportedGroupCVMixin, _BaseKFold):
'''K-Fold cross-validator.
Provides train/test indices to split data in train/test sets. Split
dataset into k consecutive folds (without shuffling by default).
Each fold is then used once as a validation while the k - 1 remaining
folds form the tra... | 3 | 1 | 8 | 1 | 8 | 0 | 2 | 3.81 | 2 | 2 | 0 | 1 | 2 | 0 | 2 | 46 | 94 | 17 | 16 | 10 | 13 | 61 | 16 | 10 | 13 | 3 | 5 | 1 | 4 |
322,779 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.LeaveOneGroupOut | from ..utils.validation import _num_samples, check_array, column_or_1d
import numpy as np
class LeaveOneGroupOut(GroupsConsumerMixin, BaseCrossValidator):
"""Leave One Group Out cross-validator.
Provides train/test indices to split data such that each training set is
comprised of all samples except ones b... |
class LeaveOneGroupOut(GroupsConsumerMixin, BaseCrossValidator):
'''Leave One Group Out cross-validator.
Provides train/test indices to split data such that each training set is
comprised of all samples except ones belonging to one specific group.
Arbitrary domain specific group information is provided... | 4 | 3 | 22 | 3 | 7 | 12 | 2 | 3.5 | 2 | 2 | 0 | 0 | 3 | 0 | 3 | 43 | 117 | 18 | 22 | 6 | 18 | 77 | 17 | 6 | 13 | 4 | 4 | 1 | 7 |
322,780 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.LeaveOneOut | from ..utils.validation import _num_samples, check_array, column_or_1d
class LeaveOneOut(_UnsupportedGroupCVMixin, BaseCrossValidator):
"""Leave-One-Out cross-validator.
Provides train/test indices to split data in train/test sets. Each
sample is used once as a test set (singleton) while the remaining
... |
class LeaveOneOut(_UnsupportedGroupCVMixin, BaseCrossValidator):
'''Leave-One-Out cross-validator.
Provides train/test indices to split data in train/test sets. Each
sample is used once as a test set (singleton) while the remaining
samples form the training set.
Note: ``LeaveOneOut()`` is equivalen... | 3 | 2 | 15 | 2 | 6 | 8 | 2 | 4.42 | 2 | 2 | 0 | 0 | 2 | 0 | 2 | 43 | 77 | 12 | 12 | 4 | 9 | 53 | 10 | 4 | 7 | 2 | 4 | 1 | 4 |
322,781 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.LeavePGroupsOut | from scipy.special import comb
from itertools import chain, combinations
import numpy as np
from ..utils.validation import _num_samples, check_array, column_or_1d
class LeavePGroupsOut(GroupsConsumerMixin, BaseCrossValidator):
"""Leave P Group(s) Out cross-validator.
Provides train/test indices to split data ... |
class LeavePGroupsOut(GroupsConsumerMixin, BaseCrossValidator):
'''Leave P Group(s) Out cross-validator.
Provides train/test indices to split data according to a third-party
provided group. This group information can be used to encode arbitrary
domain specific stratifications of the samples as integers... | 5 | 3 | 18 | 2 | 7 | 9 | 2 | 2.7 | 2 | 6 | 0 | 0 | 4 | 1 | 4 | 44 | 131 | 20 | 30 | 11 | 25 | 81 | 23 | 11 | 18 | 5 | 4 | 2 | 9 |
322,782 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.LeavePOut | from itertools import chain, combinations
import numpy as np
from scipy.special import comb
from ..utils.validation import _num_samples, check_array, column_or_1d
class LeavePOut(_UnsupportedGroupCVMixin, BaseCrossValidator):
"""Leave-P-Out cross-validator.
Provides train/test indices to split data in train/t... |
class LeavePOut(_UnsupportedGroupCVMixin, BaseCrossValidator):
'''Leave-P-Out cross-validator.
Provides train/test indices to split data in train/test sets. This results
in testing on all distinct samples of size p, while the remaining n - p
samples form the training set in each iteration.
Note: ``... | 4 | 2 | 10 | 1 | 5 | 4 | 2 | 3.59 | 2 | 4 | 0 | 0 | 3 | 1 | 3 | 44 | 90 | 12 | 17 | 7 | 13 | 61 | 13 | 7 | 9 | 3 | 4 | 1 | 6 |
322,783 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.PredefinedSplit | import warnings
import numpy as np
from ..utils.validation import _num_samples, check_array, column_or_1d
class PredefinedSplit(BaseCrossValidator):
"""Predefined split cross-validator.
Provides train/test indices to split data into train/test sets using a
predefined scheme specified by the user with the ... |
class PredefinedSplit(BaseCrossValidator):
'''Predefined split cross-validator.
Provides train/test indices to split data into train/test sets using a
predefined scheme specified by the user with the ``test_fold`` parameter.
Read more in the :ref:`User Guide <predefined_split>`.
.. versionadded:: 0... | 6 | 5 | 15 | 2 | 5 | 8 | 2 | 2.74 | 1 | 3 | 0 | 0 | 5 | 2 | 5 | 45 | 122 | 21 | 27 | 14 | 21 | 74 | 24 | 14 | 18 | 2 | 4 | 1 | 8 |
322,784 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.RepeatedKFold | class RepeatedKFold(_UnsupportedGroupCVMixin, _RepeatedSplits):
"""Repeated K-Fold cross validator.
Repeats K-Fold `n_repeats` times with different randomization in each repetition.
Read more in the :ref:`User Guide <repeated_k_fold>`.
Parameters
----------
n_splits : int, default=5
N... | class RepeatedKFold(_UnsupportedGroupCVMixin, _RepeatedSplits):
'''Repeated K-Fold cross validator.
Repeats K-Fold `n_repeats` times with different randomization in each repetition.
Read more in the :ref:`User Guide <repeated_k_fold>`.
Parameters
----------
n_splits : int, default=5
Numb... | 2 | 1 | 4 | 0 | 4 | 0 | 1 | 10 | 2 | 2 | 1 | 0 | 1 | 0 | 1 | 41 | 64 | 9 | 5 | 2 | 3 | 50 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
322,785 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.RepeatedStratifiedKFold | from ..utils.validation import _num_samples, check_array, column_or_1d
class RepeatedStratifiedKFold(_UnsupportedGroupCVMixin, _RepeatedSplits):
"""Repeated class-wise stratified K-Fold cross validator.
Repeats Stratified K-Fold n times with different randomization in each
repetition.
Read more in th... |
class RepeatedStratifiedKFold(_UnsupportedGroupCVMixin, _RepeatedSplits):
'''Repeated class-wise stratified K-Fold cross validator.
Repeats Stratified K-Fold n times with different randomization in each
repetition.
Read more in the :ref:`User Guide <repeated_k_fold>`.
.. note::
Stratificati... | 3 | 2 | 22 | 4 | 5 | 13 | 1 | 7.36 | 2 | 2 | 1 | 0 | 2 | 0 | 2 | 42 | 111 | 19 | 11 | 3 | 8 | 81 | 6 | 3 | 3 | 1 | 4 | 0 | 2 |
322,786 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.ShuffleSplit | class ShuffleSplit(_UnsupportedGroupCVMixin, BaseShuffleSplit):
"""Random permutation cross-validator.
Yields indices to split data into training and test sets.
Note: contrary to other cross-validation strategies, random splits
do not guarantee that test sets across all folds will be mutually exclusiv... | class ShuffleSplit(_UnsupportedGroupCVMixin, BaseShuffleSplit):
'''Random permutation cross-validator.
Yields indices to split data into training and test sets.
Note: contrary to other cross-validation strategies, random splits
do not guarantee that test sets across all folds will be mutually exclusive,... | 2 | 1 | 10 | 0 | 10 | 0 | 1 | 7.45 | 2 | 1 | 0 | 0 | 1 | 1 | 1 | 42 | 103 | 10 | 11 | 5 | 7 | 82 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
322,787 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.StratifiedGroupKFold | from ..utils import _safe_indexing, check_random_state, indexable, metadata_routing
from ..utils.validation import _num_samples, check_array, column_or_1d
import numpy as np
from ..utils.multiclass import type_of_target
from collections import defaultdict
import warnings
class StratifiedGroupKFold(GroupsConsumerMixin,... |
class StratifiedGroupKFold(GroupsConsumerMixin, _BaseKFold):
'''Class-wise stratified K-Fold iterator variant with non-overlapping groups.
This cross-validation object is a variation of StratifiedKFold attempts to
return stratified folds with non-overlapping groups. The folds are made by
preserving the... | 4 | 1 | 34 | 2 | 26 | 6 | 4 | 1.36 | 2 | 7 | 0 | 0 | 3 | 0 | 3 | 46 | 209 | 25 | 78 | 28 | 74 | 106 | 51 | 28 | 47 | 8 | 5 | 2 | 12 |
322,788 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.StratifiedKFold | import numpy as np
from ..utils.validation import _num_samples, check_array, column_or_1d
import warnings
from ..utils._array_api import _convert_to_numpy, ensure_common_namespace_device, get_namespace
from ..utils.multiclass import type_of_target
from ..utils import _safe_indexing, check_random_state, indexable, metad... |
class StratifiedKFold(_BaseKFold):
'''Class-wise stratified K-Fold cross-validator.
Provides train/test indices to split data in train/test sets.
This cross-validation object is a variation of KFold that returns
stratified folds. The folds are made by preserving the percentage of
samples for each c... | 5 | 2 | 29 | 3 | 16 | 11 | 3 | 1.73 | 1 | 4 | 0 | 0 | 4 | 0 | 4 | 47 | 203 | 31 | 63 | 22 | 58 | 109 | 42 | 22 | 37 | 7 | 5 | 2 | 12 |
322,789 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.StratifiedShuffleSplit | from ..utils.validation import _num_samples, check_array, column_or_1d
import numpy as np
from ..utils._array_api import _convert_to_numpy, ensure_common_namespace_device, get_namespace
from ..utils.extmath import _approximate_mode
import warnings
from ..utils import _safe_indexing, check_random_state, indexable, metad... |
class StratifiedShuffleSplit(BaseShuffleSplit):
'''Class-wise stratified ShuffleSplit cross-validator.
Provides train/test indices to split data in train/test sets.
This cross-validation object is a merge of :class:`StratifiedKFold` and
:class:`ShuffleSplit`, which returns stratified randomized folds. ... | 4 | 2 | 41 | 7 | 23 | 12 | 3 | 1.46 | 1 | 4 | 0 | 0 | 3 | 3 | 3 | 43 | 207 | 35 | 70 | 25 | 64 | 102 | 42 | 21 | 38 | 7 | 4 | 2 | 10 |
322,790 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split.TimeSeriesSplit | from ..utils import _safe_indexing, check_random_state, indexable, metadata_routing
from ..utils.validation import _num_samples, check_array, column_or_1d
import warnings
import numpy as np
class TimeSeriesSplit(_BaseKFold):
"""Time Series cross-validator.
Provides train/test indices to split time-ordered dat... |
class TimeSeriesSplit(_BaseKFold):
'''Time Series cross-validator.
Provides train/test indices to split time-ordered data, where other
cross-validation methods are inappropriate, as they would lead to training
on future data and evaluating on past data.
To ensure comparable metrics across folds, sa... | 4 | 3 | 29 | 4 | 15 | 10 | 3 | 2.96 | 1 | 4 | 0 | 0 | 3 | 3 | 3 | 46 | 212 | 30 | 46 | 16 | 42 | 136 | 28 | 16 | 24 | 6 | 5 | 2 | 9 |
322,791 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split._BaseKFold | from ..utils import _safe_indexing, check_random_state, indexable, metadata_routing
from abc import ABCMeta, abstractmethod
import numbers
from ..utils.validation import _num_samples, check_array, column_or_1d
class _BaseKFold(BaseCrossValidator, metaclass=ABCMeta):
"""Base class for K-Fold cross-validators and Ti... |
class _BaseKFold(BaseCrossValidator, metaclass=ABCMeta):
'''Base class for K-Fold cross-validators and TimeSeriesSplit.'''
@abstractmethod
def __init__(self, n_splits, *, shuffle, random_state):
pass
def split(self, X, y=None, groups=None):
'''Generate indices to split data into traini... | 5 | 3 | 29 | 5 | 13 | 11 | 3 | 0.81 | 2 | 6 | 0 | 5 | 3 | 3 | 3 | 43 | 92 | 17 | 42 | 10 | 37 | 34 | 23 | 9 | 19 | 5 | 4 | 1 | 9 |
322,792 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split._CVIterableWrapper | class _CVIterableWrapper(BaseCrossValidator):
"""Wrapper class for old style cv objects and iterables."""
def __init__(self, cv):
self.cv = list(cv)
def get_n_splits(self, X=None, y=None, groups=None):
"""Returns the number of splitting iterations in the cross-validator.
Parameter... | class _CVIterableWrapper(BaseCrossValidator):
'''Wrapper class for old style cv objects and iterables.'''
def __init__(self, cv):
pass
def get_n_splits(self, X=None, y=None, groups=None):
'''Returns the number of splitting iterations in the cross-validator.
Parameters
-----... | 4 | 3 | 15 | 3 | 2 | 10 | 1 | 3.88 | 1 | 1 | 0 | 0 | 3 | 1 | 3 | 43 | 51 | 12 | 8 | 6 | 4 | 31 | 8 | 6 | 4 | 2 | 4 | 1 | 4 |
322,793 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split._RepeatedSplits | from ..utils import _safe_indexing, check_random_state, indexable, metadata_routing
import numbers
from ..utils.metadata_routing import _MetadataRequester
from abc import ABCMeta, abstractmethod
class _RepeatedSplits(_MetadataRequester, metaclass=ABCMeta):
"""Repeated splits for an arbitrary randomized CV splitter... |
class _RepeatedSplits(_MetadataRequester, metaclass=ABCMeta):
'''Repeated splits for an arbitrary randomized CV splitter.
Repeats splits for cross-validators n times with different randomization
in each repetition.
Parameters
----------
cv : callable
Cross-validator class.
n_repeats... | 5 | 3 | 18 | 3 | 6 | 9 | 2 | 2.15 | 2 | 3 | 0 | 2 | 4 | 4 | 4 | 39 | 105 | 23 | 26 | 17 | 21 | 56 | 26 | 17 | 21 | 4 | 3 | 2 | 9 |
322,794 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/model_selection/_split.py | sklearn.model_selection._split._UnsupportedGroupCVMixin | import warnings
class _UnsupportedGroupCVMixin:
"""Mixin for splitters that do not support Groups."""
def split(self, X, y=None, groups=None):
"""Generate indices to split data into training and test set.
Parameters
----------
X : array-like of shape (n_samples, n_features)
... |
class _UnsupportedGroupCVMixin:
'''Mixin for splitters that do not support Groups.'''
def split(self, X, y=None, groups=None):
'''Generate indices to split data into training and test set.
Parameters
----------
X : array-like of shape (n_samples, n_features)
Trainin... | 2 | 2 | 29 | 5 | 7 | 17 | 2 | 2.25 | 0 | 2 | 0 | 6 | 1 | 0 | 1 | 1 | 32 | 6 | 8 | 2 | 6 | 18 | 5 | 2 | 3 | 2 | 0 | 1 | 2 |
322,795 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/multiclass.py | sklearn.multiclass.OneVsOneClassifier | from .base import BaseEstimator, ClassifierMixin, MetaEstimatorMixin, MultiOutputMixin, _fit_context, clone, is_classifier, is_regressor
import numpy as np
from numbers import Integral, Real
from .utils.metaestimators import _safe_split, available_if
from .utils.multiclass import _check_partial_fit_first_call, _ovr_dec... |
class OneVsOneClassifier(MetaEstimatorMixin, ClassifierMixin, BaseEstimator):
'''One-vs-one multiclass strategy.
This strategy consists in fitting one classifier per class pair.
At prediction time, the class which received the most votes is selected.
Since it requires to fit `n_classes * (n_classes - 1... | 13 | 8 | 33 | 5 | 17 | 11 | 2 | 1.03 | 3 | 10 | 3 | 0 | 8 | 6 | 8 | 41 | 363 | 62 | 148 | 38 | 131 | 153 | 64 | 32 | 55 | 4 | 2 | 1 | 16 |
322,796 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/multiclass.py | sklearn.multiclass.OneVsRestClassifier | from .base import BaseEstimator, ClassifierMixin, MetaEstimatorMixin, MultiOutputMixin, _fit_context, clone, is_classifier, is_regressor
from .utils._param_validation import HasMethods, Interval
from .utils.metaestimators import _safe_split, available_if
from .utils.validation import _check_method_params, _num_samples,... |
class OneVsRestClassifier(MultiOutputMixin, ClassifierMixin, MetaEstimatorMixin, BaseEstimator):
'''One-vs-the-rest (OvR) multiclass strategy.
Also known as one-vs-all, this strategy consists in fitting one classifier
per class. For each classifier, the class is fitted against all the other
classes. In... | 18 | 10 | 29 | 4 | 13 | 12 | 2 | 1.42 | 4 | 13 | 5 | 0 | 10 | 8 | 10 | 44 | 433 | 73 | 149 | 54 | 122 | 211 | 83 | 40 | 72 | 4 | 2 | 2 | 21 |
322,797 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/multiclass.py | sklearn.multiclass.OutputCodeClassifier | from .base import BaseEstimator, ClassifierMixin, MetaEstimatorMixin, MultiOutputMixin, _fit_context, clone, is_classifier, is_regressor
from .utils._tags import get_tags
from .utils.validation import _check_method_params, _num_samples, check_is_fitted, validate_data
import numpy as np
from numbers import Integral, Rea... |
class OutputCodeClassifier(MetaEstimatorMixin, ClassifierMixin, BaseEstimator):
'''(Error-Correcting) Output-Code multiclass strategy.
Output-code based strategies consist in representing each class with a
binary code (an array of 0s and 1s). At fitting time, one binary
classifier per bit in the code b... | 7 | 4 | 26 | 4 | 13 | 9 | 2 | 1.62 | 3 | 8 | 3 | 0 | 5 | 9 | 5 | 38 | 247 | 48 | 76 | 29 | 67 | 123 | 43 | 26 | 37 | 5 | 2 | 1 | 9 |
322,798 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/multiclass.py | sklearn.multiclass._ConstantPredictor | import numpy as np
from .base import BaseEstimator, ClassifierMixin, MetaEstimatorMixin, MultiOutputMixin, _fit_context, clone, is_classifier, is_regressor
from .utils.validation import _check_method_params, _num_samples, check_is_fitted, validate_data
class _ConstantPredictor(BaseEstimator):
"""Helper predictor t... |
class _ConstantPredictor(BaseEstimator):
'''Helper predictor to be used when only one class is present.'''
def fit(self, X, y):
pass
def predict(self, X):
pass
def decision_function(self, X):
pass
def predict_proba(self, X):
pass | 5 | 1 | 12 | 1 | 12 | 0 | 1 | 0.02 | 1 | 1 | 0 | 0 | 4 | 1 | 4 | 35 | 54 | 6 | 47 | 8 | 42 | 1 | 19 | 8 | 14 | 1 | 2 | 0 | 4 |
322,799 | etsi-ai/etsi-watchdog | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/etsi-ai_etsi-watchdog/venv/Lib/site-packages/sklearn/multioutput.py | sklearn.multioutput.ClassifierChain | from .base import BaseEstimator, ClassifierMixin, MetaEstimatorMixin, RegressorMixin, _fit_context, clone, is_classifier
import numpy as np
from .utils.metadata_routing import MetadataRouter, MethodMapping, _raise_for_params, _routing_enabled, process_routing
from .utils._param_validation import HasMethods, Hidden, Str... |
class ClassifierChain(MetaEstimatorMixin, ClassifierMixin, _BaseChain):
'''A multi-label model that arranges binary classifiers into a chain.
Each model makes a prediction in the order specified by the chain using
all of the available features provided to the model plus the predictions
of models that a... | 11 | 6 | 17 | 2 | 6 | 8 | 1 | 2.9 | 3 | 3 | 2 | 0 | 7 | 2 | 7 | 67 | 288 | 58 | 59 | 28 | 36 | 171 | 25 | 13 | 17 | 1 | 4 | 0 | 7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.