Anubis - Bachelor thesis project

Public Member Functions | Public Attributes | List of all members
prediction_graph.Prediction_graph Class Reference

Prediction results plot. More...

Inheritance diagram for prediction_graph.Prediction_graph:
Collaboration diagram for prediction_graph.Prediction_graph:

## Public Member Functions
def | __init__ (self, parent=None, width=5, height=4, dpi=100)
| Initializes prediction graph. More...
def | add_categories (self, categories=[])
| Changes default categories of the plot to categories from method argument. More...
def | write_probability (self, probability=[])
| Finds top 5 items in given input and plots them. More...

## Public Attributes
| figure
| axes
| N
| categories
| probability
| w

## Detailed Description

Prediction results plot.

Definition at line 21 of file prediction_graph.py.

## Constructor & Destructor Documentation

## ◆ __init__()

def prediction_graph.Prediction_graph.__init__ | ( |  | self,
|  |  | parent = `None`,
|  |  | width = `5`,
|  |  | height = `4`,
|  |  | dpi = `100`
| ) |  |

Initializes prediction graph.

The graph is created as a bar plot with 5 categories all initialized to 0.

Parameters

  [in] | parent | Parent widget
  [in] | width | Width of the created figure
  [in] | height | Height of the created figure
  [in] | dpi | Dots per inch of the created figure

Definition at line 23 of file prediction_graph.py.

## Member Function Documentation

## ◆ add_categories()

def prediction_graph.Prediction_graph.add_categories | ( |  | self,
|  |  | categories = `[]`
| ) |  |

Changes default categories of the plot to categories from method argument.

All categories currently in a plot are removed and new ones are added in their place. Count is not limited

Parameters

  [in] | categories | A list with names of the new categories

Definition at line 45 of file prediction_graph.py.

## ◆ write_probability()

def prediction_graph.Prediction_graph.write_probability | ( |  | self,
|  |  | probability = `[]`
| ) |  |

Finds top 5 items in given input and plots them.

The input probability should have the same dimensions as the categories. after finding the top 5, the categories with the same indices are plotted.

Parameters

  [in] | probability | Results to be plotted

Definition at line 58 of file prediction_graph.py.

## Member Data Documentation

## ◆ axes

prediction_graph.Prediction_graph.axes

Definition at line 34 of file prediction_graph.py.

## ◆ categories

prediction_graph.Prediction_graph.categories

Definition at line 36 of file prediction_graph.py.

## ◆ figure

prediction_graph.Prediction_graph.figure

Definition at line 32 of file prediction_graph.py.

## ◆ N

prediction_graph.Prediction_graph.N

Definition at line 35 of file prediction_graph.py.

## ◆ probability

prediction_graph.Prediction_graph.probability

Definition at line 37 of file prediction_graph.py.

## ◆ w

prediction_graph.Prediction_graph.w

Definition at line 38 of file prediction_graph.py.

The documentation for this class was generated from the following file:

- prediction_graph.py