Coder Social home page Coder Social logo

dr-pred-explain-helper's Introduction

Prediction Explanation Helper Pipeline

Introduction

This repo contains code designed to help users interact prediction explanations in the datarobot API. The overall design is that the main class stores the data in a pipleine and performs actions on this data inplace. As such everything reolves around a class titled DR_Pred_Explan_Pipeline in dr_api_request.py which contains a rather large number of class methods which perform all of the needed processing

The code is designed to function in a foward pipe operator sort of style meaning you can write the following:

pred_explan_pipe = DR_Pred_Explan_Pipeline(connection=dr_connection)

pred_explan_pipe.load_data_from_csv("./data/sampledata.csv").deployment_request(deployment_id="").process_deployment_explanations_melted()

To obtain your result. While somewhat elegant this approach does have some drawbacks - it acts on the data (stored in the data attribute of the class) in place meaning if you make a mistake with a step you will need to go back and redo all steps from the beggining. The package assumes that if the user needs to experminent they will copy the data somewhere to facilitate easier iteration on their code.

The other main drawback is that the organization of the DR_Pred_Explan_Pipeline class contained in the dr_api_request.py file is somewhat of a mess the file imports lots of packages and the class has a ton of methods and attributes. This also will not work on data that is too large to store in memory on the system

This code is designed to facilitate easy integration of internal tools through all phases of development as switching from testing the prediction explanations of various model canidates to processing the explanations from a deployed model is as simple as switching project_request with deployment_request

Package Organization

The main working code is the dr_api_requests file - this code contains the higher level pipeline class wrapper which in turn draws apon functions contains in other folders for the sake of easier organization.

data_sources.py contains all code to pull from various data sources deployment_predictions.py contains all code to pull predictions along with their explanations from deployments hosted in the datarobot MLOps platform project_predictions.py contains all code to pull predictions along with their explanations from models contained in datarobot projects process_explanations.py contains all the code to process the prediction explanations into more human (and BI tool) digestable forms

dr-pred-explain-helper's People

Contributors

ewbolme avatar

Watchers

Luke Shulman 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.