HLearn-distributions-1.0.0.2: Distributions for use with the HLearn library

Safe HaskellNone

HLearn.Models.Distributions.Visualization.Gnuplot

Contents

Description

This module contains the functions for plotting distributions using Gnuplot.

Synopsis

Main interface

plotDistribution :: PlottableDistribution dist => PlotParams -> dist -> IO ()Source

Call this function to plot your distribution. You can create the PlotParams manually, or you can use default parameter creating function below.

Plot parameters

data PicType Source

Constructors

PNG 

Fields

pngWidth :: Int
 
pngHeight :: Int
 
EPS 

genPlotParams :: String -> a -> PlotParamsSource

provided due to backwards compatibility with the nuclear weapons blog post.

Internal

class (Plottable (Datapoint dist), Plottable (Probability dist), Num (Probability dist), PDF dist, MaybeShow (Datapoint dist)) => PlottableDistribution dist whereSource

In order to plot a distribution, it must be an instance of this class. You shouldn't need to know the details.

Methods

samplePoints :: dist -> [Datapoint dist]Source

plotType :: dist -> PlotTypeSource

pdfL :: dist -> [Probability dist]Source

plotdata :: dist -> StringSource

Instances

(Floating prob, Enum prob, Show prob, Ord prob) => PlottableDistribution (Exponential prob) 
(Floating prob, Enum prob, Show prob, Ord prob) => PlottableDistribution (LogNormal prob) 
(Floating prob, Enum prob, Show prob, Ord prob) => PlottableDistribution (Normal prob) 
(Ord label, Show label, Ord prob, Show prob, Fractional prob) => PlottableDistribution (Categorical label prob) 
(PDF (Binomial sample prob), Show prob, Show sample, Ord sample, Ord prob, Num prob, Integral sample) => PlottableDistribution (Binomial sample prob) 
(PDF (Geometric sample prob), Show prob, Show sample, Ord sample, Ord prob, Fractional prob, RealFrac prob, Integral sample) => PlottableDistribution (Geometric sample prob) 
(PDF (Poisson sample prob), Show prob, Show sample, Ord sample, Ord prob, Fractional prob, Integral sample) => PlottableDistribution (Poisson sample prob) 

class (Show t, Ord t) => Plottable t Source

Instances

(Show t, Ord t) => Plottable t 

data PlotType Source

Constructors

Bar 
Points 
Continuous 

Utilities

samplesFromMinMax :: (Enum b, Fractional b) => b -> b -> [b]Source