Repository Analysis

scikit-learn/scikit-learn

scikit-learn: machine learning in Python

18.1 Moderate AI signal View on GitHub
18.1
Adjusted Score
18.1
Raw Score
100%
Time Factor
2026-05-29
Last Push
66,203
Stars
Python
Language
460,062
Lines of Code
1186
Files
6826
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 139MEDIUM 850LOW 5837

Pattern Findings

6826 matches across 14 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers4086 hits · 3474 pts
SeverityFileLineSnippet
LOWasv_benchmarks/benchmarks/metrics.py44 def peakmem_pairwise_distances(self, *args):
LOWasv_benchmarks/benchmarks/datasets.py84def _synth_regression_dataset(n_samples=100000, n_features=100, dtype=np.float32):
LOWasv_benchmarks/benchmarks/datasets.py100def _synth_regression_sparse_dataset(
LOWasv_benchmarks/benchmarks/datasets.py118def _synth_classification_dataset(
LOWasv_benchmarks/benchmarks/utils.py24def make_dict_learning_scorers(caller):
LOWsklearn/conftest.py131def pytest_collection_modifyitems(config, items):
LOWsklearn/conftest.py274def munge_scipy_to_check_spmatrix_usage():
LOWsklearn/multiclass.py118def _threshold_for_binary_predict(estimator):
LOWsklearn/random_projection.py63def johnson_lindenstrauss_min_dim(n_samples, *, eps=0.1):
LOWsklearn/random_projection.py360 def _compute_inverse_components(self):
LOWsklearn/multioutput.py81def _available_if_estimator_has(attr):
LOWsklearn/multioutput.py624def _available_if_base_estimator_has(attr):
LOWsklearn/pipeline.py1578def _fit_transform_one_with_callbacks(
LOWsklearn/pipeline.py1820 def _validate_transformer_weights(self):
LOWsklearn/pipeline.py1880 def _add_prefix_for_feature_names_out(self, transformer_with_feature_names_out):
LOWsklearn/calibration.py598def _fit_classifier_calibrator_pair(
LOWsklearn/tree/_classes.py186 def _compute_missing_values_in_feature_mask(self, X, estimator_name=None):
LOWsklearn/tree/_classes.py627 def cost_complexity_pruning_path(self, X, y, sample_weight=None):
LOWsklearn/tree/_classes.py1411 def _compute_partial_dependence_recursion(self, grid, target_features):
LOWsklearn/tree/tests/test_split.py40 def compute_node_value_and_impurity(self, y, w):
LOWsklearn/tree/tests/test_monotonic_tree.py44def test_monotonic_constraints_classifications(
LOWsklearn/tree/tests/test_monotonic_tree.py123def test_monotonic_constraints_regressions(
LOWsklearn/tree/tests/test_monotonic_tree.py207def test_multiple_output_raises(TreeClassifier):
LOWsklearn/tree/tests/test_monotonic_tree.py220def test_bad_monotonic_cst_raises(TreeClassifier):
LOWsklearn/tree/tests/test_monotonic_tree.py374def assert_nd_reg_tree_children_monotonic_bounded(tree_, monotonic_cst):
LOWsklearn/tree/tests/test_monotonic_tree.py444def test_assert_nd_reg_tree_children_monotonic_bounded():
LOWsklearn/tree/tests/test_monotonic_tree.py481def test_nd_tree_nodes_values(
LOWsklearn/tree/tests/test_tree.py745def test_min_weight_fraction_leaf_on_dense_input(name):
LOWsklearn/tree/tests/test_tree.py751def test_min_weight_fraction_leaf_on_sparse_input(name, csc_container):
LOWsklearn/tree/tests/test_tree.py755def check_min_weight_fraction_leaf_with_min_samples_leaf(
LOWsklearn/tree/tests/test_tree.py1623def test_public_apply_all_trees(name):
LOWsklearn/tree/tests/test_tree.py1633def test_public_apply_sparse_trees(name, csr_container):
LOWsklearn/tree/tests/test_tree.py1641def test_decision_path_hardcoded():
LOWsklearn/tree/tests/test_tree.py257def test_weighted_classification_toy():
LOWsklearn/tree/tests/test_tree.py489def test_importances_gini_equal_squared_error():
LOWsklearn/tree/tests/test_tree.py685def check_min_weight_fraction_leaf(name, datasets, sparse_container=None):
LOWsklearn/tree/tests/test_tree.py817def test_min_weight_fraction_leaf_with_min_samples_leaf_on_dense_input(name):
LOWsklearn/tree/tests/test_tree.py823def test_min_weight_fraction_leaf_with_min_samples_leaf_on_sparse_input(
LOWsklearn/tree/tests/test_tree.py840def test_min_impurity_decrease(TreeEstimator, criterion, global_random_seed):
LOWsklearn/tree/tests/test_tree.py1132def test_sample_weight_invalid():
LOWsklearn/tree/tests/test_tree.py1226def test_max_leaf_nodes_max_depth():
LOWsklearn/tree/tests/test_tree.py1253def test_only_constant_features():
LOWsklearn/tree/tests/test_tree.py1264def test_almost_constant_feature(tree_cls):
LOWsklearn/tree/tests/test_tree.py1284def test_behaviour_constant_feature_after_splits():
LOWsklearn/tree/tests/test_tree.py1298def test_with_only_one_non_constant_features():
LOWsklearn/tree/tests/test_tree.py1413def test_sparse_input_reg_trees(tree_type, dataset):
LOWsklearn/tree/tests/test_tree.py1505def test_explicit_sparse_zeros(tree_type, csc_container, csr_container):
LOWsklearn/tree/tests/test_tree.py1604def test_min_weight_leaf_split_level(name, sparse_container):
LOWsklearn/tree/tests/test_tree.py1870def test_empty_leaf_infinite_threshold(sparse_container):
LOWsklearn/tree/tests/test_tree.py1892def test_prune_tree_classifier_are_subtrees(dataset, tree_cls):
LOWsklearn/tree/tests/test_tree.py1908def test_prune_tree_regression_are_subtrees(dataset, tree_cls):
LOWsklearn/tree/tests/test_tree.py1923def test_prune_single_node_tree():
LOWsklearn/tree/tests/test_tree.py1935def assert_pruning_creates_subtree(estimator_cls, X, y, pruning_path):
LOWsklearn/tree/tests/test_tree.py1993def test_apply_path_readonly_all_trees(name, splitter, sparse_container):
LOWsklearn/tree/tests/test_tree.py2113def test_criterion_entropy_same_as_log_loss(Tree, n_classes):
LOWsklearn/tree/tests/test_tree.py2135def test_different_endianness_pickle():
LOWsklearn/tree/tests/test_tree.py2145 def get_pickle_non_native_endianness():
LOWsklearn/tree/tests/test_tree.py2160def test_different_endianness_joblib_pickle():
LOWsklearn/tree/tests/test_tree.py2173 def get_joblib_pickle_non_native_endianness():
LOWsklearn/tree/tests/test_tree.py2186def get_different_bitness_node_ndarray(node_ndarray):
4026 more matches not shown…
Decorative Section Separators699 hits · 2108 pts
SeverityFileLineSnippet
MEDIUMsklearn/__init__.py7# ==================================
MEDIUMsklearn/tree/_classes.py63# =============================================================================
MEDIUMsklearn/tree/_classes.py65# =============================================================================
MEDIUMsklearn/tree/_classes.py85# =============================================================================
MEDIUMsklearn/tree/_classes.py87# =============================================================================
MEDIUMsklearn/tree/_classes.py694# =============================================================================
MEDIUMsklearn/tree/_classes.py696# =============================================================================
MEDIUMsklearn/metrics/cluster/tests/test_common.py28# ------------------------
MEDIUMsklearn/metrics/cluster/tests/test_common.py59# ---------------------------------------
MEDIUMsklearn/metrics/cluster/tests/test_common.py64# --------------------------------------------------------------------
MEDIUMsklearn/metrics/tests/test_common.py111# -------------------------------------------
MEDIUMsklearn/metrics/tests/test_common.py127# ------------------------
MEDIUMsklearn/metrics/tests/test_common.py306# ---------------------------------------
MEDIUM…earn/metrics/_pairwise_distances_reduction/__init__.py6# =============================
MEDIUM…earn/metrics/_pairwise_distances_reduction/__init__.py33# ------------------------------------------
MEDIUM…earn/metrics/_pairwise_distances_reduction/__init__.py42# ------------------
MEDIUMsklearn/ensemble/tests/test_voting.py703# ======================
MEDIUMsklearn/ensemble/tests/test_voting.py796# =============================
MEDIUMsklearn/ensemble/tests/test_bagging.py1085# ======================
MEDIUMsklearn/ensemble/tests/test_bagging.py1157# =============================
MEDIUMsklearn/ensemble/tests/test_stacking.py903# ======================
MEDIUMsklearn/ensemble/tests/test_stacking.py1020# =============================
MEDIUMsklearn/semi_supervised/tests/test_self_training.py358# =================================================================
MEDIUMsklearn/semi_supervised/tests/test_self_training.py384# ====================
MEDIUMsklearn/compose/tests/test_column_transformer.py2712# ======================
MEDIUMsklearn/compose/tests/test_column_transformer.py2899# =============================
MEDIUMsklearn/externals/_arff.py845 # -----------------------------------------------------------------
MEDIUMsklearn/externals/_arff.py853 # -----------------------------------------------------------------
MEDIUMsklearn/externals/_arff.py858 # -----------------------------------------------------------------
MEDIUMsklearn/externals/_arff.py1# =============================================================================
MEDIUMsklearn/externals/_arff.py5# =============================================================================
MEDIUMsklearn/externals/_arff.py25# =============================================================================
MEDIUMsklearn/externals/_arff.py414# =============================================================================
MEDIUMsklearn/externals/_arff.py663# =============================================================================
MEDIUMsklearn/externals/_arff.py807 # -----------------------------------------------------------------
MEDIUMsklearn/externals/_arff.py816 # -----------------------------------------------------------------
MEDIUMsklearn/externals/_arff.py1042# =============================================================================
MEDIUMsklearn/externals/_arff.py1107# =============================================================================
MEDIUMsklearn/tests/test_pipeline.py2098# =====================
MEDIUMsklearn/tests/test_pipeline.py2264# =============================
MEDIUMsklearn/tests/test_pipeline.py2322# =====================================================================
MEDIUMsklearn/tests/test_pipeline.py2606# ====================
MEDIUMsklearn/linear_model/tests/test_ridge.py2635# ======================
MEDIUMsklearn/linear_model/tests/test_ridge.py2665# =============================
MEDIUMsklearn/utils/_pprint.py17# --------------------------------------------
MEDIUMsklearn/utils/_metadata_requests.py262# ==============
MEDIUMsklearn/utils/_metadata_requests.py323# =====================================
MEDIUMsklearn/utils/_metadata_requests.py778# ============================
MEDIUMsklearn/utils/_metadata_requests.py1337# ==============
MEDIUMsklearn/utils/_metadata_requests.py1753# ==========================
MEDIUMsklearn/manifold/tests/test_locally_linear.py19# ----------------------------------------------------------------------
MEDIUMsklearn/manifold/tests/test_locally_linear.py40# ----------------------------------------------------------------------
MEDIUMsklearn/model_selection/tests/test_validation.py2448# ======================================================
MEDIUMsklearn/model_selection/tests/test_validation.py2705# =============================
MEDIUMsklearn/model_selection/tests/test_search.py2696# ======================
MEDIUMsklearn/model_selection/tests/test_search.py2760# =============================
MEDIUMsklearn/decomposition/_kernel_pca.py386 # ----------------------------------------------
MEDIUMexamples/bicluster/plot_spectral_biclustering.py26# --------------------
MEDIUMexamples/bicluster/plot_spectral_biclustering.py69# ------------------------------
MEDIUMexamples/bicluster/plot_spectral_biclustering.py92# ----------------
639 more matches not shown…
Unused Imports744 hits · 648 pts
SeverityFileLineSnippet
LOWsklearn/conftest.py41
LOWsklearn/conftest.py66
LOWsklearn/conftest.py239
LOWsklearn/__init__.py24
LOWsklearn/__init__.py24
LOWsklearn/__init__.py24
LOWsklearn/__init__.py69
LOWsklearn/__init__.py69
LOWsklearn/__init__.py70
LOWsklearn/__init__.py71
LOWsklearn/tree/__init__.py6
LOWsklearn/tree/__init__.py6
LOWsklearn/tree/__init__.py6
LOWsklearn/tree/__init__.py6
LOWsklearn/tree/__init__.py6
LOWsklearn/tree/__init__.py13
LOWsklearn/tree/__init__.py13
LOWsklearn/tree/__init__.py13
LOWsklearn/metrics/__init__.py6
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py7
LOWsklearn/metrics/__init__.py30
LOWsklearn/metrics/__init__.py31
LOWsklearn/metrics/__init__.py32
LOWsklearn/metrics/__init__.py33
LOWsklearn/metrics/__init__.py34
LOWsklearn/metrics/__init__.py35
LOWsklearn/metrics/__init__.py36
LOWsklearn/metrics/__init__.py36
LOWsklearn/metrics/__init__.py36
LOWsklearn/metrics/__init__.py36
LOWsklearn/metrics/__init__.py36
LOWsklearn/metrics/__init__.py36
LOWsklearn/metrics/__init__.py36
LOWsklearn/metrics/__init__.py36
LOWsklearn/metrics/__init__.py36
LOWsklearn/metrics/__init__.py36
LOWsklearn/metrics/__init__.py36
LOWsklearn/metrics/__init__.py36
LOWsklearn/metrics/__init__.py36
LOWsklearn/metrics/__init__.py36
684 more matches not shown…
Cross-File Repetition125 hits · 625 pts
SeverityFileLineSnippet
HIGHsklearn/multiclass.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/multiclass.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/multiclass.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/compose/_column_transformer.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/linear_model/_least_angle.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/linear_model/_logistic.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/linear_model/_omp.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/linear_model/_coordinate_descent.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/feature_selection/_from_model.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/model_selection/_search.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/multioutput.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/multioutput.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/multioutput.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/pipeline.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/calibration.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/model_selection/_classification_threshold.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/model_selection/_classification_threshold.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/pipeline.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/ensemble/_voting.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/ensemble/_bagging.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/linear_model/_ridge.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/linear_model/_ransac.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/impute/_iterative.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/covariance/_graph_lasso.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
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/sciki
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/sciki
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/sciki
HIGHsklearn/model_selection/tests/test_plot.py0check that named constructors return the correct type when subclassed. non-regression test for: https://github.com/sciki
HIGHsklearn/ensemble/_voting.py0get output feature names for transformation. parameters ---------- input_features : array-like of str or none, default=n
HIGHsklearn/ensemble/_voting.py0get output feature names for transformation. parameters ---------- input_features : array-like of str or none, default=n
HIGHsklearn/feature_extraction/_dict_vectorizer.py0get output feature names for transformation. parameters ---------- input_features : array-like of str or none, default=n
HIGHsklearn/feature_extraction/text.py0get output feature names for transformation. parameters ---------- input_features : array-like of str or none, default=n
HIGHsklearn/ensemble/_stacking.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/semi_supervised/_self_training.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/compose/_target.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/feature_selection/_rfe.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/feature_selection/_rfe.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/feature_selection/_sequential.py0get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work
HIGHsklearn/ensemble/tests/test_voting.py0test that the right error message is raised when metadata is passed while not supported when `enable_metadata_routing=fa
HIGHsklearn/ensemble/tests/test_stacking.py0test that the right error message is raised when metadata is passed while not supported when `enable_metadata_routing=fa
HIGHsklearn/semi_supervised/tests/test_self_training.py0test that the right error message is raised when metadata is passed while not supported when `enable_metadata_routing=fa
HIGHsklearn/compose/tests/test_column_transformer.py0test that the right error message is raised when metadata is passed while not supported when `enable_metadata_routing=fa
HIGHsklearn/tests/test_pipeline.py0test that the right error message is raised when metadata is passed while not supported when `enable_metadata_routing=fa
HIGHsklearn/ensemble/tests/test_voting.py0test that the right error is raised when metadata is not requested.
HIGHsklearn/ensemble/tests/test_stacking.py0test that the right error is raised when metadata is not requested.
HIGHsklearn/compose/tests/test_column_transformer.py0test that the right error is raised when metadata is not requested.
HIGHsklearn/tests/test_pipeline.py0test that the right error is raised when metadata is not requested.
HIGH…perimental/tests/test_enable_hist_gradient_boosting.py0tests for making sure experimental imports work as expected.
HIGH…rn/experimental/tests/test_enable_iterative_imputer.py0tests for making sure experimental imports work as expected.
HIGH…n/experimental/tests/test_enable_successive_halving.py0tests for making sure experimental imports work as expected.
HIGHsklearn/_loss/loss.py0compute raw_prediction of an intercept-only model. this is the weighted median of the target, i.e. over the samples axis
HIGHsklearn/_loss/loss.py0compute raw_prediction of an intercept-only model. this is the weighted median of the target, i.e. over the samples axis
HIGHsklearn/_loss/loss.py0compute raw_prediction of an intercept-only model. this is the weighted median of the target, i.e. over the samples axis
HIGHsklearn/gaussian_process/kernels.py0get parameters of this kernel. parameters ---------- deep : bool, default=true if true, will return the parameters for t
HIGHsklearn/gaussian_process/kernels.py0get parameters of this kernel. parameters ---------- deep : bool, default=true if true, will return the parameters for t
HIGHsklearn/gaussian_process/kernels.py0get parameters of this kernel. parameters ---------- deep : bool, default=true if true, will return the parameters for t
HIGHsklearn/gaussian_process/kernels.py0get parameters of this kernel. parameters ---------- deep : bool, default=true if true, will return the parameters for t
HIGHsklearn/gaussian_process/kernels.py0returns the (flattened, log-transformed) non-fixed hyperparameters. note that theta are typically the log-transformed va
HIGHsklearn/gaussian_process/kernels.py0returns the (flattened, log-transformed) non-fixed hyperparameters. note that theta are typically the log-transformed va
HIGHsklearn/gaussian_process/kernels.py0returns the (flattened, log-transformed) non-fixed hyperparameters. note that theta are typically the log-transformed va
65 more matches not shown…
Over-Commented Block625 hits · 609 pts
SeverityFileLineSnippet
LOWasv_benchmarks/asv.conf.json21
LOWasv_benchmarks/asv.conf.json41 //"install_timeout": 600,
LOWasv_benchmarks/asv.conf.json81 //
LOWasv_benchmarks/asv.conf.json101 // {"environment_type": "conda", "six": null}, // don't run without six on conda
LOWasv_benchmarks/asv.conf.json121 // "results_dir": "results",
LOWasv_benchmarks/asv.conf.json141 // skipped for the matching benchmark.
LOWasv_benchmarks/benchmarks/config.json1{
LOWsklearn/__init__.py1"""Configure global settings and get information about the working environment."""
LOWsklearn/__init__.py21import os
LOWsklearn/__init__.py41#
LOWsklearn/calibration.py1141 # TODO: numpy 2.0
LOWsklearn/tree/tests/test_monotonic_tree.py321 depth_first_builder,
LOWsklearn/tree/tests/test_monotonic_tree.py401 # down the tree to both children.
LOWsklearn/tree/tests/test_monotonic_tree.py481def test_nd_tree_nodes_values(
LOWsklearn/metrics/cluster/tests/test_common.py21from sklearn.metrics.tests.test_common import check_array_api_metric
LOWsklearn/metrics/_plot/__init__.py1# Authors: The scikit-learn developers
LOWsklearn/metrics/tests/test_common.py101 assert_array_equal,
LOWsklearn/metrics/tests/test_common.py121# all metrics that have the same behavior.
LOW…earn/metrics/_pairwise_distances_reduction/__init__.py1# Authors: The scikit-learn developers
LOW…earn/metrics/_pairwise_distances_reduction/__init__.py21# For computational reasons, the reduction are performed on the fly on chunks
LOW…earn/metrics/_pairwise_distances_reduction/__init__.py41# High-level diagram
LOW…earn/metrics/_pairwise_distances_reduction/__init__.py61# | | (float{32,64} implem.) | |
LOW…earn/metrics/_pairwise_distances_reduction/__init__.py81# - :class:`ArgKmin64` if X and Y are two `float64` array-likes
LOWsklearn/ensemble/_hist_gradient_boosting/predictor.py141 # while on 32 bit np.intp = np.int32.
LOW…hist_gradient_boosting/tests/test_gradient_boosting.py521 # Test that the class distributions in the whole dataset and in the small
LOW…_hist_gradient_boosting/tests/test_compare_lightgbm.py41 # samples is large enough, the structure of the prediction trees found by
LOWsklearn/cluster/_hdbscan/__init__.py1# Authors: The scikit-learn developers
LOWsklearn/cluster/_hdbscan/hdbscan.py1"""
LOWsklearn/cluster/_hdbscan/hdbscan.py21# specific prior written permission.
LOWsklearn/_loss/loss.py1"""
LOWsklearn/_loss/loss.py61# - HistGradientBoostingClassifier: (n_classes, n_samples)
LOWsklearn/_loss/loss.py1461 #
LOWsklearn/_loss/tests/test_loss.py281 #
LOWsklearn/gaussian_process/kernels.py1"""A set of kernels that can be combined by operators and used in Gaussian processes."""
LOWsklearn/gaussian_process/_gpr.py601 alpha = cho_solve((L, GPR_CHOLESKY_LOWER), y_train, check_finite=False)
LOWsklearn/gaussian_process/_gpr.py621 # 0.5 * trace((alpha . alpha^T - K^-1) . K_gradient)
LOWsklearn/datasets/_arff_parser.py421 # `pd.read_csv` automatically handles double quotes for quoting non-numeric
LOWsklearn/datasets/images/__init__.py1# Authors: The scikit-learn developers
LOWsklearn/datasets/descr/__init__.py1# Authors: The scikit-learn developers
LOWsklearn/datasets/data/__init__.py1# Authors: The scikit-learn developers
LOWsklearn/externals/conftest.py1# Do not collect any tests in externals. This is more robust than using
LOWsklearn/externals/_arff.py1# =============================================================================
LOWsklearn/externals/array_api_compat/torch/_aliases.py721 # torch.unique doesn't support returning indices.
LOWsklearn/externals/array_api_compat/torch/linalg.py61 # See linalg_solve_is_vector_rhs in
LOWsklearn/externals/_numpydoc/docscrape.py241 desc = r.read_to_next_unindented_line()
LOWsklearn/externals/_packaging/version.py1"""Vendored from
LOWsklearn/externals/_packaging/version.py481 local: Optional[Tuple[SubLocalType]],
LOWsklearn/externals/_packaging/_structures.py1"""Vendoered from
LOWsklearn/tests/test_docstrings.py61
LOWsklearn/tests/test_docstrings.py81 # Ignore GL08: Parsing of the method signature failed, possibly because this is
LOWsklearn/linear_model/_quantile.py201 # min sum(pinball loss) + alpha * L1
LOWsklearn/linear_model/_linear_loss.py581 if self.fit_intercept:
LOWsklearn/linear_model/_linear_loss.py621 #
LOWsklearn/linear_model/_linear_loss.py821 # - p_i_k is the (predicted) probability that sample i belongs to class k
LOWsklearn/linear_model/_coordinate_descent.py1181 #
LOWsklearn/linear_model/_glm/glm.py241 # We want to minimize
LOWsklearn/linear_model/_glm/_newton_solver.py321 print(" Check Convergence")
LOWsklearn/linear_model/_glm/_newton_solver.py401
LOWsklearn/linear_model/_glm/_newton_solver.py521 return
LOWsklearn/linear_model/_glm/_newton_solver.py541 n_classes = self.linear_loss.base_loss.n_classes
565 more matches not shown…
Self-Referential Comments82 hits · 256 pts
SeverityFileLineSnippet
MEDIUMsklearn/tree/tests/test_tree.py2686 # Create a predictive feature using `y` and with some noise
MEDIUMsklearn/tree/tests/test_tree.py2896 # Create a tree with root and two children
MEDIUM…earn/metrics/_pairwise_distances_reduction/__init__.py11# This module provides routines to compute pairwise distances between a set
MEDIUMsklearn/ensemble/tests/test_forest.py858 # Create the RTE with sparse=False
MEDIUMsklearn/ensemble/tests/test_forest.py871 # Create the RTEs
MEDIUMsklearn/ensemble/tests/test_forest.py1900 # Create a predictive feature using `y` and with some noise
MEDIUMsklearn/ensemble/_hist_gradient_boosting/__init__.py1"""This module implements histogram-based gradient boosting estimators.
MEDIUMsklearn/gaussian_process/tests/test_gpr.py411 # Define a dummy optimizer that simply tests 50 random hyperparameters
MEDIUMsklearn/gaussian_process/tests/test_gpc.py166 # Define a dummy optimizer that simply tests 10 random hyperparameters
MEDIUMsklearn/compose/_column_transformer.py1335# This function is not validated using validate_params because
MEDIUMsklearn/datasets/_svmlight_format_io.py1"""This module implements a loader and dumper for the svmlight format
MEDIUMsklearn/datasets/_openml.py172 # Create a tmpdir as a subfolder of dir_name where the final file will
MEDIUMsklearn/externals/_arff.py781 # Create the return object
MEDIUMsklearn/externals/_arff.py790 # Create the data helper object
MEDIUMsklearn/tests/test_calibration.py314 # This function is called from _CalibratedClassifier.predict_proba.
MEDIUMsklearn/tests/test_naive_bayes.py201 # Create an empty array
MEDIUMsklearn/tests/test_pipeline.py1519 # Create a new pipeline with cloned estimators
MEDIUMsklearn/tests/test_pipeline.py2326 # This class is used in this section for testing routing in the pipeline.
MEDIUMsklearn/linear_model/tests/test_sgd.py1881 # Define a ground truth on the scaled data
MEDIUMsklearn/linear_model/tests/test_sgd.py2133 # Create a classification problem with 50000 features and 20 classes. Using
MEDIUMsklearn/linear_model/tests/test_least_angle.py363 # Create an ill-conditioned situation in which the LARS has to go
MEDIUMsklearn/linear_model/tests/test_coordinate_descent.py1594 # Create a problem sufficiently large to cause memmapping (1MB).
MEDIUMsklearn/impute/tests/test_impute.py197 # Create a matrix X with columns
MEDIUMsklearn/impute/tests/test_impute.py213 # Create the columns
MEDIUMsklearn/utils/_array_api.py1325 # The following code is strongly inspired and simplified from
MEDIUMsklearn/utils/metadata_routing.py3# This module is not a separate sub-folder since that would result in a circular
MEDIUMsklearn/utils/_testing.py562 # Create a list of parameters to compare with the parameters gotten
MEDIUMsklearn/utils/validation.py48# This function is not used anymore at this moment in the code base but we keep it in
MEDIUMsklearn/utils/tests/test_estimator_checks.py1337 # This module is run as a script to check that we have no dependency on
MEDIUMsklearn/utils/tests/test_multiclass.py575 # Define the sparse matrix with a mix of implicit and explicit zeros
MEDIUMsklearn/utils/_repr_html/base.py153 """This function is returned by the @property `_repr_html_` to make
MEDIUMsklearn/feature_selection/_univariate_selection.py38# The following function is a rewriting of scipy.stats.f_oneway
MEDIUMsklearn/inspection/tests/test_permutation_importance.py457 # Creating a scorer function that does not takes sample_weight
MEDIUMsklearn/manifold/_isomap.py418 # Create the graph of shortest distances from X to
MEDIUMsklearn/mixture/tests/test_gaussian_mixture.py259 # Define the bad precisions for each covariance_type
MEDIUMsklearn/preprocessing/_data.py2914 # Create the quantiles of reference
MEDIUMsklearn/model_selection/_search.py1066 # Create the subcontexts ahead of time to avoid creating them on the fly
MEDIUMsklearn/model_selection/tests/test_validation.py2061 # Create a failing classifier to deliberately fail
MEDIUMsklearn/model_selection/tests/test_validation.py2126 # Create a failing classifier to deliberately fail
MEDIUMsklearn/model_selection/tests/test_validation.py2154 # Create a failing classifier to deliberately fail
MEDIUMsklearn/neighbors/_classification.py419 # This function is defined here only to modify the parent docstring
MEDIUMsklearn/neighbors/_classification.py887 # This function is defined here only to modify the parent docstring
MEDIUMsklearn/neighbors/_nca.py307 # Create a dictionary of parameters to be passed to the optimizer
MEDIUMexamples/classification/plot_digits_classification.py62# Create a classifier: a support vector classifier
MEDIUMexamples/tree/plot_tree_regression.py27# Create a random 1D dataset
MEDIUMexamples/tree/plot_tree_regression.py91# Create a random dataset
MEDIUMexamples/ensemble/plot_adaboost_multiclass.py32# Creating the dataset
MEDIUM…/ensemble/plot_random_forest_regression_multioutput.py34# Create a random dataset
MEDIUMexamples/ensemble/plot_gradient_boosting_quantile.py91# Create an evenly spaced evaluation set of input values spanning the [0, 10]
MEDIUMexamples/ensemble/plot_forest_iris.py102 # Create a title for each column and the console by using str() and
MEDIUMexamples/cluster/plot_adjusted_for_chance_measures.py22# Defining the list of metrics to evaluate
MEDIUMexamples/cluster/plot_kmeans_silhouette_analysis.py61 # Create a subplot with 1 row and 2 columns
MEDIUMexamples/cluster/plot_kmeans_digits.py88 # Define the metrics which require only the true labels and estimator
MEDIUMexamples/calibration/plot_compare_calibration.py98# Define the classifiers to be compared in the study.
MEDIUMexamples/compose/plot_digits_pipe.py27# Define a pipeline to search for the best combination of PCA truncation
MEDIUMexamples/compose/plot_digits_pipe.py30# Define a Standard Scaler to normalize inputs
MEDIUMexamples/compose/plot_compare_reduction.py111# Create a temporary folder to store the transformers of the pipeline
MEDIUMexamples/linear_model/plot_ridge_coeffs.py66# Creating a non-noisy data set
MEDIUMexamples/linear_model/plot_sgd_early_stopping.py89# Define the estimators to compare
MEDIUMexamples/linear_model/plot_logistic_path.py61# Create a pipeline with `StandardScaler` and `LogisticRegression`, to normalize
22 more matches not shown…
Deep Nesting277 hits · 256 pts
SeverityFileLineSnippet
LOWsklearn/conftest.py131
LOWsklearn/kernel_approximation.py705
LOWsklearn/multioutput.py708
LOWsklearn/pipeline.py671
LOWsklearn/discriminant_analysis.py38
LOWsklearn/dummy.py252
LOWsklearn/dummy.py339
LOWsklearn/dummy.py543
LOWsklearn/base.py100
LOWsklearn/calibration.py687
LOWsklearn/calibration.py781
LOWsklearn/tree/_export.py523
LOWsklearn/tree/_export.py708
LOWsklearn/tree/_classes.py226
LOWsklearn/tree/tests/test_split.py40
LOWsklearn/tree/tests/test_monotonic_tree.py245
LOWsklearn/tree/tests/test_monotonic_tree.py374
LOWsklearn/tree/tests/test_tree.py840
LOWsklearn/metrics/_scorer.py560
LOWsklearn/metrics/_scorer.py138
LOWsklearn/metrics/_classification.py428
LOWsklearn/metrics/_classification.py1900
LOWsklearn/metrics/_regression.py60
LOWsklearn/metrics/_regression.py946
LOWsklearn/metrics/_regression.py1365
LOWsklearn/metrics/_regression.py1410
LOWsklearn/metrics/pairwise.py567
LOWsklearn/metrics/pairwise.py2303
LOWsklearn/metrics/pairwise.py2584
LOWsklearn/metrics/_ranking.py128
LOWsklearn/metrics/cluster/_supervised.py80
LOWsklearn/metrics/_plot/confusion_matrix.py88
LOW…learn/metrics/_plot/tests/test_common_curve_display.py486
LOW…learn/metrics/_plot/tests/test_common_curve_display.py593
LOWsklearn/metrics/tests/test_common.py847
LOWsklearn/metrics/tests/test_common.py2723
LOWsklearn/metrics/tests/test_common.py2860
LOWsklearn/metrics/tests/test_dist_metrics.py246
LOWsklearn/metrics/tests/test_ranking.py129
LOWsklearn/metrics/tests/test_classification.py2499
LOWsklearn/ensemble/_bagging.py892
LOWsklearn/ensemble/_gb.py136
LOWsklearn/ensemble/_gb.py545
LOWsklearn/ensemble/_gb.py626
LOWsklearn/ensemble/_stacking.py87
LOWsklearn/ensemble/tests/test_forest.py345
LOWsklearn/ensemble/tests/test_forest.py364
LOW…/ensemble/_hist_gradient_boosting/gradient_boosting.py394
LOWsklearn/cluster/_agglomerative.py429
LOWsklearn/cluster/_optics.py922
LOWsklearn/cluster/_optics.py1021
LOWsklearn/cluster/_kmeans.py462
LOWsklearn/cluster/_kmeans.py630
LOWsklearn/cluster/_kmeans.py874
LOWsklearn/cluster/_kmeans.py964
LOWsklearn/cluster/_spectral.py672
LOWsklearn/cluster/_affinity_propagation.py34
LOWsklearn/cluster/tests/test_hierarchical.py102
LOWsklearn/cluster/tests/test_bicluster.py94
LOWsklearn/feature_extraction/_dict_vectorizer.py142
217 more matches not shown…
AI Slop Vocabulary67 hits · 172 pts
SeverityFileLineSnippet
MEDIUMsklearn/metrics/_classification.py531 # namespace and device so as to be able to leverage the efficient
MEDIUMsklearn/metrics/tests/test_dist_metrics.py193 # Choose rtol to make sure that this test is robust to changes in the random
LOWsklearn/metrics/tests/test_pairwise.py1645 # Single dimension input, just return tuple of contents.
MEDIUMsklearn/ensemble/tests/test_forest.py1895 # `forest_non_predictive`: meaningful for R2/accuracy, but robust in tests.
MEDIUMsklearn/feature_extraction/tests/test_text.py471 # this is robust to features with only zeros
LOWsklearn/_loss/loss.py1452 # dtypes. For float64, we simply use the values that are present in the
MEDIUMsklearn/datasets/tests/test_openml.py1368 # redownload, to utilize cache
MEDIUMsklearn/externals/conftest.py1# Do not collect any tests in externals. This is more robust than using
MEDIUMsklearn/externals/array_api_compat/common/_helpers.py1011 # as we do below for unknown arrays, this is not recommended by JAX best practices.
MEDIUMsklearn/linear_model/_theil_sen.py208 """Theil-Sen Estimator: robust multivariate regression model.
MEDIUMsklearn/linear_model/_huber.py130 """L2-regularized linear regression model that is robust to outliers.
MEDIUMsklearn/linear_model/_glm/tests/test_glm.py1006 # LBFGS is robust to a collinear design because its approximation of the
MEDIUMsklearn/linear_model/tests/test_least_angle.py143 # Check that lars_path is robust to collinearity in input
MEDIUMsklearn/linear_model/tests/test_base.py362 # robust to any random seed in the admissible range.
LOWsklearn/utils/_array_api.py237 # Note: here we cannot simply use a Python `set` as it requires
LOWsklearn/utils/_metadata_requests.py1831 # try doing any routing, we can simply return a structure which returns
LOWsklearn/utils/tests/test_pprint.py602 # want to expend the whole line of the right side, just add the ellispsis
LOWsklearn/utils/tests/test_estimator_checks.py374 # then just return zeros.
MEDIUMsklearn/covariance/_graph_lasso.py108 i = 0 # initialize the counter to be robust to `max_iter=0`
MEDIUMsklearn/covariance/_graph_lasso.py116 # be robust to the max_iter=0 edge case, see:
MEDIUMsklearn/covariance/_robust_covariance.py128 # compute initial robust estimates from a random subset
MEDIUMsklearn/covariance/_robust_covariance.py131 # get initial robust estimates from the function parameters
MEDIUMsklearn/covariance/_robust_covariance.py489 # take the middle points' mean to get the robust location estimate
MEDIUMsklearn/covariance/_robust_covariance.py622 """Minimum Covariance Determinant (MCD): robust estimator of covariance.
MEDIUMsklearn/preprocessing/_data.py1553 """Scale features using statistics that are robust to outliers.
MEDIUMsklearn/preprocessing/tests/test_data.py1239 # Test robust scaling of 2d array along first axis
MEDIUMsklearn/preprocessing/tests/test_data.py1446 # check in conjunction with subsampling
MEDIUMsklearn/model_selection/_split.py777 # without attempting to leverage array API namespace features. However
LOWsklearn/decomposition/_pca.py529 # Small problem or n_components == 'mle', just call full PCA
MEDIUMexamples/ensemble/plot_gradient_boosting_quantile.py193# (underestimation for this asymmetric noise) but is also naturally robust to
MEDIUMexamples/cluster/plot_hdbscan.py106# HDBSCAN is much more robust in this sense: HDBSCAN can be seen as
MEDIUMexamples/cluster/plot_hdbscan.py179# results regarding density. We will however see that HDBSCAN is relatively robust
MEDIUMexamples/cluster/plot_hdbscan.py193# more robust with respect to noisy datasets, e.g. high-variance clusters with
MEDIUMexamples/cluster/plot_adjusted_for_chance_measures.py27# example, it is possible to use evaluation metrics that leverage this
MEDIUMexamples/cluster/plot_dbscan.py68# that leverage this "supervised" ground truth information to quantify the
MEDIUMexamples/linear_model/plot_quantile_regression.py92# insights. On top of that, median estimation is much more robust to outliers
MEDIUMexamples/linear_model/plot_ridge_coeffs.py161# When `alpha` is small, the model captures the intricate details of the
MEDIUMexamples/linear_model/plot_ridge_coeffs.py179# Some other linear models are formulated to be robust to outliers such as the
MEDIUM…near_model/plot_tweedie_regression_insurance_claims.py458# :class:`~sklearn.linear_model.GammaRegressor` is able to leverage some
MEDIUMexamples/linear_model/plot_logistic_multinomial.py186# - This approach can capture more nuanced relationships between classes, potentially
MEDIUMexamples/impute/plot_missing_values.py271# robust estimator for data with high magnitude variables which could dominate
MEDIUMexamples/covariance/plot_mahalanobis_distances.py104# that of the MCD robust estimator (1.2). This shows that the MCD based
MEDIUMexamples/covariance/plot_mahalanobis_distances.py105# robust estimator is much more resistant to the outlier samples, which were
MEDIUMexamples/covariance/plot_mahalanobis_distances.py112# fit an MCD robust estimator to data
MEDIUMexamples/covariance/plot_mahalanobis_distances.py124# Mahalanobis distances calculated by both methods. Notice that the robust
MEDIUMexamples/covariance/plot_mahalanobis_distances.py179# distribution of inlier samples for robust MCD based Mahalanobis distances.
MEDIUM…ples/covariance/plot_robust_vs_empirical_covariance.py101 # fit a Minimum Covariance Determinant (MCD) robust estimator to data
MEDIUM…ples/covariance/plot_robust_vs_empirical_covariance.py103 # compare raw robust estimates with the true location and covariance
MEDIUMexamples/miscellaneous/plot_outlier_detection_bench.py331# method to avoid granting a privilege to non-binary features and that is robust
MEDIUMexamples/miscellaneous/plot_outlier_detection_bench.py406# IQR is robust to outliers: the median and interquartile range are less
MEDIUMexamples/inspection/plot_partial_dependence.py316# without any preprocessing as tree-based models are naturally robust to
MEDIUMexamples/svm/plot_svm_kernels.py266# different kernels utilize the training data to determine the classification
MEDIUMexamples/svm/plot_svm_kernels.py278# For a comprehensive evaluation, fine-tuning of :class:`~sklearn.svm.SVC`
MEDIUMexamples/applications/plot_outlier_detection_wine.py34# robust estimator can help concentrate on a relevant cluster when outlying
MEDIUMexamples/applications/plot_outlier_detection_wine.py102# robust estimator of covariance to concentrate on the main mode of the data
MEDIUM…ples/applications/plot_cyclical_feature_engineering.py285# the linear regression model to properly leverage the time information: linear
MEDIUM…ples/applications/plot_cyclical_feature_engineering.py494# leverage the periodic time-related features and reduce the error from ~14% to
MEDIUM…ples/applications/plot_cyclical_feature_engineering.py559# leverage those features to properly model intra-day variations.
MEDIUM…es/release_highlights/plot_release_highlights_1_3_0.py50# making it more robust to parameter selection than :class:`cluster.DBSCAN`.
MEDIUM…es/release_highlights/plot_release_highlights_1_5_0.py153# Similarly to most other PCA solvers, the new `"covariance_eigh"` solver can leverage
7 more matches not shown…
Redundant / Tautological Comments51 hits · 78 pts
SeverityFileLineSnippet
LOWsklearn/__init__.py144 # Check if a random seed exists in the environment, if not create one.
LOWsklearn/pipeline.py2101 # Check if Xs dimensions are valid
LOWsklearn/calibration.py987 # Check if it is the output of predict_proba
LOWsklearn/tree/tests/test_tree.py483 # Check if variable importance before fit raises ValueError.
LOWsklearn/tree/tests/test_export.py380 # Check if it errors when length of feature_names
LOWsklearn/metrics/_classification.py309 # Check if dimensions are consistent.
LOW…learn/metrics/_plot/tests/test_common_curve_display.py436 # Check if the number of parameters match
LOWsklearn/metrics/tests/test_dist_metrics.py325 # Check if both callable metric and predefined metric initialized
LOWsklearn/ensemble/tests/test_gradient_boosting.py1310 # Check if validation_fraction has an effect
LOWsklearn/ensemble/tests/test_gradient_boosting.py1319 # Check if n_estimators_ increase monotonically with n_iter_no_change
LOWsklearn/ensemble/tests/test_gradient_boosting.py491 # Check if we can fit even though all targets are equal.
LOWsklearn/ensemble/tests/test_gradient_boosting.py505 # Check if quantile loss with alpha=0.5 equals absolute_error.
LOWsklearn/ensemble/tests/test_gradient_boosting.py1231 # Check if early stopping works as expected, that is empirically check that the
LOWsklearn/cluster/tests/test_bisect_k_means.py57 # Check if results is the same for dense and sparse data
LOWsklearn/cluster/_hdbscan/hdbscan.py113 # Check if the mutual reachability matrix has any rows which have
LOWsklearn/gaussian_process/_gpc.py488 # Check if we have converged (log marginal likelihood does
LOWsklearn/gaussian_process/_gpr.py483 # Check if any of the variances is negative because of
LOWsklearn/externals/_arff.py564 # Check if the rows are sorted
LOWsklearn/linear_model/tests/test_theil_sen.py164 # Check if median is solution of the Fermat-Weber location problem
LOWsklearn/utils/estimator_checks.py4429 # Check if classifier throws an exception when fed regression targets
LOWsklearn/utils/multiclass.py421 # Check if multioutput
LOWsklearn/utils/tests/test_extmath.py576 # Check if the randomized_svd sign flipping is always done based on u
LOWsklearn/utils/tests/test_extmath.py635 # Check if cartesian product delivers the right results
LOWsklearn/covariance/_robust_covariance.py174 # Check if best fit already found (det => 0, logdet => -inf)
LOWsklearn/neural_network/tests/test_rbm.py134 # Check if we don't get NaNs sampling the full digits dataset.
LOWsklearn/feature_selection/tests/test_rfe.py84 # Check if the supports are equal
LOWsklearn/mixture/tests/test_gaussian_mixture.py980 # Check if the score increase
LOWsklearn/preprocessing/tests/test_data.py1185 # Check if non-finite inputs raise ValueError
LOWsklearn/preprocessing/tests/test_data.py745 # Check if StandardScaler inverse_transform is
LOWsklearn/model_selection/tests/test_split.py358 # Check if get_n_splits returns the number of folds
LOWsklearn/model_selection/tests/test_split.py409 # Check if get_n_splits returns the number of folds
LOWsklearn/model_selection/tests/test_validation.py1715 # Check if the additional duplicate indices are caught
LOWsklearn/model_selection/tests/test_validation.py617 # Check if ValueError (when groups is None) propagates to cross_val_score
LOWsklearn/model_selection/tests/test_search.py1925 # Check if a one time iterable is accepted as a cv parameter.
LOWsklearn/model_selection/tests/test_search.py341 # Check if ValueError (when groups is None) propagates to GridSearchCV
LOWsklearn/model_selection/tests/test_search.py931 # Check if the search `cv_results`'s array are of correct types
LOWsklearn/model_selection/tests/test_search.py1000 # Check if score and timing are reasonable
LOWsklearn/model_selection/tests/test_search.py1261 # Check if score and timing are reasonable, also checks if the keys
LOWsklearn/model_selection/tests/test_search.py1977 # Check if generators are supported as cv and
LOW…learn/model_selection/tests/test_successive_halving.py724 # Check if ValueError (when groups is None) propagates to
LOWsklearn/decomposition/tests/test_fastica.py168 # Set atol to account for the different magnitudes of the elements in sources
LOWsklearn/decomposition/tests/test_incremental_pca.py452 # Set n_samples_seen_ to be a floating point number instead of an int
LOWsklearn/neighbors/_lof.py324 # Verify if negative_outlier_factor_ values are within acceptable range.
LOWmaint_tools/update_tracking_issue.py170# Check if test collection failed
LOWexamples/linear_model/plot_ridge_path.py56# Display results
LOW…/linear_model/plot_lasso_lasso_lars_elasticnet_path.py75# Display results
LOW…ples/covariance/plot_robust_vs_empirical_covariance.py122# Display results
LOW…les/model_selection/plot_grid_search_refit_callable.py329# Print the results
LOWbenchmarks/bench_isolation_forest.py48# Set this to true for plotting score histograms for each dataset:
LOWbenchmarks/bench_sample_without_replacement.py195 # Print results
LOWbenchmarks/bench_random_projections.py273 # Print results
Excessive Try-Catch Wrapping46 hits · 53 pts
SeverityFileLineSnippet
LOWsklearn/pipeline.py2212 except Exception:
MEDIUMsklearn/pipeline.py389def _final_estimator(self):
LOWsklearn/metrics/_scorer.py173 except Exception as e:
LOWsklearn/metrics/_classification.py2401 except Exception as e:
LOWsklearn/ensemble/_base.py308 except Exception:
LOWsklearn/feature_extraction/text.py419 except Exception:
LOWsklearn/compose/_column_transformer.py1283 except Exception:
MEDIUMsklearn/compose/_column_transformer.py541def _get_remainder_cols_dtype(self):
LOWsklearn/datasets/_kddcup99.py376 except Exception as e:
LOWsklearn/datasets/_twenty_newsgroups.py311 except Exception as e:
LOWsklearn/datasets/_openml.py69 except Exception as exc:
LOWsklearn/datasets/_openml.py190 except Exception:
LOWsklearn/datasets/_openml.py557 except Exception as exc:
LOWsklearn/externals/_arff.py758 except Exception:
LOWsklearn/externals/array_api_compat/common/_helpers.py1048 except Exception:
LOW…earn/externals/array_api_extra/_lib/_utils/_helpers.py448 except Exception: # pylint: disable=broad-exception-caught
LOWsklearn/tests/test_init.py11except Exception as e:
LOWsklearn/utils/_available_if.py33 except Exception as e:
LOWsklearn/utils/estimator_checks.py4064 except Exception as e:
LOWsklearn/utils/estimator_checks.py4073 except Exception as e:
LOWsklearn/utils/estimator_checks.py923 except Exception as e:
LOWsklearn/utils/estimator_checks.py1518 except Exception as e:
LOWsklearn/utils/estimator_checks.py1543 except Exception as e:
LOWsklearn/utils/estimator_checks.py4294 except Exception as e:
LOWsklearn/utils/_metadata_requests.py1595 except Exception:
LOWsklearn/utils/_testing.py540 except Exception as exp:
LOWsklearn/utils/validation.py361 except Exception as err:
LOWsklearn/utils/tests/test_array_api.py632 except Exception:
LOWsklearn/utils/_repr_html/estimator.py239 except Exception:
LOWsklearn/utils/_repr_html/estimator.py422 except Exception:
LOWsklearn/utils/_repr_html/estimator.py437 except Exception:
LOWsklearn/callback/_callback_support.py131 except Exception as exc:
LOWsklearn/model_selection/_validation.py858 except Exception:
LOWsklearn/model_selection/_validation.py946 except Exception:
LOWbenchmarks/bench_rcv1_logreg_convergence.py41 except Exception:
LOWbenchmarks/bench_rcv1_logreg_convergence.py50 except Exception:
LOWbenchmarks/bench_rcv1_logreg_convergence.py55 except Exception:
LOWbuild_tools/circle/list_versions.py20 except Exception:
MEDIUMbuild_tools/circle/list_versions.py21 print("Error reading", url, file=sys.stderr)
MEDIUMbuild_tools/circle/list_versions.py17def json_urlread(url):
LOWdoc/conf.py1017 except Exception as e:
LOWdoc/sphinxext/github_link.py52 except Exception:
LOWdoc/sphinxext/github_link.py57 except Exception:
LOWdoc/sphinxext/github_link.py68 except Exception:
MEDIUMdoc/sphinxext/github_link.py11def _get_git_revision():
LOWdoc/sphinxext/override_pst_pagetoc.py68 except Exception as e:
Cross-Language Confusion14 hits · 45 pts
SeverityFileLineSnippet
HIGHsklearn/externals/array_api_extra/_delegation.py231 If ``x < 0`` or ``x >= num_classes``, then the result is undefined, may raise
HIGHsklearn/linear_model/_glm/glm.py395 :math:`D^2 = 1-\\frac{D(y_{true},y_{pred})}{D_{null}}`,
HIGHsklearn/linear_model/_glm/glm.py396 :math:`D_{null}` is the null deviance, i.e. the deviance of a model
HIGHsklearn/callback/tests/test_scoring_monitor.py182 assert log.equals(expected_log)
HIGHsklearn/callback/tests/test_scoring_monitor.py217 assert log.equals(expected_log)
HIGHsklearn/decomposition/_dict_learning.py699 (U^*, V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1
HIGHsklearn/decomposition/_dict_learning.py701 with || V_k ||_2 = 1 for all 0 <= k < n_components
HIGHsklearn/decomposition/_dict_learning.py916 (U^*, V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1
HIGHsklearn/decomposition/_dict_learning.py918 with || V_k ||_2 = 1 for all 0 <= k < n_components
HIGHsklearn/decomposition/_dict_learning.py1425 (U^*,V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1
HIGHsklearn/decomposition/_dict_learning.py1427 with || V_k ||_2 <= 1 for all 0 <= k < n_components
HIGHsklearn/decomposition/_dict_learning.py1768 (U^*,V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1
HIGHsklearn/decomposition/_dict_learning.py1770 with || V_k ||_2 <= 1 for all 0 <= k < n_components
HIGHsklearn/neighbors/tests/test_neighbors_tree.py177 heap.push(row, d, i)
Slop Phrases4 hits · 9 pts
SeverityFileLineSnippet
LOWsklearn/compose/_column_transformer.py924 # we use fit_transform to make sure to set sparse_output_ (for which we
LOWsklearn/model_selection/_split.py2382 # to make sure to break them anew in each iteration
MEDIUMexamples/miscellaneous/plot_estimator_representation.py37# elements. See :ref:`visualizing_composite_estimators` for how you can use
MEDIUM…s/release_highlights/plot_release_highlights_0_23_0.py63# elements. See :ref:`visualizing_composite_estimators` for how you can use
Verbosity Indicators4 hits · 7 pts
SeverityFileLineSnippet
LOWsklearn/covariance/_robust_covariance.py265 The purpose of this function is to find the best sets of n_support
LOW…emi_supervised/plot_semi_supervised_versus_svm_iris.py142# Step 1: similarities between query and all training samples
LOW…emi_supervised/plot_semi_supervised_versus_svm_iris.py145# Step 2: weighted average of label distributions
LOW…emi_supervised/plot_semi_supervised_versus_svm_iris.py148# Step 3: normalize to sum to 1
Dead Code2 hits · 4 pts
SeverityFileLineSnippet
MEDIUMsklearn/utils/tests/test_estimator_checks.py1487
MEDIUMsklearn/utils/tests/test_estimator_checks.py1488