Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jubatus

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jubatus

Jubatus client for Node.js (unofficial)

  • 0.9.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

jubatus-node-client

Build Status npm version Codacy Badge Codacy Badge Dependency Status

Jubatus client for Node.js (unofficial)

Usage

See also http://jubat.us/en/api/index.html

Classifier

const jubatus = require("jubatus");

const classifier = new jubatus.classifier.client.Classifier(9199, "localhost");
Train
const datum = new jubatus.common.types.Datum().addString("foo", "bar").addNumber("quux", 0.1);
const labeledDatum = new jubatus.classifier.types.LabeledDatum("baz", datum);
const data = [labeledDatum];

classifier.train(data).then(result => {
    console.error(result);
}).catch(error => {
    console.error(error);
});
Classify
var stringValues = [ [ "foo", "qux" ] ],
    numValues = [ [ "quux", 1 ] ],
    datum = new jubatus.common.types.Datum(stringValues, numValues),
    data = [ datum ];

classifier.classify(data).then(result => {
    result.forEach(estimateResults => {
        var mostLikely = estimateResults
                .reduce((previous, current) => previous.score > current.score ? previous : current);
        console.log("estimate = %j", mostLikely);
    });
}).catch(error => {
    console.error(error);
});

Tutorial

see https://github.com/naokikimura/jubatus-tutorial-node

Keywords

FAQs

Package last updated on 27 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc