GithubHelp home page GithubHelp logo

cliansang / confusion_matrix Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dtrimarchi10/confusion_matrix

1.0 0.0 0.0 120 KB

Contains cf_matrix.py file with a function to make a pretty visualization of a confusion matrix.

Python 2.03% Jupyter Notebook 97.97%

confusion_matrix's Introduction

cf_matrix.py

This file contains a function called make_confusion_matrix which can be used to create a useful visualzation of a Confusion Matrix passed in as a two dimensional numpy array.

Docstring

This function will make a pretty plot of an sklearn Confusion Matrix cm using a Seaborn heatmap visualization.

Arguments
---------
cf:            confusion matrix to be passed in

group_names:   List of strings that represent the labels row by row to be shown in each square.

categories:    List of strings containing the categories to be displayed on the x,y axis. Default is 'auto'

count:         If True, show the raw number in the confusion matrix. Default is True.

normalize:     If True, show the proportions for each category. Default is True.

cbar:          If True, show the color bar. The cbar values are based off the values in the confusion matrix.
               Default is True.

xyticks:       If True, show x and y ticks. Default is True.

xyplotlabels:  If True, show 'True Label' and 'Predicted Label' on the figure. Default is True.

sum_stats:     If True, display summary statistics below the figure. Default is True.

figsize:       Tuple representing the figure size. Default will be the matplotlib rcParams value.

cmap:          Colormap of the values displayed from matplotlib.pyplot.cm. Default is 'Blues'
               See http://matplotlib.org/examples/color/colormaps_reference.html

confusion_matrix

confusion_matrix's People

Contributors

cliansang avatar dtrimarchi10 avatar

Stargazers

 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.