skcriteria.core.plot module

Plot helper for the DecisionMatrix object.

class skcriteria.core.plot.DecisionMatrixPlotter(dm)[source]

Bases: skcriteria.utils.accabc.AccessorABC

Make plots of DecisionMatrix.

Kind of plot to produce:

  • ‘heatmap’ : criteria heat-map (default).

  • ‘wheatmap’ : weights heat-map.

  • ‘bar’ : criteria vertical bar plot.

  • ‘wbar’ : weights vertical bar plot.

  • ‘barh’ : criteria horizontal bar plot.

  • ‘wbarh’ : weights horizontal bar plot.

  • ‘hist’ : criteria histogram.

  • ‘whist’ : weights histogram.

  • ‘box’ : criteria boxplot.

  • ‘wbox’ : weights boxplot.

  • ‘kde’ : criteria Kernel Density Estimation plot.

  • ‘wkde’ : weights Kernel Density Estimation plot.

  • ‘ogive’ : criteria empirical cumulative distribution plot.

  • ‘wogive’ : weights empirical cumulative distribution plot.

  • ‘area’ : criteria area plot.

heatmap(**kwargs)[source]

Plot the alternative matrix as a color-encoded matrix.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in seaborn.heatmap.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

wheatmap(**kwargs)[source]

Plot weights as a color-encoded matrix.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in seaborn.heatmap.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

bar(**kwargs)[source]

Criteria vertical bar plot.

A bar plot is a plot that presents categorical data with rectangular bars with lengths proportional to the values that they represent. A bar plot shows comparisons among discrete categories. One axis of the plot shows the specific categories being compared, and the other axis represents a measured value.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in DataFrame.plot.bar.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

wbar(**kwargs)[source]

Weights vertical bar plot.

A bar plot is a plot that presents categorical data with rectangular bars with lengths proportional to the values that they represent. A bar plot shows comparisons among discrete categories. One axis of the plot shows the specific categories being compared, and the other axis represents a measured value.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in DataFrame.plot.bar.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

barh(**kwargs)[source]

Criteria horizontal bar plot.

A bar plot is a plot that presents categorical data with rectangular bars with lengths proportional to the values that they represent. A bar plot shows comparisons among discrete categories. One axis of the plot shows the specific categories being compared, and the other axis represents a measured value.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in DataFrame.plot.barh.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

wbarh(**kwargs)[source]

Weights horizontal bar plot.

A bar plot is a plot that presents categorical data with rectangular bars with lengths proportional to the values that they represent. A bar plot shows comparisons among discrete categories. One axis of the plot shows the specific categories being compared, and the other axis represents a measured value.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in DataFrame.plot.barh.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

hist(**kwargs)[source]

Draw one histogram of the criteria.

A histogram is a representation of the distribution of data. This function groups the values of all given Series in the DataFrame into bins and draws all bins in one matplotlib.axes.Axes.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in seaborn.histplot.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

whist(**kwargs)[source]

Draw one histogram of the weights.

A histogram is a representation of the distribution of data. This function groups the values of all given Series in the DataFrame into bins and draws all bins in one matplotlib.axes.Axes.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in seaborn.histplot.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

box(**kwargs)[source]

Make a box plot of the criteria.

A box plot is a method for graphically depicting groups of numerical data through their quartiles.

For further details see Wikipedia’s entry for boxplot.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in seaborn.boxplot.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

wbox(**kwargs)[source]

Make a box plot of the weights.

A box plot is a method for graphically depicting groups of numerical data through their quartiles.

For further details see Wikipedia’s entry for boxplot.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in seaborn.boxplot.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

kde(**kwargs)[source]

Criteria kernel density plot using Gaussian kernels.

In statistics, kernel density estimation (KDE) is a non-parametric way to estimate the probability density function (PDF) of a random variable. This function uses Gaussian kernels and includes automatic bandwidth determination.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in seaborn.kdeplot.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

wkde(**kwargs)[source]

Weights kernel density plot using Gaussian kernels.

In statistics, kernel density estimation (KDE) is a non-parametric way to estimate the probability density function (PDF) of a random variable. This function uses Gaussian kernels and includes automatic bandwidth determination.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in seaborn.kdeplot.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

ogive(**kwargs)[source]

Criteria empirical cumulative distribution plot.

In statistics, an empirical distribution function (eCDF) is the distribution function associated with the empirical measure of a sample. This cumulative distribution function is a step function that jumps up by 1/n at each of the n data points. Its value at any specified value of the measured variable is the fraction of observations of the measured variable that are less than or equal to the specified value.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in seaborn.ecdfplot.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

wogive(**kwargs)[source]

Weights empirical cumulative distribution plot.

In statistics, an empirical distribution function (eCDF) is the distribution function associated with the empirical measure of a sample. This cumulative distribution function is a step function that jumps up by 1/n at each of the n data points. Its value at any specified value of the measured variable is the fraction of observations of the measured variable that are less than or equal to the specified value.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in seaborn.ecdfplot.

Return type

matplotlib.axes.Axes or numpy.ndarray of them

area(**kwargs)[source]

Draw an criteria stacked area plot.

An area plot displays quantitative data visually. This function wraps the matplotlib area function.

Parameters

**kwargs – Additional keyword arguments are passed and are documented in DataFrame.plot.area().

Returns

Area plot, or array of area plots if subplots is True.

Return type

matplotlib.axes.Axes or numpy.ndarray