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.
29 lines
754 B
29 lines
754 B
// Original - @Gozola.
|
|
// https://gist.github.com/Gozala/1269991
|
|
// This is a reimplemented version (with a few bug fixes).
|
|
|
|
var createStore = require('./create-store.js');
|
|
|
|
module.exports = weakMap;
|
|
|
|
function weakMap() {
|
|
var privates = createStore();
|
|
|
|
return {
|
|
'get': function (key, fallback) {
|
|
var store = privates(key)
|
|
return store.hasOwnProperty('value') ?
|
|
store.value : fallback
|
|
},
|
|
'set': function (key, value) {
|
|
privates(key).value = value;
|
|
return this;
|
|
},
|
|
'has': function(key) {
|
|
return 'value' in privates(key);
|
|
},
|
|
'delete': function (key) {
|
|
return delete privates(key).value;
|
|
}
|
|
}
|
|
}
|
|
|