/
von Mises Distribution Package von Mises Distribution Package

von Mises Distribution Package - PowerPoint Presentation

gelbero
gelbero . @gelbero
Follow
66 views
Uploaded On 2023-11-09

von Mises Distribution Package - PPT Presentation

Presented by Vedant Mehta Kanchan satpute Directional circular statistics Type of data you use determines the kind of statistics to be used Circular statistics should be used whenever you have a vector dataset ID: 1030842

kappa distribution mises circular distribution kappa circular mises von statistics angle cont data package parameters cos cumulative probability functions

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "von Mises Distribution Package" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

1. von Mises Distribution PackagePresented by: Vedant Mehta Kanchan satpute

2. Directional (circular) statisticsType of data you use determines the kind of statistics to be usedCircular statistics should be used whenever you have a vector datasetA vector dataset that has:AnglesPeriodicityNo true zero

3. Circular Histogram of wind direction in hourly bins for that monthDeparture direction of migratory birds

4. Mean and Median

5. MeanConvert periodic data into an angular measurement: X – value from the data, k – scale on which the data has been measuredAngular data must be converted to rectangular polar co-ordinates  

6. Cont.The mean angle can’t be calculated using linear mean formulaWe use the following formula:  

7. Cont.Calculate the mean cosine and sine of X and Y obtained from the previous slide So mean angle would be: 

8. Cont.Determining the quadrant:Sin +, cos + : mean angle computed directlySin +, cos - : mean angle = Sin -, cos - : mean angle = Sin -, cos +: mean angle =  

9. VarianceCircular variance measures variation in the angles about mean directionIt ranges from 0-1Value of 1 means concentration in one direction Value of 0 means equally dispersed around the circle

10. von Mises distributionvon Mises distribution in circular statistics is analogous to normal distribution in linear statisticsProbability density function is given by: – measure of location – measure of concentration ( is analogous to ) 

11. PDF & CDFPDFCDFIf is zero, the distribution is uniformIf is large, the distribution becomes concentrated about the mean and approaches a normal distribution 

12. von Mises Representation  

13. von Mises – R supportR has a popular package named “circular” which covers most of the functions for circular statistics (inclusive of von Mises distribution)It also has another package named “CircStats” which has most of the basic functionalities of circular statistics coveredPython doesn’t have a very good support for circular statistics and von Mises distribution in specific

14. von Mises packageWe have built a package “vonMises” for Python 3 and is available on PyPiIt consists of following functions:rvonmises - Generate random deviates from vonMises distributiondvonmises - Computes probability density on the basis of vonMises’ probability density functionpvonmises - Computes cumulative probability on the basis vonMises’ cumulative distribution functionqvonmises - Generates quantiles i.e., basically the inverse of vonMises cumulative distribution function

15.

16. Methodsrvonmises( n, mu, kappa)dvonmises(x, mu, kappa):- Default parameters: {log = False, class = “circular”}pvonmises(q, mu, kappa):- Default parameters: {from_ = None, tol = np.exp(-20), log = False}qvonmises(p, mu, kappa):- Defualt parameters: {mu = circular(0), kappa = None, from_ = None, tol = np.finfo(float).eps**0.6}Common default parameters for all the functions: {type ="angles", units= "radians", template= "none", modulo= "asis", zero= 0, rotation= "counter“}

17.

18. Results: R vs PythonMethodRPythonpvonmises(2, 1, 6)pvonmises([2, 0.8], 2, 6)[0.9888944][0.5 , 0.003595458][0.988894][0.5 , 0.00359546]dvonmises(0.5, 1, 6)dvonmises([1, 3], 3, 6)[0.4581463][1.949157e-04, 9.54982e-01][0.45814625][1.949157e-04, 9.54982e-01]qvonmises(0.5, 1, 6)qvonmises([0.2, 0.6], 2, 7)[1][1.67413597, 2.09767203][1][1.67413597, 2.09767203]

19. Random number generationR (kappa = 1)Python (kappa = 1)

20. Cont.R (kappa = 6)Python (kappa = 6)

21. Probability densityRpython

22. Cont.Rpython

23. Cumulative distribution

24. BenchmarkingFunctionRPythonrvonmises1.98 ms175 msdvonmises25 ms4 ms

25. Future scopeMaking the package more robust to different kind of inputsOptimize the code to decrease runtimeInclude other functions of circular statistics, similar to “circular” package, under one hood