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.
 
 
 
 
StackGenVis/frontend/node_modules/compare-cell/test/brute.js

36 lines
696 B

'use strict'
var tape = require('tape')
var compare = require('../compare')
tape('brute force check', function(t) {
function seq(d, n, cb) {
var comb = new Array(d)
function rec(i) {
if(i === d) {
cb(comb)
} else for(var j=0; j<n; ++j) {
comb[i] = j
rec(i+1)
}
}
rec(0)
}
for(var i=1; i<=4; ++i) {
seq(i, 5, function(a) {
seq(i, 5, function(b) {
var d = compare(a, b)
var x = a.slice().sort().join()
var y = b.slice().sort().join()
if(x === y) {
t.ok(d === 0, x + ' == ' + y)
} else {
t.ok(d !== 0, x + ' != ' + y)
}
})
})
}
t.end()
})