How to use the vega-statistics.randomKDE function in vega-statistics

To help you get started, we’ve selected a few vega-statistics examples, based on popular ways it is used in public projects.

github vega / vega / packages / vega-transforms / src / KDE.js View on Github external
groups.forEach(g => {
      const density = randomKDE(g, bandwidth)[method],
            scale = _.counts ? g.length : 1,
            local = domain || extent(g);

      sampleCurve(density, local, minsteps, maxsteps).forEach(v => {
        const t = {};
        for (let i=0; i<names.length; ++i) {
          t[names[i]] = g.dims[i];
        }
        t[as[0]] = v[0];
        t[as[1]] = v[1] * scale;
        values.push(ingest(t));
      });
    });

vega-statistics

Statistical routines and probability distributions.

BSD-3-Clause
Latest version published 7 months ago

Package Health Score

87 / 100
Full package analysis

Similar packages