Comments (3)
@inventormc can you tell me how to repro this? Is there a branch + a script?
from tune-sklearn.
Yeah I used this script for xgb.
"""
An example training a XGBClassifier, performing
randomized search using TuneSearchCV.
"""
import warnings
from tune_sklearn import TuneSearchCV
from sklearn import datasets
from sklearn.model_selection import train_test_split
from xgboost import XGBClassifier
warnings.filterwarnings("ignore")
digits = datasets.load_digits()
x = digits.data
y = digits.target
x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=.2)
# A parameter grid for XGBoost
params = {
"min_child_weight": [1, 5, 10],
"gamma": [0.5, 1, 1.5, 2, 5],
"subsample": [0.6, 0.8, 1.0],
"colsample_bytree": [0.6, 0.8, 1.0],
"max_depth": [3, 4, 5],
}
xgb = XGBClassifier(
learning_rate=0.02,
n_estimators=50,
objective="binary:logistic",
silent=True,
nthread=1,
)
digit_search = TuneSearchCV(
xgb,
param_distributions=params,
n_iter=3,
# use_gpu=True # Commented out for testing on travis,
# but this is how you would use gpu
)
import time # Just to compare fit times
start = time.time()
digit_search.fit(x_train, y_train)
end = time.time()
print(end-start)
print(digit_search.cv_results_)
digit_search = TuneSearchCV(
xgb,
param_distributions=params,
n_iter=3,
early_stopping="MedianStoppingRule",
max_iters=50
# use_gpu=True # Commented out for testing on travis,
# but this is how you would use gpu
)
start = time.time()
digit_search.fit(x_train, y_train)
end = time.time()
print(end-start)
print(digit_search.cv_results_)
from tune-sklearn.
Merged in #63
from tune-sklearn.
Related Issues (20)
- TuneSearchCV not correctly handling error_score parameter HOT 5
- Save TuneSearchCV object with tensorflow and keras models HOT 7
- Can't suppress warning messages through standard python methods HOT 4
- n_jobs doesn't seem to be taken into account by TuneSearchCV HOT 3
- Resuming from checkpoint?
- Fail to run the conda installed tune_sklearn package HOT 2
- sk_n_jobs bug
- "training_iteration" from TuneSearchCV is always 1, and accuracy does not improve over time
- For TuneGridSearchCV: Where should I put reuse_actors=True?
- AttributeError: 'str' object has no attribute 'setup'
- TuneSearchCV doesn't seem to search for modules in alternative locations included in the PATH environment variable HOT 2
- during pickling there is an error HOT 1
- False Error log complains failed to read the result of trails
- How to tune Skorch model using GPU
- Since Ray-2.7.0, fetch_trial_dataframes is deprecated and raise an DeprecationWarning exception HOT 2
- No experiment checkpoint file of form 'experiment_state-*.json' was found HOT 1
- context is not passed with `set_config`
- Label management problem for Multilable classification
- Is it possible to save all models when doing TuneSearchCV or equivalent?
- Installation fails on Python 3.11/Windows
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tune-sklearn.