Giter Club home page Giter Club logo

csye7200-bigdata-project's Introduction

CSYE7200 Big Data Project

How to start the application

In IntelliJ IDEA

  • (Prerequisites) Install scala and Play framework plugins
  • (Prerequisites) Java version should be 8 (Java 15 also work on Windows)
  • Open build.sbt as a project
  • Open sbt panel on the right hand side, click on tasks -> clean and tasks -> compile to recompile the project
  • Edit run configurations, add a new Play 2 application config, set Play 2 Module as csye7200_project
  • Run the application

APIs

  • /spark/train
    • Start training the ML models and save them to files once complete
    • Training process will be wrapped in Future and response will be returned immediately. Actual training status can be checked in application logs (by default logs/application.log)
  • /spark/infer/lr
    • Logistic regression inference API. Input format can be checked in Postman.
    • Output will be 0 (not popular) or 1 (popular)
  • /spark/infer/rf
    • Random forest inference API. Input format can be checked in Postman.
    • Output will be 0 (not popular) or 1 (popular)
  • /spark/infer_batch/lr
    • Logistic regression Batch inference API. Input should be .csvfile.
    • Output will be a List contains 0 (not popular) or 1 (popular)
  • /spark/infer_batch/rf
    • Random forest Batch inference API. Input should be .csvfile.
    • Output will be a List contains 0 (not popular) or 1 (popular)

GUI

To use the GUI, please follow the instruction here webapp-snapshot

Testing API

We provide 2 methods to test the web APIs

  • Postman
    • Scripts available at postman_test/spark.postman_collection.json. Import it to Postman to start testing.
  • Rest Client
    • Scripts available at restclient_test/request.rest. Open it in VsCode(with rest client extension) to start testing.

Note

  • When you start application first time, you must call the /spark/train API before you request other APIs

Configuration

Application configuration file is conf/application.conf

  • spark - all spark related configuration
    • isLocal - Boolean. Indicate whether Spark session will be run on local
    • LRModelPath - String. Path where logistic regression's pipeline model is saved
    • RFModelPath - String. Path where random forest's pipeline model is saved
    • useCsv - Boolean. Indicate whether we will use processed .csv file as training data input
    • h5FolderPath - String. If useCsv is set to false, all .h5 files under h5FolderPath will be used as training data
    • csvPath - String. Path where the processed .csv file is at. Only used if useCsv is set to true
    • masterIp - String. When running on cluster, the IP address of master node
    • executorMem - String. Memory size assigned to Spark on each cluster executor. e.g. '12g'

Libraries

Library used for reading hdf5 file in scala: https://github.com/jamesmudd/jhdf

csye7200-bigdata-project's People

Contributors

mrniro avatar niftymule avatar eikcaj16 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.