Giter Club home page Giter Club logo

predictionio-template-recommendation-sparklingwater's Introduction

Sparkling Water-Deep Learning Engine Template

This engine template has integrated Sparkling Water's Deep Learning Model by default.

Overview

This Engine Template demonstrates an energy forecasting engine. It integrates Deep Learning from the Sparkling Water library to perform energy analysis. We can query the circuit and time, and return predicted energy usage.

Usage

Event Data Requirements

By default, the engine requires the following events to be collected:

  • Circuit ID
  • Time
  • Energy

Input Query

  • Circuit ID
  • Time

Output PredictedResult

  • Energy Consumption

Dataset Format

Your data should be in csv format, with the following constraints:

  • Row 0 of the dataset must contain integers representing Circuit IDs.
  • Column 0 of the dataset must contain integers representing Time.
  • All other rows and columns should contain integers or doubles representing Energy data. Empty cells are ignored.

The file data/sample_data.csv is included for reference.

1. Run PredictionIO

If PredictionIO is not installed, install it here.

Start all components (Event Server, Elaticsearch, and HBase).

Note: If pio-start-all is not recognized, upgrade to the latest version of PredictionIO.

$ pio-start-all

Verify the status of components:

$ pio status

2. Download the Engine Template

git clone https://github.com/BensonQiu/predictionio-template-recommendation-sparklingwater

3. Create a new application

$ pio app new [YourAppName]

The console output should include the App Name, App ID, and Access Key. You will need the App ID and Access Key in future steps. You can view your applications by entering pio app list.

4. Import Data to the Event Server

Install the PredictionIO Python SDK:

$ pip install predictionio

or

$ easy_install predictionio

From the root directory of your engine, run:

$ python data/import_eventserver.py --access_key [YourAccessKeyFromStep3] --file [/path/to/your/data]

5. Build, Train, and Deploy the Engine

From the root directory of your engine, find engine.json and verify that the appId matches the App Id of your application from Step 3.

 ...
  "datasource": {
    "params" : {
      "appId": 1
    }
  },
  ...

Build the engine.

$ pio build

Train the engine. This may take several minutes.

$ pio train

Deploy the engine. This may take several minutes.

$ pio deploy

After deploying successfully, you can view the status of your engine at http://localhost:8000.

6. Using the Engine

To do a sample query, run python query.py from the root directory of your engine. Customize the query by modifying the JSON { circuitId: 1, time: "1422985500" } in query.py. The engine will return a JSON object containing predicted energy usage.

predictionio-template-recommendation-sparklingwater's People

Contributors

bensonqiu avatar k4hoo avatar dszeto avatar

Watchers

James Cloos avatar  avatar

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.