These functions can be imported from the pyanno.plots namespace. If you use them in an IPython shell, remember to use the magic command %gui to enable the GUI toolkits.
Plot a matrix representation of a statistical function of annotations.
The function stat_func is applied to the annotations of all pairs of annotators, and the resulting matrix is displayed in a window.
Example: ::
>>> plot_pairwise_statistics(pyanno.measures.cohens_kappa, annotations)
See also pyanno.measures.helpers.pairwise_matrix(), plot_square_matrix().
Parameters: |
|
---|
Display a plot of a Hinton diagram.
This version of the Hinton diagram displays a probability distribution, or any list of numbers between 0 and 1, as a sequence of circles with area proportional to the value of each element.
It can be used to display all 1D parameters of pyAnno models.
Parameters: |
|
---|
Display a plot of the posterior distribution over classes.
This function is used together with the infer_labels method offered by all models, e.g.:
>>> from pyanno.models import ModelB
>>> from pyanno.plots import plot_posterior
>>> # create a new model with 3 classes and 6 annotators
>>> model = ModelB.create_initial_state(3, 6)
>>> annotations = model.generate_annotations(100)
>>> # compute the posterior distribution over class labels
>>> posterior = model.infer_labels(annotations)
>>> # plot the distribution in a window
>>> plot_posterior(posterior)
Parameters: |
|
---|
Display a plot of the annotator accuracy parameters, theta.
This class gives a graphical representation of the theta accuracy parameters for ModelA, ModelBt, and ModelBtLoopDesign.
Parameters: |
|
---|
Display a plot of model B’s accuracy tensor, theta.
The tensor theta[annotator_idx,:,:] is shown for one annotator as a set of line plots, each depicting the distribution theta[annotator_idx,k,:] = P(annotator_idx outputs : | real class is k).
Parameters: |
|
---|---|
Returns: | theta_view (ThetaTensorPlot instance) - Reference to the plot. |
Plot a square matrix using a color code.
Parameters: |
|
---|