HLearn-distributions-1.1.0.1: 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

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

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