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.
44 lines
782 B
44 lines
782 B
'use strict';
|
|
|
|
var path = require('path');
|
|
var utils = require('lazy-cache')(require);
|
|
var fn = require;
|
|
require = utils;
|
|
|
|
/**
|
|
* Lazily required module dependencies
|
|
*/
|
|
|
|
require('isobject', 'isObject');
|
|
require('map-config', 'mapper');
|
|
require('resolve-dir', 'resolve');
|
|
require = fn;
|
|
|
|
/**
|
|
* Try to require a module, fail silently if not found.
|
|
*/
|
|
|
|
utils.tryRequire = function(name, cwd) {
|
|
try {
|
|
return require(name);
|
|
} catch (err) {};
|
|
return require(path.resolve(cwd || process.cwd(), name));
|
|
};
|
|
|
|
/**
|
|
* Cast the given value to an array
|
|
*/
|
|
|
|
utils.arrayify = function(val) {
|
|
if (!val) return [];
|
|
if (typeof val === 'string') {
|
|
return val.split(',');
|
|
}
|
|
return Array.isArray(val) ? val : [val];
|
|
};
|
|
|
|
/**
|
|
* Expose `utils` modules
|
|
*/
|
|
|
|
module.exports = utils;
|
|
|