Skip to content

Commit

Permalink
Remove base estimator deprecated name
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Li <adam2392@gmail.com>
  • Loading branch information
adam2392 committed Nov 29, 2023
2 parents 3d377ad + b8229da commit 41dd7cb
Show file tree
Hide file tree
Showing 187 changed files with 3,692 additions and 2,889 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- pull_request_target

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:

comment:
needs: lint
if: always()
if: ${{ !cancelled() }}
runs-on: ubuntu-latest

# We need these permissions to be able to post / update comments
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ scikit-learn 1.0 and later require Python 3.7 or newer.
scikit-learn 1.1 and later require Python 3.8 or newer.

Scikit-learn plotting capabilities (i.e., functions start with ``plot_`` and
classes end with "Display") require Matplotlib (>= |MatplotlibMinVersion|).
classes end with ``Display``) require Matplotlib (>= |MatplotlibMinVersion|).
For running the examples Matplotlib >= |MatplotlibMinVersion| is required.
A few examples require scikit-image >= |Scikit-ImageMinVersion|, a few examples
require pandas >= |PandasMinVersion|, some examples require seaborn >=
Expand Down
4 changes: 1 addition & 3 deletions asv_benchmarks/benchmarks/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ def _20newsgroups_lowdim_dataset(n_components=100, ngrams=(1, 1), dtype=np.float

@M.cache
def _mnist_dataset(dtype=np.float32):
X, y = fetch_openml(
"mnist_784", version=1, return_X_y=True, as_frame=False, parser="pandas"
)
X, y = fetch_openml("mnist_784", version=1, return_X_y=True, as_frame=False)
X = X.astype(dtype, copy=False)
X = MaxAbsScaler().fit_transform(X)

Expand Down
1 change: 1 addition & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ jobs:
py38_conda_forge_openblas_ubuntu_2204:
DISTRIB: 'conda'
LOCK_FILE: './build_tools/azure/py38_conda_forge_openblas_ubuntu_2204_linux-64_conda.lock'
CHECK_WARNINGS: 'true'
COVERAGE: 'false'
SKLEARN_TESTS_GLOBAL_RANDOM_SEED: '0' # non-default seed

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bench_hist_gradient_boosting_adult.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def predict(est, data_test, target_test):
print(f"predicted in {toc - tic:.3f}s, ROC AUC: {roc_auc:.4f}, ACC: {acc :.4f}")


data = fetch_openml(data_id=179, as_frame=True, parser="pandas") # adult dataset
data = fetch_openml(data_id=179, as_frame=True) # adult dataset
X, y = data.data, data.target

# Ordinal encode the categories to use the native support available in HGBDT
Expand Down
3 changes: 3 additions & 0 deletions benchmarks/bench_hist_gradient_boosting_higgsboson.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
parser.add_argument("--no-predict", action="store_true", default=False)
parser.add_argument("--cache-loc", type=str, default="/tmp")
parser.add_argument("--no-interactions", type=bool, default=False)
parser.add_argument("--max-features", type=float, default=1.0)
args = parser.parse_args()

HERE = os.path.dirname(__file__)
Expand All @@ -36,6 +37,7 @@
subsample = args.subsample
lr = args.learning_rate
max_bins = args.max_bins
max_features = args.max_features


@m.cache
Expand Down Expand Up @@ -104,6 +106,7 @@ def predict(est, data_test, target_test):
random_state=0,
verbose=1,
interaction_cst=interaction_cst,
max_features=max_features,
)
fit(est, data_train, target_train, "sklearn")
predict(est, data_test, target_test)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bench_isolation_forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def print_outlier_ratio(y):
y = dataset.target

if dat == "shuttle":
dataset = fetch_openml("shuttle", as_frame=False, parser="pandas")
dataset = fetch_openml("shuttle", as_frame=False)
X = dataset.data
y = dataset.target.astype(np.int64)
X, y = sh(X, y, random_state=random_state)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bench_lof.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
y = dataset.target

if dataset_name == "shuttle":
dataset = fetch_openml("shuttle", as_frame=False, parser="pandas")
dataset = fetch_openml("shuttle", as_frame=False)
X = dataset.data
y = dataset.target.astype(np.int64)
# we remove data with label 4
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bench_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def load_data(dtype=np.float32, order="F"):
######################################################################
# Load dataset
print("Loading dataset...")
data = fetch_openml("mnist_784", as_frame=True, parser="pandas")
data = fetch_openml("mnist_784", as_frame=True)
X = check_array(data["data"], dtype=dtype, order=order)
y = data["target"]

Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bench_plot_randomized_svd.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def get_data(dataset_name):
del row
del col
else:
X = fetch_openml(dataset_name, parser="auto").data
X = fetch_openml(dataset_name).data
return X


Expand Down
2 changes: 1 addition & 1 deletion benchmarks/bench_tsne_mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
def load_data(dtype=np.float32, order="C", shuffle=True, seed=0):
"""Load the data, then cache and memmap the train/test split"""
print("Loading dataset...")
data = fetch_openml("mnist_784", as_frame=True, parser="pandas")
data = fetch_openml("mnist_784", as_frame=True)

X = check_array(data["data"], dtype=dtype, order=order)
y = data["target"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ https://repo.anaconda.com/pkgs/main/linux-64/libpq-12.15-hdbd6064_1.conda#218227
https://repo.anaconda.com/pkgs/main/linux-64/libwebp-1.3.2-h11a3e52_0.conda#9e0d6c9abdd97b076c66d4cf488589ee
https://repo.anaconda.com/pkgs/main/linux-64/openjpeg-2.4.0-h3ad879b_0.conda#86baecb47ecaa7f7ff2657a1f03b90c9
https://repo.anaconda.com/pkgs/main/linux-64/python-3.8.18-h955ad1f_0.conda#fa35c1028f48db26df051ee75dd9422f
https://repo.anaconda.com/pkgs/main/linux-64/certifi-2023.7.22-py38h06a4308_0.conda#59416ad8979a654bb8f5184b62d8a9e7
https://repo.anaconda.com/pkgs/main/linux-64/certifi-2023.11.17-py38h06a4308_0.conda#3c4c381d8521859fcfde56ef2e3e5c40
https://repo.anaconda.com/pkgs/main/noarch/cycler-0.11.0-pyhd3eb1b0_0.conda#f5e365d2cdb66d547eb8c3ab93843aab
https://repo.anaconda.com/pkgs/main/linux-64/cython-0.29.33-py38h6a678d5_0.conda#eb105388ba8bcf5ce82cf4cd5deeb5f9
https://repo.anaconda.com/pkgs/main/linux-64/exceptiongroup-1.0.4-py38h06a4308_0.conda#db954e73dca6076c64a1004d71b45784
Expand Down
Loading

0 comments on commit 41dd7cb

Please sign in to comment.