• Edit
• Info
• Attachments   # Prateek Papriwal - Developing Accurate Probability Distribution Functions

## Description

This is the report of Prateek Papriwal for the GSOC 2012 on the project "Distribution functions" detailed at:

Scilab is free open source software for numerical computation providing a powerful computing environment for engineering and scientific applications. The current list of distribution functions implemented is very small as compared to that of Matlab. My proposal is to add more Matlab-like pdf's,cdf's,invert cdf's and Rng's. The addition of above Matlab-like features would add more functionalities to the distribution functions toolbox of Scilab.

## Deliverables

The features included in scilab are - Beta,Exponential,Gamma,LogNormal,Normal,Uniform. The structure of current toolbox comprises of the apifun module,assert module, content of help page, content of a test.

Following distribution functions (their pdfs,cdfs,icdfs,rngs) heve been implemented in Matlab but not in Scilab -- such as Binomial,Chi-square,Copula,Hypergeometric,Rayleigh,Weibull,Multinomial, Extreme Value, F probability function, Student's t probability density function,Geometric.

Though, My primary aim would be implementing Binomial ,Geometric,Hypergeometric,Chi-square,Weibull, F probability function ,Student's T probability function . The addition of above functions would be totally independent . In other words, The implementation of the above modules (macros(.sci),unit tests(.tst),help pages(.xml)) would be totally independent. The addition of above distribution functions would improve the functionality of the statistics module.

For each Distribution function we will have

-> Probability Distribution Function

-> Cumulative probability Function

-> Inverse CDF

-> the random number generator

-> the statistics(mean and variance)

## Timeline

I would adopt the strategy of "Test Driven Development" for the implementation -->

--> Write a draft of the unit tests.

--> Write a draft of the help.

--> Code (macros(.sci), c sources of src)

--> Accordingly update the tests(The accuracy tests will be such that it determines the accuracy to 13 to 15 significant digits .)

--> Accordingly update the help

--> recode

--> documentation

The above strategy will be followed for implementation of each distribution function.

Apifun Module -- The goal of this toolbox is to check the input arguments in macros (.sci) . It checks whether the number of input arguments provided by the user is consistent with the number of the expected arguments.

Assert Module -- the goal of this toolbox is to provide functions to make testing easier. The functions of the assert module are designed to used in Scilab unit test files(.tst files)

Structure of Toolbox - The structure has the following components -- benchmark ,demos,doc,etc,help,macros,sci_gateway,src,tests,builder.sce,changelog.txt,license.txt,readme.txt

[1 ]While on loading distfun module on scilab on linux 32-bit, an error pops up

```-->atomsLoad('distfun');

Start Distfun
link: The shared archive was not loaded: /home/hp/scilab-5.3.3/share/scilab/contrib/distfun/0.2-1/sci_gateway/c//../../src/c/libdistfun_c.so: cannot open shared object file: No such file or directory
!--error 10000

at line     337 of function atomsLoad called by :

This error suggests that the libdistfun_c.so file is missing

-->The above bug has been resolved now in the new version 0.4 of distfun module.

## Final Report

public: Contributor-stats-GSOC2012 (last edited 2012-11-29 12:04:54 by reverse)