Repository Analysis

scikit-learn/scikit-learn

scikit-learn: machine learning in Python

19.2 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of scikit-learn/scikit-learn, a Python project with 66,674 GitHub stars. SynthScan v2.0 examined 465,291 lines of code across 1191 source files, recording 7279 pattern matches distributed across 19 syntactic categories. The overall adjusted score of 19.2 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

19.2
Adjusted Score
19.2
Raw Score
100%
Time Factor
2026-07-14
Last Push
66.7K
Stars
Python
Language
465.3K
Lines of Code
1.2K
Files
7.3K
Pattern Hits
2026-07-14
Scan Date
0.12
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 139MEDIUM 900LOW 6240

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 7279 distinct pattern matches across 19 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Hyper-Verbose Identifiers4133 hits · 3512 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
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.py621def _available_if_base_estimator_has(attr):CODE
LOWsklearn/pipeline.py1594def _fit_transform_one_with_callbacks(CODE
LOWsklearn/pipeline.py1836 def _validate_transformer_weights(self):CODE
LOWsklearn/pipeline.py1896 def _add_prefix_for_feature_names_out(self, transformer_with_feature_names_out):CODE
LOWsklearn/calibration.py600def _fit_classifier_calibrator_pair(CODE
LOWsklearn/tree/_classes.py198 def _compute_missing_values_in_feature_mask(self, X, estimator_name=None):CODE
LOWsklearn/tree/_classes.py577 def _fit_categorical_features(self, X):CODE
LOWsklearn/tree/_classes.py593 def _transform_categorical_features(self, X):CODE
LOWsklearn/tree/_classes.py798 def cost_complexity_pruning_path(self, X, y, sample_weight=None):CODE
LOWsklearn/tree/_classes.py1636 def _compute_partial_dependence_recursion(self, grid, target_features):CODE
LOWsklearn/tree/tests/test_split.py86 def compute_node_value_and_impurity(self, y, w):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
LOWsklearn/tree/tests/test_tree.py758def test_min_weight_fraction_leaf_on_dense_input(name):CODE
LOWsklearn/tree/tests/test_tree.py764def test_min_weight_fraction_leaf_on_sparse_input(name, csc_container):CODE
LOWsklearn/tree/tests/test_tree.py768def check_min_weight_fraction_leaf_with_min_samples_leaf(CODE
LOWsklearn/tree/tests/test_tree.py1636def test_public_apply_all_trees(name):CODE
LOWsklearn/tree/tests/test_tree.py1646def test_public_apply_sparse_trees(name, csr_container):CODE
LOWsklearn/tree/tests/test_tree.py1654def test_decision_path_hardcoded():CODE
LOWsklearn/tree/tests/test_tree.py260def test_weighted_classification_toy():CODE
LOWsklearn/tree/tests/test_tree.py492def test_importances_gini_equal_squared_error():CODE
LOWsklearn/tree/tests/test_tree.py698def check_min_weight_fraction_leaf(name, datasets, sparse_container=None):CODE
LOWsklearn/tree/tests/test_tree.py830def test_min_weight_fraction_leaf_with_min_samples_leaf_on_dense_input(name):CODE
LOWsklearn/tree/tests/test_tree.py836def test_min_weight_fraction_leaf_with_min_samples_leaf_on_sparse_input(CODE
LOWsklearn/tree/tests/test_tree.py853def test_min_impurity_decrease(TreeEstimator, criterion, global_random_seed):CODE
LOWsklearn/tree/tests/test_tree.py1145def test_sample_weight_invalid():CODE
LOWsklearn/tree/tests/test_tree.py1239def test_max_leaf_nodes_max_depth():CODE
LOWsklearn/tree/tests/test_tree.py1266def test_only_constant_features():CODE
LOWsklearn/tree/tests/test_tree.py1277def test_almost_constant_feature(tree_cls):CODE
LOWsklearn/tree/tests/test_tree.py1297def test_behaviour_constant_feature_after_splits():CODE
LOWsklearn/tree/tests/test_tree.py1311def test_with_only_one_non_constant_features():CODE
LOWsklearn/tree/tests/test_tree.py1426def test_sparse_input_reg_trees(tree_type, dataset):CODE
LOWsklearn/tree/tests/test_tree.py1518def test_explicit_sparse_zeros(tree_type, csc_container, csr_container):CODE
LOWsklearn/tree/tests/test_tree.py1617def test_min_weight_leaf_split_level(name, sparse_container):CODE
LOWsklearn/tree/tests/test_tree.py1883def test_empty_leaf_infinite_threshold(sparse_container):CODE
LOWsklearn/tree/tests/test_tree.py1905def test_prune_tree_classifier_are_subtrees(dataset, tree_cls):CODE
LOWsklearn/tree/tests/test_tree.py1921def test_prune_tree_regression_are_subtrees(dataset, tree_cls):CODE
LOWsklearn/tree/tests/test_tree.py1936def test_prune_single_node_tree():CODE
LOWsklearn/tree/tests/test_tree.py1948def assert_pruning_creates_subtree(estimator_cls, X, y, pruning_path):CODE
LOWsklearn/tree/tests/test_tree.py2006def test_apply_path_readonly_all_trees(name, splitter, sparse_container):CODE
LOWsklearn/tree/tests/test_tree.py2126def test_criterion_entropy_same_as_log_loss(Tree, n_classes):CODE
LOWsklearn/tree/tests/test_tree.py2148def test_different_endianness_pickle():CODE
LOWsklearn/tree/tests/test_tree.py2158 def get_pickle_non_native_endianness():CODE
4073 more matches not shown…
Decorative Section Separators746 hits · 2277 pts
SeverityFileLineSnippetContext
MEDIUMsklearn/__init__.py7# ==================================COMMENT
MEDIUMsklearn/tree/_classes.py68# =============================================================================COMMENT
MEDIUMsklearn/tree/_classes.py70# =============================================================================COMMENT
MEDIUMsklearn/tree/_classes.py90# =============================================================================COMMENT
MEDIUMsklearn/tree/_classes.py92# =============================================================================COMMENT
MEDIUMsklearn/tree/_classes.py865# =============================================================================COMMENT
MEDIUMsklearn/tree/_classes.py867# =============================================================================COMMENT
MEDIUMsklearn/metrics/cluster/tests/test_common.py28# ------------------------COMMENT
MEDIUMsklearn/metrics/cluster/tests/test_common.py59# ---------------------------------------COMMENT
MEDIUMsklearn/metrics/cluster/tests/test_common.py64# --------------------------------------------------------------------COMMENT
MEDIUMsklearn/metrics/tests/test_common.py111# -------------------------------------------COMMENT
MEDIUMsklearn/metrics/tests/test_common.py127# ------------------------COMMENT
MEDIUMsklearn/metrics/tests/test_common.py306# ---------------------------------------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.py1085# ======================COMMENT
MEDIUMsklearn/ensemble/tests/test_bagging.py1157# =============================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.py2712# ======================COMMENT
MEDIUMsklearn/compose/tests/test_column_transformer.py2899# =============================COMMENT
MEDIUMsklearn/externals/_arff.py845 # -----------------------------------------------------------------COMMENT
MEDIUMsklearn/externals/_arff.py853 # -----------------------------------------------------------------COMMENT
MEDIUMsklearn/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.py2104# =====================COMMENT
MEDIUMsklearn/tests/test_pipeline.py2279# =============================COMMENT
MEDIUMsklearn/tests/test_pipeline.py2337# =====================================================================COMMENT
MEDIUMsklearn/tests/test_pipeline.py2658# ====================COMMENT
MEDIUMsklearn/linear_model/tests/test_ridge.py2635# ======================COMMENT
MEDIUMsklearn/linear_model/tests/test_ridge.py2665# =============================COMMENT
MEDIUMsklearn/utils/_pprint.py17# --------------------------------------------COMMENT
MEDIUMsklearn/utils/_metadata_requests.py262# ==============COMMENT
MEDIUMsklearn/utils/_metadata_requests.py323# =====================================COMMENT
MEDIUMsklearn/utils/_metadata_requests.py778# ============================COMMENT
MEDIUMsklearn/utils/_metadata_requests.py1343# ==============COMMENT
MEDIUMsklearn/utils/_metadata_requests.py1759# ==========================COMMENT
MEDIUMsklearn/manifold/tests/test_locally_linear.py19# ----------------------------------------------------------------------COMMENT
MEDIUMsklearn/manifold/tests/test_locally_linear.py40# ----------------------------------------------------------------------COMMENT
MEDIUMsklearn/model_selection/tests/test_validation.py2448# ======================================================COMMENT
MEDIUMsklearn/model_selection/tests/test_validation.py2695# =============================COMMENT
MEDIUMsklearn/model_selection/tests/test_search.py2696# ======================COMMENT
MEDIUMsklearn/model_selection/tests/test_search.py2760# =============================COMMENT
MEDIUMsklearn/decomposition/_kernel_pca.py386 # ----------------------------------------------COMMENT
MEDIUMexamples/bicluster/plot_spectral_biclustering.py26# --------------------COMMENT
MEDIUMexamples/bicluster/plot_spectral_biclustering.py69# ------------------------------COMMENT
MEDIUMexamples/bicluster/plot_spectral_biclustering.py92# ----------------COMMENT
686 more matches not shown…
Unused Imports747 hits · 643 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
687 more matches not shown…
Over-Commented Block636 hits · 618 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/calibration.py1141COMMENT
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.py21from sklearn.metrics.tests.test_common import check_array_api_metricCOMMENT
LOWsklearn/metrics/_plot/__init__.py1# Authors: The scikit-learn developersCOMMENT
LOWsklearn/metrics/tests/test_common.py101 assert_array_equal,COMMENT
LOWsklearn/metrics/tests/test_common.py121# all metrics that have the same behavior.COMMENT
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.py521 # Test that the class distributions in the whole dataset and in the smallCOMMENT
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 #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 alpha = cho_solve((L, GPR_CHOLESKY_LOWER), y_train, check_finite=False)COMMENT
LOWsklearn/gaussian_process/_gpr.py621 # 0.5 * trace((alpha . alpha^T - K^-1) . K_gradient)COMMENT
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/linear_model/_quantile.py201 # min sum(pinball loss) + alpha * L1COMMENT
LOWsklearn/linear_model/_logistic.py961 score_params = _check_method_params(X=X, params=score_params, indices=test)COMMENT
LOWsklearn/linear_model/_linear_loss.py641 grad = grad.ravel(order="F")COMMENT
LOWsklearn/linear_model/_linear_loss.py661 # For 3 classes and n_samples = 1, this looks like ("@" is a bit misusedCOMMENT
LOWsklearn/linear_model/_linear_loss.py861 # - class indices k, lCOMMENT
LOWsklearn/linear_model/_coordinate_descent.py1181 sample_weight = _check_sample_weight(sample_weight, X, dtype=X.dtype)COMMENT
LOWsklearn/linear_model/_coordinate_descent.py1201 # alpha' = sum(sw) * alpha (4)COMMENT
LOWsklearn/linear_model/_coordinate_descent.py1781 # Multiple functions touch X and subsamples of X and can induce aCOMMENT
LOWsklearn/linear_model/_ridge.py3061 # `RidgeClassifier` does not accept "sag" or "saga" solver and thus supportCOMMENT
LOWsklearn/linear_model/_glm/glm.py241 if not linear_loss.base_loss.in_y_true_range(y):COMMENT
LOWsklearn/linear_model/_glm/_newton_solver.py601 " The inner solver detected a pointwise Hessian with many "COMMENT
576 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.py2716 # Create a predictive feature using `y` and with some noiseCOMMENT
MEDIUMsklearn/tree/tests/test_tree.py2930 # 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
MEDIUMsklearn/ensemble/tests/test_forest.py858 # Create the RTE with sparse=FalseCOMMENT
MEDIUMsklearn/ensemble/tests/test_forest.py871 # Create the RTEsCOMMENT
MEDIUMsklearn/ensemble/tests/test_forest.py1900 # 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.py1310# 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.py314 # This function is called from _CalibratedClassifier.predict_proba.COMMENT
MEDIUMsklearn/tests/test_naive_bayes.py201 # Create an empty arrayCOMMENT
MEDIUMsklearn/tests/test_pipeline.py1525 # Create a new pipeline with cloned estimatorsCOMMENT
MEDIUMsklearn/tests/test_pipeline.py2341 # 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.py1677 # 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.py1392 # 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.py562 # Create a list of parameters to compare with the parameters gottenCOMMENT
MEDIUMsklearn/utils/validation.py48# This function is not used anymore at this moment in the code base but we keep it inCOMMENT
MEDIUMsklearn/utils/tests/test_estimator_checks.py1337 # This module is run as a script to check that we have no dependency onCOMMENT
MEDIUMsklearn/utils/tests/test_multiclass.py575 # 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.py418 # Create the graph of shortest distances from X toCOMMENT
MEDIUMsklearn/mixture/tests/test_gaussian_mixture.py259 # Define the bad precisions for each covariance_typeCOMMENT
MEDIUMsklearn/preprocessing/_data.py2914 # Create the quantiles of referenceCOMMENT
MEDIUMsklearn/model_selection/_search.py1069 # Create the subcontexts ahead of time to avoid creating them on the flyCOMMENT
MEDIUMsklearn/model_selection/tests/test_validation.py2061 # Create a failing classifier to deliberately failCOMMENT
MEDIUMsklearn/model_selection/tests/test_validation.py2126 # Create a failing classifier to deliberately failCOMMENT
MEDIUMsklearn/model_selection/tests/test_validation.py2154 # Create a failing classifier to deliberately failCOMMENT
MEDIUMsklearn/neighbors/_classification.py419 # This function is defined here only to modify the parent docstringCOMMENT
MEDIUMsklearn/neighbors/_classification.py887 # This function is defined here only to modify the parent docstringCOMMENT
MEDIUMsklearn/neighbors/_nca.py317 # Create a dictionary of parameters to be passed to the optimizerCOMMENT
MEDIUMexamples/classification/plot_digits_classification.py62# Create a classifier: a support vector classifierCOMMENT
MEDIUMexamples/tree/plot_tree_regression.py27# Create a random 1D datasetCOMMENT
MEDIUMexamples/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.py102 # Create a title for each column and the console by using str() andCOMMENT
MEDIUMexamples/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.py89# Define the estimators to compareCOMMENT
24 more matches not shown…
Deep Nesting277 hits · 254 pts
SeverityFileLineSnippetContext
LOWsklearn/conftest.py131CODE
LOWsklearn/kernel_approximation.py705CODE
LOWsklearn/multioutput.py705CODE
LOWsklearn/pipeline.py678CODE
LOWsklearn/discriminant_analysis.py38CODE
LOWsklearn/dummy.py252CODE
LOWsklearn/dummy.py339CODE
LOWsklearn/dummy.py543CODE
LOWsklearn/base.py100CODE
LOWsklearn/calibration.py689CODE
LOWsklearn/calibration.py783CODE
LOWsklearn/tree/_export.py560CODE
LOWsklearn/tree/_export.py747CODE
LOWsklearn/tree/_classes.py238CODE
LOWsklearn/tree/tests/test_split.py86CODE
LOWsklearn/tree/tests/test_monotonic_tree.py245CODE
LOWsklearn/tree/tests/test_monotonic_tree.py374CODE
LOWsklearn/tree/tests/test_tree.py853CODE
LOWsklearn/metrics/_scorer.py566CODE
LOWsklearn/metrics/_classification.py443CODE
LOWsklearn/metrics/_classification.py1899CODE
LOWsklearn/metrics/_regression.py60CODE
LOWsklearn/metrics/_regression.py970CODE
LOWsklearn/metrics/_regression.py1385CODE
LOWsklearn/metrics/_regression.py1430CODE
LOWsklearn/metrics/pairwise.py569CODE
LOWsklearn/metrics/pairwise.py2311CODE
LOWsklearn/metrics/pairwise.py2592CODE
LOWsklearn/metrics/_ranking.py128CODE
LOWsklearn/metrics/cluster/_supervised.py80CODE
LOWsklearn/metrics/_plot/confusion_matrix.py88CODE
LOW…learn/metrics/_plot/tests/test_common_curve_display.py486CODE
LOW…learn/metrics/_plot/tests/test_common_curve_display.py593CODE
LOWsklearn/metrics/tests/test_common.py827CODE
LOWsklearn/metrics/tests/test_common.py2714CODE
LOWsklearn/metrics/tests/test_common.py2870CODE
LOWsklearn/metrics/tests/test_dist_metrics.py246CODE
LOWsklearn/metrics/tests/test_ranking.py129CODE
LOWsklearn/metrics/tests/test_pairwise.py425CODE
LOWsklearn/metrics/tests/test_classification.py2499CODE
LOWsklearn/ensemble/_bagging.py890CODE
LOWsklearn/ensemble/_gb.py114CODE
LOWsklearn/ensemble/_gb.py527CODE
LOWsklearn/ensemble/_gb.py608CODE
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.py429CODE
LOWsklearn/cluster/_optics.py922CODE
LOWsklearn/cluster/_optics.py1021CODE
LOWsklearn/cluster/_kmeans.py462CODE
LOWsklearn/cluster/_kmeans.py630CODE
LOWsklearn/cluster/_kmeans.py874CODE
LOWsklearn/cluster/_kmeans.py964CODE
LOWsklearn/cluster/_spectral.py672CODE
LOWsklearn/cluster/_affinity_propagation.py34CODE
LOWsklearn/cluster/tests/test_hierarchical.py102CODE
LOWsklearn/cluster/tests/test_bicluster.py94CODE
LOWsklearn/feature_extraction/_dict_vectorizer.py142CODE
217 more matches not shown…
AI Structural Patterns234 hits · 232 pts
SeverityFileLineSnippetContext
LOWasv_benchmarks/benchmarks/neighbors.py29CODE
LOWasv_benchmarks/benchmarks/model_selection.py57CODE
LOWasv_benchmarks/benchmarks/ensemble.py111CODE
LOWsklearn/kernel_approximation.py989CODE
LOWsklearn/isotonic.py439CODE
LOWsklearn/_config.py64CODE
LOWsklearn/_config.py249CODE
LOWsklearn/tree/_export.py116CODE
LOWsklearn/tree/_export.py835CODE
LOWsklearn/tree/_export.py247CODE
LOWsklearn/tree/_export.py455CODE
LOWsklearn/tree/_export.py635CODE
LOWsklearn/tree/_classes.py1149CODE
LOWsklearn/tree/_classes.py1555CODE
LOWsklearn/tree/_classes.py1943CODE
LOWsklearn/tree/_classes.py2222CODE
LOWsklearn/metrics/cluster/_bicluster.py49CODE
LOWsklearn/metrics/_plot/det_curve.py229CODE
LOWsklearn/metrics/_plot/precision_recall_curve.py406CODE
LOWsklearn/metrics/_plot/precision_recall_curve.py564CODE
LOWsklearn/metrics/_plot/precision_recall_curve.py738CODE
LOWsklearn/metrics/_plot/roc_curve.py297CODE
LOWsklearn/metrics/_plot/roc_curve.py436CODE
LOWsklearn/metrics/_plot/roc_curve.py576CODE
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.py729CODE
LOWsklearn/ensemble/_forest.py1017CODE
LOWsklearn/ensemble/_forest.py1516CODE
LOWsklearn/ensemble/_forest.py1894CODE
LOWsklearn/ensemble/_forest.py2292CODE
LOWsklearn/ensemble/_forest.py2650CODE
LOWsklearn/ensemble/_forest.py2924CODE
LOWsklearn/ensemble/_bagging.py294CODE
LOWsklearn/ensemble/_bagging.py855CODE
LOWsklearn/ensemble/_bagging.py1355CODE
LOWsklearn/ensemble/_gb.py365CODE
LOWsklearn/ensemble/_gb.py1466CODE
LOWsklearn/ensemble/_gb.py2071CODE
LOWsklearn/ensemble/_iforest.py250CODE
LOW…/ensemble/_hist_gradient_boosting/gradient_boosting.py1646CODE
LOW…/ensemble/_hist_gradient_boosting/gradient_boosting.py2040CODE
LOWsklearn/ensemble/_hist_gradient_boosting/grower.py244CODE
LOWsklearn/cluster/_agglomerative.py953CODE
LOWsklearn/cluster/_agglomerative.py1286CODE
LOWsklearn/cluster/_optics.py267CODE
LOWsklearn/cluster/_dbscan.py29CODE
LOWsklearn/cluster/_dbscan.py372CODE
LOWsklearn/cluster/_bicluster.py497CODE
LOWsklearn/cluster/_bicluster.py616CODE
LOWsklearn/cluster/_kmeans.py304CODE
LOWsklearn/cluster/_kmeans.py1386CODE
LOWsklearn/cluster/_kmeans.py1900CODE
LOWsklearn/cluster/_spectral.py194CODE
LOWsklearn/cluster/_spectral.py636CODE
LOWsklearn/cluster/_bisect_k_means.py228CODE
LOWsklearn/cluster/_affinity_propagation.py189CODE
LOWsklearn/cluster/_affinity_propagation.py465CODE
174 more matches not shown…
AI Slop Vocabulary67 hits · 173 pts
SeverityFileLineSnippetContext
MEDIUMsklearn/metrics/_classification.py548 # 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
MEDIUMsklearn/ensemble/tests/test_forest.py1895 # `forest_non_predictive`: meaningful for R2/accuracy, but robust in tests.COMMENT
MEDIUMsklearn/feature_extraction/tests/test_text.py471 # 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
MEDIUMsklearn/linear_model/_huber.py130 """L2-regularized linear regression model that is robust to outliers.STRING
MEDIUMsklearn/linear_model/_glm/tests/test_glm.py1045 # 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.py362 # robust to any random seed in the admissible range.COMMENT
LOWsklearn/utils/_array_api.py236 # Note: here we cannot simply use a Python `set` as it requiresCOMMENT
LOWsklearn/utils/_metadata_requests.py1841 # 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.py108 i = 0 # initialize the counter to be robust to `max_iter=0`CODE
MEDIUMsklearn/covariance/_graph_lasso.py116 # 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.py1553 """Scale features using statistics that are robust to outliers.STRING
MEDIUMsklearn/preprocessing/tests/test_data.py1239 # Test robust scaling of 2d array along first axisCOMMENT
MEDIUMsklearn/preprocessing/tests/test_data.py1446 # check in conjunction with subsamplingCOMMENT
MEDIUMsklearn/model_selection/_split.py777 # without attempting to leverage array API namespace features. HoweverCOMMENT
LOWsklearn/decomposition/_pca.py529 # 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
MEDIUMexamples/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
MEDIUMexamples/covariance/plot_mahalanobis_distances.py104# that of the MCD robust estimator (1.2). This shows that the MCD basedSTRING
MEDIUMexamples/covariance/plot_mahalanobis_distances.py105# robust estimator is much more resistant to the outlier samples, which wereSTRING
MEDIUMexamples/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
MEDIUMexamples/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
MEDIUM…es/release_highlights/plot_release_highlights_1_5_0.py153# Similarly to most other PCA solvers, the new `"covariance_eigh"` solver can leverageCOMMENT
7 more matches not shown…
AI Response Leakage17 hits · 130 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/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
HIGHexamples/svm/plot_svm_kernels.py257# with data that exhibits a sigmoidal shape. In this example, careful fineCOMMENT
HIGHexamples/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 Boilerplate99 hits · 98 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.py40__all__ = [CODE
LOWsklearn/pipeline.py37__all__ = ["FeatureUnion", "Pipeline", "make_pipeline", "make_union"]CODE
LOWsklearn/discriminant_analysis.py35__all__ = ["LinearDiscriminantAnalysis", "QuadraticDiscriminantAnalysis"]CODE
LOWsklearn/exceptions.py6__all__ = [CODE
LOWsklearn/tree/__init__.py15__all__ = [CODE
LOWsklearn/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.py35logger = logging.getLogger(__name__)CODE
LOWsklearn/datasets/_twenty_newsgroups.py56logger = 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/__init__.py35__all__ = [CODE
LOWsklearn/externals/array_api_extra/_delegation.py21__all__ = [CODE
LOWsklearn/externals/array_api_extra/testing.py34__all__ = [CODE
LOWsklearn/externals/array_api_extra/_lib/_backends.py11__all__ = ["NUMPY_VERSION", "Backend"]CODE
LOWsklearn/externals/array_api_extra/_lib/_funcs.py25__all__ = [CODE
LOW…learn/externals/array_api_extra/_lib/_utils/_typing.py10__all__ = ["Array", "DType", "Device", "GetIndex", "SetIndex"]CODE
LOW…learn/externals/array_api_extra/_lib/_utils/_compat.py53__all__ = [CODE
39 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.py2115 # Check if Xs dimensions are validCOMMENT
LOWsklearn/calibration.py989 # Check if it is the output of predict_probaCOMMENT
LOWsklearn/tree/tests/test_tree.py486 # 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.py325 # Check if dimensions are consistent.STRING
LOW…learn/metrics/_plot/tests/test_common_curve_display.py436 # Check if the number of parameters matchCOMMENT
LOWsklearn/metrics/tests/test_dist_metrics.py325 # Check if both callable metric and predefined metric initializedCOMMENT
LOWsklearn/ensemble/tests/test_gradient_boosting.py1309 # Check if validation_fraction has an effectCOMMENT
LOWsklearn/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.py488 # Check if we have converged (log marginal likelihood doesCOMMENT
LOWsklearn/gaussian_process/_gpr.py483 # 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.py4520 # Check if classifier throws an exception when fed regression targetsCOMMENT
LOWsklearn/utils/multiclass.py421 # Check if multioutputCOMMENT
LOWsklearn/utils/tests/test_extmath.py576 # Check if the randomized_svd sign flipping is always done based on uCOMMENT
LOWsklearn/utils/tests/test_extmath.py635 # 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.py980 # Check if the score increaseCOMMENT
LOWsklearn/preprocessing/tests/test_data.py1185 # Check if non-finite inputs raise ValueErrorCOMMENT
LOWsklearn/preprocessing/tests/test_data.py745 # Check if StandardScaler inverse_transform isCOMMENT
LOWsklearn/model_selection/tests/test_split.py358 # Check if get_n_splits returns the number of foldsCOMMENT
LOWsklearn/model_selection/tests/test_split.py409 # Check if get_n_splits returns the number of foldsCOMMENT
LOWsklearn/model_selection/tests/test_validation.py1715 # Check if the additional duplicate indices are caughtCOMMENT
LOWsklearn/model_selection/tests/test_validation.py617 # Check if ValueError (when groups is None) propagates to cross_val_scoreCOMMENT
LOWsklearn/model_selection/tests/test_search.py1925 # Check if a one time iterable is accepted as a cv parameter.COMMENT
LOWsklearn/model_selection/tests/test_search.py341 # Check if ValueError (when groups is None) propagates to GridSearchCVCOMMENT
LOWsklearn/model_selection/tests/test_search.py931 # Check if the search `cv_results`'s array are of correct typesCOMMENT
LOWsklearn/model_selection/tests/test_search.py1000 # Check if score and timing are reasonableCOMMENT
LOWsklearn/model_selection/tests/test_search.py1261 # Check if score and timing are reasonable, also checks if the keysCOMMENT
LOWsklearn/model_selection/tests/test_search.py1977 # 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.py324 # 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
Excessive Try-Catch Wrapping48 hits · 56 pts
SeverityFileLineSnippetContext
LOWsklearn/pipeline.py2226 except Exception:CODE
MEDIUMsklearn/pipeline.py396def _final_estimator(self):CODE
LOWsklearn/metrics/_scorer.py180 except Exception as e:CODE
LOWsklearn/metrics/_classification.py2403 except Exception as e:STRING
LOWsklearn/ensemble/_base.py308 except Exception:CODE
LOWsklearn/feature_extraction/text.py419 except Exception:CODE
LOWsklearn/compose/_column_transformer.py1258 except Exception:CODE
MEDIUMsklearn/compose/_column_transformer.py539def _get_remainder_cols_dtype(self):CODE
LOWsklearn/datasets/_kddcup99.py376 except Exception as e:CODE
LOWsklearn/datasets/_twenty_newsgroups.py311 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
LOW…earn/externals/array_api_extra/_lib/_utils/_helpers.py425 except Exception: # pylint: disable=broad-exception-caughtCODE
LOWsklearn/tests/test_init.py11except Exception as e:CODE
LOWsklearn/utils/_available_if.py33 except Exception as e:CODE
LOWsklearn/utils/estimator_checks.py4155 except Exception as e:CODE
LOWsklearn/utils/estimator_checks.py4164 except Exception as e:CODE
LOWsklearn/utils/estimator_checks.py936 except Exception as e:CODE
LOWsklearn/utils/estimator_checks.py1609 except Exception as e:CODE
LOWsklearn/utils/estimator_checks.py1634 except Exception as e:CODE
LOWsklearn/utils/estimator_checks.py4385 except Exception as e:CODE
LOWsklearn/utils/_metadata_requests.py1601 except Exception:CODE
LOWsklearn/utils/_testing.py540 except Exception as exp:CODE
LOWsklearn/utils/validation.py361 except Exception as err:CODE
LOWsklearn/utils/tests/test_array_api.py687 except Exception:CODE
LOWsklearn/utils/_repr_html/estimator.py239 except Exception:CODE
LOWsklearn/utils/_repr_html/estimator.py422 except Exception:CODE
LOWsklearn/utils/_repr_html/estimator.py437 except Exception:CODE
LOWsklearn/callback/_callback_support.py131 except Exception as exc:CODE
LOWsklearn/model_selection/_validation.py862 except Exception:CODE
LOWsklearn/model_selection/_validation.py950 except Exception:CODE
LOWbenchmarks/bench_rcv1_logreg_convergence.py41 except Exception:CODE
LOWbenchmarks/bench_rcv1_logreg_convergence.py50 except Exception:CODE
LOWbenchmarks/bench_rcv1_logreg_convergence.py55 except Exception:CODE
LOWbuild_tools/circle/list_versions.py20 except Exception:CODE
MEDIUMbuild_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.py1005 except Exception as e:CODE
LOWdoc/sphinxext/github_link.py52 except Exception:CODE
LOWdoc/sphinxext/github_link.py57 except Exception:CODE
LOWdoc/sphinxext/github_link.py68 except Exception:CODE
MEDIUMdoc/sphinxext/github_link.py11def _get_git_revision():CODE
LOWdoc/sphinxext/override_pst_pagetoc.py68 except Exception as e:CODE
Cross-Language Confusion14 hits · 45 pts
SeverityFileLineSnippetContext
HIGHsklearn/externals/array_api_extra/_delegation.py693 If ``x < 0`` or ``x >= num_classes``, then the result is undefined, may raiseSTRING
HIGHsklearn/linear_model/_glm/glm.py419 :math:`D^2 = 1-\\frac{D(y_{true},y_{pred})}{D_{null}}`,STRING
HIGHsklearn/linear_model/_glm/glm.py420 :math:`D_{null}` is the null deviance, i.e. the deviance of a modelSTRING
HIGHsklearn/callback/tests/test_scoring_monitor.py182 assert log.equals(expected_log)CODE
HIGHsklearn/callback/tests/test_scoring_monitor.py217 assert log.equals(expected_log)CODE
HIGHsklearn/decomposition/_dict_learning.py699 (U^*, V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1STRING
HIGHsklearn/decomposition/_dict_learning.py701 with || V_k ||_2 = 1 for all 0 <= k < n_componentsSTRING
HIGHsklearn/decomposition/_dict_learning.py916 (U^*, V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1STRING
HIGHsklearn/decomposition/_dict_learning.py918 with || V_k ||_2 = 1 for all 0 <= k < n_componentsSTRING
HIGHsklearn/decomposition/_dict_learning.py1425 (U^*,V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1STRING
HIGHsklearn/decomposition/_dict_learning.py1427 with || V_k ||_2 <= 1 for all 0 <= k < n_componentsSTRING
HIGHsklearn/decomposition/_dict_learning.py1768 (U^*,V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1STRING
HIGHsklearn/decomposition/_dict_learning.py1770 with || V_k ||_2 <= 1 for all 0 <= k < n_componentsSTRING
HIGHsklearn/neighbors/tests/test_neighbors_tree.py177 heap.push(row, d, i)CODE
Slop Phrases4 hits · 9 pts
SeverityFileLineSnippetContext
LOWsklearn/compose/_column_transformer.py922 # we use fit_transform to make sure to set sparse_output_ (for which weCOMMENT
LOWsklearn/model_selection/_split.py2382 # 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.py334 # 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.py1487CODE
MEDIUMsklearn/utils/tests/test_estimator_checks.py1488CODE