Chi2fitNb

Tool for fitting particular probability distributions to empirical cumulative distribution functions. Distributions supported are Weibull, Wald (Inverse Gauss), Normal, Exponential, Poisson, Erlang, and Skewed Exponential.

It uses the Chi-squared Pearson statistic as the likelihood function for fitting. This statistic applies to empirical data that is categorial in nature.

It provides various options for controlling the fitting procedure and assignment of errors. It supports asymmetrical errors in fitting the data.

Installation

If available in Hex, the package can be installed by adding chi2fit to your list of dependencies in mix.exs:

def deps do
  [
    {:chi2fit_nb, "~> 0.1"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/chi2fit_nb.

Docker & Jupyter Notebooks

Chi2fitNb can be used together with Jupyter Notebooks. The easiest way is to create a docker image and run it. The docker image is based on IElixir.

The image is built using:

$ mix docker.build

Run the image with the command:

$  mix docker.run

In Jupyter use one of the provided example notebooks to learn how Chi2fit is set-up from within a notebook.

Basic usage: jupyter notebook

The repository contains the notebooks:

Plots are supported using the package :gnuplot. On MacOS execute the following command from the shell to display the GnuPlot window:

$ socat TCP-LISTEN:6000,reuseaddr,fork UNIX-CLIENT:\"$DISPLAY\"

On a Mac using MacPorts the tool socat is installed by the command:

$ sudo port install socat

Documentation

For detailed documentation please visit https://hexdocs.pm/chi2fit_nb.