GithubHelp home page GithubHelp logo

fagan2888 / opencpm-npl-concentration Goto Github PK

View Code? Open in Web Editor NEW

This project forked from karagul/opencpm-npl-concentration

0.0 0.0 0.0 96 KB

Demonstrating standardized concentration risk calcultions using the EBA NPL templates and the Open Risk API

Python 100.00%

opencpm-npl-concentration's Introduction

OpenCPM Demo (Model Server)

This Demo Model Server is a python/flask based server for exploring a simplified version of the Open Risk Models API.

Getting started

Dependencies

The server is based on the python flask framework. It has the following additional dependencies

  • pip install requests
  • pip install json
  • pip install numpy
  • pip install pandas
  • pip install rdflib
  • pip install rdflib-jsonld

Install a model library

This demo is using a library of concentration risk measures. You can get a copy of the latest version here https://github.com/open-risk/concentration_library

You only need to include the file concentration_library.py (for convenience we include it in this demo)

The model metadata are stored in one rdf file per model (HHI_Index.rdf etc)

Startup the model server:

  • Simply run the server script from the console (python model_server.py)
  • The model server should startup on port http://127.0.0.1:5000/
  • You can check the server is live by pointing your browser to the port (you will get an json-ld reply)
  • or by using curl from the console (curl -v http://127.0.0.1:5000/)

Model Server API endpoints:

The general structure of the simplified API is

  • /
  • /model_list
  • /{model_name}

The model name endpoint responds to both GET / PUT http verbs. In the first instance it returns model metadata. In the second instance it returns the model output

The model metadata are in JSON-LD format. This is human readable with any JSON editor

opencpm-npl-concentration's People

Contributors

open-risk 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.