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/robust-product/product.js

29 lines
583 B

"use strict"
var robustSum = require("robust-sum")
var robustScale = require("robust-scale")
module.exports = robustProduct
function robustProduct(a, b) {
if(a.length === 1) {
return robustScale(b, a[0])
}
if(b.length === 1) {
return robustScale(a, b[0])
}
if(a.length === 0 || b.length === 0) {
return [0]
}
var r = [0]
if(a.length < b.length) {
for(var i=0; i<a.length; ++i) {
r = robustSum(r, robustScale(b, a[i]))
}
} else {
for(var i=0; i<b.length; ++i) {
r = robustSum(r, robustScale(a, b[i]))
}
}
return r
}