This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| os.environ["OMP_NUM_THREADS"] = "1" # avoid oversubscription | |
| import pandas as pd | |
| from distributed.client import performance_report | |
| from time import perf_counter | |
| from joblib import Memory, parallel_backend | |
| from distributed import Client, LocalCluster | |
| from sklearn.datasets import make_regression | |
| from sklearn.experimental import enable_hist_gradient_boosting # noqa |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In [19]: from sklearn.preprocessing import StandardScaler | |
| In [20]: from sklearn.linear_model import LogisticRegression | |
| In [21]: from sklearn.pipeline import Pipeline | |
| In [22]: p = Pipeline([("scaler", StandardScaler()), ("classifier", LogisticRegression())]) | |
| In [23]: import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn.model_selection import cross_validate | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| from sklearn.datasets import fetch_openml | |
| from sklearn.experimental import enable_hist_gradient_boosting # noqa | |
| from sklearn.ensemble import HistGradientBoostingClassifier | |
| from sklearn.pipeline import make_pipeline | |
| from sklearn.compose import make_column_transformer | |
| from sklearn.compose import make_column_selector |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import pytest | |
| from sklearn.datasets import load_breast_cancer | |
| from sklearn.utils import shuffle | |
| from sklearn.model_selection import train_test_split | |
| from sklearn.model_selection import GridSearchCV | |
| from sklearn.linear_model import LogisticRegression | |
| from sklearn.metrics import roc_auc_score, roc_curve | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @pytest.mark.parametrize("loss", ['huber', 'ls', 'lad', 'quantile']) | |
| @pytest.mark.parametrize("use_sample_weight", [False, True]) | |
| def test_regressor_train_loss_convergence(loss, use_sample_weight): | |
| rng = np.random.RandomState(42) | |
| n_samples, n_features = 30, 5 | |
| n_estimators = 300 | |
| # Make random data (without duplicated samples) to make sure | |
| # it's possible to build an invertible (overfitting) mapping | |
| # from X to y that therefore should lead to a regression loss |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (conda-forge-compilers) 0 [~/code/scikit-learn (master)]$ pip install -e . -v | |
| Created temporary directory: /private/var/folders/69/7jxl92h50w10b4v998qt4tj00000gn/T/pip-ephem-wheel-cache-cn0u3xn5 | |
| Created temporary directory: /private/var/folders/69/7jxl92h50w10b4v998qt4tj00000gn/T/pip-req-tracker-7xtixh31 | |
| Created requirements tracker '/private/var/folders/69/7jxl92h50w10b4v998qt4tj00000gn/T/pip-req-tracker-7xtixh31' | |
| Created temporary directory: /private/var/folders/69/7jxl92h50w10b4v998qt4tj00000gn/T/pip-install-q8mggn78 | |
| Obtaining file:///Users/ogrisel/code/scikit-learn | |
| Added file:///Users/ogrisel/code/scikit-learn to build tracker '/private/var/folders/69/7jxl92h50w10b4v998qt4tj00000gn/T/pip-req-tracker-7xtixh31' | |
| Running setup.py (path:/Users/ogrisel/code/scikit-learn/setup.py) egg_info for package from file:///Users/ogrisel/code/scikit-learn | |
| Running command python setup.py egg_info | |
| running egg_info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from time import time | |
| from pprint import pprint | |
| import numpy as np | |
| import pandas as pd | |
| from scipy.stats import expon, randint, uniform | |
| from sklearn.pipeline import Pipeline | |
| from sklearn.compose import ColumnTransformer | |
| from sklearn.preprocessing import OrdinalEncoder |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Starting Microsoft Python language server. | |
| ##########Linting Output - flake8########## | |
| Microsoft Python Language Server version 0.1.75.0 | |
| Initializing for /opt/venvs/py37/bin/python | |
| Loading files from /home/ogrisel/code/scikit-learn | |
| Parsing document file:///home/ogrisel/code/scikit-learn/setup.py | |
| Parse complete for file:///home/ogrisel/code/scikit-learn/setup.py at version -1 | |
| Analysis queued for file:///home/ogrisel/code/scikit-learn/setup.py | |
| Parsing document file:///home/ogrisel/code/scikit-learn/conftest.py | |
| Parse complete for file:///home/ogrisel/code/scikit-learn/conftest.py at version -1 |