- Set up a virtual env.
git clone -b ccp_prune_tree https://github.com/thomasjpfan/scikit-learn scikit-learn-ccp-pythoncd scikit-learn-ccp-pythongit checkout 25910e085cf7bb0a98ee33c050fa9233e247e523- Install scikit-learn
- Go to directory with
bench_prune_tree.py
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
| #!/usr/bin/env python3 | |
| # pip install GitPython PyGithub | |
| import argparse | |
| import os | |
| import sys | |
| from github import Github | |
| from git import Repo |
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.tree import DecisionTreeRegressor | |
| from sklearn.linear_model import Ridge | |
| from sklearn.preprocessing import StandardScaler | |
| from sklearn.pipeline import Pipeline | |
| from sklearn.model_selection import GridSearchCV | |
| from sklearn.datasets import load_boston | |
| from sklearn.model_selection import train_test_split | |
| boston = load_boston() | |
| X_train, X_test, y_train, y_test = train_test_split( |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
For reference here are the time it takes to run the following:
OMP_NUM_THREADS=$i python benchmarks/bench_hist_gradient_boosting_higgsboson.py \
--n-leaf-nodes 255 --n-trees 100
lightgbm==2.2.1
xgboost==0.90
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| { | |
| "TagRemovePreprocessor": { "remove_input_tags": ["to_remove"] }, | |
| "SlidesExporter": { "reveal_theme": "simple" }, | |
| "NbConvertApp": { | |
| "export_format": "slides" | |
| }, | |
| "TemplateExporter": { | |
| "exclude_input_prompt": true, | |
| "exclude_output_prompt": true | |
| } |
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 sklearn | |
| import numpy as np | |
| import scipy | |
| import csv | |
| import argparse | |
| from pathlib import Path | |
| import openml | |
| from openml.exceptions import OpenMLRunsExistError | |
| from sklearn.experimental import enable_hist_gradient_boosting |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.