{"id":15655201,"url":"https://github.com/mayer79/metricsweighted","last_synced_at":"2025-09-05T03:41:07.642Z","repository":{"id":44787746,"uuid":"197969599","full_name":"mayer79/MetricsWeighted","owner":"mayer79","description":"R package for weighted model metrics","archived":false,"fork":false,"pushed_at":"2025-04-12T18:26:33.000Z","size":2405,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-29T17:03:47.089Z","etag":null,"topics":["machine-learning","metrics","performance","r","r-package","rstats","statistics"],"latest_commit_sha":null,"homepage":"https://mayer79.github.io/MetricsWeighted/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mayer79.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","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-07-20T18:48:17.000Z","updated_at":"2025-04-12T18:21:10.000Z","dependencies_parsed_at":"2024-01-27T22:30:48.723Z","dependency_job_id":"dd1e6c17-84c8-49d3-81bb-ce9fe1e86ff3","html_url":"https://github.com/mayer79/MetricsWeighted","commit_stats":{"total_commits":87,"total_committers":3,"mean_commits":29.0,"dds":0.03448275862068961,"last_synced_commit":"6ebbab3f723e0f311d7f8dd938a6bec1a2a8caaf"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/mayer79/MetricsWeighted","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayer79%2FMetricsWeighted","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayer79%2FMetricsWeighted/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayer79%2FMetricsWeighted/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayer79%2FMetricsWeighted/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mayer79","download_url":"https://codeload.github.com/mayer79/MetricsWeighted/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mayer79%2FMetricsWeighted/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262632323,"owners_count":23340213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["machine-learning","metrics","performance","r","r-package","rstats","statistics"],"created_at":"2024-10-03T12:56:59.446Z","updated_at":"2025-06-29T17:03:49.416Z","avatar_url":"https://github.com/mayer79.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# {MetricsWeighted} \u003ca href='https://github.com/mayer79/MetricsWeighted'\u003e\u003cimg src='man/figures/logo.png' align=\"right\" height=\"139\"/\u003e\u003c/a\u003e\r\n\r\n\u003c!-- badges: start --\u003e\r\n\r\n[![R-CMD-check](https://github.com/mayer79/MetricsWeighted/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/mayer79/MetricsWeighted/actions/workflows/R-CMD-check.yaml)\r\n[![Codecov test coverage](https://codecov.io/gh/mayer79/MetricsWeighted/graph/badge.svg)](https://app.codecov.io/gh/mayer79/MetricsWeighted)\r\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/MetricsWeighted)](https://cran.r-project.org/package=MetricsWeighted)\r\n[![](https://cranlogs.r-pkg.org/badges/MetricsWeighted)](https://cran.r-project.org/package=MetricsWeighted) \r\n[![](https://cranlogs.r-pkg.org/badges/grand-total/MetricsWeighted?color=orange)](https://cran.r-project.org/package=MetricsWeighted)\r\n\r\n\u003c!-- badges: end --\u003e\r\n\r\n## Overview\r\n\r\n{MetricsWeighted} provides weighted and unweighted versions of metrics and performance measures for machine learning.\r\n\r\n## Installation\r\n\r\n```r\r\n# From CRAN\r\ninstall.packages(\"MetricsWeighted\")\r\n\r\n# Development version\r\ndevtools::install_github(\"mayer79/MetricsWeighted\")\r\n```\r\n\r\n## Usage\r\n\r\nThere are two ways to apply the package. We will go through them in the following examples. Please have a look at the vignette on CRAN for further information and examples. \r\n\r\n### Example 1: Standard interface\r\n\r\n``` r\r\nlibrary(MetricsWeighted)\r\n\r\ny \u003c- 1:10\r\npred \u003c- c(2:10, 14)\r\n\r\nrmse(y, pred)            # 1.58\r\nrmse(y, pred, w = 1:10)  # 1.93\r\n\r\nr_squared(y, pred)       # 0.70\r\nr_squared(y, pred, deviance_function = deviance_gamma)  # 0.78\r\n\r\n```\r\n\r\n### Example 2: data.frame interface\r\n\r\nUseful, e.g., in a {dplyr} chain.\r\n\r\n``` r\r\ndat \u003c- data.frame(y = y, pred = pred)\r\n\r\nperformance(dat, actual = \"y\", predicted = \"pred\")\r\n\r\n\u003e metric    value\r\n\u003e   rmse 1.581139\r\n\r\nperformance(\r\n  dat, \r\n  actual = \"y\", \r\n  predicted = \"pred\", \r\n  metrics = list(rmse = rmse, `R-squared` = r_squared)\r\n)\r\n\r\n\u003e    metric     value\r\n\u003e      rmse 1.5811388\r\n\u003e R-squared 0.6969697\r\n```\r\n\r\nCheck out the vignette for more applications.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayer79%2Fmetricsweighted","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmayer79%2Fmetricsweighted","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayer79%2Fmetricsweighted/lists"}