StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.2 KiB
58 lines
1.2 KiB
4 years ago
|
# fast-isnumeric
|
||
|
|
||
|
The fast way to check if a JS object is numeric
|
||
|
|
||
|
### Install
|
||
|
|
||
|
```
|
||
|
npm install fast-isnumeric
|
||
|
```
|
||
|
|
||
|
### API
|
||
|
|
||
|
```js
|
||
|
var isNumeric = require('fast-isnumeric');
|
||
|
|
||
|
isNumeric(/* any JS object */);
|
||
|
```
|
||
|
|
||
|
### How fast
|
||
|
|
||
|
Run comparison on jsperf: http://jsperf.com/isnumeric-jquery-and-alternate/5
|
||
|
|
||
|

|
||
|
|
||
|
### Warning
|
||
|
|
||
|
Please look up the test cases in
|
||
|
[test.js](https://github.com/plotly/fast-isnumeric/blob/master/test.js) before
|
||
|
using this module.
|
||
|
|
||
|
Most importantly, `fast-isnumeric` returns false on number and string
|
||
|
constructors. That is, `isNumeric(new Number(1))` and `isNumeric(new
|
||
|
String('1'))` are **false**.
|
||
|
|
||
|
### Tests
|
||
|
|
||
|
Test locally with karma:
|
||
|
|
||
|
```
|
||
|
npm test
|
||
|
```
|
||
|
|
||
|
### Why?
|
||
|
|
||
|
In [plotly](https://plot.ly/)'s javascript graphing library
|
||
|
[plotly.js](https://plot.ly/javascript/) numerical objects must be accounted
|
||
|
for in numerous hot code paths. Inspired by Jon Schlinkert's
|
||
|
[is-number](https://github.com/jonschlinkert/is-number), `fast-isnumeric` is
|
||
|
significantly simplified and sped up by ignoring number and string constructors.
|
||
|
|
||
|
### Author
|
||
|
|
||
|
Alex Johnson | https://github.com/alexcjohnson
|
||
|
|
||
|
### License
|
||
|
|
||
|
Copyright (c) 2015 Alex Johnson Released under the MIT license.
|