Code Monkey home page Code Monkey logo

naive-bayes-api's Introduction

Naive Bayes API

A Firebase powered API that allows you to build and train your own Machine Learning models and impress all of your friends and make you really rich and popular.

Installation

git clone https://github.com/matthieunelmes/naive-bayes-api.git
cd naive-bayes-api
npm install

Setting up Firebase

Setup a new Firebase project at firebase.google.com Within the newly created project dashboard, click Database on the side menu and select Create database under the real-time database section.

Next, you need to download the connection credentials which will allow the application to connect to the database. To do this go to: Project Overview -> Project Settings -> Service accounts. Make note of the databaseURL then click generate a new private key. This'll download a json file which contains your connection credentials.

Create a copy of example.env and rename to .env Then copy across the values from the json file which you just downloaded from Firebase. The FIREBASE_URL is the databaseURL from the previous step.

Running

npm start

Starts local dev environment on localhost:9311

Endpoints

Endpoint Desc Type Params Returns
/api/models Get list of models GET n/a (array) model
/api/model/ Get single model GET n/a (object) model
/api/model Create new model POST name (id) model-id
/api/model//addItem Add trained item to model POST modelId, text, classification (id) modelItemId
/api/model//train Train model GET n/a (bool) training complete
/api/model//test Test model accuracy GET n/a (object) model accuracy
/api/model//classify Classify test against pre-trained model POST text (object) classification

Example

//TODO

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

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.