Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mstorm/node-dcg
Discounted cumulative gain (DCG) calculator.
https://github.com/mstorm/node-dcg
Last synced: 4 months ago
JSON representation
Discounted cumulative gain (DCG) calculator.
- Host: GitHub
- URL: https://github.com/mstorm/node-dcg
- Owner: mstorm
- License: mit
- Created: 2017-06-16T17:24:58.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2023-05-04T07:43:11.000Z (over 1 year ago)
- Last Synced: 2024-08-17T03:51:04.005Z (4 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-dcg
[Discounted cumulative gain (DCG)](https://en.wikipedia.org/wiki/Discounted_cumulative_gain) calculator.
## Installation
npm:
```bash
$ npm install node-dcg
```## Usage
```javascript
var dcg = require('node-dcg');var value = dcg.ndcg([3, 0, 1, 2]);
console.log(value);
```