{"id":13857980,"url":"https://github.com/smaakage85/modelgrid","last_synced_at":"2026-02-21T17:36:10.746Z","repository":{"id":56937098,"uuid":"136794655","full_name":"smaakage85/modelgrid","owner":"smaakage85","description":"A Minimalistic Framework for Creating, Managing and Training Multiple Caret Models","archived":false,"fork":false,"pushed_at":"2024-05-06T21:42:23.000Z","size":141,"stargazers_count":22,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-09T11:45:43.140Z","etag":null,"topics":["caret","machine-learning","predictive-analytics","predictive-modeling"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smaakage85.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"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":"2018-06-10T09:12:55.000Z","updated_at":"2025-12-06T06:59:50.000Z","dependencies_parsed_at":"2025-07-13T23:31:01.239Z","dependency_job_id":"0d6ae52d-ca73-4ea1-aa1f-978ca6c93d19","html_url":"https://github.com/smaakage85/modelgrid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/smaakage85/modelgrid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smaakage85%2Fmodelgrid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smaakage85%2Fmodelgrid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smaakage85%2Fmodelgrid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smaakage85%2Fmodelgrid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smaakage85","download_url":"https://codeload.github.com/smaakage85/modelgrid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smaakage85%2Fmodelgrid/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29688332,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T15:51:39.154Z","status":"ssl_error","status_checked_at":"2026-02-21T15:49:03.425Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["caret","machine-learning","predictive-analytics","predictive-modeling"],"created_at":"2024-08-05T03:01:53.036Z","updated_at":"2026-02-21T17:36:05.737Z","avatar_url":"https://github.com/smaakage85.png","language":"R","funding_links":[],"categories":["R"],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\"\n)\n```\n\n# modelgrid \u003cimg src=\"man/figures/mglogo.png\" align=\"right\" /\u003e\n\n[![Travis-CI Build Status](https://travis-ci.org/smaakage85/modelgrid.svg?branch=master)](https://travis-ci.org/smaakage85/modelgrid)\n[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/smaakage85/modelgrid?branch=master\u0026svg=true)](https://ci.appveyor.com/project/smaakage85/modelgrid)\n\nThis is a small package offering a minimalistic but flexible framework for \ncreating, managing and training multiple caret models with a bare minimum of code.\n\n## Installation\n\n`modelgrid` can be installed from CRAN with `install.packages('modelgrid')`. \nIf you want the development version then install directly from GitHub:\n\n```{r, eval = FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"smaakage85/modelgrid\")\n```\n\n## Building your first model grid\n\nFirst, pre-allocate an empty model grid with the constructor function `model_grid`.\n\n```{r, message = FALSE}\nlibrary(modelgrid)\nmg \u003c- model_grid()\n\nmg\n```\n\nAs you see, a `model_grid` has three components:\n\n* `shared_settings`: settings to be shared across models. Obvious choices include\nthe target variable, features and resampling scheme.\n* `models`: settings that uniquely identify the indvidual models.\n* `model_fits`: contains the fitted models, once the `model_grid` has been trained.\n\nNext, decide what settings you want to be shared by the models constituting the\n`model_grid`.\n\n```{r, message = FALSE}\nlibrary(dplyr)\nlibrary(lattice)\nlibrary(caret)\ndata(GermanCredit)\n\nmg \u003c-\n  mg %\u003e%\n  share_settings(\n    y = GermanCredit[[\"Class\"]],\n    x = GermanCredit %\u003e% select(-Class),\n    metric = \"ROC\",\n    trControl = trainControl(\n      method = \"cv\",\n      number = 5,\n      summaryFunction = twoClassSummary,\n      classProbs = TRUE\n      )\n  )\n```\n\nOur first model candidate will be a simple Random Forest configuration.\n\n```{r}\nmg \u003c-\n  mg %\u003e%\n  add_model(\n    model_name = \"Funky Forest\",\n    method = \"rf\",\n    tuneLength = 5\n  )\n```\n\nLet us also give an eXtreme Gradient Boosting model a shot.\n\n```{r}\nmg \u003c-\n  mg %\u003e%\n  add_model(\n    model_name = \"Big Boost\",\n    method = \"xgbTree\",\n    nthread = 8\n  )\n```\n\nThat's it. We are all set to train our first very own (extremely simple)\nmodel grid.\n\n```{r, message = FALSE}\nmg \u003c- train(mg)\n```\n\nVisualize performance statistics of final models.\n\n```{r performance_bwplot}\nmg$model_fits %\u003e%\n  resamples(.) %\u003e%\n  bwplot(.)\n```\n\nYou want to know more about all of the exciting features of the `model_grid`? Take a look at the vignette (:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmaakage85%2Fmodelgrid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmaakage85%2Fmodelgrid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmaakage85%2Fmodelgrid/lists"}