scikit-learn: machine learning in Python
6826 matches across 14 categories. Click a row to expand file-level details.
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | asv_benchmarks/benchmarks/metrics.py | 44 | def peakmem_pairwise_distances(self, *args): |
| LOW | asv_benchmarks/benchmarks/datasets.py | 84 | def _synth_regression_dataset(n_samples=100000, n_features=100, dtype=np.float32): |
| LOW | asv_benchmarks/benchmarks/datasets.py | 100 | def _synth_regression_sparse_dataset( |
| LOW | asv_benchmarks/benchmarks/datasets.py | 118 | def _synth_classification_dataset( |
| LOW | asv_benchmarks/benchmarks/utils.py | 24 | def make_dict_learning_scorers(caller): |
| LOW | sklearn/conftest.py | 131 | def pytest_collection_modifyitems(config, items): |
| LOW | sklearn/conftest.py | 274 | def munge_scipy_to_check_spmatrix_usage(): |
| LOW | sklearn/multiclass.py | 118 | def _threshold_for_binary_predict(estimator): |
| LOW | sklearn/random_projection.py | 63 | def johnson_lindenstrauss_min_dim(n_samples, *, eps=0.1): |
| LOW | sklearn/random_projection.py | 360 | def _compute_inverse_components(self): |
| LOW | sklearn/multioutput.py | 81 | def _available_if_estimator_has(attr): |
| LOW | sklearn/multioutput.py | 624 | def _available_if_base_estimator_has(attr): |
| LOW | sklearn/pipeline.py | 1578 | def _fit_transform_one_with_callbacks( |
| LOW | sklearn/pipeline.py | 1820 | def _validate_transformer_weights(self): |
| LOW | sklearn/pipeline.py | 1880 | def _add_prefix_for_feature_names_out(self, transformer_with_feature_names_out): |
| LOW | sklearn/calibration.py | 598 | def _fit_classifier_calibrator_pair( |
| LOW | sklearn/tree/_classes.py | 186 | def _compute_missing_values_in_feature_mask(self, X, estimator_name=None): |
| LOW | sklearn/tree/_classes.py | 627 | def cost_complexity_pruning_path(self, X, y, sample_weight=None): |
| LOW | sklearn/tree/_classes.py | 1411 | def _compute_partial_dependence_recursion(self, grid, target_features): |
| LOW | sklearn/tree/tests/test_split.py | 40 | def compute_node_value_and_impurity(self, y, w): |
| LOW | sklearn/tree/tests/test_monotonic_tree.py | 44 | def test_monotonic_constraints_classifications( |
| LOW | sklearn/tree/tests/test_monotonic_tree.py | 123 | def test_monotonic_constraints_regressions( |
| LOW | sklearn/tree/tests/test_monotonic_tree.py | 207 | def test_multiple_output_raises(TreeClassifier): |
| LOW | sklearn/tree/tests/test_monotonic_tree.py | 220 | def test_bad_monotonic_cst_raises(TreeClassifier): |
| LOW | sklearn/tree/tests/test_monotonic_tree.py | 374 | def assert_nd_reg_tree_children_monotonic_bounded(tree_, monotonic_cst): |
| LOW | sklearn/tree/tests/test_monotonic_tree.py | 444 | def test_assert_nd_reg_tree_children_monotonic_bounded(): |
| LOW | sklearn/tree/tests/test_monotonic_tree.py | 481 | def test_nd_tree_nodes_values( |
| LOW | sklearn/tree/tests/test_tree.py | 745 | def test_min_weight_fraction_leaf_on_dense_input(name): |
| LOW | sklearn/tree/tests/test_tree.py | 751 | def test_min_weight_fraction_leaf_on_sparse_input(name, csc_container): |
| LOW | sklearn/tree/tests/test_tree.py | 755 | def check_min_weight_fraction_leaf_with_min_samples_leaf( |
| LOW | sklearn/tree/tests/test_tree.py | 1623 | def test_public_apply_all_trees(name): |
| LOW | sklearn/tree/tests/test_tree.py | 1633 | def test_public_apply_sparse_trees(name, csr_container): |
| LOW | sklearn/tree/tests/test_tree.py | 1641 | def test_decision_path_hardcoded(): |
| LOW | sklearn/tree/tests/test_tree.py | 257 | def test_weighted_classification_toy(): |
| LOW | sklearn/tree/tests/test_tree.py | 489 | def test_importances_gini_equal_squared_error(): |
| LOW | sklearn/tree/tests/test_tree.py | 685 | def check_min_weight_fraction_leaf(name, datasets, sparse_container=None): |
| LOW | sklearn/tree/tests/test_tree.py | 817 | def test_min_weight_fraction_leaf_with_min_samples_leaf_on_dense_input(name): |
| LOW | sklearn/tree/tests/test_tree.py | 823 | def test_min_weight_fraction_leaf_with_min_samples_leaf_on_sparse_input( |
| LOW | sklearn/tree/tests/test_tree.py | 840 | def test_min_impurity_decrease(TreeEstimator, criterion, global_random_seed): |
| LOW | sklearn/tree/tests/test_tree.py | 1132 | def test_sample_weight_invalid(): |
| LOW | sklearn/tree/tests/test_tree.py | 1226 | def test_max_leaf_nodes_max_depth(): |
| LOW | sklearn/tree/tests/test_tree.py | 1253 | def test_only_constant_features(): |
| LOW | sklearn/tree/tests/test_tree.py | 1264 | def test_almost_constant_feature(tree_cls): |
| LOW | sklearn/tree/tests/test_tree.py | 1284 | def test_behaviour_constant_feature_after_splits(): |
| LOW | sklearn/tree/tests/test_tree.py | 1298 | def test_with_only_one_non_constant_features(): |
| LOW | sklearn/tree/tests/test_tree.py | 1413 | def test_sparse_input_reg_trees(tree_type, dataset): |
| LOW | sklearn/tree/tests/test_tree.py | 1505 | def test_explicit_sparse_zeros(tree_type, csc_container, csr_container): |
| LOW | sklearn/tree/tests/test_tree.py | 1604 | def test_min_weight_leaf_split_level(name, sparse_container): |
| LOW | sklearn/tree/tests/test_tree.py | 1870 | def test_empty_leaf_infinite_threshold(sparse_container): |
| LOW | sklearn/tree/tests/test_tree.py | 1892 | def test_prune_tree_classifier_are_subtrees(dataset, tree_cls): |
| LOW | sklearn/tree/tests/test_tree.py | 1908 | def test_prune_tree_regression_are_subtrees(dataset, tree_cls): |
| LOW | sklearn/tree/tests/test_tree.py | 1923 | def test_prune_single_node_tree(): |
| LOW | sklearn/tree/tests/test_tree.py | 1935 | def assert_pruning_creates_subtree(estimator_cls, X, y, pruning_path): |
| LOW | sklearn/tree/tests/test_tree.py | 1993 | def test_apply_path_readonly_all_trees(name, splitter, sparse_container): |
| LOW | sklearn/tree/tests/test_tree.py | 2113 | def test_criterion_entropy_same_as_log_loss(Tree, n_classes): |
| LOW | sklearn/tree/tests/test_tree.py | 2135 | def test_different_endianness_pickle(): |
| LOW | sklearn/tree/tests/test_tree.py | 2145 | def get_pickle_non_native_endianness(): |
| LOW | sklearn/tree/tests/test_tree.py | 2160 | def test_different_endianness_joblib_pickle(): |
| LOW | sklearn/tree/tests/test_tree.py | 2173 | def get_joblib_pickle_non_native_endianness(): |
| LOW | sklearn/tree/tests/test_tree.py | 2186 | def get_different_bitness_node_ndarray(node_ndarray): |
| 4026 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | sklearn/__init__.py | 7 | # ================================== |
| MEDIUM | sklearn/tree/_classes.py | 63 | # ============================================================================= |
| MEDIUM | sklearn/tree/_classes.py | 65 | # ============================================================================= |
| MEDIUM | sklearn/tree/_classes.py | 85 | # ============================================================================= |
| MEDIUM | sklearn/tree/_classes.py | 87 | # ============================================================================= |
| MEDIUM | sklearn/tree/_classes.py | 694 | # ============================================================================= |
| MEDIUM | sklearn/tree/_classes.py | 696 | # ============================================================================= |
| MEDIUM | sklearn/metrics/cluster/tests/test_common.py | 28 | # ------------------------ |
| MEDIUM | sklearn/metrics/cluster/tests/test_common.py | 59 | # --------------------------------------- |
| MEDIUM | sklearn/metrics/cluster/tests/test_common.py | 64 | # -------------------------------------------------------------------- |
| MEDIUM | sklearn/metrics/tests/test_common.py | 111 | # ------------------------------------------- |
| MEDIUM | sklearn/metrics/tests/test_common.py | 127 | # ------------------------ |
| MEDIUM | sklearn/metrics/tests/test_common.py | 306 | # --------------------------------------- |
| MEDIUM | …earn/metrics/_pairwise_distances_reduction/__init__.py | 6 | # ============================= |
| MEDIUM | …earn/metrics/_pairwise_distances_reduction/__init__.py | 33 | # ------------------------------------------ |
| MEDIUM | …earn/metrics/_pairwise_distances_reduction/__init__.py | 42 | # ------------------ |
| MEDIUM | sklearn/ensemble/tests/test_voting.py | 703 | # ====================== |
| MEDIUM | sklearn/ensemble/tests/test_voting.py | 796 | # ============================= |
| MEDIUM | sklearn/ensemble/tests/test_bagging.py | 1085 | # ====================== |
| MEDIUM | sklearn/ensemble/tests/test_bagging.py | 1157 | # ============================= |
| MEDIUM | sklearn/ensemble/tests/test_stacking.py | 903 | # ====================== |
| MEDIUM | sklearn/ensemble/tests/test_stacking.py | 1020 | # ============================= |
| MEDIUM | sklearn/semi_supervised/tests/test_self_training.py | 358 | # ================================================================= |
| MEDIUM | sklearn/semi_supervised/tests/test_self_training.py | 384 | # ==================== |
| MEDIUM | sklearn/compose/tests/test_column_transformer.py | 2712 | # ====================== |
| MEDIUM | sklearn/compose/tests/test_column_transformer.py | 2899 | # ============================= |
| MEDIUM | sklearn/externals/_arff.py | 845 | # ----------------------------------------------------------------- |
| MEDIUM | sklearn/externals/_arff.py | 853 | # ----------------------------------------------------------------- |
| MEDIUM | sklearn/externals/_arff.py | 858 | # ----------------------------------------------------------------- |
| MEDIUM | sklearn/externals/_arff.py | 1 | # ============================================================================= |
| MEDIUM | sklearn/externals/_arff.py | 5 | # ============================================================================= |
| MEDIUM | sklearn/externals/_arff.py | 25 | # ============================================================================= |
| MEDIUM | sklearn/externals/_arff.py | 414 | # ============================================================================= |
| MEDIUM | sklearn/externals/_arff.py | 663 | # ============================================================================= |
| MEDIUM | sklearn/externals/_arff.py | 807 | # ----------------------------------------------------------------- |
| MEDIUM | sklearn/externals/_arff.py | 816 | # ----------------------------------------------------------------- |
| MEDIUM | sklearn/externals/_arff.py | 1042 | # ============================================================================= |
| MEDIUM | sklearn/externals/_arff.py | 1107 | # ============================================================================= |
| MEDIUM | sklearn/tests/test_pipeline.py | 2098 | # ===================== |
| MEDIUM | sklearn/tests/test_pipeline.py | 2264 | # ============================= |
| MEDIUM | sklearn/tests/test_pipeline.py | 2322 | # ===================================================================== |
| MEDIUM | sklearn/tests/test_pipeline.py | 2606 | # ==================== |
| MEDIUM | sklearn/linear_model/tests/test_ridge.py | 2635 | # ====================== |
| MEDIUM | sklearn/linear_model/tests/test_ridge.py | 2665 | # ============================= |
| MEDIUM | sklearn/utils/_pprint.py | 17 | # -------------------------------------------- |
| MEDIUM | sklearn/utils/_metadata_requests.py | 262 | # ============== |
| MEDIUM | sklearn/utils/_metadata_requests.py | 323 | # ===================================== |
| MEDIUM | sklearn/utils/_metadata_requests.py | 778 | # ============================ |
| MEDIUM | sklearn/utils/_metadata_requests.py | 1337 | # ============== |
| MEDIUM | sklearn/utils/_metadata_requests.py | 1753 | # ========================== |
| MEDIUM | sklearn/manifold/tests/test_locally_linear.py | 19 | # ---------------------------------------------------------------------- |
| MEDIUM | sklearn/manifold/tests/test_locally_linear.py | 40 | # ---------------------------------------------------------------------- |
| MEDIUM | sklearn/model_selection/tests/test_validation.py | 2448 | # ====================================================== |
| MEDIUM | sklearn/model_selection/tests/test_validation.py | 2705 | # ============================= |
| MEDIUM | sklearn/model_selection/tests/test_search.py | 2696 | # ====================== |
| MEDIUM | sklearn/model_selection/tests/test_search.py | 2760 | # ============================= |
| MEDIUM | sklearn/decomposition/_kernel_pca.py | 386 | # ---------------------------------------------- |
| MEDIUM | examples/bicluster/plot_spectral_biclustering.py | 26 | # -------------------- |
| MEDIUM | examples/bicluster/plot_spectral_biclustering.py | 69 | # ------------------------------ |
| MEDIUM | examples/bicluster/plot_spectral_biclustering.py | 92 | # ---------------- |
| 639 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | sklearn/conftest.py | 41 | |
| LOW | sklearn/conftest.py | 66 | |
| LOW | sklearn/conftest.py | 239 | |
| LOW | sklearn/__init__.py | 24 | |
| LOW | sklearn/__init__.py | 24 | |
| LOW | sklearn/__init__.py | 24 | |
| LOW | sklearn/__init__.py | 69 | |
| LOW | sklearn/__init__.py | 69 | |
| LOW | sklearn/__init__.py | 70 | |
| LOW | sklearn/__init__.py | 71 | |
| LOW | sklearn/tree/__init__.py | 6 | |
| LOW | sklearn/tree/__init__.py | 6 | |
| LOW | sklearn/tree/__init__.py | 6 | |
| LOW | sklearn/tree/__init__.py | 6 | |
| LOW | sklearn/tree/__init__.py | 6 | |
| LOW | sklearn/tree/__init__.py | 13 | |
| LOW | sklearn/tree/__init__.py | 13 | |
| LOW | sklearn/tree/__init__.py | 13 | |
| LOW | sklearn/metrics/__init__.py | 6 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 7 | |
| LOW | sklearn/metrics/__init__.py | 30 | |
| LOW | sklearn/metrics/__init__.py | 31 | |
| LOW | sklearn/metrics/__init__.py | 32 | |
| LOW | sklearn/metrics/__init__.py | 33 | |
| LOW | sklearn/metrics/__init__.py | 34 | |
| LOW | sklearn/metrics/__init__.py | 35 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| LOW | sklearn/metrics/__init__.py | 36 | |
| 684 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | sklearn/multiclass.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/multiclass.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/multiclass.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/compose/_column_transformer.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/linear_model/_least_angle.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/linear_model/_logistic.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/linear_model/_omp.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/linear_model/_coordinate_descent.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/feature_selection/_from_model.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/model_selection/_search.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/multioutput.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/multioutput.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/multioutput.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/pipeline.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/calibration.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/model_selection/_classification_threshold.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/model_selection/_classification_threshold.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/pipeline.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/ensemble/_voting.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/ensemble/_bagging.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/linear_model/_ridge.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/linear_model/_ransac.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/impute/_iterative.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/covariance/_graph_lasso.py | 0 | get 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.py | 0 | check 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.py | 0 | check 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.py | 0 | check that named constructors return the correct type when subclassed. non-regression test for: https://github.com/sciki |
| HIGH | sklearn/model_selection/tests/test_plot.py | 0 | check that named constructors return the correct type when subclassed. non-regression test for: https://github.com/sciki |
| HIGH | sklearn/ensemble/_voting.py | 0 | get output feature names for transformation. parameters ---------- input_features : array-like of str or none, default=n |
| HIGH | sklearn/ensemble/_voting.py | 0 | get output feature names for transformation. parameters ---------- input_features : array-like of str or none, default=n |
| HIGH | sklearn/feature_extraction/_dict_vectorizer.py | 0 | get output feature names for transformation. parameters ---------- input_features : array-like of str or none, default=n |
| HIGH | sklearn/feature_extraction/text.py | 0 | get output feature names for transformation. parameters ---------- input_features : array-like of str or none, default=n |
| HIGH | sklearn/ensemble/_stacking.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/semi_supervised/_self_training.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/compose/_target.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/feature_selection/_rfe.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/feature_selection/_rfe.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/feature_selection/_sequential.py | 0 | get metadata routing of this object. please check :ref:`user guide <metadata_routing>` on how the routing mechanism work |
| HIGH | sklearn/ensemble/tests/test_voting.py | 0 | test that the right error message is raised when metadata is passed while not supported when `enable_metadata_routing=fa |
| HIGH | sklearn/ensemble/tests/test_stacking.py | 0 | test that the right error message is raised when metadata is passed while not supported when `enable_metadata_routing=fa |
| HIGH | sklearn/semi_supervised/tests/test_self_training.py | 0 | test that the right error message is raised when metadata is passed while not supported when `enable_metadata_routing=fa |
| HIGH | sklearn/compose/tests/test_column_transformer.py | 0 | test that the right error message is raised when metadata is passed while not supported when `enable_metadata_routing=fa |
| HIGH | sklearn/tests/test_pipeline.py | 0 | test that the right error message is raised when metadata is passed while not supported when `enable_metadata_routing=fa |
| HIGH | sklearn/ensemble/tests/test_voting.py | 0 | test that the right error is raised when metadata is not requested. |
| HIGH | sklearn/ensemble/tests/test_stacking.py | 0 | test that the right error is raised when metadata is not requested. |
| HIGH | sklearn/compose/tests/test_column_transformer.py | 0 | test that the right error is raised when metadata is not requested. |
| HIGH | sklearn/tests/test_pipeline.py | 0 | test that the right error is raised when metadata is not requested. |
| HIGH | …perimental/tests/test_enable_hist_gradient_boosting.py | 0 | tests for making sure experimental imports work as expected. |
| HIGH | …rn/experimental/tests/test_enable_iterative_imputer.py | 0 | tests for making sure experimental imports work as expected. |
| HIGH | …n/experimental/tests/test_enable_successive_halving.py | 0 | tests for making sure experimental imports work as expected. |
| HIGH | sklearn/_loss/loss.py | 0 | compute raw_prediction of an intercept-only model. this is the weighted median of the target, i.e. over the samples axis |
| HIGH | sklearn/_loss/loss.py | 0 | compute raw_prediction of an intercept-only model. this is the weighted median of the target, i.e. over the samples axis |
| HIGH | sklearn/_loss/loss.py | 0 | compute raw_prediction of an intercept-only model. this is the weighted median of the target, i.e. over the samples axis |
| HIGH | sklearn/gaussian_process/kernels.py | 0 | get parameters of this kernel. parameters ---------- deep : bool, default=true if true, will return the parameters for t |
| HIGH | sklearn/gaussian_process/kernels.py | 0 | get parameters of this kernel. parameters ---------- deep : bool, default=true if true, will return the parameters for t |
| HIGH | sklearn/gaussian_process/kernels.py | 0 | get parameters of this kernel. parameters ---------- deep : bool, default=true if true, will return the parameters for t |
| HIGH | sklearn/gaussian_process/kernels.py | 0 | get parameters of this kernel. parameters ---------- deep : bool, default=true if true, will return the parameters for t |
| HIGH | sklearn/gaussian_process/kernels.py | 0 | returns the (flattened, log-transformed) non-fixed hyperparameters. note that theta are typically the log-transformed va |
| HIGH | sklearn/gaussian_process/kernels.py | 0 | returns the (flattened, log-transformed) non-fixed hyperparameters. note that theta are typically the log-transformed va |
| HIGH | sklearn/gaussian_process/kernels.py | 0 | returns the (flattened, log-transformed) non-fixed hyperparameters. note that theta are typically the log-transformed va |
| 65 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | asv_benchmarks/asv.conf.json | 21 | |
| LOW | asv_benchmarks/asv.conf.json | 41 | //"install_timeout": 600, |
| LOW | asv_benchmarks/asv.conf.json | 81 | // |
| LOW | asv_benchmarks/asv.conf.json | 101 | // {"environment_type": "conda", "six": null}, // don't run without six on conda |
| LOW | asv_benchmarks/asv.conf.json | 121 | // "results_dir": "results", |
| LOW | asv_benchmarks/asv.conf.json | 141 | // skipped for the matching benchmark. |
| LOW | asv_benchmarks/benchmarks/config.json | 1 | { |
| LOW | sklearn/__init__.py | 1 | """Configure global settings and get information about the working environment.""" |
| LOW | sklearn/__init__.py | 21 | import os |
| LOW | sklearn/__init__.py | 41 | # |
| LOW | sklearn/calibration.py | 1141 | # TODO: numpy 2.0 |
| LOW | sklearn/tree/tests/test_monotonic_tree.py | 321 | depth_first_builder, |
| LOW | sklearn/tree/tests/test_monotonic_tree.py | 401 | # down the tree to both children. |
| LOW | sklearn/tree/tests/test_monotonic_tree.py | 481 | def test_nd_tree_nodes_values( |
| LOW | sklearn/metrics/cluster/tests/test_common.py | 21 | from sklearn.metrics.tests.test_common import check_array_api_metric |
| LOW | sklearn/metrics/_plot/__init__.py | 1 | # Authors: The scikit-learn developers |
| LOW | sklearn/metrics/tests/test_common.py | 101 | assert_array_equal, |
| LOW | sklearn/metrics/tests/test_common.py | 121 | # all metrics that have the same behavior. |
| LOW | …earn/metrics/_pairwise_distances_reduction/__init__.py | 1 | # Authors: The scikit-learn developers |
| LOW | …earn/metrics/_pairwise_distances_reduction/__init__.py | 21 | # For computational reasons, the reduction are performed on the fly on chunks |
| LOW | …earn/metrics/_pairwise_distances_reduction/__init__.py | 41 | # High-level diagram |
| LOW | …earn/metrics/_pairwise_distances_reduction/__init__.py | 61 | # | | (float{32,64} implem.) | | |
| LOW | …earn/metrics/_pairwise_distances_reduction/__init__.py | 81 | # - :class:`ArgKmin64` if X and Y are two `float64` array-likes |
| LOW | sklearn/ensemble/_hist_gradient_boosting/predictor.py | 141 | # while on 32 bit np.intp = np.int32. |
| LOW | …hist_gradient_boosting/tests/test_gradient_boosting.py | 521 | # Test that the class distributions in the whole dataset and in the small |
| LOW | …_hist_gradient_boosting/tests/test_compare_lightgbm.py | 41 | # samples is large enough, the structure of the prediction trees found by |
| LOW | sklearn/cluster/_hdbscan/__init__.py | 1 | # Authors: The scikit-learn developers |
| LOW | sklearn/cluster/_hdbscan/hdbscan.py | 1 | """ |
| LOW | sklearn/cluster/_hdbscan/hdbscan.py | 21 | # specific prior written permission. |
| LOW | sklearn/_loss/loss.py | 1 | """ |
| LOW | sklearn/_loss/loss.py | 61 | # - HistGradientBoostingClassifier: (n_classes, n_samples) |
| LOW | sklearn/_loss/loss.py | 1461 | # |
| LOW | sklearn/_loss/tests/test_loss.py | 281 | # |
| LOW | sklearn/gaussian_process/kernels.py | 1 | """A set of kernels that can be combined by operators and used in Gaussian processes.""" |
| LOW | sklearn/gaussian_process/_gpr.py | 601 | alpha = cho_solve((L, GPR_CHOLESKY_LOWER), y_train, check_finite=False) |
| LOW | sklearn/gaussian_process/_gpr.py | 621 | # 0.5 * trace((alpha . alpha^T - K^-1) . K_gradient) |
| LOW | sklearn/datasets/_arff_parser.py | 421 | # `pd.read_csv` automatically handles double quotes for quoting non-numeric |
| LOW | sklearn/datasets/images/__init__.py | 1 | # Authors: The scikit-learn developers |
| LOW | sklearn/datasets/descr/__init__.py | 1 | # Authors: The scikit-learn developers |
| LOW | sklearn/datasets/data/__init__.py | 1 | # Authors: The scikit-learn developers |
| LOW | sklearn/externals/conftest.py | 1 | # Do not collect any tests in externals. This is more robust than using |
| LOW | sklearn/externals/_arff.py | 1 | # ============================================================================= |
| LOW | sklearn/externals/array_api_compat/torch/_aliases.py | 721 | # torch.unique doesn't support returning indices. |
| LOW | sklearn/externals/array_api_compat/torch/linalg.py | 61 | # See linalg_solve_is_vector_rhs in |
| LOW | sklearn/externals/_numpydoc/docscrape.py | 241 | desc = r.read_to_next_unindented_line() |
| LOW | sklearn/externals/_packaging/version.py | 1 | """Vendored from |
| LOW | sklearn/externals/_packaging/version.py | 481 | local: Optional[Tuple[SubLocalType]], |
| LOW | sklearn/externals/_packaging/_structures.py | 1 | """Vendoered from |
| LOW | sklearn/tests/test_docstrings.py | 61 | |
| LOW | sklearn/tests/test_docstrings.py | 81 | # Ignore GL08: Parsing of the method signature failed, possibly because this is |
| LOW | sklearn/linear_model/_quantile.py | 201 | # min sum(pinball loss) + alpha * L1 |
| LOW | sklearn/linear_model/_linear_loss.py | 581 | if self.fit_intercept: |
| LOW | sklearn/linear_model/_linear_loss.py | 621 | # |
| LOW | sklearn/linear_model/_linear_loss.py | 821 | # - p_i_k is the (predicted) probability that sample i belongs to class k |
| LOW | sklearn/linear_model/_coordinate_descent.py | 1181 | # |
| LOW | sklearn/linear_model/_glm/glm.py | 241 | # We want to minimize |
| LOW | sklearn/linear_model/_glm/_newton_solver.py | 321 | print(" Check Convergence") |
| LOW | sklearn/linear_model/_glm/_newton_solver.py | 401 | |
| LOW | sklearn/linear_model/_glm/_newton_solver.py | 521 | return |
| LOW | sklearn/linear_model/_glm/_newton_solver.py | 541 | n_classes = self.linear_loss.base_loss.n_classes |
| 565 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | sklearn/tree/tests/test_tree.py | 2686 | # Create a predictive feature using `y` and with some noise |
| MEDIUM | sklearn/tree/tests/test_tree.py | 2896 | # Create a tree with root and two children |
| MEDIUM | …earn/metrics/_pairwise_distances_reduction/__init__.py | 11 | # This module provides routines to compute pairwise distances between a set |
| MEDIUM | sklearn/ensemble/tests/test_forest.py | 858 | # Create the RTE with sparse=False |
| MEDIUM | sklearn/ensemble/tests/test_forest.py | 871 | # Create the RTEs |
| MEDIUM | sklearn/ensemble/tests/test_forest.py | 1900 | # Create a predictive feature using `y` and with some noise |
| MEDIUM | sklearn/ensemble/_hist_gradient_boosting/__init__.py | 1 | """This module implements histogram-based gradient boosting estimators. |
| MEDIUM | sklearn/gaussian_process/tests/test_gpr.py | 411 | # Define a dummy optimizer that simply tests 50 random hyperparameters |
| MEDIUM | sklearn/gaussian_process/tests/test_gpc.py | 166 | # Define a dummy optimizer that simply tests 10 random hyperparameters |
| MEDIUM | sklearn/compose/_column_transformer.py | 1335 | # This function is not validated using validate_params because |
| MEDIUM | sklearn/datasets/_svmlight_format_io.py | 1 | """This module implements a loader and dumper for the svmlight format |
| MEDIUM | sklearn/datasets/_openml.py | 172 | # Create a tmpdir as a subfolder of dir_name where the final file will |
| MEDIUM | sklearn/externals/_arff.py | 781 | # Create the return object |
| MEDIUM | sklearn/externals/_arff.py | 790 | # Create the data helper object |
| MEDIUM | sklearn/tests/test_calibration.py | 314 | # This function is called from _CalibratedClassifier.predict_proba. |
| MEDIUM | sklearn/tests/test_naive_bayes.py | 201 | # Create an empty array |
| MEDIUM | sklearn/tests/test_pipeline.py | 1519 | # Create a new pipeline with cloned estimators |
| MEDIUM | sklearn/tests/test_pipeline.py | 2326 | # This class is used in this section for testing routing in the pipeline. |
| MEDIUM | sklearn/linear_model/tests/test_sgd.py | 1881 | # Define a ground truth on the scaled data |
| MEDIUM | sklearn/linear_model/tests/test_sgd.py | 2133 | # Create a classification problem with 50000 features and 20 classes. Using |
| MEDIUM | sklearn/linear_model/tests/test_least_angle.py | 363 | # Create an ill-conditioned situation in which the LARS has to go |
| MEDIUM | sklearn/linear_model/tests/test_coordinate_descent.py | 1594 | # Create a problem sufficiently large to cause memmapping (1MB). |
| MEDIUM | sklearn/impute/tests/test_impute.py | 197 | # Create a matrix X with columns |
| MEDIUM | sklearn/impute/tests/test_impute.py | 213 | # Create the columns |
| MEDIUM | sklearn/utils/_array_api.py | 1325 | # The following code is strongly inspired and simplified from |
| MEDIUM | sklearn/utils/metadata_routing.py | 3 | # This module is not a separate sub-folder since that would result in a circular |
| MEDIUM | sklearn/utils/_testing.py | 562 | # Create a list of parameters to compare with the parameters gotten |
| MEDIUM | sklearn/utils/validation.py | 48 | # This function is not used anymore at this moment in the code base but we keep it in |
| MEDIUM | sklearn/utils/tests/test_estimator_checks.py | 1337 | # This module is run as a script to check that we have no dependency on |
| MEDIUM | sklearn/utils/tests/test_multiclass.py | 575 | # Define the sparse matrix with a mix of implicit and explicit zeros |
| MEDIUM | sklearn/utils/_repr_html/base.py | 153 | """This function is returned by the @property `_repr_html_` to make |
| MEDIUM | sklearn/feature_selection/_univariate_selection.py | 38 | # The following function is a rewriting of scipy.stats.f_oneway |
| MEDIUM | sklearn/inspection/tests/test_permutation_importance.py | 457 | # Creating a scorer function that does not takes sample_weight |
| MEDIUM | sklearn/manifold/_isomap.py | 418 | # Create the graph of shortest distances from X to |
| MEDIUM | sklearn/mixture/tests/test_gaussian_mixture.py | 259 | # Define the bad precisions for each covariance_type |
| MEDIUM | sklearn/preprocessing/_data.py | 2914 | # Create the quantiles of reference |
| MEDIUM | sklearn/model_selection/_search.py | 1066 | # Create the subcontexts ahead of time to avoid creating them on the fly |
| MEDIUM | sklearn/model_selection/tests/test_validation.py | 2061 | # Create a failing classifier to deliberately fail |
| MEDIUM | sklearn/model_selection/tests/test_validation.py | 2126 | # Create a failing classifier to deliberately fail |
| MEDIUM | sklearn/model_selection/tests/test_validation.py | 2154 | # Create a failing classifier to deliberately fail |
| MEDIUM | sklearn/neighbors/_classification.py | 419 | # This function is defined here only to modify the parent docstring |
| MEDIUM | sklearn/neighbors/_classification.py | 887 | # This function is defined here only to modify the parent docstring |
| MEDIUM | sklearn/neighbors/_nca.py | 307 | # Create a dictionary of parameters to be passed to the optimizer |
| MEDIUM | examples/classification/plot_digits_classification.py | 62 | # Create a classifier: a support vector classifier |
| MEDIUM | examples/tree/plot_tree_regression.py | 27 | # Create a random 1D dataset |
| MEDIUM | examples/tree/plot_tree_regression.py | 91 | # Create a random dataset |
| MEDIUM | examples/ensemble/plot_adaboost_multiclass.py | 32 | # Creating the dataset |
| MEDIUM | …/ensemble/plot_random_forest_regression_multioutput.py | 34 | # Create a random dataset |
| MEDIUM | examples/ensemble/plot_gradient_boosting_quantile.py | 91 | # Create an evenly spaced evaluation set of input values spanning the [0, 10] |
| MEDIUM | examples/ensemble/plot_forest_iris.py | 102 | # Create a title for each column and the console by using str() and |
| MEDIUM | examples/cluster/plot_adjusted_for_chance_measures.py | 22 | # Defining the list of metrics to evaluate |
| MEDIUM | examples/cluster/plot_kmeans_silhouette_analysis.py | 61 | # Create a subplot with 1 row and 2 columns |
| MEDIUM | examples/cluster/plot_kmeans_digits.py | 88 | # Define the metrics which require only the true labels and estimator |
| MEDIUM | examples/calibration/plot_compare_calibration.py | 98 | # Define the classifiers to be compared in the study. |
| MEDIUM | examples/compose/plot_digits_pipe.py | 27 | # Define a pipeline to search for the best combination of PCA truncation |
| MEDIUM | examples/compose/plot_digits_pipe.py | 30 | # Define a Standard Scaler to normalize inputs |
| MEDIUM | examples/compose/plot_compare_reduction.py | 111 | # Create a temporary folder to store the transformers of the pipeline |
| MEDIUM | examples/linear_model/plot_ridge_coeffs.py | 66 | # Creating a non-noisy data set |
| MEDIUM | examples/linear_model/plot_sgd_early_stopping.py | 89 | # Define the estimators to compare |
| MEDIUM | examples/linear_model/plot_logistic_path.py | 61 | # Create a pipeline with `StandardScaler` and `LogisticRegression`, to normalize |
| 22 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | sklearn/conftest.py | 131 | |
| LOW | sklearn/kernel_approximation.py | 705 | |
| LOW | sklearn/multioutput.py | 708 | |
| LOW | sklearn/pipeline.py | 671 | |
| LOW | sklearn/discriminant_analysis.py | 38 | |
| LOW | sklearn/dummy.py | 252 | |
| LOW | sklearn/dummy.py | 339 | |
| LOW | sklearn/dummy.py | 543 | |
| LOW | sklearn/base.py | 100 | |
| LOW | sklearn/calibration.py | 687 | |
| LOW | sklearn/calibration.py | 781 | |
| LOW | sklearn/tree/_export.py | 523 | |
| LOW | sklearn/tree/_export.py | 708 | |
| LOW | sklearn/tree/_classes.py | 226 | |
| LOW | sklearn/tree/tests/test_split.py | 40 | |
| LOW | sklearn/tree/tests/test_monotonic_tree.py | 245 | |
| LOW | sklearn/tree/tests/test_monotonic_tree.py | 374 | |
| LOW | sklearn/tree/tests/test_tree.py | 840 | |
| LOW | sklearn/metrics/_scorer.py | 560 | |
| LOW | sklearn/metrics/_scorer.py | 138 | |
| LOW | sklearn/metrics/_classification.py | 428 | |
| LOW | sklearn/metrics/_classification.py | 1900 | |
| LOW | sklearn/metrics/_regression.py | 60 | |
| LOW | sklearn/metrics/_regression.py | 946 | |
| LOW | sklearn/metrics/_regression.py | 1365 | |
| LOW | sklearn/metrics/_regression.py | 1410 | |
| LOW | sklearn/metrics/pairwise.py | 567 | |
| LOW | sklearn/metrics/pairwise.py | 2303 | |
| LOW | sklearn/metrics/pairwise.py | 2584 | |
| LOW | sklearn/metrics/_ranking.py | 128 | |
| LOW | sklearn/metrics/cluster/_supervised.py | 80 | |
| LOW | sklearn/metrics/_plot/confusion_matrix.py | 88 | |
| LOW | …learn/metrics/_plot/tests/test_common_curve_display.py | 486 | |
| LOW | …learn/metrics/_plot/tests/test_common_curve_display.py | 593 | |
| LOW | sklearn/metrics/tests/test_common.py | 847 | |
| LOW | sklearn/metrics/tests/test_common.py | 2723 | |
| LOW | sklearn/metrics/tests/test_common.py | 2860 | |
| LOW | sklearn/metrics/tests/test_dist_metrics.py | 246 | |
| LOW | sklearn/metrics/tests/test_ranking.py | 129 | |
| LOW | sklearn/metrics/tests/test_classification.py | 2499 | |
| LOW | sklearn/ensemble/_bagging.py | 892 | |
| LOW | sklearn/ensemble/_gb.py | 136 | |
| LOW | sklearn/ensemble/_gb.py | 545 | |
| LOW | sklearn/ensemble/_gb.py | 626 | |
| LOW | sklearn/ensemble/_stacking.py | 87 | |
| LOW | sklearn/ensemble/tests/test_forest.py | 345 | |
| LOW | sklearn/ensemble/tests/test_forest.py | 364 | |
| LOW | …/ensemble/_hist_gradient_boosting/gradient_boosting.py | 394 | |
| LOW | sklearn/cluster/_agglomerative.py | 429 | |
| LOW | sklearn/cluster/_optics.py | 922 | |
| LOW | sklearn/cluster/_optics.py | 1021 | |
| LOW | sklearn/cluster/_kmeans.py | 462 | |
| LOW | sklearn/cluster/_kmeans.py | 630 | |
| LOW | sklearn/cluster/_kmeans.py | 874 | |
| LOW | sklearn/cluster/_kmeans.py | 964 | |
| LOW | sklearn/cluster/_spectral.py | 672 | |
| LOW | sklearn/cluster/_affinity_propagation.py | 34 | |
| LOW | sklearn/cluster/tests/test_hierarchical.py | 102 | |
| LOW | sklearn/cluster/tests/test_bicluster.py | 94 | |
| LOW | sklearn/feature_extraction/_dict_vectorizer.py | 142 | |
| 217 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | sklearn/metrics/_classification.py | 531 | # namespace and device so as to be able to leverage the efficient |
| MEDIUM | sklearn/metrics/tests/test_dist_metrics.py | 193 | # Choose rtol to make sure that this test is robust to changes in the random |
| LOW | sklearn/metrics/tests/test_pairwise.py | 1645 | # Single dimension input, just return tuple of contents. |
| MEDIUM | sklearn/ensemble/tests/test_forest.py | 1895 | # `forest_non_predictive`: meaningful for R2/accuracy, but robust in tests. |
| MEDIUM | sklearn/feature_extraction/tests/test_text.py | 471 | # this is robust to features with only zeros |
| LOW | sklearn/_loss/loss.py | 1452 | # dtypes. For float64, we simply use the values that are present in the |
| MEDIUM | sklearn/datasets/tests/test_openml.py | 1368 | # redownload, to utilize cache |
| MEDIUM | sklearn/externals/conftest.py | 1 | # Do not collect any tests in externals. This is more robust than using |
| MEDIUM | sklearn/externals/array_api_compat/common/_helpers.py | 1011 | # as we do below for unknown arrays, this is not recommended by JAX best practices. |
| MEDIUM | sklearn/linear_model/_theil_sen.py | 208 | """Theil-Sen Estimator: robust multivariate regression model. |
| MEDIUM | sklearn/linear_model/_huber.py | 130 | """L2-regularized linear regression model that is robust to outliers. |
| MEDIUM | sklearn/linear_model/_glm/tests/test_glm.py | 1006 | # LBFGS is robust to a collinear design because its approximation of the |
| MEDIUM | sklearn/linear_model/tests/test_least_angle.py | 143 | # Check that lars_path is robust to collinearity in input |
| MEDIUM | sklearn/linear_model/tests/test_base.py | 362 | # robust to any random seed in the admissible range. |
| LOW | sklearn/utils/_array_api.py | 237 | # Note: here we cannot simply use a Python `set` as it requires |
| LOW | sklearn/utils/_metadata_requests.py | 1831 | # try doing any routing, we can simply return a structure which returns |
| LOW | sklearn/utils/tests/test_pprint.py | 602 | # want to expend the whole line of the right side, just add the ellispsis |
| LOW | sklearn/utils/tests/test_estimator_checks.py | 374 | # then just return zeros. |
| MEDIUM | sklearn/covariance/_graph_lasso.py | 108 | i = 0 # initialize the counter to be robust to `max_iter=0` |
| MEDIUM | sklearn/covariance/_graph_lasso.py | 116 | # be robust to the max_iter=0 edge case, see: |
| MEDIUM | sklearn/covariance/_robust_covariance.py | 128 | # compute initial robust estimates from a random subset |
| MEDIUM | sklearn/covariance/_robust_covariance.py | 131 | # get initial robust estimates from the function parameters |
| MEDIUM | sklearn/covariance/_robust_covariance.py | 489 | # take the middle points' mean to get the robust location estimate |
| MEDIUM | sklearn/covariance/_robust_covariance.py | 622 | """Minimum Covariance Determinant (MCD): robust estimator of covariance. |
| MEDIUM | sklearn/preprocessing/_data.py | 1553 | """Scale features using statistics that are robust to outliers. |
| MEDIUM | sklearn/preprocessing/tests/test_data.py | 1239 | # Test robust scaling of 2d array along first axis |
| MEDIUM | sklearn/preprocessing/tests/test_data.py | 1446 | # check in conjunction with subsampling |
| MEDIUM | sklearn/model_selection/_split.py | 777 | # without attempting to leverage array API namespace features. However |
| LOW | sklearn/decomposition/_pca.py | 529 | # Small problem or n_components == 'mle', just call full PCA |
| MEDIUM | examples/ensemble/plot_gradient_boosting_quantile.py | 193 | # (underestimation for this asymmetric noise) but is also naturally robust to |
| MEDIUM | examples/cluster/plot_hdbscan.py | 106 | # HDBSCAN is much more robust in this sense: HDBSCAN can be seen as |
| MEDIUM | examples/cluster/plot_hdbscan.py | 179 | # results regarding density. We will however see that HDBSCAN is relatively robust |
| MEDIUM | examples/cluster/plot_hdbscan.py | 193 | # more robust with respect to noisy datasets, e.g. high-variance clusters with |
| MEDIUM | examples/cluster/plot_adjusted_for_chance_measures.py | 27 | # example, it is possible to use evaluation metrics that leverage this |
| MEDIUM | examples/cluster/plot_dbscan.py | 68 | # that leverage this "supervised" ground truth information to quantify the |
| MEDIUM | examples/linear_model/plot_quantile_regression.py | 92 | # insights. On top of that, median estimation is much more robust to outliers |
| MEDIUM | examples/linear_model/plot_ridge_coeffs.py | 161 | # When `alpha` is small, the model captures the intricate details of the |
| MEDIUM | examples/linear_model/plot_ridge_coeffs.py | 179 | # Some other linear models are formulated to be robust to outliers such as the |
| MEDIUM | …near_model/plot_tweedie_regression_insurance_claims.py | 458 | # :class:`~sklearn.linear_model.GammaRegressor` is able to leverage some |
| MEDIUM | examples/linear_model/plot_logistic_multinomial.py | 186 | # - This approach can capture more nuanced relationships between classes, potentially |
| MEDIUM | examples/impute/plot_missing_values.py | 271 | # robust estimator for data with high magnitude variables which could dominate |
| MEDIUM | examples/covariance/plot_mahalanobis_distances.py | 104 | # that of the MCD robust estimator (1.2). This shows that the MCD based |
| MEDIUM | examples/covariance/plot_mahalanobis_distances.py | 105 | # robust estimator is much more resistant to the outlier samples, which were |
| MEDIUM | examples/covariance/plot_mahalanobis_distances.py | 112 | # fit an MCD robust estimator to data |
| MEDIUM | examples/covariance/plot_mahalanobis_distances.py | 124 | # Mahalanobis distances calculated by both methods. Notice that the robust |
| MEDIUM | examples/covariance/plot_mahalanobis_distances.py | 179 | # distribution of inlier samples for robust MCD based Mahalanobis distances. |
| MEDIUM | …ples/covariance/plot_robust_vs_empirical_covariance.py | 101 | # fit a Minimum Covariance Determinant (MCD) robust estimator to data |
| MEDIUM | …ples/covariance/plot_robust_vs_empirical_covariance.py | 103 | # compare raw robust estimates with the true location and covariance |
| MEDIUM | examples/miscellaneous/plot_outlier_detection_bench.py | 331 | # method to avoid granting a privilege to non-binary features and that is robust |
| MEDIUM | examples/miscellaneous/plot_outlier_detection_bench.py | 406 | # IQR is robust to outliers: the median and interquartile range are less |
| MEDIUM | examples/inspection/plot_partial_dependence.py | 316 | # without any preprocessing as tree-based models are naturally robust to |
| MEDIUM | examples/svm/plot_svm_kernels.py | 266 | # different kernels utilize the training data to determine the classification |
| MEDIUM | examples/svm/plot_svm_kernels.py | 278 | # For a comprehensive evaluation, fine-tuning of :class:`~sklearn.svm.SVC` |
| MEDIUM | examples/applications/plot_outlier_detection_wine.py | 34 | # robust estimator can help concentrate on a relevant cluster when outlying |
| MEDIUM | examples/applications/plot_outlier_detection_wine.py | 102 | # robust estimator of covariance to concentrate on the main mode of the data |
| MEDIUM | …ples/applications/plot_cyclical_feature_engineering.py | 285 | # the linear regression model to properly leverage the time information: linear |
| MEDIUM | …ples/applications/plot_cyclical_feature_engineering.py | 494 | # leverage the periodic time-related features and reduce the error from ~14% to |
| MEDIUM | …ples/applications/plot_cyclical_feature_engineering.py | 559 | # leverage those features to properly model intra-day variations. |
| MEDIUM | …es/release_highlights/plot_release_highlights_1_3_0.py | 50 | # making it more robust to parameter selection than :class:`cluster.DBSCAN`. |
| MEDIUM | …es/release_highlights/plot_release_highlights_1_5_0.py | 153 | # Similarly to most other PCA solvers, the new `"covariance_eigh"` solver can leverage |
| 7 more matches not shown… | |||
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | sklearn/__init__.py | 144 | # Check if a random seed exists in the environment, if not create one. |
| LOW | sklearn/pipeline.py | 2101 | # Check if Xs dimensions are valid |
| LOW | sklearn/calibration.py | 987 | # Check if it is the output of predict_proba |
| LOW | sklearn/tree/tests/test_tree.py | 483 | # Check if variable importance before fit raises ValueError. |
| LOW | sklearn/tree/tests/test_export.py | 380 | # Check if it errors when length of feature_names |
| LOW | sklearn/metrics/_classification.py | 309 | # Check if dimensions are consistent. |
| LOW | …learn/metrics/_plot/tests/test_common_curve_display.py | 436 | # Check if the number of parameters match |
| LOW | sklearn/metrics/tests/test_dist_metrics.py | 325 | # Check if both callable metric and predefined metric initialized |
| LOW | sklearn/ensemble/tests/test_gradient_boosting.py | 1310 | # Check if validation_fraction has an effect |
| LOW | sklearn/ensemble/tests/test_gradient_boosting.py | 1319 | # Check if n_estimators_ increase monotonically with n_iter_no_change |
| LOW | sklearn/ensemble/tests/test_gradient_boosting.py | 491 | # Check if we can fit even though all targets are equal. |
| LOW | sklearn/ensemble/tests/test_gradient_boosting.py | 505 | # Check if quantile loss with alpha=0.5 equals absolute_error. |
| LOW | sklearn/ensemble/tests/test_gradient_boosting.py | 1231 | # Check if early stopping works as expected, that is empirically check that the |
| LOW | sklearn/cluster/tests/test_bisect_k_means.py | 57 | # Check if results is the same for dense and sparse data |
| LOW | sklearn/cluster/_hdbscan/hdbscan.py | 113 | # Check if the mutual reachability matrix has any rows which have |
| LOW | sklearn/gaussian_process/_gpc.py | 488 | # Check if we have converged (log marginal likelihood does |
| LOW | sklearn/gaussian_process/_gpr.py | 483 | # Check if any of the variances is negative because of |
| LOW | sklearn/externals/_arff.py | 564 | # Check if the rows are sorted |
| LOW | sklearn/linear_model/tests/test_theil_sen.py | 164 | # Check if median is solution of the Fermat-Weber location problem |
| LOW | sklearn/utils/estimator_checks.py | 4429 | # Check if classifier throws an exception when fed regression targets |
| LOW | sklearn/utils/multiclass.py | 421 | # Check if multioutput |
| LOW | sklearn/utils/tests/test_extmath.py | 576 | # Check if the randomized_svd sign flipping is always done based on u |
| LOW | sklearn/utils/tests/test_extmath.py | 635 | # Check if cartesian product delivers the right results |
| LOW | sklearn/covariance/_robust_covariance.py | 174 | # Check if best fit already found (det => 0, logdet => -inf) |
| LOW | sklearn/neural_network/tests/test_rbm.py | 134 | # Check if we don't get NaNs sampling the full digits dataset. |
| LOW | sklearn/feature_selection/tests/test_rfe.py | 84 | # Check if the supports are equal |
| LOW | sklearn/mixture/tests/test_gaussian_mixture.py | 980 | # Check if the score increase |
| LOW | sklearn/preprocessing/tests/test_data.py | 1185 | # Check if non-finite inputs raise ValueError |
| LOW | sklearn/preprocessing/tests/test_data.py | 745 | # Check if StandardScaler inverse_transform is |
| LOW | sklearn/model_selection/tests/test_split.py | 358 | # Check if get_n_splits returns the number of folds |
| LOW | sklearn/model_selection/tests/test_split.py | 409 | # Check if get_n_splits returns the number of folds |
| LOW | sklearn/model_selection/tests/test_validation.py | 1715 | # Check if the additional duplicate indices are caught |
| LOW | sklearn/model_selection/tests/test_validation.py | 617 | # Check if ValueError (when groups is None) propagates to cross_val_score |
| LOW | sklearn/model_selection/tests/test_search.py | 1925 | # Check if a one time iterable is accepted as a cv parameter. |
| LOW | sklearn/model_selection/tests/test_search.py | 341 | # Check if ValueError (when groups is None) propagates to GridSearchCV |
| LOW | sklearn/model_selection/tests/test_search.py | 931 | # Check if the search `cv_results`'s array are of correct types |
| LOW | sklearn/model_selection/tests/test_search.py | 1000 | # Check if score and timing are reasonable |
| LOW | sklearn/model_selection/tests/test_search.py | 1261 | # Check if score and timing are reasonable, also checks if the keys |
| LOW | sklearn/model_selection/tests/test_search.py | 1977 | # Check if generators are supported as cv and |
| LOW | …learn/model_selection/tests/test_successive_halving.py | 724 | # Check if ValueError (when groups is None) propagates to |
| LOW | sklearn/decomposition/tests/test_fastica.py | 168 | # Set atol to account for the different magnitudes of the elements in sources |
| LOW | sklearn/decomposition/tests/test_incremental_pca.py | 452 | # Set n_samples_seen_ to be a floating point number instead of an int |
| LOW | sklearn/neighbors/_lof.py | 324 | # Verify if negative_outlier_factor_ values are within acceptable range. |
| LOW | maint_tools/update_tracking_issue.py | 170 | # Check if test collection failed |
| LOW | examples/linear_model/plot_ridge_path.py | 56 | # Display results |
| LOW | …/linear_model/plot_lasso_lasso_lars_elasticnet_path.py | 75 | # Display results |
| LOW | …ples/covariance/plot_robust_vs_empirical_covariance.py | 122 | # Display results |
| LOW | …les/model_selection/plot_grid_search_refit_callable.py | 329 | # Print the results |
| LOW | benchmarks/bench_isolation_forest.py | 48 | # Set this to true for plotting score histograms for each dataset: |
| LOW | benchmarks/bench_sample_without_replacement.py | 195 | # Print results |
| LOW | benchmarks/bench_random_projections.py | 273 | # Print results |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | sklearn/pipeline.py | 2212 | except Exception: |
| MEDIUM | sklearn/pipeline.py | 389 | def _final_estimator(self): |
| LOW | sklearn/metrics/_scorer.py | 173 | except Exception as e: |
| LOW | sklearn/metrics/_classification.py | 2401 | except Exception as e: |
| LOW | sklearn/ensemble/_base.py | 308 | except Exception: |
| LOW | sklearn/feature_extraction/text.py | 419 | except Exception: |
| LOW | sklearn/compose/_column_transformer.py | 1283 | except Exception: |
| MEDIUM | sklearn/compose/_column_transformer.py | 541 | def _get_remainder_cols_dtype(self): |
| LOW | sklearn/datasets/_kddcup99.py | 376 | except Exception as e: |
| LOW | sklearn/datasets/_twenty_newsgroups.py | 311 | except Exception as e: |
| LOW | sklearn/datasets/_openml.py | 69 | except Exception as exc: |
| LOW | sklearn/datasets/_openml.py | 190 | except Exception: |
| LOW | sklearn/datasets/_openml.py | 557 | except Exception as exc: |
| LOW | sklearn/externals/_arff.py | 758 | except Exception: |
| LOW | sklearn/externals/array_api_compat/common/_helpers.py | 1048 | except Exception: |
| LOW | …earn/externals/array_api_extra/_lib/_utils/_helpers.py | 448 | except Exception: # pylint: disable=broad-exception-caught |
| LOW | sklearn/tests/test_init.py | 11 | except Exception as e: |
| LOW | sklearn/utils/_available_if.py | 33 | except Exception as e: |
| LOW | sklearn/utils/estimator_checks.py | 4064 | except Exception as e: |
| LOW | sklearn/utils/estimator_checks.py | 4073 | except Exception as e: |
| LOW | sklearn/utils/estimator_checks.py | 923 | except Exception as e: |
| LOW | sklearn/utils/estimator_checks.py | 1518 | except Exception as e: |
| LOW | sklearn/utils/estimator_checks.py | 1543 | except Exception as e: |
| LOW | sklearn/utils/estimator_checks.py | 4294 | except Exception as e: |
| LOW | sklearn/utils/_metadata_requests.py | 1595 | except Exception: |
| LOW | sklearn/utils/_testing.py | 540 | except Exception as exp: |
| LOW | sklearn/utils/validation.py | 361 | except Exception as err: |
| LOW | sklearn/utils/tests/test_array_api.py | 632 | except Exception: |
| LOW | sklearn/utils/_repr_html/estimator.py | 239 | except Exception: |
| LOW | sklearn/utils/_repr_html/estimator.py | 422 | except Exception: |
| LOW | sklearn/utils/_repr_html/estimator.py | 437 | except Exception: |
| LOW | sklearn/callback/_callback_support.py | 131 | except Exception as exc: |
| LOW | sklearn/model_selection/_validation.py | 858 | except Exception: |
| LOW | sklearn/model_selection/_validation.py | 946 | except Exception: |
| LOW | benchmarks/bench_rcv1_logreg_convergence.py | 41 | except Exception: |
| LOW | benchmarks/bench_rcv1_logreg_convergence.py | 50 | except Exception: |
| LOW | benchmarks/bench_rcv1_logreg_convergence.py | 55 | except Exception: |
| LOW | build_tools/circle/list_versions.py | 20 | except Exception: |
| MEDIUM | build_tools/circle/list_versions.py | 21 | print("Error reading", url, file=sys.stderr) |
| MEDIUM | build_tools/circle/list_versions.py | 17 | def json_urlread(url): |
| LOW | doc/conf.py | 1017 | except Exception as e: |
| LOW | doc/sphinxext/github_link.py | 52 | except Exception: |
| LOW | doc/sphinxext/github_link.py | 57 | except Exception: |
| LOW | doc/sphinxext/github_link.py | 68 | except Exception: |
| MEDIUM | doc/sphinxext/github_link.py | 11 | def _get_git_revision(): |
| LOW | doc/sphinxext/override_pst_pagetoc.py | 68 | except Exception as e: |
| Severity | File | Line | Snippet |
|---|---|---|---|
| HIGH | sklearn/externals/array_api_extra/_delegation.py | 231 | If ``x < 0`` or ``x >= num_classes``, then the result is undefined, may raise |
| HIGH | sklearn/linear_model/_glm/glm.py | 395 | :math:`D^2 = 1-\\frac{D(y_{true},y_{pred})}{D_{null}}`, |
| HIGH | sklearn/linear_model/_glm/glm.py | 396 | :math:`D_{null}` is the null deviance, i.e. the deviance of a model |
| HIGH | sklearn/callback/tests/test_scoring_monitor.py | 182 | assert log.equals(expected_log) |
| HIGH | sklearn/callback/tests/test_scoring_monitor.py | 217 | assert log.equals(expected_log) |
| HIGH | sklearn/decomposition/_dict_learning.py | 699 | (U^*, V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1 |
| HIGH | sklearn/decomposition/_dict_learning.py | 701 | with || V_k ||_2 = 1 for all 0 <= k < n_components |
| HIGH | sklearn/decomposition/_dict_learning.py | 916 | (U^*, V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1 |
| HIGH | sklearn/decomposition/_dict_learning.py | 918 | with || V_k ||_2 = 1 for all 0 <= k < n_components |
| HIGH | sklearn/decomposition/_dict_learning.py | 1425 | (U^*,V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1 |
| HIGH | sklearn/decomposition/_dict_learning.py | 1427 | with || V_k ||_2 <= 1 for all 0 <= k < n_components |
| HIGH | sklearn/decomposition/_dict_learning.py | 1768 | (U^*,V^*) = argmin 0.5 || X - U V ||_Fro^2 + alpha * || U ||_1,1 |
| HIGH | sklearn/decomposition/_dict_learning.py | 1770 | with || V_k ||_2 <= 1 for all 0 <= k < n_components |
| HIGH | sklearn/neighbors/tests/test_neighbors_tree.py | 177 | heap.push(row, d, i) |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | sklearn/compose/_column_transformer.py | 924 | # we use fit_transform to make sure to set sparse_output_ (for which we |
| LOW | sklearn/model_selection/_split.py | 2382 | # to make sure to break them anew in each iteration |
| MEDIUM | examples/miscellaneous/plot_estimator_representation.py | 37 | # elements. See :ref:`visualizing_composite_estimators` for how you can use |
| MEDIUM | …s/release_highlights/plot_release_highlights_0_23_0.py | 63 | # elements. See :ref:`visualizing_composite_estimators` for how you can use |
| Severity | File | Line | Snippet |
|---|---|---|---|
| LOW | sklearn/covariance/_robust_covariance.py | 265 | The purpose of this function is to find the best sets of n_support |
| LOW | …emi_supervised/plot_semi_supervised_versus_svm_iris.py | 142 | # Step 1: similarities between query and all training samples |
| LOW | …emi_supervised/plot_semi_supervised_versus_svm_iris.py | 145 | # Step 2: weighted average of label distributions |
| LOW | …emi_supervised/plot_semi_supervised_versus_svm_iris.py | 148 | # Step 3: normalize to sum to 1 |
| Severity | File | Line | Snippet |
|---|---|---|---|
| MEDIUM | sklearn/utils/tests/test_estimator_checks.py | 1487 | |
| MEDIUM | sklearn/utils/tests/test_estimator_checks.py | 1488 |