{"id":18520237,"url":"https://github.com/mlr-org/mlr3hyperband","last_synced_at":"2026-03-07T00:30:54.751Z","repository":{"id":41456416,"uuid":"207808496","full_name":"mlr-org/mlr3hyperband","owner":"mlr-org","description":"Successive Halving and Hyperband in the mlr3 ecosystem","archived":false,"fork":false,"pushed_at":"2025-07-23T11:49:40.000Z","size":13038,"stargazers_count":18,"open_issues_count":5,"forks_count":5,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-12-09T01:34:11.981Z","etag":null,"topics":["automl","bbotk","hyperband","hyperparameter-tuning","machine-learning","mlr3","optimization","r","tune","tuning"],"latest_commit_sha":null,"homepage":"https://mlr3hyperband.mlr-org.com","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlr-org.png","metadata":{"funding":{"github":"mlr-org"},"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-09-11T12:36:02.000Z","updated_at":"2025-07-23T11:30:08.000Z","dependencies_parsed_at":"2024-03-04T17:33:11.025Z","dependency_job_id":"c7a5736d-5574-4f8c-826f-b5d87041a5cf","html_url":"https://github.com/mlr-org/mlr3hyperband","commit_stats":{"total_commits":262,"total_committers":11,"mean_commits":"23.818181818181817","dds":0.6870229007633588,"last_synced_commit":"a44f8043a953901d11fe66f170bd6bf062f846fd"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/mlr-org/mlr3hyperband","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlr-org%2Fmlr3hyperband","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlr-org%2Fmlr3hyperband/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlr-org%2Fmlr3hyperband/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlr-org%2Fmlr3hyperband/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlr-org","download_url":"https://codeload.github.com/mlr-org/mlr3hyperband/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlr-org%2Fmlr3hyperband/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30204154,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T19:07:06.838Z","status":"ssl_error","status_checked_at":"2026-03-06T18:57:34.882Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automl","bbotk","hyperband","hyperparameter-tuning","machine-learning","mlr3","optimization","r","tune","tuning"],"created_at":"2024-11-06T17:19:11.771Z","updated_at":"2026-03-07T00:30:54.741Z","avatar_url":"https://github.com/mlr-org.png","language":"R","funding_links":["https://github.com/sponsors/mlr-org"],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\nbibliography: references.bib\n---\n\n```{r, include = FALSE}\nlibrary(mlr3misc)\nlibrary(utils)\nlibrary(mlr3tuningspaces)\nlibrary(data.table)\nsource(\"R/bibentries.R\")\nwriteLines(toBibtex(bibentries), \"references.bib\")\n\nlgr::get_logger(\"mlr3\")$set_threshold(\"warn\")\nlgr::get_logger(\"bbotk\")$set_threshold(\"warn\")\nset.seed(0)\noptions(\n  datatable.print.nrows = 10,\n  datatable.print.class = FALSE,\n  datatable.print.keys = FALSE,\n  datatable.print.trunc.cols = TRUE,\n  width = 100)\n\n# mute load messages\nlibrary(bbotk)\nlibrary(mlr3verse)\nlibrary(mlr3hyperband)\nlibrary(mlr3learners)\n```\n\n# mlr3hyperband \u003cimg src=\"man/figures/logo.png\" align=\"right\" width = \"120\" /\u003e\n\nPackage website: [release](https://mlr3hyperband.mlr-org.com/) | [dev](https://mlr3hyperband.mlr-org.com/dev/)\n\n\u003c!-- badges: start --\u003e\n[![r-cmd-check](https://github.com/mlr-org/mlr3hyperband/actions/workflows/r-cmd-check.yml/badge.svg)](https://github.com/mlr-org/mlr3hyperband/actions/workflows/r-cmd-check.yml)\n[![CRAN Status](https://www.r-pkg.org/badges/version-ago/mlr3hyperband)](https://cran.r-project.org/package=mlr3hyperband)\n[![Mattermost](https://img.shields.io/badge/chat-mattermost-orange.svg)](https://lmmisld-lmu-stats-slds.srv.mwn.de/mlr_invite/)\n\u003c!-- badges: end --\u003e\n\n*mlr3hyperband* adds the optimization algorithms Successive Halving [@jamieson_2016] and Hyperband [@li_2018] to the [mlr3](https://mlr-org.com/) ecosystem.\nThe implementation in mlr3hyperband features improved scheduling and parallelizes the evaluation of configurations.\nThe package includes tuners for hyperparameter optimization in [mlr3tuning](https://github.com/mlr-org/mlr3tuning) and optimizers for black-box optimization in [bbotk](https://github.com/mlr-org/bbotk).\n\n## Resources\n\nThere are several sections about hyperparameter optimization in the [mlr3book](https://mlr3book.mlr-org.com).\n\nThe [gallery](https://mlr-org.com/gallery.html) features a series of case studies on Hyperband.\n\n* [Tune](https://mlr-org.com/gallery/series/2023-01-15-hyperband-xgboost/) the hyperparameters of XGBoost with Hyperband\n* Use data [subsampling](https://mlr-org.com/gallery/series/2023-01-16-hyperband-subsampling/) and Hyperband to optimize a support vector machine.\n\nThe website features a benchmark about the performance of [asynchronous successive halving](https://mlr-org.com/benchmarks/benchmarks_async.html).\n\n## Installation\n\nInstall the last release from CRAN:\n\n```{r, eval = FALSE}\ninstall.packages(\"mlr3hyperband\")\n```\n\nInstall the development version from GitHub:\n\n```{r, eval = FALSE}\npak::pak(\"mlr-org/mlr3hyperband\")\n```\n\n## Examples\n\nWe optimize the hyperparameters of an XGBoost model on the [Sonar](https://mlr3.mlr-org.com/reference/mlr_tasks_sonar.html) data set.\nThe number of boosting rounds `nrounds` is the fidelity parameter.\nWe tag this parameter with `\"budget\"` in the search space.\n\n```{r}\nlibrary(mlr3hyperband)\nlibrary(mlr3learners)\n\nlearner = lrn(\"classif.xgboost\",\n  nrounds           = to_tune(p_int(27, 243, tags = \"budget\")),\n  eta               = to_tune(1e-4, 1, logscale = TRUE),\n  max_depth         = to_tune(1, 20),\n  colsample_bytree  = to_tune(1e-1, 1),\n  colsample_bylevel = to_tune(1e-1, 1),\n  lambda            = to_tune(1e-3, 1e3, logscale = TRUE),\n  alpha             = to_tune(1e-3, 1e3, logscale = TRUE),\n  subsample         = to_tune(1e-1, 1)\n)\n```\n\nWe use the `tune()` function to run the optimization.\n\n```{r}\ninstance = tune(\n  tnr(\"hyperband\", eta = 3),\n  task = tsk(\"pima\"),\n  learner = learner,\n  resampling = rsmp(\"cv\", folds = 3),\n  measures = msr(\"classif.ce\")\n)\n```\n\nThe instance contains the best-performing hyperparameter configuration.\n\n```{r}\ninstance$result\n```\n\nThe archive contains all evaluated hyperparameter configurations.\nHyperband adds the `\"stage\"` and `\"braket\"`.\n\n```{r}\nas.data.table(instance$archive)[, .(stage, bracket, classif.ce, nrounds)]\n```\n\nWe fit a final model with optimized hyperparameters to make predictions on new data.\n\n```{r}\nlearner$param_set$values = instance$result_learner_param_vals\nlearner$train(tsk(\"sonar\"))\n```\n\n## References\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlr-org%2Fmlr3hyperband","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlr-org%2Fmlr3hyperband","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlr-org%2Fmlr3hyperband/lists"}