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/rat-vec/test/cmp.js

52 lines
998 B

4 years ago
var test = require('tape');
var cmp = require('../cmp')
var rv = require('../index');
test('ensure equal is 0', function(t) {
var a = rv([0, 1])
var b = rv([0, 1]);
t.deepEqual(cmp(a, b), [0, 0], '[0, 0]');
t.end();
});
test('ensure less is -1', function(t) {
var a = rv([-5.5, -2.5])
var b = rv([5.5, 2.5]);
t.deepEqual(cmp(a, b), [-1, -1], '[-1, -1]');
t.end();
});
test('ensure greater is 1', function(t) {
var a = rv([5.5, 2.5])
var b = rv([-5.5, -2.5]);
t.deepEqual(cmp(a, b), [1, 1], '[1, 1]');
t.end();
});
test('cmp mixed [0, -1]', function(t) {
var a = rv([1, -2.5])
var b = rv([1, 2.5]);
t.deepEqual(cmp(a, b), [0, -1], '[0, -1]');
t.end();
});
test('cmp mixed [-1, 1]', function(t) {
var a = rv([-1, 2.5])
var b = rv([1, -2.5]);
t.deepEqual(cmp(a, b), [-1, 1], '[-1, 1]');
t.end();
});
test('cmp mixed [1, -1]', function(t) {
var a = rv([1,-2.5])
var b = rv([-1, 2.5]);
t.deepEqual(cmp(a, b), [1, -1], '[1, -1]');
t.end();
});