GithubHelp home page GithubHelp logo

API documentation? about druidjs HOT 4 CLOSED

saehm avatar saehm commented on May 15, 2024
API documentation?

from druidjs.

Comments (4)

saehm avatar saehm commented on May 15, 2024 1

Hey,

the documentation for FASTMAP is here: https://saehm.github.io/DruidJS/FASTMAP.html

I hope this helps!

from druidjs.

saehm avatar saehm commented on May 15, 2024 1

I checked your notebook, and the druid code.

For me, the notebook works for the iterative methods with this:

result = Generators.observe(
  worker(
    function dr({ dr_method, data }) {
      return druid[dr_method].generator(data, {});
    },
    { dr_method, data },
    `
importScripts(${JSON.stringify(
      await require.resolve("@saehrimnir/druidjs@^0.7.1") // note: version 0.7 changes the API, breaking FASTMAP to PCA in this notebook. See https://observablehq.com/@saehrimnir/hello-druidjs/2
    )});
`
  )
)

The generator function just calls the transform function and returns its results, maybe i need to use yield instead?

All the methods work for me with the transform function return druid[dr_method].transform(data, {});.

The second parameter {} is (as a workaround) needed for the DR methods which have a neighbors parameter.

from druidjs.

saehm avatar saehm commented on May 15, 2024 1

I fixed the issue of the methods which need a neighbor parameter.
I already added the generator function for all DR methods when you were talking about this here: #13 (comment).
But they did not work yet. With version 0.7.3, your notebook works for all DR techniques with your code, but also with this code:

result = Generators.observe(
  worker(
    function dr({ dr_method, data }) {
      return druid[dr_method].generator(data); // show the steps
    },
    { dr_method, data },
    `
importScripts(${JSON.stringify(
      await require.resolve("@saehrimnir/druidjs@^0.7.3")
    )});
`
  )
)

from druidjs.

Fil avatar Fil commented on May 15, 2024

I see. So we need one of:

 yield druid[dr_method].transform(data, {});
 yield* druid[dr_method].generator(data, {});

How can I distinguish the methods that have a working generator? (I think it's the same question as #13 (comment) :) )

from druidjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.