AI Slop Code RIsk Monitor

scikit-learn/scikit-learn

scikit-learn: machine learning in Python

19.7 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for scikit-learn/scikit-learn, a Python project with 67,522 GitHub stars. SynthScan examined 469,939 lines of code across 1211 source files, recording 7448 pattern matches distributed across 20 syntactic categories. The legacy adjusted pattern signal is 19.7 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

19.7
Adjusted Signal
19.7
Raw Pattern Score
100%
Time Factor
2026-10-10
Last Push
67.5K
Stars
Python
Language
469.9K
Lines of Code
1.2K
Files
7.4K
Pattern Hits
2026-10-12
Scan Date
0.14
HC Hit Rate

Risk Review · v3

Use each vector to guide manual verification of the underlying findings.

Cognitive Ownership Risk 43.5/100 · MEDIUM

Can maintainers explain intent, assumptions, and trade-offs? 5607 finding(s).

Hallucinated Dependency & Supply Chain Risk 7.4/100 · LOW

Are imports declared and package/API names verified? 782 finding(s).

Agent Over-Engineering Ratio 52.3/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 5498 finding(s).

PR Review Velocity Impact 66.0/100 · HIGH

Which changes need focused human review? 7448 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 175MEDIUM 902LOW 6371

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 7448 distinct pattern matches across 20 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers4201 hits · 3561 pts
SeverityFileLineSnippetContext
LOWasv_benchmarks/benchmarks/metrics.py44 def peakmem_pairwise_distances(self, *args):CODE
LOWasv_benchmarks/benchmarks/datasets.py84def _synth_regression_dataset(n_samples=100000, n_features=100, dtype=np.float32):CODE
LOWasv_benchmarks/benchmarks/datasets.py100def _synth_regression_sparse_dataset(CODE
LOWasv_benchmarks/benchmarks/datasets.py118def _synth_classification_dataset(CODE
LOWasv_benchmarks/benchmarks/utils.py24def make_dict_learning_scorers(caller):CODE
LOWasv_benchmarks/benchmarks/cluster.py31 def time_single_linkage_label(self, n_samples):CODE
LOWsklearn/conftest.py131def pytest_collection_modifyitems(config, items):CODE
LOWsklearn/conftest.py274def munge_scipy_to_check_spmatrix_usage():CODE
LOWsklearn/conftest.py506def hide_available_matplotlib(monkeypatch):CODE
LOWsklearn/multiclass.py118def _threshold_for_binary_predict(estimator):CODE
LOWsklearn/random_projection.py63def johnson_lindenstrauss_min_dim(n_samples, *, eps=0.1):CODE
LOWsklearn/random_projection.py360 def _compute_inverse_components(self):CODE
LOWsklearn/multioutput.py82def _available_if_estimator_has(attr):CODE
LOWsklearn/multioutput.py600def _available_if_base_estimator_has(attr):CODE
LOWsklearn/pipeline.py1582def _fit_transform_one_with_callbacks(CODE
LOWsklearn/pipeline.py1817 def _validate_transformer_weights(self):CODE
LOWsklearn/pipeline.py1877 def _add_prefix_for_feature_names_out(self, transformer_with_feature_names_out):CODE
LOWsklearn/calibration.py712def _fit_classifier_calibrator_pair(CODE
LOWsklearn/tree/_classes.py203 def _compute_missing_values_in_feature_mask(self, X, estimator_name=None):CODE
LOWsklearn/tree/_classes.py812 def cost_complexity_pruning_path(self, X, y, sample_weight=None):CODE
LOWsklearn/tree/_classes.py1625 def _compute_partial_dependence_recursion(self, grid, target_features):CODE
LOWsklearn/tree/tests/test_split.py61def random_categorical_goes_left(seed, x):CODE
LOWsklearn/tree/tests/test_split.py111 def compute_node_value_and_impurity(self, y, w):CODE
LOWsklearn/tree/tests/test_split.py367def test_random_categorical_goes_left_unbiased():CODE
LOWsklearn/tree/tests/test_split.py386def test_random_categorical_split_unbiased_public_api():CODE
LOWsklearn/tree/tests/test_monotonic_tree.py44def test_monotonic_constraints_classifications(CODE
LOWsklearn/tree/tests/test_monotonic_tree.py123def test_monotonic_constraints_regressions(CODE
LOWsklearn/tree/tests/test_monotonic_tree.py207def test_multiple_output_raises(TreeClassifier):CODE
LOWsklearn/tree/tests/test_monotonic_tree.py220def test_bad_monotonic_cst_raises(TreeClassifier):CODE
LOWsklearn/tree/tests/test_monotonic_tree.py374def assert_nd_reg_tree_children_monotonic_bounded(tree_, monotonic_cst):CODE
LOWsklearn/tree/tests/test_monotonic_tree.py444def test_assert_nd_reg_tree_children_monotonic_bounded():CODE
LOWsklearn/tree/tests/test_monotonic_tree.py481def test_nd_tree_nodes_values(CODE
LOW⚡sklearn/tree/tests/test_tree.py766def test_min_weight_fraction_leaf_on_dense_input(name):CODE
LOW⚡sklearn/tree/tests/test_tree.py772def test_min_weight_fraction_leaf_on_sparse_input(name, csc_container):CODE
LOW⚡sklearn/tree/tests/test_tree.py776def check_min_weight_fraction_leaf_with_min_samples_leaf(CODE
LOW⚡sklearn/tree/tests/test_tree.py1644def test_public_apply_all_trees(name):CODE
LOW⚡sklearn/tree/tests/test_tree.py1654def test_public_apply_sparse_trees(name, csr_container):CODE
LOW⚡sklearn/tree/tests/test_tree.py1662def test_decision_path_hardcoded():CODE
LOW⚡sklearn/tree/tests/test_tree.py3253def test_predict_missing_category_without_fit_missing_values(Tree, X, X_test):CODE
LOW⚡sklearn/tree/tests/test_tree.py3261def test_predict_categorical_list_input(Tree):CODE
LOW⚡sklearn/tree/tests/test_tree.py3271def test_categorical_preprocessor_preserves_feature_order(Tree):CODE
LOWsklearn/tree/tests/test_tree.py261def test_weighted_classification_toy():CODE
LOWsklearn/tree/tests/test_tree.py493def test_importances_gini_equal_squared_error():CODE
LOWsklearn/tree/tests/test_tree.py706def check_min_weight_fraction_leaf(name, datasets, sparse_container=None):CODE
LOWsklearn/tree/tests/test_tree.py838def test_min_weight_fraction_leaf_with_min_samples_leaf_on_dense_input(name):CODE
LOWsklearn/tree/tests/test_tree.py844def test_min_weight_fraction_leaf_with_min_samples_leaf_on_sparse_input(CODE
LOWsklearn/tree/tests/test_tree.py861def test_min_impurity_decrease(TreeEstimator, criterion, global_random_seed):CODE
LOWsklearn/tree/tests/test_tree.py1153def test_sample_weight_invalid():CODE
LOWsklearn/tree/tests/test_tree.py1247def test_max_leaf_nodes_max_depth():CODE
LOWsklearn/tree/tests/test_tree.py1274def test_only_constant_features():CODE
LOWsklearn/tree/tests/test_tree.py1285def test_almost_constant_feature(tree_cls):CODE
LOWsklearn/tree/tests/test_tree.py1305def test_behaviour_constant_feature_after_splits():CODE
LOWsklearn/tree/tests/test_tree.py1319def test_with_only_one_non_constant_features():CODE
LOWsklearn/tree/tests/test_tree.py1434def test_sparse_input_reg_trees(tree_type, dataset):CODE
LOWsklearn/tree/tests/test_tree.py1526def test_explicit_sparse_zeros(tree_type, csc_container, csr_container):CODE
LOWsklearn/tree/tests/test_tree.py1625def test_min_weight_leaf_split_level(name, sparse_container):CODE
LOWsklearn/tree/tests/test_tree.py1891def test_empty_leaf_infinite_threshold(sparse_container):CODE
LOWsklearn/tree/tests/test_tree.py1913def test_prune_tree_classifier_are_subtrees(dataset, tree_cls):CODE
LOWsklearn/tree/tests/test_tree.py1929def test_prune_tree_regression_are_subtrees(dataset, tree_cls):CODE
LOWsklearn/tree/tests/test_tree.py1944def test_prune_single_node_tree():CODE
4141 more matches not shown…
Decorative Section Separators748 hits · 2283 pts
SeverityFileLineSnippetContext
MEDIUMsklearn/__init__.py7# ==================================COMMENT
MEDIUM⚡sklearn/tree/_classes.py68# =============================================================================COMMENT
MEDIUM⚡sklearn/tree/_classes.py70# =============================================================================COMMENT
MEDIUMsklearn/tree/_classes.py95# =============================================================================COMMENT
MEDIUMsklearn/tree/_classes.py97# =============================================================================COMMENT
MEDIUMsklearn/tree/_classes.py879# =============================================================================COMMENT
MEDIUMsklearn/tree/_classes.py881# =============================================================================COMMENT
MEDIUMsklearn/metrics/cluster/tests/test_common.py29# ------------------------COMMENT
MEDIUMsklearn/metrics/cluster/tests/test_common.py60# ---------------------------------------COMMENT
MEDIUMsklearn/metrics/cluster/tests/test_common.py65# --------------------------------------------------------------------COMMENT
MEDIUMsklearn/metrics/tests/test_common.py119# -------------------------------------------COMMENT
MEDIUMsklearn/metrics/tests/test_common.py135# ------------------------COMMENT
MEDIUMsklearn/metrics/tests/test_common.py353# ---------------------------------------COMMENT
MEDIUM…earn/metrics/_pairwise_distances_reduction/__init__.py6# =============================COMMENT
MEDIUM…earn/metrics/_pairwise_distances_reduction/__init__.py33# ------------------------------------------COMMENT
MEDIUM…earn/metrics/_pairwise_distances_reduction/__init__.py42# ------------------COMMENT
MEDIUMsklearn/ensemble/tests/test_voting.py703# ======================COMMENT
MEDIUMsklearn/ensemble/tests/test_voting.py796# =============================COMMENT
MEDIUMsklearn/ensemble/tests/test_bagging.py1087# ======================COMMENT
MEDIUMsklearn/ensemble/tests/test_bagging.py1159# =============================COMMENT
MEDIUMsklearn/ensemble/tests/test_stacking.py903# ======================COMMENT
MEDIUMsklearn/ensemble/tests/test_stacking.py1019# =============================COMMENT
MEDIUMsklearn/semi_supervised/tests/test_self_training.py358# =================================================================COMMENT
MEDIUMsklearn/semi_supervised/tests/test_self_training.py384# ====================COMMENT
MEDIUMsklearn/compose/tests/test_column_transformer.py2708# ======================COMMENT
MEDIUMsklearn/compose/tests/test_column_transformer.py2895# =============================COMMENT
MEDIUM⚡sklearn/externals/_arff.py845 # -----------------------------------------------------------------COMMENT
MEDIUM⚡sklearn/externals/_arff.py853 # -----------------------------------------------------------------COMMENT
MEDIUM⚡sklearn/externals/_arff.py858 # -----------------------------------------------------------------COMMENT
MEDIUMsklearn/externals/_arff.py1# =============================================================================COMMENT
MEDIUMsklearn/externals/_arff.py5# =============================================================================COMMENT
MEDIUMsklearn/externals/_arff.py25# =============================================================================COMMENT
MEDIUMsklearn/externals/_arff.py414# =============================================================================COMMENT
MEDIUMsklearn/externals/_arff.py663# =============================================================================COMMENT
MEDIUMsklearn/externals/_arff.py807 # -----------------------------------------------------------------COMMENT
MEDIUMsklearn/externals/_arff.py816 # -----------------------------------------------------------------COMMENT
MEDIUMsklearn/externals/_arff.py1042# =============================================================================COMMENT
MEDIUMsklearn/externals/_arff.py1107# =============================================================================COMMENT
MEDIUMsklearn/tests/test_pipeline.py2106# =====================COMMENT
MEDIUMsklearn/tests/test_pipeline.py2344# =============================COMMENT
MEDIUMsklearn/tests/test_pipeline.py2402# =====================================================================COMMENT
MEDIUMsklearn/tests/test_pipeline.py2723# ====================COMMENT
MEDIUMsklearn/linear_model/tests/test_ridge.py2681# ======================COMMENT
MEDIUMsklearn/linear_model/tests/test_ridge.py2711# =============================COMMENT
MEDIUMsklearn/utils/_pprint.py17# --------------------------------------------COMMENT
MEDIUMsklearn/utils/_metadata_requests.py275# ==============COMMENT
MEDIUMsklearn/utils/_metadata_requests.py336# =====================================COMMENT
MEDIUMsklearn/utils/_metadata_requests.py886# ============================COMMENT
MEDIUMsklearn/utils/_metadata_requests.py1460# ==============COMMENT
MEDIUMsklearn/utils/_metadata_requests.py1876# ==========================COMMENT
MEDIUMsklearn/manifold/tests/test_locally_linear.py19# ----------------------------------------------------------------------COMMENT
MEDIUMsklearn/manifold/tests/test_locally_linear.py40# ----------------------------------------------------------------------COMMENT
MEDIUMsklearn/model_selection/tests/test_validation.py2425# ======================================================COMMENT
MEDIUMsklearn/model_selection/tests/test_validation.py2672# =============================COMMENT
MEDIUMsklearn/model_selection/tests/test_search.py2701# ======================COMMENT
MEDIUMsklearn/model_selection/tests/test_search.py2765# =============================COMMENT
MEDIUMsklearn/decomposition/_kernel_pca.py378 # ----------------------------------------------COMMENT
MEDIUMexamples/bicluster/plot_spectral_biclustering.py26# --------------------COMMENT
MEDIUMexamples/bicluster/plot_spectral_biclustering.py69# ------------------------------COMMENT
MEDIUMexamples/bicluster/plot_spectral_biclustering.py92# ----------------COMMENT
688 more matches not shown…
Unused Imports764 hits · 655 pts
SeverityFileLineSnippetContext
LOWsklearn/conftest.py41CODE
LOWsklearn/conftest.py66CODE
LOWsklearn/conftest.py239CODE
LOWsklearn/__init__.py24CODE
LOWsklearn/__init__.py24CODE
LOWsklearn/__init__.py24CODE
LOWsklearn/__init__.py69CODE
LOWsklearn/__init__.py69CODE
LOWsklearn/__init__.py70CODE
LOWsklearn/__init__.py71CODE
LOWsklearn/tree/__init__.py6CODE
LOWsklearn/tree/__init__.py6CODE
LOWsklearn/tree/__init__.py6CODE
LOWsklearn/tree/__init__.py6CODE
LOWsklearn/tree/__init__.py6CODE
LOWsklearn/tree/__init__.py13CODE
LOWsklearn/tree/__init__.py13CODE
LOWsklearn/tree/__init__.py13CODE
LOWsklearn/metrics/__init__.py6CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py7CODE
LOWsklearn/metrics/__init__.py30CODE
LOWsklearn/metrics/__init__.py31CODE
LOWsklearn/metrics/__init__.py32CODE
LOWsklearn/metrics/__init__.py33CODE
LOWsklearn/metrics/__init__.py34CODE
LOWsklearn/metrics/__init__.py35CODE
LOWsklearn/metrics/__init__.py36CODE
LOWsklearn/metrics/__init__.py36CODE
LOWsklearn/metrics/__init__.py36CODE
LOWsklearn/metrics/__init__.py36CODE
LOWsklearn/metrics/__init__.py36CODE
LOWsklearn/metrics/__init__.py36CODE
LOWsklearn/metrics/__init__.py36CODE
LOWsklearn/metrics/__init__.py36CODE
LOWsklearn/metrics/__init__.py36CODE
LOWsklearn/metrics/__init__.py36CODE
LOWsklearn/metrics/__init__.py36CODE
LOWsklearn/metrics/__init__.py36CODE
LOWsklearn/metrics/__init__.py36CODE
LOWsklearn/metrics/__init__.py36CODE
704 more matches not shown…
Over-Commented Block651 hits · 630 pts
SeverityFileLineSnippetContext
LOWasv_benchmarks/asv.conf.json21COMMENT
LOWasv_benchmarks/asv.conf.json41 //"install_timeout": 600,COMMENT
LOWasv_benchmarks/asv.conf.json81 //COMMENT
LOWasv_benchmarks/asv.conf.json101 // {"environment_type": "conda", "six": null}, // don't run without six on condaCOMMENT
LOWasv_benchmarks/asv.conf.json121 // "results_dir": "results",COMMENT
LOWasv_benchmarks/asv.conf.json141 // skipped for the matching benchmark.COMMENT
LOWasv_benchmarks/benchmarks/config.json1{COMMENT
LOWsklearn/__init__.py1"""Configure global settings and get information about the working environment."""COMMENT
LOWsklearn/__init__.py21import osCOMMENT
LOWsklearn/__init__.py41#COMMENT
LOWsklearn/tree/_classes.py461 raise ValueError(COMMENT
LOWsklearn/tree/tests/test_monotonic_tree.py321 depth_first_builder,COMMENT
LOWsklearn/tree/tests/test_monotonic_tree.py401 # down the tree to both children.COMMENT
LOWsklearn/tree/tests/test_monotonic_tree.py481def test_nd_tree_nodes_values(COMMENT
LOWsklearn/metrics/cluster/tests/test_common.py21)COMMENT
LOWsklearn/metrics/_plot/__init__.py1# Authors: The scikit-learn developersCOMMENT
LOWsklearn/metrics/tests/test_common.py121#COMMENT
LOWsklearn/metrics/tests/test_common.py141# which compare a ground truth and the estimated targets as returned by aCOMMENT
LOW…earn/metrics/_pairwise_distances_reduction/__init__.py1# Authors: The scikit-learn developersCOMMENT
LOW…earn/metrics/_pairwise_distances_reduction/__init__.py21# For computational reasons, the reduction are performed on the fly on chunksCOMMENT
LOW…earn/metrics/_pairwise_distances_reduction/__init__.py41# High-level diagramCOMMENT
LOW…earn/metrics/_pairwise_distances_reduction/__init__.py61# | | (float{32,64} implem.) | |COMMENT
LOW…earn/metrics/_pairwise_distances_reduction/__init__.py81# - :class:`ArgKmin64` if X and Y are two `float64` array-likesCOMMENT
LOWsklearn/ensemble/_hist_gradient_boosting/predictor.py141 # while on 32 bit np.intp = np.int32.COMMENT
LOW…hist_gradient_boosting/tests/test_gradient_boosting.py261 # invalid (np.inf) for the Gamma deviance. A Poisson HGBT (having a log link)COMMENT
LOW…hist_gradient_boosting/tests/test_gradient_boosting.py521 assert y_small.shape[0] == 10000COMMENT
LOW…_hist_gradient_boosting/tests/test_compare_lightgbm.py41 # samples is large enough, the structure of the prediction trees found byCOMMENT
LOWsklearn/cluster/_hdbscan/__init__.py1# Authors: The scikit-learn developersCOMMENT
LOWsklearn/cluster/_hdbscan/hdbscan.py1"""COMMENT
LOWsklearn/cluster/_hdbscan/hdbscan.py21# specific prior written permission.COMMENT
LOWsklearn/_loss/loss.py1"""COMMENT
LOWsklearn/_loss/loss.py61# - HistGradientBoostingClassifier: (n_classes, n_samples)COMMENT
LOWsklearn/_loss/loss.py1501 #COMMENT
LOWsklearn/_loss/tests/test_loss.py281 # def mpf2float(x):COMMENT
LOWsklearn/gaussian_process/kernels.py1"""A set of kernels that can be combined by operators and used in Gaussian processes."""COMMENT
LOWsklearn/gaussian_process/_gpr.py601 # y^T . alpha for each output, independently using einsum. Thus, itCOMMENT
LOWsklearn/gaussian_process/_gpr.py621 # output_alpha = alpha[:, [output_idx]]COMMENT
LOWsklearn/datasets/_base.py1441 # We create a temporary file dedicated to this particular download to avoidCOMMENT
LOWsklearn/datasets/_arff_parser.py421 # `pd.read_csv` automatically handles double quotes for quoting non-numericCOMMENT
LOWsklearn/datasets/images/__init__.py1# Authors: The scikit-learn developersCOMMENT
LOWsklearn/datasets/descr/__init__.py1# Authors: The scikit-learn developersCOMMENT
LOWsklearn/datasets/data/__init__.py1# Authors: The scikit-learn developersCOMMENT
LOWsklearn/externals/conftest.py1# Do not collect any tests in externals. This is more robust than usingCOMMENT
LOWsklearn/externals/_arff.py1# =============================================================================COMMENT
LOWsklearn/externals/array_api_compat/torch/_aliases.py741COMMENT
LOWsklearn/externals/array_api_compat/torch/linalg.py61 # See linalg_solve_is_vector_rhs inCOMMENT
LOWsklearn/externals/_numpydoc/docscrape.py241 desc = r.read_to_next_unindented_line()COMMENT
LOWsklearn/externals/_packaging/version.py1"""Vendored fromCOMMENT
LOWsklearn/externals/_packaging/version.py481 local: Optional[Tuple[SubLocalType]],COMMENT
LOWsklearn/externals/_packaging/_structures.py1"""Vendoered fromCOMMENT
LOWsklearn/tests/test_docstrings.py61 # We ignore following error code,COMMENT
LOWsklearn/tests/test_naive_bayes.py561COMMENT
LOWsklearn/linear_model/_quantile.py161 # So we rescale the penalty term, which is equivalent.COMMENT
LOWsklearn/linear_model/_linear_loss.py641 )COMMENT
LOWsklearn/linear_model/_linear_loss.py681 # Here, h is a priori a 4-dimensional matrix of shapeCOMMENT
LOWsklearn/linear_model/_linear_loss.py701 # (X' @ diag(h10) @ X, X' @ diag(h11), X' @ diag(h12))COMMENT
LOWsklearn/linear_model/_linear_loss.py901 # - sample index iCOMMENT
LOWsklearn/linear_model/_coordinate_descent.py1201 sample_weight = NoneCOMMENT
LOWsklearn/linear_model/_coordinate_descent.py1221 # equivalent to (1) in case of no sw.COMMENT
LOWsklearn/linear_model/_glm/_newton_solver.py781 # feature j for all classes by the same amount c:COMMENT
591 more matches not shown…
Cross-File Repetition108 hits · 540 pts
SeverityFileLineSnippetContext
HIGHsklearn/multiclass.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/compose/_column_transformer.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/linear_model/_least_angle.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/linear_model/_logistic.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/linear_model/_omp.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/linear_model/_coordinate_descent.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/feature_selection/_from_model.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/model_selection/_search.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/multioutput.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/pipeline.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/calibration.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/model_selection/_classification_threshold.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/ensemble/_voting.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/ensemble/_bagging.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/linear_model/_ridge.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/linear_model/_ransac.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/impute/_iterative.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/covariance/_graph_lasso.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/metrics/_scorer.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/ensemble/_stacking.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/semi_supervised/_self_training.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/compose/_target.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/feature_selection/_rfe.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/feature_selection/_sequential.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/preprocessing/_target_encoder.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism workSTRING
HIGHsklearn/base.py0mask feature names according to selected features. parameters ---------- input_features : array-like of str or none, defSTRING
HIGHsklearn/compose/_column_transformer.py0mask feature names according to selected features. parameters ---------- input_features : array-like of str or none, defSTRING
HIGHsklearn/impute/_base.py0mask feature names according to selected features. parameters ---------- input_features : array-like of str or none, defSTRING
HIGHsklearn/impute/_knn.py0mask feature names according to selected features. parameters ---------- input_features : array-like of str or none, defSTRING
HIGHsklearn/impute/_iterative.py0mask feature names according to selected features. parameters ---------- input_features : array-like of str or none, defSTRING
HIGHsklearn/preprocessing/_encoders.py0mask feature names according to selected features. parameters ---------- input_features : array-like of str or none, defSTRING
HIGHsklearn/preprocessing/_polynomial.py0mask feature names according to selected features. parameters ---------- input_features : array-like of str or none, defSTRING
HIGHsklearn/feature_selection/_base.py0mask feature names according to selected features. parameters ---------- input_features : array-like of str or none, defSTRING
HIGHsklearn/preprocessing/_discretization.py0mask feature names according to selected features. parameters ---------- input_features : array-like of str or none, defSTRING
HIGHsklearn/tree/_classes.py0fast partial dependence computation. parameters ---------- grid : ndarray, shape (n_samples, n_target_features), dtype=nSTRING
HIGHsklearn/ensemble/_forest.py0fast partial dependence computation. parameters ---------- grid : ndarray, shape (n_samples, n_target_features), dtype=nSTRING
HIGHsklearn/ensemble/_gb.py0fast partial dependence computation. parameters ---------- grid : ndarray, shape (n_samples, n_target_features), dtype=nSTRING
HIGH…/ensemble/_hist_gradient_boosting/gradient_boosting.py0fast partial dependence computation. parameters ---------- grid : ndarray, shape (n_samples, n_target_features), dtype=nSTRING
HIGH…learn/metrics/_plot/tests/test_common_curve_display.py0check that named constructors return the correct type when subclassed. non-regression test for: https://github.com/scikiSTRING
HIGH…inspection/_plot/tests/test_plot_partial_dependence.py0check that named constructors return the correct type when subclassed. non-regression test for: https://github.com/scikiSTRING
HIGH…spection/_plot/tests/test_boundary_decision_display.py0check that named constructors return the correct type when subclassed. non-regression test for: https://github.com/scikiSTRING
HIGHsklearn/model_selection/tests/test_plot.py0check that named constructors return the correct type when subclassed. non-regression test for: https://github.com/scikiSTRING
HIGHsklearn/ensemble/_voting.py0get output feature names for transformation. parameters ---------- input_features : array-like of str or none, default=nSTRING
HIGHsklearn/feature_extraction/_dict_vectorizer.py0get output feature names for transformation. parameters ---------- input_features : array-like of str or none, default=nSTRING
HIGHsklearn/feature_extraction/text.py0get output feature names for transformation. parameters ---------- input_features : array-like of str or none, default=nSTRING
HIGHsklearn/ensemble/tests/test_voting.py0test that the right error message is raised when metadata params are passed while not supported when `enable_metadata_roSTRING
HIGHsklearn/ensemble/tests/test_stacking.py0test that the right error message is raised when metadata params are passed while not supported when `enable_metadata_roSTRING
HIGHsklearn/semi_supervised/tests/test_self_training.py0test that the right error message is raised when metadata params are passed while not supported when `enable_metadata_roSTRING
HIGHsklearn/compose/tests/test_column_transformer.py0test that the right error message is raised when metadata params are passed while not supported when `enable_metadata_roSTRING
HIGHsklearn/tests/test_pipeline.py0test that the right error message is raised when metadata params are passed while not supported when `enable_metadata_roSTRING
HIGHsklearn/linear_model/tests/test_logistic.py0test that the right error message is raised when metadata params are passed while not supported when `enable_metadata_roSTRING
HIGHsklearn/ensemble/tests/test_voting.py0test that the right error is raised when metadata is not requested.STRING
HIGHsklearn/ensemble/tests/test_stacking.py0test that the right error is raised when metadata is not requested.STRING
HIGHsklearn/compose/tests/test_column_transformer.py0test that the right error is raised when metadata is not requested.STRING
HIGHsklearn/tests/test_pipeline.py0test that the right error is raised when metadata is not requested.STRING
HIGHsklearn/ensemble/tests/test_stacking.py0check that we raise the proper attributeerror when the estimator does not implement the `partial_fit` method, which is dSTRING
HIGHsklearn/tests/test_multiclass.py0check that we raise the proper attributeerror when the estimator does not implement the `partial_fit` method, which is dSTRING
HIGHsklearn/feature_selection/tests/test_rfe.py0check that we raise the proper attributeerror when the estimator does not implement the `partial_fit` method, which is dSTRING
HIGHsklearn/feature_selection/tests/test_from_model.py0check that we raise the proper attributeerror when the estimator does not implement the `partial_fit` method, which is dSTRING
HIGH…perimental/tests/test_enable_hist_gradient_boosting.py0tests for making sure experimental imports work as expected.STRING
48 more matches not shown…
Self-Referential Comments84 hits · 264 pts
SeverityFileLineSnippetContext
MEDIUMsklearn/tree/tests/test_tree.py2729 # Create a predictive feature using `y` and with some noiseCOMMENT
MEDIUMsklearn/tree/tests/test_tree.py2943 # Create a tree with root and two childrenCOMMENT
MEDIUM…earn/metrics/_pairwise_distances_reduction/__init__.py11# This module provides routines to compute pairwise distances between a setCOMMENT
MEDIUM⚡sklearn/ensemble/tests/test_forest.py858 # Create the RTE with sparse=FalseCOMMENT
MEDIUM⚡sklearn/ensemble/tests/test_forest.py871 # Create the RTEsCOMMENT
MEDIUM⚡sklearn/ensemble/tests/test_forest.py1899 # Create a predictive feature using `y` and with some noiseCOMMENT
MEDIUMsklearn/ensemble/_hist_gradient_boosting/__init__.py1"""This module implements histogram-based gradient boosting estimators.STRING
MEDIUMsklearn/gaussian_process/tests/test_gpr.py411 # Define a dummy optimizer that simply tests 50 random hyperparametersCOMMENT
MEDIUMsklearn/gaussian_process/tests/test_gpc.py166 # Define a dummy optimizer that simply tests 10 random hyperparametersCOMMENT
MEDIUMsklearn/compose/_column_transformer.py1306# This function is not validated using validate_params becauseCOMMENT
MEDIUMsklearn/datasets/_svmlight_format_io.py1"""This module implements a loader and dumper for the svmlight formatSTRING
MEDIUMsklearn/datasets/_openml.py194 # Create a tmpdir as a subfolder of dir_name where the final file willCOMMENT
MEDIUMsklearn/datasets/tests/test_openml.py1496 # Create a corrupted copy of the arff file (flip the last byte so that itsCOMMENT
MEDIUMsklearn/externals/_arff.py781 # Create the return objectCOMMENT
MEDIUMsklearn/externals/_arff.py790 # Create the data helper objectCOMMENT
MEDIUMsklearn/tests/test_calibration.py301 # This function is called from _CalibratedClassifier.predict_proba.COMMENT
MEDIUM⚡sklearn/tests/test_naive_bayes.py199 # Create an empty arrayCOMMENT
MEDIUMsklearn/tests/test_pipeline.py1526 # Create a new pipeline with cloned estimatorsCOMMENT
MEDIUMsklearn/tests/test_pipeline.py2406 # This class is used in this section for testing routing in the pipeline.COMMENT
MEDIUMsklearn/linear_model/tests/test_sgd.py1881 # Define a ground truth on the scaled dataCOMMENT
MEDIUMsklearn/linear_model/tests/test_sgd.py2133 # Create a classification problem with 50000 features and 20 classes. UsingCOMMENT
MEDIUMsklearn/linear_model/tests/test_least_angle.py363 # Create an ill-conditioned situation in which the LARS has to goCOMMENT
MEDIUMsklearn/linear_model/tests/test_coordinate_descent.py1678 # Create a problem sufficiently large to cause memmapping (1MB).COMMENT
MEDIUMsklearn/impute/tests/test_impute.py193 # Create a matrix X with columnsCOMMENT
MEDIUMsklearn/impute/tests/test_impute.py209 # Create the columnsCOMMENT
MEDIUMsklearn/utils/_array_api.py1259 # The following code is strongly inspired and simplified fromCOMMENT
MEDIUMsklearn/utils/metadata_routing.py3# This module is not a separate sub-folder since that would result in a circularCOMMENT
MEDIUMsklearn/utils/_testing.py566 # Create a list of parameters to compare with the parameters gottenCOMMENT
MEDIUMsklearn/utils/validation.py45# This function is not used anymore at this moment in the code base but we keep it inCOMMENT
MEDIUMsklearn/utils/tests/test_estimator_checks.py1335 # This module is run as a script to check that we have no dependency onCOMMENT
MEDIUMsklearn/utils/tests/test_multiclass.py577 # Define the sparse matrix with a mix of implicit and explicit zerosCOMMENT
MEDIUMsklearn/utils/_repr_html/base.py153 """This function is returned by the @property `_repr_html_` to makeSTRING
MEDIUMsklearn/feature_selection/_univariate_selection.py38# The following function is a rewriting of scipy.stats.f_onewayCOMMENT
MEDIUMsklearn/inspection/tests/test_permutation_importance.py457 # Creating a scorer function that does not takes sample_weightCOMMENT
MEDIUMsklearn/manifold/_isomap.py410 # Create the graph of shortest distances from X toCOMMENT
MEDIUMsklearn/mixture/tests/test_gaussian_mixture.py257 # Define the bad precisions for each covariance_typeCOMMENT
MEDIUMsklearn/preprocessing/_data.py2909 # Create the quantiles of referenceCOMMENT
MEDIUMsklearn/model_selection/_search.py1067 # Create the subcontexts ahead of time to avoid creating them on the flyCOMMENT
MEDIUMsklearn/model_selection/tests/test_validation.py2038 # Create a failing classifier to deliberately failCOMMENT
MEDIUMsklearn/model_selection/tests/test_validation.py2103 # Create a failing classifier to deliberately failCOMMENT
MEDIUMsklearn/model_selection/tests/test_validation.py2131 # Create a failing classifier to deliberately failCOMMENT
MEDIUMsklearn/neighbors/_classification.py417 # This function is defined here only to modify the parent docstringCOMMENT
MEDIUMsklearn/neighbors/_classification.py883 # This function is defined here only to modify the parent docstringCOMMENT
MEDIUMsklearn/neighbors/_nca.py315 # Create a dictionary of parameters to be passed to the optimizerCOMMENT
MEDIUMexamples/classification/plot_digits_classification.py62# Create a classifier: a support vector classifierCOMMENT
MEDIUM⚡examples/tree/plot_tree_regression.py27# Create a random 1D datasetCOMMENT
MEDIUM⚡examples/tree/plot_tree_regression.py91# Create a random datasetCOMMENT
MEDIUMexamples/ensemble/plot_adaboost_multiclass.py32# Creating the datasetCOMMENT
MEDIUM…/ensemble/plot_random_forest_regression_multioutput.py34# Create a random datasetCOMMENT
MEDIUMexamples/ensemble/plot_gradient_boosting_quantile.py91# Create an evenly spaced evaluation set of input values spanning the [0, 10]COMMENT
MEDIUMexamples/ensemble/plot_forest_iris.py101 # Create a title for each column and the console by using str() andCOMMENT
MEDIUM⚡examples/cluster/plot_adjusted_for_chance_measures.py22# Defining the list of metrics to evaluateCOMMENT
MEDIUMexamples/cluster/plot_kmeans_silhouette_analysis.py61 # Create a subplot with 1 row and 2 columnsCOMMENT
MEDIUMexamples/cluster/plot_kmeans_digits.py88 # Define the metrics which require only the true labels and estimatorCOMMENT
MEDIUMexamples/calibration/plot_compare_calibration.py98# Define the classifiers to be compared in the study.COMMENT
MEDIUMexamples/compose/plot_digits_pipe.py27# Define a pipeline to search for the best combination of PCA truncationCOMMENT
MEDIUMexamples/compose/plot_digits_pipe.py30# Define a Standard Scaler to normalize inputsCOMMENT
MEDIUMexamples/compose/plot_compare_reduction.py111# Create a temporary folder to store the transformers of the pipelineCOMMENT
MEDIUMexamples/linear_model/plot_ridge_coeffs.py66# Creating a non-noisy data setCOMMENT
MEDIUMexamples/linear_model/plot_sgd_early_stopping.py92# Define the estimators to compareCOMMENT
24 more matches not shown…
Deep Nesting280 hits · 255 pts
SeverityFileLineSnippetContext
LOWsklearn/conftest.py131CODE
LOWsklearn/kernel_approximation.py695CODE
LOWsklearn/multioutput.py684CODE
LOWsklearn/pipeline.py674CODE
LOWsklearn/discriminant_analysis.py40CODE
LOWsklearn/dummy.py246CODE
LOWsklearn/dummy.py333CODE
LOWsklearn/dummy.py535CODE
LOWsklearn/base.py100CODE
LOWsklearn/tree/_export.py558CODE
LOWsklearn/tree/_export.py745CODE
LOWsklearn/tree/_classes.py243CODE
LOWsklearn/tree/tests/test_split.py111CODE
LOWsklearn/tree/tests/test_monotonic_tree.py245CODE
LOWsklearn/tree/tests/test_monotonic_tree.py374CODE
LOWsklearn/tree/tests/test_tree.py861CODE
LOWsklearn/metrics/_scorer.py566CODE
LOWsklearn/metrics/_classification.py443CODE
LOWsklearn/metrics/_classification.py1899CODE
LOWsklearn/metrics/_regression.py60CODE
LOWsklearn/metrics/_regression.py966CODE
LOWsklearn/metrics/_regression.py1378CODE
LOWsklearn/metrics/_regression.py1423CODE
LOWsklearn/metrics/pairwise.py563CODE
LOWsklearn/metrics/pairwise.py2277CODE
LOWsklearn/metrics/pairwise.py2546CODE
LOWsklearn/metrics/_ranking.py128CODE
LOWsklearn/metrics/cluster/_supervised.py81CODE
LOWsklearn/metrics/_plot/confusion_matrix.py88CODE
LOW…learn/metrics/_plot/tests/test_common_curve_display.py510CODE
LOW…learn/metrics/_plot/tests/test_common_curve_display.py617CODE
LOWsklearn/metrics/tests/test_common.py902CODE
LOWsklearn/metrics/tests/test_common.py2613CODE
LOWsklearn/metrics/tests/test_common.py2697CODE
LOWsklearn/metrics/tests/test_common.py2889CODE
LOWsklearn/metrics/tests/test_dist_metrics.py246CODE
LOWsklearn/metrics/tests/test_ranking.py131CODE
LOWsklearn/metrics/tests/test_pairwise.py425CODE
LOWsklearn/metrics/tests/test_classification.py1746CODE
LOWsklearn/metrics/tests/test_classification.py2511CODE
LOWsklearn/ensemble/_bagging.py887CODE
LOWsklearn/ensemble/_gb.py114CODE
LOWsklearn/ensemble/_gb.py527CODE
LOWsklearn/ensemble/_gb.py604CODE
LOWsklearn/ensemble/_stacking.py88CODE
LOWsklearn/ensemble/tests/test_forest.py345CODE
LOWsklearn/ensemble/tests/test_forest.py364CODE
LOW…/ensemble/_hist_gradient_boosting/gradient_boosting.py394CODE
LOWsklearn/cluster/_agglomerative.py427CODE
LOWsklearn/cluster/_optics.py914CODE
LOWsklearn/cluster/_optics.py1013CODE
LOWsklearn/cluster/_kmeans.py457CODE
LOWsklearn/cluster/_kmeans.py625CODE
LOWsklearn/cluster/_kmeans.py865CODE
LOWsklearn/cluster/_kmeans.py955CODE
LOWsklearn/cluster/_spectral.py667CODE
LOWsklearn/cluster/_affinity_propagation.py34CODE
LOWsklearn/cluster/tests/test_hierarchical.py103CODE
LOWsklearn/cluster/tests/test_bicluster.py94CODE
LOWsklearn/feature_extraction/_dict_vectorizer.py142CODE
220 more matches not shown…
AI Structural Patterns238 hits · 236 pts
SeverityFileLineSnippetContext
LOWasv_benchmarks/benchmarks/neighbors.py29CODE
LOWasv_benchmarks/benchmarks/model_selection.py57CODE
LOWasv_benchmarks/benchmarks/ensemble.py111CODE
LOWsklearn/kernel_approximation.py973CODE
LOWsklearn/isotonic.py430CODE
LOWsklearn/_config.py65CODE
LOWsklearn/_config.py262CODE
LOWsklearn/tree/_export.py116CODE
LOWsklearn/tree/_export.py833CODE
LOWsklearn/tree/_export.py245CODE
LOWsklearn/tree/_export.py453CODE
LOWsklearn/tree/_export.py633CODE
LOWsklearn/tree/_classes.py1153CODE
LOWsklearn/tree/_classes.py1544CODE
LOWsklearn/tree/_classes.py1922CODE
LOWsklearn/tree/_classes.py2185CODE
LOWsklearn/metrics/cluster/_bicluster.py49CODE
LOWsklearn/metrics/_plot/det_curve.py227CODE
LOWsklearn/metrics/_plot/precision_recall_curve.py404CODE
LOWsklearn/metrics/_plot/precision_recall_curve.py562CODE
LOWsklearn/metrics/_plot/precision_recall_curve.py736CODE
LOWsklearn/metrics/_plot/roc_curve.py295CODE
LOWsklearn/metrics/_plot/roc_curve.py434CODE
LOWsklearn/metrics/_plot/roc_curve.py574CODE
LOWsklearn/metrics/_plot/confusion_matrix.py88CODE
LOWsklearn/metrics/_plot/confusion_matrix.py205CODE
LOWsklearn/metrics/_plot/confusion_matrix.py354CODE
LOWsklearn/ensemble/_forest.py206CODE
LOWsklearn/ensemble/_forest.py727CODE
LOWsklearn/ensemble/_forest.py1015CODE
LOWsklearn/ensemble/_forest.py1496CODE
LOWsklearn/ensemble/_forest.py1853CODE
LOWsklearn/ensemble/_forest.py2233CODE
LOWsklearn/ensemble/_forest.py2570CODE
LOWsklearn/ensemble/_forest.py2830CODE
LOWsklearn/ensemble/_bagging.py294CODE
LOWsklearn/ensemble/_bagging.py852CODE
LOWsklearn/ensemble/_bagging.py1352CODE
LOWsklearn/ensemble/_gb.py365CODE
LOWsklearn/ensemble/_gb.py1438CODE
LOWsklearn/ensemble/_gb.py2023CODE
LOWsklearn/ensemble/_iforest.py238CODE
LOW…/ensemble/_hist_gradient_boosting/gradient_boosting.py1655CODE
LOW…/ensemble/_hist_gradient_boosting/gradient_boosting.py2040CODE
LOWsklearn/ensemble/_hist_gradient_boosting/grower.py244CODE
LOWsklearn/cluster/_agglomerative.py939CODE
LOWsklearn/cluster/_agglomerative.py1263CODE
LOWsklearn/cluster/_optics.py261CODE
LOWsklearn/cluster/_dbscan.py29CODE
LOWsklearn/cluster/_dbscan.py363CODE
LOWsklearn/cluster/_bicluster.py493CODE
LOWsklearn/cluster/_bicluster.py612CODE
LOWsklearn/cluster/_kmeans.py302CODE
LOWsklearn/cluster/_kmeans.py1372CODE
LOWsklearn/cluster/_kmeans.py1879CODE
LOWsklearn/cluster/_spectral.py194CODE
LOWsklearn/cluster/_spectral.py631CODE
LOWsklearn/cluster/_bisect_k_means.py228CODE
LOWsklearn/cluster/_affinity_propagation.py189CODE
LOWsklearn/cluster/_affinity_propagation.py457CODE
178 more matches not shown…
AI Slop Vocabulary68 hits · 174 pts
SeverityFileLineSnippetContext
MEDIUMsklearn/metrics/_classification.py546 # namespace and device so as to be able to leverage the efficientSTRING
MEDIUMsklearn/metrics/tests/test_dist_metrics.py193 # Choose rtol to make sure that this test is robust to changes in the randomCOMMENT
LOWsklearn/metrics/tests/test_pairwise.py1654 # Single dimension input, just return tuple of contents.COMMENT
MEDIUM⚡sklearn/ensemble/tests/test_forest.py1894 # `forest_non_predictive`: meaningful for R2/accuracy, but robust in tests.COMMENT
MEDIUMsklearn/feature_extraction/tests/test_text.py476 # this is robust to features with only zerosCOMMENT
LOWsklearn/_loss/loss.py1492 # dtypes. For float64, we simply use the values that are present in theCOMMENT
MEDIUMsklearn/datasets/tests/test_openml.py1368 # redownload, to utilize cacheCOMMENT
MEDIUMsklearn/externals/conftest.py1# Do not collect any tests in externals. This is more robust than usingCOMMENT
MEDIUMsklearn/externals/array_api_compat/common/_helpers.py1029 # as we do below for unknown arrays, this is not recommended by JAX best practices.COMMENT
MEDIUMsklearn/linear_model/_theil_sen.py208 """Theil-Sen Estimator: robust multivariate regression model.STRING
LOWsklearn/linear_model/_linear_loss.py1204 # We use 0 as the inverse of 0 and just set:COMMENT
MEDIUMsklearn/linear_model/_huber.py130 """L2-regularized linear regression model that is robust to outliers.STRING
MEDIUMsklearn/linear_model/_glm/tests/test_glm.py1091 # LBFGS is robust to a collinear design because its approximation of theCOMMENT
MEDIUMsklearn/linear_model/tests/test_least_angle.py143 # Check that lars_path is robust to collinearity in inputCOMMENT
MEDIUMsklearn/linear_model/tests/test_base.py363 # robust to any random seed in the admissible range.COMMENT
LOWsklearn/utils/_array_api.py241 # Note: here we cannot simply use a Python `set` as it requiresCOMMENT
LOWsklearn/utils/_metadata_requests.py1958 # try doing any routing, we can simply return a structure which returnsCOMMENT
LOWsklearn/utils/tests/test_pprint.py602 # want to expend the whole line of the right side, just add the ellispsisCOMMENT
LOWsklearn/utils/tests/test_estimator_checks.py374 # then just return zeros.COMMENT
MEDIUMsklearn/covariance/_graph_lasso.py106 i = 0 # initialize the counter to be robust to `max_iter=0`CODE
MEDIUMsklearn/covariance/_graph_lasso.py114 # be robust to the max_iter=0 edge case, see:COMMENT
MEDIUMsklearn/covariance/_robust_covariance.py128 # compute initial robust estimates from a random subsetCOMMENT
MEDIUMsklearn/covariance/_robust_covariance.py131 # get initial robust estimates from the function parametersCOMMENT
MEDIUMsklearn/covariance/_robust_covariance.py489 # take the middle points' mean to get the robust location estimateCOMMENT
MEDIUMsklearn/covariance/_robust_covariance.py622 """Minimum Covariance Determinant (MCD): robust estimator of covariance.STRING
MEDIUMsklearn/preprocessing/_data.py1517 """Scale features using statistics that are robust to outliers.STRING
MEDIUMsklearn/preprocessing/tests/test_data.py1240 # Test robust scaling of 2d array along first axisCOMMENT
MEDIUMsklearn/preprocessing/tests/test_data.py1440 # check in conjunction with subsamplingCOMMENT
MEDIUMsklearn/model_selection/_split.py765 # without attempting to leverage array API namespace features. HoweverCOMMENT
LOWsklearn/decomposition/_pca.py515 # Small problem or n_components == 'mle', just call full PCACOMMENT
MEDIUMexamples/ensemble/plot_gradient_boosting_quantile.py193# (underestimation for this asymmetric noise) but is also naturally robust toCOMMENT
MEDIUMexamples/cluster/plot_hdbscan.py106# HDBSCAN is much more robust in this sense: HDBSCAN can be seen asCOMMENT
MEDIUMexamples/cluster/plot_hdbscan.py179# results regarding density. We will however see that HDBSCAN is relatively robustCOMMENT
MEDIUMexamples/cluster/plot_hdbscan.py193# more robust with respect to noisy datasets, e.g. high-variance clusters withCOMMENT
MEDIUM⚡examples/cluster/plot_adjusted_for_chance_measures.py27# example, it is possible to use evaluation metrics that leverage thisCOMMENT
MEDIUMexamples/cluster/plot_dbscan.py68# that leverage this "supervised" ground truth information to quantify theCOMMENT
MEDIUMexamples/linear_model/plot_quantile_regression.py92# insights. On top of that, median estimation is much more robust to outliersCOMMENT
MEDIUMexamples/linear_model/plot_ridge_coeffs.py161# When `alpha` is small, the model captures the intricate details of theCOMMENT
MEDIUMexamples/linear_model/plot_ridge_coeffs.py179# Some other linear models are formulated to be robust to outliers such as theCOMMENT
MEDIUM…near_model/plot_tweedie_regression_insurance_claims.py458# :class:`~sklearn.linear_model.GammaRegressor` is able to leverage someCOMMENT
MEDIUMexamples/linear_model/plot_logistic_multinomial.py186# - This approach can capture more nuanced relationships between classes, potentiallyCOMMENT
MEDIUMexamples/impute/plot_missing_values.py268# robust estimator for data with high magnitude variables which could dominateCOMMENT
MEDIUM⚡examples/covariance/plot_mahalanobis_distances.py104# that of the MCD robust estimator (1.2). This shows that the MCD basedSTRING
MEDIUM⚡examples/covariance/plot_mahalanobis_distances.py105# robust estimator is much more resistant to the outlier samples, which wereSTRING
MEDIUM⚡examples/covariance/plot_mahalanobis_distances.py112# fit an MCD robust estimator to dataSTRING
MEDIUMexamples/covariance/plot_mahalanobis_distances.py124# Mahalanobis distances calculated by both methods. Notice that the robustSTRING
MEDIUMexamples/covariance/plot_mahalanobis_distances.py179# distribution of inlier samples for robust MCD based Mahalanobis distances.STRING
MEDIUM…ples/covariance/plot_robust_vs_empirical_covariance.py101 # fit a Minimum Covariance Determinant (MCD) robust estimator to dataSTRING
MEDIUM…ples/covariance/plot_robust_vs_empirical_covariance.py103 # compare raw robust estimates with the true location and covarianceSTRING
MEDIUMexamples/miscellaneous/plot_outlier_detection_bench.py331# method to avoid granting a privilege to non-binary features and that is robustCOMMENT
MEDIUMexamples/miscellaneous/plot_outlier_detection_bench.py406# IQR is robust to outliers: the median and interquartile range are lessCOMMENT
MEDIUMexamples/inspection/plot_partial_dependence.py316# without any preprocessing as tree-based models are naturally robust toCOMMENT
MEDIUM⚡examples/svm/plot_svm_kernels.py266# different kernels utilize the training data to determine the classificationCOMMENT
MEDIUMexamples/svm/plot_svm_kernels.py278# For a comprehensive evaluation, fine-tuning of :class:`~sklearn.svm.SVC`COMMENT
MEDIUMexamples/applications/plot_outlier_detection_wine.py34# robust estimator can help concentrate on a relevant cluster when outlyingCOMMENT
MEDIUMexamples/applications/plot_outlier_detection_wine.py102# robust estimator of covariance to concentrate on the main mode of the dataCOMMENT
MEDIUM…ples/applications/plot_cyclical_feature_engineering.py285# the linear regression model to properly leverage the time information: linearCOMMENT
MEDIUM…ples/applications/plot_cyclical_feature_engineering.py494# leverage the periodic time-related features and reduce the error from ~14% toCOMMENT
MEDIUM…ples/applications/plot_cyclical_feature_engineering.py559# leverage those features to properly model intra-day variations.COMMENT
MEDIUM…es/release_highlights/plot_release_highlights_1_3_0.py50# making it more robust to parameter selection than :class:`cluster.DBSCAN`.COMMENT
8 more matches not shown…
Empty Error Handlers31 hits · 155 pts
SeverityFileLineSnippetContext
HIGHsklearn/conftest.py446except ImportError:CODE
HIGHsklearn/pipeline.py1243except (ValueError, AttributeError, TypeError):CODE
HIGHsklearn/pipeline.py1256except (ValueError, AttributeError, TypeError):CODE
HIGHsklearn/pipeline.py2207except Exception:CODE
HIGHsklearn/base.py134except AttributeError:CODE
HIGHsklearn/metrics/tests/test_classification.py2936except ImportError:CODE
HIGHsklearn/ensemble/_base.py308except Exception:CODE
HIGH…hist_gradient_boosting/tests/test_gradient_boosting.py1085except ImportError:CODE
HIGHsklearn/compose/_column_transformer.py1254except Exception:CODE
HIGHsklearn/externals/array_api_compat/cupy/linalg.py19except ImportError:CODE
HIGHsklearn/externals/array_api_compat/torch/_aliases.py26except AttributeError:CODE
HIGHsklearn/externals/array_api_compat/torch/_aliases.py138except KeyError:CODE
HIGHsklearn/externals/array_api_compat/common/_helpers.py295except Exception:CODE
HIGHsklearn/externals/array_api_extra/testing/_testing.py701except (TypeError, BufferError):CODE
HIGHsklearn/externals/_numpydoc/docscrape.py674except AttributeError:CODE
HIGHsklearn/tests/test_config.py100except ValueError:CODE
HIGHsklearn/linear_model/_ransac.py409except ValueError:CODE
HIGHsklearn/linear_model/_glm/glm.py574except (ValueError, AttributeError, TypeError):CODE
HIGHsklearn/utils/estimator_checks.py4733except NotFittedError:CODE
HIGHsklearn/utils/estimator_checks.py3188except NotImplementedError:CODE
HIGHsklearn/utils/multiclass.py385except IndexError:CODE
HIGHsklearn/utils/_unique.py20except (AttributeError, TypeError):CODE
HIGHsklearn/utils/_unique.py74except AttributeError:CODE
HIGHsklearn/utils/_metadata_requests.py1718except Exception:CODE
HIGHsklearn/utils/_testing.py366except ImportError:CODE
HIGHsklearn/utils/tests/test_estimator_checks.py693except ImportError:CODE
HIGHsklearn/callback/_progressbar.py147except ImportError:CODE
HIGHbenchmarks/bench_20newsgroups.py64except (TypeError, ValueError):CODE
HIGHbenchmarks/bench_saga.py388except OSError:CODE
HIGHdoc/conftest.py143except ImportError:CODE
HIGHdoc/conf.py53except ImportError:CODE
AI Response Leakage18 hits · 138 pts
SeverityFileLineSnippetContext
HIGHexamples/tree/plot_unveil_tree_structure.py158# Note: In this example, `n_outputs=1`, but the tree classifier can also handleCOMMENT
HIGHexamples/tree/plot_cost_complexity_pruning.py99# In this example, setting ``ccp_alpha=0.015`` maximizes the testing accuracy.COMMENT
HIGHexamples/calibration/plot_compare_calibration.py192# In this example the training set was intentionally kept very small. In thisCOMMENT
HIGHexamples/calibration/plot_calibration_multiclass.py210# In this example, the re-calibration yields an overall better model. We can showCOMMENT
HIGHexamples/compose/plot_transformed_target.py127# of transforming the targets before learning a model. In this example, theCOMMENT
HIGH…near_model/plot_tweedie_regression_insurance_claims.py587# In this example, both modeling approaches yield comparable performanceCOMMENT
HIGHexamples/linear_model/plot_lasso_model_selection.py22# In this example, we will use the diabetes dataset.COMMENT
HIGHexamples/linear_model/plot_lasso_model_selection.py243# In this example, both approaches are working similarly. The in-sampleCOMMENT
HIGHexamples/linear_model/plot_lasso_and_elasticnet.py110# In this example, we demo a :class:`~sklearn.linear_model.Lasso` with a fixedCOMMENT
HIGHexamples/svm/plot_svm_scale_c.py43# In this example we investigate the effect of reparametrizing the regularizationSTRING
HIGH⚡examples/svm/plot_svm_kernels.py257# with data that exhibits a sigmoidal shape. In this example, careful fineCOMMENT
HIGH⚡examples/svm/plot_svm_kernels.py264# In this example, we have visualized the decision boundaries trained with theCOMMENT
HIGHexamples/preprocessing/plot_target_encoder_cross_val.py68# In this example, we generate them to show how :class:`TargetEncoder`'s defaultCOMMENT
HIGHexamples/model_selection/plot_grid_search_stats.py126# cases. In this example we will show how to implement one of them (the soCOMMENT
HIGHexamples/model_selection/plot_grid_search_stats.py360# In this example we are going to define theCOMMENT
HIGH…les/model_selection/plot_grid_search_refit_callable.py372# In this example, we've seen how to implement this rule using a custom refitCOMMENT
HIGHexamples/multiclass/plot_multiclass_overview.py30# In this example, we use a UCI dataset [1]_, generally referred as the YeastCOMMENT
HIGHexamples/neighbors/plot_classification.py18# In this example, we use the iris dataset. We split the data into a train and testCOMMENT
Modern Structural Boilerplate122 hits · 122 pts
SeverityFileLineSnippetContext
LOWsklearn/multiclass.py74__all__ = [CODE
LOWsklearn/random_projection.py49__all__ = [CODE
LOWsklearn/isotonic.py21__all__ = ["IsotonicRegression", "check_increasing", "isotonic_regression"]CODE
LOWsklearn/multioutput.py51__all__ = [CODE
LOWsklearn/__init__.py26logger = logging.getLogger(__name__)CODE
LOWsklearn/naive_bayes.py39__all__ = [CODE
LOWsklearn/pipeline.py37__all__ = ["FeatureUnion", "Pipeline", "make_pipeline", "make_union"]CODE
LOWsklearn/discriminant_analysis.py37__all__ = ["LinearDiscriminantAnalysis", "QuadraticDiscriminantAnalysis"]CODE
LOWsklearn/exceptions.py6__all__ = [CODE
LOWsklearn/tree/__init__.py15__all__ = [CODE
LOW⚡sklearn/tree/_classes.py60__all__ = [CODE
LOWsklearn/metrics/__init__.py105__all__ = [CODE
LOWsklearn/metrics/cluster/_bicluster.py10__all__ = ["consensus_score"]CODE
LOWsklearn/metrics/cluster/__init__.py35__all__ = [CODE
LOW…earn/metrics/_pairwise_distances_reduction/__init__.py103__all__ = [CODE
LOWsklearn/ensemble/_forest.py84__all__ = [CODE
LOWsklearn/ensemble/_bagging.py46__all__ = ["BaggingClassifier", "BaggingRegressor"]CODE
LOWsklearn/ensemble/_weight_boosting.py53__all__ = [CODE
LOWsklearn/ensemble/__init__.py25__all__ = [CODE
LOWsklearn/ensemble/_iforest.py26__all__ = ["IsolationForest"]CODE
LOWsklearn/cluster/_bicluster.py21__all__ = ["SpectralBiclustering", "SpectralCoclustering"]CODE
LOWsklearn/cluster/__init__.py36__all__ = [CODE
LOWsklearn/feature_extraction/__init__.py11__all__ = [CODE
LOWsklearn/feature_extraction/text.py40__all__ = [CODE
LOWsklearn/feature_extraction/image.py22__all__ = [CODE
LOWsklearn/_loss/__init__.py24__all__ = [CODE
LOWsklearn/semi_supervised/__init__.py13__all__ = ["LabelPropagation", "LabelSpreading", "SelfTrainingClassifier"]CODE
LOWsklearn/semi_supervised/_self_training.py26__all__ = ["SelfTrainingClassifier"]CODE
LOWsklearn/gaussian_process/__init__.py10__all__ = ["GaussianProcessClassifier", "GaussianProcessRegressor", "kernels"]CODE
LOWsklearn/compose/_target.py25__all__ = ["TransformedTargetRegressor"]CODE
LOWsklearn/compose/__init__.py18__all__ = [CODE
LOWsklearn/compose/_column_transformer.py54__all__ = ["ColumnTransformer", "make_column_selector", "make_column_transformer"]CODE
LOWsklearn/datasets/_kddcup99.py51logger = logging.getLogger(__name__)CODE
LOWsklearn/datasets/_california_housing.py53logger = logging.getLogger(__name__)CODE
LOWsklearn/datasets/_species_distributions.py64logger = logging.getLogger(__name__)CODE
LOWsklearn/datasets/_covtype.py45logger = logging.getLogger(__name__)CODE
LOWsklearn/datasets/__init__.py62__all__ = [CODE
LOWsklearn/datasets/_rcv1.py79logger = logging.getLogger(__name__)CODE
LOWsklearn/datasets/_lfw.py34logger = logging.getLogger(__name__)CODE
LOWsklearn/datasets/_twenty_newsgroups.py55logger = logging.getLogger(__name__)CODE
LOWsklearn/datasets/_openml.py35__all__ = ["fetch_openml"]CODE
LOWsklearn/externals/array_api_compat/_internal.py74__all__ = ["get_xp", "clone_module"]STRING
LOW…earn/externals/array_api_compat/dask/array/_aliases.py353__all__ = [CODE
LOWsklearn/externals/array_api_compat/cupy/_typing.py3__all__ = ["Array", "DType", "Device"]CODE
LOWsklearn/externals/array_api_compat/torch/_typing.py1__all__ = ["Array", "Device", "DType"]CODE
LOWsklearn/externals/array_api_compat/torch/_aliases.py944__all__ = ['asarray', 'result_type', 'can_cast',STRING
LOWsklearn/externals/array_api_compat/numpy/_typing.py25__all__ = ["Array", "DType", "Device"]CODE
LOWsklearn/externals/array_api_compat/numpy/_info.py363__all__ = ["__array_namespace_info__"]CODE
LOWsklearn/externals/array_api_compat/common/_fft.py195__all__ = [CODE
LOWsklearn/externals/array_api_compat/common/_typing.py161__all__ = [CODE
LOWsklearn/externals/array_api_compat/common/_linalg.py226__all__ = ['cross', 'matmul', 'outer', 'tensordot', 'EighResult',CODE
LOWsklearn/externals/array_api_compat/common/_aliases.py661__all__ = [CODE
LOWsklearn/externals/array_api_compat/common/_helpers.py1070__all__ = [CODE
LOWsklearn/externals/array_api_extra/_statistical.py7__all__ = ["cov", "nanmax", "nanmean", "nanmin", "nansum"]CODE
LOWsklearn/externals/array_api_extra/_creation.py7__all__ = ["create_diagonal", "one_hot"]CODE
LOWsklearn/externals/array_api_extra/_set.py7__all__ = ["isin", "nunique", "setdiff1d", "union1d"]CODE
LOWsklearn/externals/array_api_extra/_at.py14__all__ = ["at"]CODE
LOWsklearn/externals/array_api_extra/_lazy.py15__all__ = ["lazy_apply"]CODE
LOWsklearn/externals/array_api_extra/_searching.py9__all__ = ["searchsorted"]CODE
LOWsklearn/externals/array_api_extra/__init__.py20__all__ = [CODE
62 more matches not shown…
Redundant / Tautological Comments51 hits · 78 pts
SeverityFileLineSnippetContext
LOWsklearn/__init__.py144 # Check if a random seed exists in the environment, if not create one.COMMENT
LOWsklearn/pipeline.py2096 # Check if Xs dimensions are validCOMMENT
LOWsklearn/calibration.py1081 # Check if it is the output of predict_probaCOMMENT
LOWsklearn/tree/tests/test_tree.py487 # Check if variable importance before fit raises ValueError.COMMENT
LOWsklearn/tree/tests/test_export.py411 # Check if it errors when length of feature_namesCOMMENT
LOWsklearn/metrics/_classification.py326 # Check if dimensions are consistent.STRING
LOW…learn/metrics/_plot/tests/test_common_curve_display.py460 # Check if the number of parameters matchCOMMENT
LOWsklearn/metrics/tests/test_dist_metrics.py325 # Check if both callable metric and predefined metric initializedCOMMENT
LOW⚡sklearn/ensemble/tests/test_gradient_boosting.py1309 # Check if validation_fraction has an effectCOMMENT
LOW⚡sklearn/ensemble/tests/test_gradient_boosting.py1318 # Check if n_estimators_ increase monotonically with n_iter_no_changeCOMMENT
LOWsklearn/ensemble/tests/test_gradient_boosting.py490 # Check if we can fit even though all targets are equal.COMMENT
LOWsklearn/ensemble/tests/test_gradient_boosting.py504 # Check if quantile loss with alpha=0.5 equals absolute_error.COMMENT
LOWsklearn/ensemble/tests/test_gradient_boosting.py1230 # Check if early stopping works as expected, that is empirically check that theCOMMENT
LOWsklearn/cluster/tests/test_bisect_k_means.py57 # Check if results is the same for dense and sparse dataCOMMENT
LOWsklearn/cluster/_hdbscan/hdbscan.py113 # Check if the mutual reachability matrix has any rows which haveCOMMENT
LOWsklearn/gaussian_process/_gpc.py486 # Check if we have converged (log marginal likelihood doesCOMMENT
LOWsklearn/gaussian_process/_gpr.py477 # Check if any of the variances is negative because ofCOMMENT
LOWsklearn/externals/_arff.py564 # Check if the rows are sortedCOMMENT
LOWsklearn/linear_model/tests/test_theil_sen.py164 # Check if median is solution of the Fermat-Weber location problemCOMMENT
LOWsklearn/utils/estimator_checks.py4529 # Check if classifier throws an exception when fed regression targetsCOMMENT
LOWsklearn/utils/multiclass.py403 # Check if multioutputCOMMENT
LOWsklearn/utils/tests/test_extmath.py573 # Check if the randomized_svd sign flipping is always done based on uCOMMENT
LOWsklearn/utils/tests/test_extmath.py632 # Check if cartesian product delivers the right resultsCOMMENT
LOWsklearn/covariance/_robust_covariance.py174 # Check if best fit already found (det => 0, logdet => -inf)COMMENT
LOWsklearn/neural_network/tests/test_rbm.py134 # Check if we don't get NaNs sampling the full digits dataset.COMMENT
LOWsklearn/feature_selection/tests/test_rfe.py84 # Check if the supports are equalCOMMENT
LOWsklearn/mixture/tests/test_gaussian_mixture.py978 # Check if the score increaseCOMMENT
LOW⚡sklearn/preprocessing/tests/test_data.py1184 # Check if non-finite inputs raise ValueErrorCOMMENT
LOWsklearn/preprocessing/tests/test_data.py744 # Check if StandardScaler inverse_transform isCOMMENT
LOWsklearn/model_selection/tests/test_split.py356 # Check if get_n_splits returns the number of foldsCOMMENT
LOWsklearn/model_selection/tests/test_split.py407 # Check if get_n_splits returns the number of foldsCOMMENT
LOW⚡sklearn/model_selection/tests/test_validation.py1712 # Check if the additional duplicate indices are caughtCOMMENT
LOWsklearn/model_selection/tests/test_validation.py621 # Check if ValueError (when groups is None) propagates to cross_val_scoreCOMMENT
LOW⚡sklearn/model_selection/tests/test_search.py1930 # Check if a one time iterable is accepted as a cv parameter.COMMENT
LOWsklearn/model_selection/tests/test_search.py344 # Check if ValueError (when groups is None) propagates to GridSearchCVCOMMENT
LOWsklearn/model_selection/tests/test_search.py932 # Check if the search `cv_results`'s array are of correct typesCOMMENT
LOWsklearn/model_selection/tests/test_search.py1001 # Check if score and timing are reasonableCOMMENT
LOWsklearn/model_selection/tests/test_search.py1262 # Check if score and timing are reasonable, also checks if the keysCOMMENT
LOWsklearn/model_selection/tests/test_search.py1982 # Check if generators are supported as cv andCOMMENT
LOW…learn/model_selection/tests/test_successive_halving.py729 # Check if ValueError (when groups is None) propagates toCOMMENT
LOWsklearn/decomposition/tests/test_fastica.py168 # Set atol to account for the different magnitudes of the elements in sourcesCOMMENT
LOWsklearn/decomposition/tests/test_incremental_pca.py452 # Set n_samples_seen_ to be a floating point number instead of an intCOMMENT
LOWsklearn/neighbors/_lof.py312 # Verify if negative_outlier_factor_ values are within acceptable range.COMMENT
LOWmaint_tools/update_tracking_issue.py170# Check if test collection failedCOMMENT
LOWexamples/linear_model/plot_ridge_path.py56# Display resultsCOMMENT
LOW…/linear_model/plot_lasso_lasso_lars_elasticnet_path.py75# Display resultsCOMMENT
LOW…ples/covariance/plot_robust_vs_empirical_covariance.py122# Display resultsSTRING
LOW…les/model_selection/plot_grid_search_refit_callable.py329# Print the resultsCOMMENT
LOWbenchmarks/bench_isolation_forest.py48# Set this to true for plotting score histograms for each dataset:COMMENT
LOWbenchmarks/bench_sample_without_replacement.py195 # Print resultsCOMMENT
LOWbenchmarks/bench_random_projections.py273 # Print resultsCOMMENT
Cross-Language Confusion18 hits · 70 pts
SeverityFileLineSnippetContext
HIGHsklearn/externals/array_api_extra/_creation.py108 If ``x < 0`` or ``x >= num_classes``, then the result is undefined, may raiseSTRING
HIGH…rn/externals/array_api_extra/_agnostic/_statistical.py86 # normalizer with a zero imaginary part. Complex ordering is undefined;COMMENT
HIGHsklearn/linear_model/_glm/glm.py494 :math:`D^2 = 1-\\frac{D(y_{true},y_{pred})}{D_{null}}`,STRING
HIGHsklearn/linear_model/_glm/glm.py495 :math:`D_{null}` is the null deviance, i.e. the deviance of a modelSTRING
HIGH⚡sklearn/utils/_repr_html/tests/test_js.py233 window.__keydowns.push({CODE
HIGH⚡sklearn/utils/_repr_html/tests/test_js.py239 window.__seenKeys.push(event.key);CODE
HIGHsklearn/utils/_repr_html/tests/test_js.py415 open: details ? details.open : null,STRING
HIGHsklearn/callback/tests/test_scoring_monitor.py185 assert log.equals(expected_log)CODE
HIGH⚡sklearn/callback/tests/test_scoring_monitor.py220 assert log.equals(expected_log)CODE
HIGHsklearn/decomposition/_dict_learning.py693 (U^*, V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1STRING
HIGHsklearn/decomposition/_dict_learning.py695 with || V_k ||_2 = 1 for all 0 <= k < n_componentsSTRING
HIGHsklearn/decomposition/_dict_learning.py904 (U^*, V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1STRING
HIGHsklearn/decomposition/_dict_learning.py906 with || V_k ||_2 = 1 for all 0 <= k < n_componentsSTRING
HIGHsklearn/decomposition/_dict_learning.py1401 (U^*,V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1STRING
HIGHsklearn/decomposition/_dict_learning.py1403 with || V_k ||_2 <= 1 for all 0 <= k < n_componentsSTRING
HIGHsklearn/decomposition/_dict_learning.py1730 (U^*,V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1STRING
HIGHsklearn/decomposition/_dict_learning.py1732 with || V_k ||_2 <= 1 for all 0 <= k < n_componentsSTRING
HIGHsklearn/neighbors/tests/test_neighbors_tree.py177 heap.push(row, d, i)CODE
Excessive Try-Catch Wrapping48 hits · 56 pts
SeverityFileLineSnippetContext
LOWsklearn/pipeline.py2207 except Exception:CODE
MEDIUMsklearn/pipeline.py392def _final_estimator(self):CODE
LOWsklearn/metrics/_scorer.py180 except Exception as e:CODE
LOWsklearn/metrics/_classification.py2413 except Exception as e:STRING
LOWsklearn/ensemble/_base.py308 except Exception:CODE
LOWsklearn/feature_extraction/text.py419 except Exception:CODE
LOWsklearn/compose/_column_transformer.py1254 except Exception:CODE
MEDIUMsklearn/compose/_column_transformer.py535def _get_remainder_cols_dtype(self):CODE
LOWsklearn/datasets/_kddcup99.py366 except Exception as e:CODE
LOWsklearn/datasets/_twenty_newsgroups.py306 except Exception as e:CODE
LOWsklearn/datasets/_openml.py83 except Exception as exc:CODE
LOWsklearn/datasets/_openml.py212 except Exception:CODE
LOWsklearn/datasets/_openml.py583 except Exception as exc:CODE
MEDIUMsklearn/datasets/_openml.py78def wrapper(*args, **kw):CODE
LOWsklearn/externals/_arff.py758 except Exception:CODE
LOWsklearn/externals/array_api_compat/common/_helpers.py295 except Exception:CODE
LOWsklearn/externals/array_api_compat/common/_helpers.py1066 except Exception:CODE
LOWsklearn/externals/array_api_extra/_lib/_helpers.py429 except Exception: # pylint: disable=broad-exception-caught # noqa: BLE001CODE
LOWsklearn/tests/test_init.py11except Exception as e:CODE
LOWsklearn/utils/_available_if.py33 except Exception as e:CODE
LOW⚡sklearn/utils/estimator_checks.py4164 except Exception as e:CODE
LOW⚡sklearn/utils/estimator_checks.py4173 except Exception as e:CODE
LOWsklearn/utils/estimator_checks.py930 except Exception as e:CODE
LOWsklearn/utils/estimator_checks.py1618 except Exception as e:CODE
LOWsklearn/utils/estimator_checks.py1643 except Exception as e:CODE
LOWsklearn/utils/estimator_checks.py4394 except Exception as e:CODE
LOWsklearn/utils/_metadata_requests.py1718 except Exception:CODE
LOWsklearn/utils/_testing.py544 except Exception as exp:CODE
LOWsklearn/utils/validation.py358 except Exception as err:CODE
LOWsklearn/utils/tests/test_array_api.py627 except Exception:CODE
LOWsklearn/utils/_repr_html/estimator.py238 except Exception:CODE
LOWsklearn/utils/_repr_html/estimator.py421 except Exception:CODE
LOWsklearn/utils/_repr_html/estimator.py436 except Exception:CODE
LOWsklearn/callback/_callback_support.py172 except Exception as exc:CODE
LOWsklearn/model_selection/_validation.py838 except Exception:CODE
LOWsklearn/model_selection/_validation.py926 except Exception:CODE
LOW⚡benchmarks/bench_rcv1_logreg_convergence.py41 except Exception:CODE
LOW⚡benchmarks/bench_rcv1_logreg_convergence.py50 except Exception:CODE
LOW⚡benchmarks/bench_rcv1_logreg_convergence.py55 except Exception:CODE
LOW⚡build_tools/circle/list_versions.py20 except Exception:CODE
MEDIUM⚡build_tools/circle/list_versions.py21 print("Error reading", url, file=sys.stderr)CODE
MEDIUMbuild_tools/circle/list_versions.py17def json_urlread(url):CODE
LOWdoc/conf.py889 except Exception as e:CODE
LOWdoc/sphinxext/github_link.py51 except Exception:CODE
LOWdoc/sphinxext/github_link.py56 except Exception:CODE
LOWdoc/sphinxext/github_link.py67 except Exception:CODE
MEDIUMdoc/sphinxext/github_link.py10def _get_git_revision():CODE
LOWdoc/sphinxext/override_pst_pagetoc.py68 except Exception as e:CODE
Slop Phrases4 hits · 9 pts
SeverityFileLineSnippetContext
LOWsklearn/compose/_column_transformer.py918 # we use fit_transform to make sure to set sparse_output_ (for which weCOMMENT
LOWsklearn/model_selection/_split.py2361 # to make sure to break them anew in each iterationCOMMENT
MEDIUMexamples/miscellaneous/plot_estimator_representation.py37# elements. See :ref:`visualizing_composite_estimators` for how you can useCOMMENT
MEDIUM…s/release_highlights/plot_release_highlights_0_23_0.py63# elements. See :ref:`visualizing_composite_estimators` for how you can useCOMMENT
TODO Padding5 hits · 8 pts
SeverityFileLineSnippetContext
LOW…n/metrics/_pairwise_distances_reduction/_dispatcher.py76 # TODO: implement a stable simultaneous_sort.COMMENT
LOW…n/metrics/_pairwise_distances_reduction/_dispatcher.py472 # TODO: implement Euclidean specialization using GEMM.COMMENT
LOW…n/metrics/_pairwise_distances_reduction/_dispatcher.py640 # TODO: implement Euclidean specialization using GEMM.COMMENT
LOWsklearn/neighbors/_kde.py40# TODO: implement a brute force version for testing purposesCOMMENT
LOWsklearn/neighbors/_kde.py330 # TODO: implement sampling for other valid kernel shapesCOMMENT
Verbosity Indicators4 hits · 7 pts
SeverityFileLineSnippetContext
LOWsklearn/covariance/_robust_covariance.py265 The purpose of this function is to find the best sets of n_supportSTRING
LOW⚡…emi_supervised/plot_semi_supervised_versus_svm_iris.py141# Step 1: similarities between query and all training samplesCOMMENT
LOW⚡…emi_supervised/plot_semi_supervised_versus_svm_iris.py144# Step 2: weighted average of label distributionsCOMMENT
LOW⚡…emi_supervised/plot_semi_supervised_versus_svm_iris.py147# Step 3: normalize to sum to 1COMMENT
Structural Annotation Overuse3 hits · 7 pts
SeverityFileLineSnippetContext
LOW⚡…emi_supervised/plot_semi_supervised_versus_svm_iris.py141# Step 1: similarities between query and all training samplesCOMMENT
LOW⚡…emi_supervised/plot_semi_supervised_versus_svm_iris.py144# Step 2: weighted average of label distributionsCOMMENT
LOW⚡…emi_supervised/plot_semi_supervised_versus_svm_iris.py147# Step 3: normalize to sum to 1COMMENT
Dead Code2 hits · 4 pts
SeverityFileLineSnippetContext
MEDIUMsklearn/utils/tests/test_estimator_checks.py1485CODE
MEDIUMsklearn/utils/tests/test_estimator_checks.py1486CODE