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.
24 lines
627 B
24 lines
627 B
/**
|
|
* inspired by is-number <https://github.com/jonschlinkert/is-number>
|
|
* but significantly simplified and sped up by ignoring number and string constructors
|
|
* ie these return false:
|
|
* new Number(1)
|
|
* new String('1')
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
var allBlankCharCodes = require('is-string-blank');
|
|
|
|
module.exports = function(n) {
|
|
var type = typeof n;
|
|
if(type === 'string') {
|
|
var original = n;
|
|
n = +n;
|
|
// whitespace strings cast to zero - filter them out
|
|
if(n===0 && allBlankCharCodes(original)) return false;
|
|
}
|
|
else if(type !== 'number') return false;
|
|
|
|
return n - n < 1;
|
|
};
|
|
|