Giter Club home page Giter Club logo

capstone_p2p's Introduction

Data Source:

The data I trained on is from https://www.lendingclub.com/info/download-data.action, and the recomendation listing data from the lending club api. I used python request library to retrive new listings.

APP:

The product I created can be viewed here: http://p2p-invest.herokuapp.com/index

There are two part in the project, first the new listing recommender, I request new listing from the lending club API and make prediction

Secondly, user input current and my app predict the charge off risk left in the time span.

Model:

This is high precision logistic regression model because, from an investor's perspective missing out on a good loan cost much less comparing to having a charge off event.

I pickled the model for each grade and plug it in to my web page.

The framework used for the webapp is flask, and the app is deployed in heroku, detailed instruction below.

flask web sorce code:

More of the how the app works can be viewed here: https://github.com/ella199161/flask-framework

I used a docker enviroment to unsure the program works.

Flask on Heroku

This project is intended to help you tie together some important concepts and technologies from the 12-day course, including Git, Flask, JSON, Pandas, Requests, Heroku, and Bokeh for visualization.

The repository contains a basic template for a Flask configuration that will work on Heroku.

A finished example that demonstrates some basic functionality.

Step 1: Setup and deploy

  • Git clone the existing template repository.

  • Procfile, requirements.txt, conda-requirements.txt, and runtime.txt contain some default settings.

  • There is some boilerplate HTML in templates/

  • Create Heroku application with heroku create <app_name> or leave blank to auto-generate a name.

  • (Suggested) Use the conda buildpack. If you choose not to, put all requirements into requirements.txt

    heroku config:add BUILDPACK_URL=https://github.com/kennethreitz/conda-buildpack.git

    The advantages of conda include easier virtual environment management and fast package installation from binaries (as compared to the compilation that pip-installed packages sometimes require). One disadvantage is that binaries take up a lot of memory, and the slug pushed to Heroku is limited to 300 MB. Another note is that the conda buildpack is being deprecated in favor of a Docker solution (see docker branch of this repo for an example).

  • Deploy to Heroku: git push heroku master

  • You should be able to see your site at https://<app_name>.herokuapp.com

  • A useful reference is the Heroku quickstart guide.

Step 2: Get data from API and put it in pandas

  • Use the requests library to grab some data from a public API. This will often be in JSON format, in which case simplejson will be useful.
  • Build in some interactivity by having the user submit a form which determines which data is requested.
  • Create a pandas dataframe with the data.

Step 3: Use Bokeh to plot pandas data

  • Create a Bokeh plot from the dataframe.
  • Consult the Bokeh documentation and examples.
  • Make the plot visible on your website through embedded HTML or other methods - this is where Flask comes in to manage the interactivity and display the desired content.
  • Some good references for Flask: This article, especially the links in "Starting off", and this tutorial.

capstone_p2p's People

Contributors

ella199161 avatar

Stargazers

Aiden avatar Paul Paczuski avatar col avatar Stefan avatar Liang Tan avatar SusiePanda avatar Danjin SUN avatar Anlu Xing avatar Zhuo Jia avatar Lawrence avatar  avatar  avatar Ying Qian avatar mixolydian avatar Jiayi Tian avatar JasonMa avatar Yang avatar Joshua Jin avatar Chengao Jiang avatar Qi avatar Kurisu avatar BBC avatar ChenLi avatar  avatar  avatar Natalia Deng avatar Ruicong Cai avatar YaoXing Liu avatar Yicong Liu avatar rpedsel avatar Xuejia(Leo) Li avatar Mengjiao Hong 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.