{
  "_id": "6a1b63e41d7bb097a0a11f12",
  "Package": "themis",
  "Title": "Extra Recipes Steps for Dealing with Unbalanced Data",
  "Version": "1.0.3.9000",
  "Authors@R": "c(\nperson(\"Emil\", \"Hvitfeldt\", , \"emil.hvitfeldt@posit.co\", role = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0002-0679-1945\")),\nperson(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\"),\ncomment = c(ROR = \"03wc8by49\"))\n)",
  "Description": "A dataset with an uneven number of cases in each class is\nsaid to be unbalanced. Many models produce a subpar performance\non unbalanced datasets. A dataset can be balanced by increasing\nthe number of minority cases using SMOTE 2011\n<doi:10.48550/arXiv.1106.1813>, BorderlineSMOTE 2005\n<doi:10.1007/11538059_91> and ADASYN 2008\n<https://ieeexplore.ieee.org/document/4633969>. Or by\ndecreasing the number of majority cases using NearMiss 2003\n<https://www.site.uottawa.ca/~nat/Workshop2003/jzhang.pdf> or\nTomek link removal 1976\n<https://ieeexplore.ieee.org/document/4309452>.",
  "License": "MIT + file LICENSE",
  "URL": "https://github.com/tidymodels/themis,\nhttps://themis.tidymodels.org",
  "BugReports": "https://github.com/tidymodels/themis/issues",
  "Config/Needs/website": "tidyverse/tidytemplate",
  "Config/testthat/edition": "3",
  "Config/usethis/last-upkeep": "2025-04-24",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "Config/pak/sysreqs": "libicu-dev",
  "Repository": "https://tidymodels.r-universe.dev",
  "Date/Publication": "2026-04-10 00:12:25 UTC",
  "RemoteUrl": "https://github.com/tidymodels/themis",
  "RemoteRef": "HEAD",
  "RemoteSha": "76cf8d0add894b8b1151bcd87c1964656c866fad",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-30 22:20:16 UTC",
    "User": "root"
  },
  "Author": "Emil Hvitfeldt [aut, cre] (ORCID:\n<https://orcid.org/0000-0002-0679-1945>),\nPosit Software, PBC [cph, fnd] (ROR: <https://ror.org/03wc8by49>)",
  "Maintainer": "Emil Hvitfeldt <emil.hvitfeldt@posit.co>",
  "MD5sum": "254952991b92c51f8db15ff2c2898d8d",
  "_user": "tidymodels",
  "_type": "src",
  "_file": "themis_1.0.3.9000.tar.gz",
  "_fileid": "0f2f260c682acd938d98cd9a33644b02f7b59889664233e7e6a8f91640d8e656",
  "_filesize": 360670,
  "_sha256": "0f2f260c682acd938d98cd9a33644b02f7b59889664233e7e6a8f91640d8e656",
  "_created": "2026-05-30T22:20:16.000Z",
  "_published": "2026-05-30T22:25:40.363Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 78681670817,
      "time": 191,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7311793861"
    },
    {
      "job": 78681670814,
      "time": 224,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7311796838"
    },
    {
      "job": 78681670822,
      "time": 287,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7311803294"
    },
    {
      "job": 78681670815,
      "time": 123,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7311786899"
    },
    {
      "job": 78681494833,
      "time": 197,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7311774735"
    },
    {
      "job": 78681670825,
      "time": 117,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7311786381"
    },
    {
      "job": 78681670832,
      "time": 155,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7311790176"
    },
    {
      "job": 78681670819,
      "time": 146,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7311790010"
    },
    {
      "job": 78681670824,
      "time": 131,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7311787695"
    }
  ],
  "_buildurl": "https://github.com/r-universe/tidymodels/actions/runs/26696371155",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/tidymodels/themis",
  "_commit": {
    "id": "76cf8d0add894b8b1151bcd87c1964656c866fad",
    "author": "Emil Hvitfeldt <emil.hvitfeldt@posit.co>",
    "committer": "GitHub <noreply@github.com>",
    "message": "More docs (#220)",
    "time": 1775779945
  },
  "_maintainer": {
    "name": "Emil Hvitfeldt",
    "email": "emil.hvitfeldt@posit.co",
    "login": "emilhvitfeldt",
    "bluesky": "@emilhvitfeldt.bsky.social",
    "description": "All things @tidymodels",
    "uuid": 14034784,
    "orcid": "0000-0002-0679-1945"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1",
      "role": "Depends"
    },
    {
      "package": "recipes",
      "version": ">= 1.1.0",
      "role": "Depends"
    },
    {
      "package": "cli",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "generics",
      "version": ">= 0.1.0",
      "role": "Imports"
    },
    {
      "package": "glue",
      "role": "Imports"
    },
    {
      "package": "gower",
      "role": "Imports"
    },
    {
      "package": "hardhat",
      "role": "Imports"
    },
    {
      "package": "lifecycle",
      "version": ">= 1.0.3",
      "role": "Imports"
    },
    {
      "package": "purrr",
      "role": "Imports"
    },
    {
      "package": "RANN",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "version": ">= 1.1.0",
      "role": "Imports"
    },
    {
      "package": "ROSE",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "role": "Imports"
    },
    {
      "package": "vctrs",
      "role": "Imports"
    },
    {
      "package": "withr",
      "role": "Imports"
    },
    {
      "package": "covr",
      "role": "Suggests"
    },
    {
      "package": "dials",
      "version": ">= 1.2.0",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "modeldata",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    }
  ],
  "_owner": "tidymodels",
  "_selfowned": true,
  "_usedby": 2,
  "_updates": [
    {
      "week": "2026-04",
      "n": 1
    },
    {
      "week": "2026-14",
      "n": 8
    },
    {
      "week": "2026-15",
      "n": 18
    }
  ],
  "_tags": [],
  "_stars": 142,
  "_contributors": [
    {
      "user": "emilhvitfeldt",
      "count": 490,
      "uuid": 14034784
    },
    {
      "user": "robertgregg",
      "count": 12,
      "uuid": 44711193
    },
    {
      "user": "topepo",
      "count": 7,
      "uuid": 5731043
    },
    {
      "user": "juliasilge",
      "count": 4,
      "uuid": 12505835
    },
    {
      "user": "hfrick",
      "count": 4,
      "uuid": 12950918
    },
    {
      "user": "jeroenjanssens",
      "count": 2,
      "uuid": 1368256
    },
    {
      "user": "rpln",
      "count": 2,
      "uuid": 14273214
    },
    {
      "user": "jxu",
      "count": 2,
      "uuid": 7989982
    },
    {
      "user": "bebru",
      "count": 1,
      "uuid": 12512888
    },
    {
      "user": "mine-cetinkaya-rundel",
      "count": 1,
      "uuid": 5965649
    },
    {
      "user": "pursuitofdatascience",
      "count": 1,
      "uuid": 54338793
    }
  ],
  "_userbio": {
    "uuid": 29100987,
    "type": "organization",
    "name": "tidymodels"
  },
  "_downloads": {
    "count": 18360,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/themis"
  },
  "_devurl": "https://github.com/tidymodels/themis",
  "_pkgdown": "https://themis.tidymodels.org",
  "_searchresults": 1680,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "extra/themis.html",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/tidymodels/themis",
  "_realowner": "tidymodels",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2020-01-13"
    },
    {
      "version": "0.1.1",
      "date": "2020-05-17"
    },
    {
      "version": "0.1.2",
      "date": "2020-08-14"
    },
    {
      "version": "0.1.3",
      "date": "2020-11-12"
    },
    {
      "version": "0.1.4",
      "date": "2021-06-12"
    },
    {
      "version": "0.2.0",
      "date": "2022-03-30"
    },
    {
      "version": "0.2.1",
      "date": "2022-04-13"
    },
    {
      "version": "0.2.2",
      "date": "2022-05-11"
    },
    {
      "version": "1.0.0",
      "date": "2022-07-02"
    },
    {
      "version": "1.0.1",
      "date": "2023-04-15"
    },
    {
      "version": "1.0.2",
      "date": "2023-08-14"
    },
    {
      "version": "1.0.3",
      "date": "2025-01-23"
    }
  ],
  "_exports": [
    "adasyn",
    "bsmote",
    "nearmiss",
    "required_pkgs",
    "rose",
    "smote",
    "smotenc",
    "step_adasyn",
    "step_bsmote",
    "step_downsample",
    "step_nearmiss",
    "step_rose",
    "step_smote",
    "step_smotenc",
    "step_tomek",
    "step_upsample",
    "tidy",
    "tomek",
    "tunable"
  ],
  "_datasets": [
    {
      "name": "circle_example",
      "title": "Synthetic Dataset With a Circle",
      "object": "circle_example",
      "class": [
        "data.frame"
      ],
      "fields": [
        "x",
        "y",
        "class",
        "id"
      ],
      "rows": 400,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "adasyn",
      "title": "Adaptive Synthetic Algorithm",
      "concept": [
        "Direct Implementations"
      ],
      "topics": [
        "adasyn"
      ]
    },
    {
      "page": "bsmote",
      "title": "borderline-SMOTE Algorithm",
      "concept": [
        "Direct Implementations"
      ],
      "topics": [
        "bsmote"
      ]
    },
    {
      "page": "circle_example",
      "title": "Synthetic Dataset With a Circle",
      "topics": [
        "circle_example"
      ]
    },
    {
      "page": "nearmiss",
      "title": "Remove Points Near Other Classes",
      "concept": [
        "Direct Implementations"
      ],
      "topics": [
        "nearmiss"
      ]
    },
    {
      "page": "rose",
      "title": "ROSE Algorithm",
      "concept": [
        "Direct Implementations"
      ],
      "topics": [
        "rose"
      ]
    },
    {
      "page": "smote",
      "title": "SMOTE Algorithm",
      "concept": [
        "Direct Implementations"
      ],
      "topics": [
        "smote"
      ]
    },
    {
      "page": "smotenc",
      "title": "SMOTENC Algorithm",
      "concept": [
        "Direct Implementations"
      ],
      "topics": [
        "smotenc"
      ]
    },
    {
      "page": "step_adasyn",
      "title": "Apply Adaptive Synthetic Algorithm",
      "concept": [
        "Steps for over-sampling"
      ],
      "topics": [
        "step_adasyn",
        "tidy.step_adasyn"
      ]
    },
    {
      "page": "step_bsmote",
      "title": "Apply borderline-SMOTE Algorithm",
      "concept": [
        "Steps for over-sampling"
      ],
      "topics": [
        "step_bsmote",
        "tidy.step_bsmote"
      ]
    },
    {
      "page": "step_downsample",
      "title": "Down-Sample a Data Set Based on a Factor Variable",
      "concept": [
        "Steps for under-sampling"
      ],
      "topics": [
        "step_downsample",
        "tidy.step_downsample"
      ]
    },
    {
      "page": "step_nearmiss",
      "title": "Remove Points Near Other Classes",
      "concept": [
        "Steps for under-sampling"
      ],
      "topics": [
        "step_nearmiss",
        "tidy.step_nearmiss"
      ]
    },
    {
      "page": "step_rose",
      "title": "Apply ROSE Algorithm",
      "concept": [
        "Steps for over-sampling"
      ],
      "topics": [
        "step_rose",
        "tidy.step_rose"
      ]
    },
    {
      "page": "step_smote",
      "title": "Apply SMOTE Algorithm",
      "concept": [
        "Steps for over-sampling"
      ],
      "topics": [
        "step_smote",
        "tidy.step_smote"
      ]
    },
    {
      "page": "step_smotenc",
      "title": "Apply SMOTENC algorithm",
      "concept": [
        "Steps for over-sampling"
      ],
      "topics": [
        "step_smotenc",
        "tidy.step_smotenc"
      ]
    },
    {
      "page": "step_tomek",
      "title": "Remove Tomek’s Links",
      "concept": [
        "Steps for under-sampling"
      ],
      "topics": [
        "step_tomek",
        "tidy.step_tomek"
      ]
    },
    {
      "page": "step_upsample",
      "title": "Up-Sample a Data Set Based on a Factor Variable",
      "concept": [
        "Steps for over-sampling"
      ],
      "topics": [
        "step_upsample",
        "tidy.step_upsample"
      ]
    },
    {
      "page": "tomek",
      "title": "Remove Tomek's links",
      "concept": [
        "Direct Implementations"
      ],
      "topics": [
        "tomek"
      ]
    }
  ],
  "_pkglogo": "https://github.com/tidymodels/themis/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/tidymodels/themis/raw/HEAD/README.md",
  "_rundeps": [
    "class",
    "cli",
    "clock",
    "codetools",
    "cpp11",
    "data.table",
    "diagram",
    "digest",
    "dplyr",
    "farver",
    "future",
    "future.apply",
    "generics",
    "ggplot2",
    "globals",
    "glue",
    "gower",
    "gtable",
    "hardhat",
    "ipred",
    "isoband",
    "KernSmooth",
    "labeling",
    "lattice",
    "lava",
    "lifecycle",
    "listenv",
    "lubridate",
    "magrittr",
    "MASS",
    "Matrix",
    "nnet",
    "numDeriv",
    "parallelly",
    "pillar",
    "pkgconfig",
    "prodlim",
    "progressr",
    "purrr",
    "R6",
    "RANN",
    "RColorBrewer",
    "Rcpp",
    "recipes",
    "rlang",
    "ROSE",
    "rpart",
    "S7",
    "scales",
    "shape",
    "sparsevctrs",
    "SQUAREM",
    "stringi",
    "stringr",
    "survival",
    "tibble",
    "tidyr",
    "tidyselect",
    "timechange",
    "timeDate",
    "tzdb",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_score": 10.595712812413467,
  "_indexed": true,
  "_nocasepkg": "themis",
  "_universes": [
    "tidymodels",
    "emilhvitfeldt"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.0.3.9000",
      "date": "2026-05-30T22:22:44.000Z",
      "distro": "noble",
      "commit": "76cf8d0add894b8b1151bcd87c1964656c866fad",
      "fileid": "9f4605bfc030dd57b3089672fcc15ca1dca2e159a175432f2c1351c1beb35919",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidymodels/actions/runs/26696371155"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "1.0.3.9000",
      "date": "2026-05-30T22:23:13.000Z",
      "distro": "noble",
      "commit": "76cf8d0add894b8b1151bcd87c1964656c866fad",
      "fileid": "cdbedf98221a707ee0f6a6c1d76cce438081d6ef928ea81e819122709227279f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidymodels/actions/runs/26696371155"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.0.3.9000",
      "date": "2026-05-30T22:24:35.000Z",
      "commit": "76cf8d0add894b8b1151bcd87c1964656c866fad",
      "fileid": "ce52831d884ffd595d8e2822724e475caf4bf1ed86c921bbf6fb72723dbb1a2b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidymodels/actions/runs/26696371155"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "1.0.3.9000",
      "date": "2026-05-30T22:21:54.000Z",
      "commit": "76cf8d0add894b8b1151bcd87c1964656c866fad",
      "fileid": "11fa41abad6271b54f5df0992f7e37abfb0dec5c90eaf3e35e705ef8ebd49bb7",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidymodels/actions/runs/26696371155"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.0.3.9000",
      "date": "2026-05-30T22:22:34.000Z",
      "commit": "76cf8d0add894b8b1151bcd87c1964656c866fad",
      "fileid": "de3134783fac72d376ce4ec161e8fd53ed752b241e5f55f77b529fc877bfa899",
      "status": "success",
      "buildurl": "https://github.com/r-universe/tidymodels/actions/runs/26696371155"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.0.3.9000",
      "date": "2026-05-30T22:21:48.000Z",
      "commit": "76cf8d0add894b8b1151bcd87c1964656c866fad",
      "fileid": "1098e02f1dbc713e0b148e1f09fb424465aa0b01506fa8b5735749b0ce31dd7f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidymodels/actions/runs/26696371155"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.0.3.9000",
      "date": "2026-05-30T22:21:43.000Z",
      "commit": "76cf8d0add894b8b1151bcd87c1964656c866fad",
      "fileid": "5688f131a4964eecd1985472b50ca003be1b31f5f69f821372c27b272c627cee",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidymodels/actions/runs/26696371155"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "1.0.3.9000",
      "date": "2026-05-30T22:21:34.000Z",
      "commit": "76cf8d0add894b8b1151bcd87c1964656c866fad",
      "fileid": "d9b145fdcdb3036f1594afad9b3215acb1d07a09bee31bc21f2052fc7593c2e2",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/tidymodels/actions/runs/26696371155"
    }
  ]
}