Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
groups.forEach(g => {
const n = g.length;
if (n <= dof) {
pulse.dataflow.warn('Skipping regression with more parameters than data points.');
return;
}
const model = fit(g, _.x, _.y, order);
if (_.params) {
// if parameter vectors requested return those
values.push(ingest({
keys: g.dims,
coef: model.coef,
rSquared: model.rSquared
}));
return;
}
const dom = domain || extent(g, _.x),
add = p => {
const t = {};
for (let i=0; i
groups.forEach(g => {
const q = quantiles(g, p);
for (let i=0; i
var src = this.value,
gen = this.generator, t;
if (!src.length || _.modified()) {
for (var prop in _) {
if (isFunction(gen[prop])) {
gen[prop](_[prop]);
}
}
}
t = gen();
if (src.length) {
pulse.mod.push(replace(src[0], t));
} else {
pulse.add.push(ingest(t));
}
src[0] = t;
return pulse;
};
function defaultItemCreate() {
return ingest({});
}
add = p => {
const t = {};
for (let i=0; i
prototype.newtuple = function(t, p) {
var names = this._dnames,
dims = this._dims,
x = {}, i, n;
for (i=0, n=dims.length; i
values = sampleCurve(method, domain, minsteps, maxsteps).map(v => {
var tuple = {};
tuple[as[0]] = v[0];
tuple[as[1]] = v[1];
return ingest(tuple);
});
function cross(input, a, b, filter) {
var data = [],
t = {},
n = input.length,
i = 0,
j, left;
for (; i
tree.each(function(node) {
var t = node.data,
p = node.parent && node.parent.data;
if (p && lut[tupleid(t)] && lut[tupleid(p)]) {
out.add.push(ingest({source: p, target: t}));
}
});
this.value = out.add;