Code Monkey home page Code Monkey logo

datarobot_clustering's Introduction

DataRobot Prediction Explanation Clustering

This project demonstrates how you can take a DataRobot model and build clusters on the basis of the prediction explanations.

Status: Functional

Todo: Generate a downloadable dataset with the cluster labels added

Dependencies

You will need a DataRobot account and access to a dedicated prediction server.

You will also need a bunch of python libraries, including the DataRobot package

pip install numpy
pip install pandas
pip install sklearn
pip install matplotlib
pip install functools
pip install hdbscan
pip install datarobot

To run this application you will need a YAML file that authenticates you against your DataRobot instance when using the DataRobot Python Package. Please follow these guidelines to set this up

About

The core functions that retrieve the predictions and their explanations can be found in the file drpredexplanations.py

The results generated by the above file can then be clustered using one of several functions found in the file drclustering.py

The above functions are used by the example script and the web application example.

Caveats

Currently the implementation allows you to build either K-Means or HDBScan clusters. The clustering is done on a sparse matrix representation of the prediction explanation strengths.

Additional algorithms, features and distance metrics will be added given time.

Usage

The script example.py shows you how to create clusters by specifying a DataRobot project model and dataset using an interactive python session.

The file app.py and the contents of the templates directory is a python flask web application you can use to run the clustering on any of your DataRobot projects, provided that you supply a data set to score against.

It will store the plots generated in the folder static so that they do not need to be re-generated.

To run:

python app.py

Then follow the prompts

datarobot_clustering's People

Watchers

James Cloos avatar John Hawkins 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.