# CustomerScoringMetrics 1.0.0 (CRAN)

Evaluation Metrics for Customer Scoring Models Depending on Binary Classifiers

[Record of 1.0.0](/cran/CustomerScoringMetrics/v/1.0.0.md) | Compare: [With another package](/compare/CustomerScoringMetrics.md#add), [Downloads](/downloads/compare/CustomerScoringMetrics.md#add) | [Licences](/cran/CustomerScoringMetrics/licences.md) | [SBOM](/cran/CustomerScoringMetrics/sbom.md)

Install from CRAN: `install.packages("CustomerScoringMetrics")`

Also from:

- r2u (Ubuntu binaries): `sudo apt install r-cran-customerscoringmetrics` _Listed from recorded download activity on this channel, not from a live index, so read it as last known. Bioconductor packages are named r-bioc-<name> there._
- Fedora COPR (iucar/cran): `sudo dnf install R-CRAN-CustomerScoringMetrics` _A rebuild of what CRAN lists, so it can lag CRAN by a rebuild._
- autoCRAN (openSUSE): `sudo zypper install R-CustomerScoringMetrics` _Listed from recorded download activity on this channel, not from a live index, so read it as last known._

- CRAN checks: OK (notes on 2 of 13)
- CRAN 30-day downloads: 234 (down 13.7% on the 30 days before, the worse direction)
- Dependent packages: 0 (none suggest it)
- Test coverage: No tests (nothing to run)
- Advisories: None known

## About

[Method](/about/licenses.md)

Functions for evaluating and visualizing predictive model performance (specifically: binary classifiers) in the field of customer scoring. These metrics include lift, lift index, gain percentage, top-decile lift, F1-score, expected misclassification cost and absolute misclassification cost.

**Full description**

Functions for evaluating and visualizing predictive model performance (specifically: binary classifiers) in the field of customer scoring. These metrics include lift, lift index, gain percentage, top-decile lift, F1-score, expected misclassification cost and absolute misclassification cost. See Berry & Linoff (2004, ISBN:0-471-47064-3), Witten and Frank (2005, 0-12-088407-0) and Blattberg, Kim & Neslin (2008, ISBN:978–0–387–72578–9) for details. Visualization functions are included for lift charts and gain percentage charts. All metrics that require class predictions offer the possibility to dynamically determine cutoff values for transforming real-valued probability predictions into class predictions.

- Maintainer: Koen W. De Bock
- Licence: [GPL (>= 2)](/cran/CustomerScoringMetrics/licences.md)
- Latest release: 6 Apr 2018
- First release: 6 Apr 2018

- [CRAN page](https://cran.r-project.org/package=CustomerScoringMetrics)
- [Source of every release](https://github.com/cran/CustomerScoringMetrics)

[Compare with another package](/compare/CustomerScoringMetrics.md#add)

**More details**

- Releases: 1
- Needs compilation: No
- LazyData: true
- RoxygenNote: 6.0.1

**Subjects (1) [Method](/about/subjects.md#found)**

- [Wearable activity data](/topics/subjects/wearable-activity-data.md)

**Cite**

#### Package

Run in R for the authors' preferred citation:

`citation("CustomerScoringMetrics")`

#### R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA: Balamuta, J. J. (2026). R Observatory: Metrics for CustomerScoringMetrics version 1.0.0 [Data set]. HJJB, LLC. Data release v2026-10-28. https://doi.org/10.5281/zenodo.21843040

BibTeX:

```
@misc{robservatoryCustomerScoringMetrics,
  author    = {Balamuta, James Joseph},
  title     = {{R} {Observatory}: Metrics for {CustomerScoringMetrics} version 1.0.0},
  year      = {2026},
  publisher = {HJJB, LLC},
  doi       = {10.5281/zenodo.21843040},
  url       = {https://r-observatory.thecoatlessprofessor.com/packages/CustomerScoringMetrics},
  note      = {Data set. Data release v2026-10-28}
}
```

From data release v2026-10-28, which the citation names so these numbers can be found later.

## Health

[Method](/about/checks-health.md)

No warnings or errors. 2 of 13 check platforms have notes.

13 CRAN platforms: 2 Note, 11 OK.

**Check output (1)**

**CRAN incoming feasibility**, Note on 2 platforms

```
Maintainer: ‘Koen W. De Bock <kdebock@audencia.com>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: person(given = c("Koen", "W."),
                    family = "De Bock",
                    role = c("aut", "cre"),
                    email = "kdebock@audencia.com")
as necessary.
```

Platforms now:

- r-devel-linux-x86_64-debian-clang: Note
- r-devel-linux-x86_64-debian-gcc: Note
- r-devel-linux-x86_64-fedora-clang: OK
- r-devel-linux-x86_64-fedora-gcc: OK
- r-devel-windows-x86_64: OK
- r-oldrel-macos-arm64: OK
- r-oldrel-macos-x86_64: OK
- r-oldrel-windows-x86_64: OK
- r-patched-linux-x86_64: OK
- r-release-linux-x86_64: OK
- r-release-macos-arm64: OK
- r-release-macos-x86_64: OK
- r-release-windows-x86_64: OK

[Check results on CRAN](https://cran.r-project.org/web/checks/check_results_CustomerScoringMetrics.html)

## Downloads

[Method](/about/downloads.md)

- Downloads in the last 30 days: 239 (down 16.4% on the 30 days before, the worse direction. It is the sum of 3 channels: CRAN, r2u and autoCRAN.)

CRAN alone: rank among CRAN packages, last 30 days: 19,381 of 26,530.

| Channel | Downloads in the last 30 days | In the total | Rank in that channel | Change |
| --- | ---: | --- | --- | --- |
| CRAN | 234 | yes | 19,381 of 26,530 | down 13.7% on the 30 days before, the worse direction |
| r2u | 2 | yes | 14,902 of 30,526 | down 66.7% on the 30 days before, the worse direction |
| autoCRAN | 3 | yes | 17,776 of 29,212 | down 66.7% on the 30 days before, the worse direction |

Other windows: [Last 90 days](/cran/CustomerScoringMetrics.md?win=90d#downloads), [Last 365 days](/cran/CustomerScoringMetrics.md?win=365d#downloads), [All time](/cran/CustomerScoringMetrics.md?win=all#downloads).

To leave channels out of the total, name them in the address, joined by dots: `?off=r2u.autocran`.

#### Over time

Downloads over time, the last 12 whole months:

| Month | CRAN | r2u | autoCRAN | Sum |
| --- | ---: | ---: | ---: | ---: |
| Oct 2025 | 476 | 3 | no figure | 479 |
| Nov 2025 | 333 | 3 | no figure | 336 |
| Dec 2025 | 220 | 9 | no figure | 229 |
| Jan 2026 | 176 | 4 | no figure | 180 |
| Feb 2026 | 167 | 6 | no figure | 173 |
| Mar 2026 | 257 | 14 | no figure | 271 |
| Apr 2026 | 224 | 17 | no figure | 241 |
| May 2026 | 147 | 10 | no figure | 157 |
| Jun 2026 | 177 | no figure | no figure | 177 |
| Jul 2026 | 140 | 13 | no figure | 153 |
| Aug 2026 | 148 | 6 | 24 | 178 |
| Sep 2026 | 276 | no figure | 5 | 281 |

First day on record: CRAN 6 Apr 2018, r2u 22 May 2022, autoCRAN 2 Jul 2026.

Every channel here counts downloads, so the channels can be stacked and summed for one period. Each channel counts in its own way and covers a different span of years, so read a sum as a rough total, and read a rise where a channel begins as that channel starting, not as growth.

Weeks start on Monday. A first or last week or month that the channel does not cover in full is left out, so every point is a whole period.

Days with no record add nothing to their week or month. For a little-used package that is usually a day with no downloads, but it can also be a gap in collection.

[Compare downloads](/downloads/compare/CustomerScoringMetrics.md#add)

## Dependencies

[Method](/about/reverse-dependencies.md)

- Needs: 0
- Dependent packages: 0
- Suggested by: 0

## Code

[Method](/about/code-metrics.md)

Selected function: `dynConfMatrix`

- Kind: Public R function
- File: R/dynConfMatrix.R, line 42
- Lines: 46
- Complexity: 11

Called by 4: [`dynAccuracy`](/cran/CustomerScoringMetrics.md?fn=dynAccuracy&view=focus#code), [`expMisclassCost`](/cran/CustomerScoringMetrics.md?fn=expMisclassCost&view=focus#code), [`misclassCost`](/cran/CustomerScoringMetrics.md?fn=misclassCost&view=focus#code), [`confMatrixMetrics`](/cran/CustomerScoringMetrics.md?fn=confMatrixMetrics&view=focus#code)

Calls 1: [`checkDepVector`](/cran/CustomerScoringMetrics.md?fn=checkDepVector&view=focus#code)

Paths: 2 steps each way.

Called by 4:

- [`dynAccuracy`](/cran/CustomerScoringMetrics.md?fn=dynAccuracy&view=focus#code), called by 1
  - [`cutoffSensitivityPlot`](/cran/CustomerScoringMetrics.md?fn=cutoffSensitivityPlot&view=focus#code)
- [`expMisclassCost`](/cran/CustomerScoringMetrics.md?fn=expMisclassCost&view=focus#code), called by 1
  - [`cutoffSensitivityPlot`](/cran/CustomerScoringMetrics.md?fn=cutoffSensitivityPlot&view=focus#code)
- [`misclassCost`](/cran/CustomerScoringMetrics.md?fn=misclassCost&view=focus#code), called by 1
  - [`cutoffSensitivityPlot`](/cran/CustomerScoringMetrics.md?fn=cutoffSensitivityPlot&view=focus#code)
- [`confMatrixMetrics`](/cran/CustomerScoringMetrics.md?fn=confMatrixMetrics&view=focus#code)

Calls 1:

- [`checkDepVector`](/cran/CustomerScoringMetrics.md?fn=checkDepVector&view=focus#code)

The open file in the files map is `R/dynConfMatrix.R`.

- Functions: 1
- Lines: 46
- Calls that stay inside it: 0
- Calls to other files: 1, to 1
- Calls from other files: 4, from 4

It calls: `R/checkDepVector.R` (1 call)

Called from: `R/confMatrixMetrics.R` (1 call), `R/dynAccuracy.R` (1 call), `R/expMisclassCost.R` (1 call), `R/misclassCost.R` (1 call)

| Function in dynConfMatrix.R | Calls in other files |
| --- | --- |
| [`dynConfMatrix`](/cran/CustomerScoringMetrics.md?fn=dynConfMatrix&view=focus#code) selected | [`checkDepVector`](/cran/CustomerScoringMetrics.md?fn=checkDepVector&view=focus#code) |


The whole package has 13 function names in 13 files and 24 calls between them. Most calls between files: `R/checkDepVector.R` and `R/confMatrixMetrics.R` (1 call), `R/confMatrixMetrics.R` and `R/dynConfMatrix.R` (1 call), `R/checkDepVector.R` and `R/cumGainsChart.R` (1 call), `R/cumGainsChart.R` and `R/cumGainsTable.R` (1 call), `R/checkDepVector.R` and `R/cumGainsTable.R` (1 call).

Graph: the whole call graph has 13 function names that take part in a call and 24 calls between them, set out in 4 layers with callers before what they call. Called by the most functions: `checkDepVector` (12), `dynConfMatrix` (4), `liftTable` (4), `cumGainsTable` (1), `dynAccuracy` (1). Calling the most functions: `cutoffSensitivityPlot` (4), `cumGainsTable` (2), `dynAccuracy` (2), `expMisclassCost` (2), `misclassCost` (2).

Most connected functions: [`checkDepVector`](/cran/CustomerScoringMetrics.md?fn=checkDepVector&view=focus#code) 12, [`dynConfMatrix`](/cran/CustomerScoringMetrics.md?fn=dynConfMatrix&view=focus#code) 5, [`liftTable`](/cran/CustomerScoringMetrics.md?fn=liftTable&view=focus#code) 5, [`cutoffSensitivityPlot`](/cran/CustomerScoringMetrics.md?fn=cutoffSensitivityPlot&view=focus#code) 4, [`cumGainsTable`](/cran/CustomerScoringMetrics.md?fn=cumGainsTable&view=focus#code) 3, [`dynAccuracy`](/cran/CustomerScoringMetrics.md?fn=dynAccuracy&view=focus#code) 3

To select another function, add ?fn=NAME to this address.

The call graph also has an address of its own: /cran/CustomerScoringMetrics/graph.md?fn=dynConfMatrix&view=focus

- Functions: 13
- Public exports: 13
- Lines of R code: 585
- Median complexity: 2

**Functions (13)**

| Function (sorted, low to high) | Kind | File | Lines | Complexity |
| --- | --- | --- | ---: | ---: |
| [`checkDepVector`](/cran/CustomerScoringMetrics.md?fn=checkDepVector#code) | Public | R/checkDepVector.R | 9 | 3 |
| [`confMatrixMetrics`](/cran/CustomerScoringMetrics.md?fn=confMatrixMetrics#code) | Public | R/confMatrixMetrics.R | 18 | 5 |
| [`cumGainsChart`](/cran/CustomerScoringMetrics.md?fn=cumGainsChart#code) | Public | R/cumGainsChart.R | 6 | 1 |
| [`cumGainsTable`](/cran/CustomerScoringMetrics.md?fn=cumGainsTable#code) | Public | R/cumGainsTable.R | 8 | 1 |
| [`cutoffSensitivityPlot`](/cran/CustomerScoringMetrics.md?fn=cutoffSensitivityPlot#code) | Public | R/cutoffSensitivityPlot.R | 27 | 7 |
| [`dynAccuracy`](/cran/CustomerScoringMetrics.md?fn=dynAccuracy#code) | Public | R/dynAccuracy.R | 7 | 1 |
| [`dynConfMatrix`](/cran/CustomerScoringMetrics.md?fn=dynConfMatrix#code) | Public | R/dynConfMatrix.R | 46 | 11 |
| [`expMisclassCost`](/cran/CustomerScoringMetrics.md?fn=expMisclassCost#code) | Public | R/expMisclassCost.R | 11 | 3 |
| [`liftChart`](/cran/CustomerScoringMetrics.md?fn=liftChart#code) | Public | R/liftChart.R | 5 | 1 |
| [`liftIndex`](/cran/CustomerScoringMetrics.md?fn=liftIndex#code) | Public | R/liftIndex.R | 6 | 1 |
| [`liftTable`](/cran/CustomerScoringMetrics.md?fn=liftTable#code) | Public | R/liftTable.R | 37 | 2 |
| [`misclassCost`](/cran/CustomerScoringMetrics.md?fn=misclassCost#code) | Public | R/misclassCost.R | 13 | 4 |

This page lists 1 to 12 of 13 functions. [Next](/cran/CustomerScoringMetrics.md?sort=name&order=asc&fpage=2#functions)

**Size and composition**

#### Lines by kind (1,249)

| Kind | Lines | Share |
| --- | ---: | ---: |
| R code | 585 | 47% |
| Documentation | 664 | 53% |

#### Lines by language

| Language | Lines | Share |
| --- | ---: | ---: |
| Rd | 664 | 53% |
| R | 585 | 47% |

Languages are counted from file extensions.

- Files: 31
- R functions: 13

**Complexity**

- Median: 2
- Mean: 3.15
- Highest: 11
- Median lines per function: 9

_About complexity: Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only._

**Call graph figures**

- R functions: 13
- Calls: 24
- Unconnected: 0
- Groups: 1

## Tests

[Method](/about/coverage.md)

The package was built and has no tests to run.

- Lines of tests: 0
- Exports named in tests: 0%

**Test suite**

- Has tests: No
- Test frameworks: No tests in this release
- Test lines per line of code: 0

## Documentation

[Method](/about/code-metrics.md)

- Exports documented: 100%
- Arguments documented: 96.5%
- Return value documented: 69.2%
- Help pages with examples: 100%
- Examples run in checks: 100%

**Other documentation**

- README: No
- Release notes file: No
- Help pages: 14
- Lines of documentation: 664

## Datasets

[Method](/about/objects.md)

| Dataset | Size |
| --- | --- |
| [response](/cran/CustomerScoringMetrics/data/response.md), response data | length 2 |

## People

[Method](/about/author-identity.md)

- [Koen W. De Bock](/people/Koen+W.+De+Bock.md): Maintainer since 1.0.0 (2018)

## Repository

[Method](/about/repo-signals.md#figures)

No repository on record

## History

[Method](/about/archive.md)

The line runs from the first release of CustomerScoringMetrics on 6 Apr 2018 to 28 Oct 2026 and marks that release.

| Version | Released | R |
| --- | --- | ---: |
| [1.0.0](/cran/CustomerScoringMetrics/v/1.0.0.md) current | 6 Apr 2018 | 3.4.4 |

---

R Observatory is independent of the R Project, CRAN and Bioconductor. The same page for people is at /cran/CustomerScoringMetrics, and every address is listed at /llms.txt.
