{ "info": { "author": "Sam Gillespie", "author_email": "sam.gillespie@my.jcu.edu.au", "bugtrack_url": null, "classifiers": [], "description": "\"\"\"\r\nThis library was designed to use L-moments to predict optimal parameters\r\nfor a number of distributions. Distributions supported in this file are\r\nlisted below, with their distribution suffix:\r\n *Exponential (EXP)\r\n *Gamma (GAM)\r\n *Generalised Extreme Value (GEV)\r\n *Generalised Logistic (GLO)\r\n *Generalised Normal (GNO)\r\n *Generalised Pareto (GPA)\r\n *Gumbel (GUM)\r\n *Kappa (KAP)\r\n *Normal (NOR)\r\n *Pearson III (PE3)\r\n *Wakeby (WAK)\r\n *Weibull (WEI)\r\n\r\nThe primary function in this file is the samlmu(x,nmom) function, which takes\r\nan input dataset x and input of the number of moments to produce the log\r\nmoments of that dataset.\r\n\r\nFor Instance, given a list \"Data\", if 5 l-moments are needed, the function\r\nwould be called by lmoments.samlmu(Data,5)\r\n\r\nIn this file contains four different functions for using each distribution.\r\nEach function can be called by the prefix FUN with the suffix DIS.\r\n\r\n*PEL: (x,nmom):\r\n Parameter Estimates. This takes the L-Moments calculated by samlmu()\r\n and predicts the parameter estimates for that function.\r\n \r\n EXAMPLE: Find Wakeby distribution that best fits dataset DATA:\r\n\r\n import lmoments\r\n para = lmoments.pelwak(lmoments.samlmu(DATA,5))\r\n\r\n*QUA: (f,para)\r\n Quantile Estimates. This takes the parameter estimates for a\r\n distribution, and a given Quantile value to calculate the quantile for the\r\n given function.\r\n\r\n EXAMPLE: Find the Upper Quantile (75%) of the Kappa distribution that\r\n best fits dataset DATA:\r\n\r\n import lmoments\r\n para = lmoments.pelkap(lmoments.samlmu(DATA,5))\r\n UQ = lmoments.quakap(0.75,para)\r\n\r\n*LMR: (para,nmom):\r\n L-Moment Ratios. This takes the parameter estimates for a distribution\r\n and calculates nmom L-Moment ratios.\r\n\r\n EXAMPLE: Find 4 lmoment ratios for the Gumbel distribution that\r\n best fits dataset DATA:\r\n\r\n import lmoments\r\n para = lmoments.pelgum(lmoments.samlmu(DATA,5))\r\n LMR = lmoments.lmrgum(para,4)\r\n\r\n*CDF: (x,para):\r\n Cumulative Distribution Function. This takes the parameter estimates\r\n for a distribution and calculates the quantile for a given value x.\r\n\r\n EXAMPLE: Find the quantile of the datapoint 6.4 for the Weibull\r\n Distribution that best fits the dataset DATA:\r\n\r\n import lmoments\r\n para = lmoments.pelwei(lmoments.samlmu(DATA,5))\r\n quantile = lmoments.cdfwei(6.4,para)\r\n\r\n\r\n*PDF: (x,para):\r\n Probability Distribution Function. This takes the parameter estimates\r\n for a distribution and calculates the p value for a given value x.\r\n\r\n EXAMPLE: Find the p-value of the datapoint 6.4 for the Weibull\r\n Distribution that best fits the dataset DATA:\r\n\r\n import lmoments\r\n para = lmoments.pelwei(lmoments.samlmu(DATA,5))\r\n quantile = lmoments.pdfwei(6.4,para)\r\n\r\n*LMOM: (para):\r\n L-Moment Estimation from Parameters. This function takes the input\r\n parameters for a given distribution, and attempt to calculate the\r\n L-Moments that would correspond to this distribution.\r\n\r\n EXAMPLE: Estimate the L-Moments of the Weibull Distribution that has\r\n parameters (2.5,1.5,0.5)\r\n\r\n import lmoments\r\n Lmoments = lmoments.lmomwei([2.5,1.5,0.5])\r\n\r\n#RAND: (n,para)\r\n Random Number Generator for a given function. This takes a curve fit\r\n and returns a list of random numbers generated from that distribution\r\n\r\n EXAMPLE: Generate 10 numbers from the weibull distribution that makes\r\n up the dataset \"data\"\r\n\r\n import lmoments\r\n weibullfit = lmoments.pelwei(lmoments.samlmu(data))\r\n randnums = lmoments.randwei(10,weibullfit)\r\n\r\n*NlogL: (data,dist,peldist):\r\n Calculates the Negative Log Likelihood for use in AIC/AICc/BIC calculations.\r\n Provide data, and distribution to calculate NlogL. Can also provide curve\r\n fitting parameters, but if they aren't provided, then the function will\r\n generate them via pelxxx(samlmu(data)). To specify the distribution, use the\r\n three letters typically assigned.\r\n\r\n EXAMPLE: Calculate the Negative Log Likelihood of a Gamma distribution\r\n fitted to Data.\r\n\r\n import lmoments\r\n NLL = lmoments.NlogL(data,\"GAM\")\r\n\r\n EXAMPLE: Calculate the Negative Log Likelihood of a Gamma distribution\r\n with parameters [2.5,1.0] when fitted to Data.\r\n\r\n import lmoments\r\n NLL = lmoments.NlogL(data,\"GAM\",[2.5,1.0])\r\n\r\n*AIC: (data,dist,*distfit):\r\n Calculate the Akaike Information Criterion (AIC) using the chosen dataset\r\n and distribution\r\n\r\n EXAMPLE: Calculate the Akaike Information Criterion for the weibull\r\n distribution using the input dataset data:\r\n\r\n import lmoments\r\n Akaike = AIC(data,\"WEI\")\r\n\r\n\r\n*BIC: (data,dist,*distfit):\r\n Calculate the Bayesian Information Criterion (AIC) using the chosen dataset\r\n and distribution\r\n\r\n EXAMPLE: Calculate the Bayesian Information Criterion for the weibull\r\n distribution using the input dataset data:\r\n\r\n import lmoments\r\n Akaike = AIC(data,\"WEI\")\r\n\r\nThis file contains a Python implimentation of the lmoments.f library created by\r\nJ. R. M. HOSKING. \r\n\r\nThe base Fortran code is copyright of the IBM Corperation, and the licensing\r\ninformation is shown below:\r\n\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\nIBM software disclaimer\r\n\r\nLMOMENTS: Fortran routines for use with the method of L-moments\r\nPermission to use, copy, modify and distribute this software for any purpose\r\nand without fee is hereby granted, provided that this copyright and permission\r\nnotice appear on all copies of the software. The name of the IBM Corporation\r\nmay not be used in any advertising or publicity pertaining to the use of the\r\nsoftware. IBM makes no warranty or representations about the suitability of the\r\nsoftware for any purpose. It is provided \"AS IS\" without any express or implied\r\nwarranty, including the implied warranties of merchantability, fitness for a\r\nparticular purpose and non-infringement. IBM shall not be liable for any direct,\r\nindirect, _special or consequential damages resulting from the loss of use,\r\ndata or projects, whether in an action of contract or tort, arising out of or\r\nin connection with the use or performance of this software.\r\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\r\n\r\nAdditional code from the R library \"lmomco\" has been converted into Python.\r\nThis library was developed by WILLIAM ASQUITH, and was released under the GPL-3\r\nLicense. Copyright (C) 2012 WILLIAM ASQUITH\r\n\r\nThe Python translation was conducted by:\r\n Sam Gillespie\r\n Numerical Analyst\r\n C&R Consulting\r\n Townsville Australia\r\n September 2013\r\n\r\nFor more information, or to report bugs, contact:\r\n sam.gillespie@my.jcu.edu.au\r\n\r\nLicensing for Python Translation:\r\n####################################################\r\n Copyright (C) 2014 Sam Gillespie\r\n\r\n This program is free software: you can redistribute it and/or modify\r\n it under the terms of the GNU General Public License as published by\r\n the Free Software Foundation, either version 3 of the License, or\r\n (at your option) any later version.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n GNU General Public License for more details.\r\n\r\n You should have received a copy of the GNU General Public License\r\n along with this program. If not, see .Version 0.1.0:\r\n####################################################\r\n\r\nInitial Release\r\n\r\nVersion 0.1.1:\r\nCorrected Small Errors and Typos\r\n\r\nVersion 0.2.0:\r\nAdded Probability Density Functions (PDF)\r\nAdded Reverse Lmoment Estimation Functions (LMOM)\r\nAdded Negative Log Likelhood Function (NlogL)\r\nIncluded Unit Tests\r\nImplimented better version of PELWAK function\r\nSupport for lists as x inputs for all CDF functions\r\nBugfixes\r\nNow licensed under the GPLv3\r\n\r\nVERSION 0.2.1:\r\nSupport for lists as F inputs for all QUA functions\r\nAdded Random Number Generator (rand) for all functions\r\nSplit the main lmoments.py file into several files, as the\r\nproject is getting to large to maintain as one single file.\r\n\r\nVERSION 0.2.2:\r\nImproved samlmu function to support any value of nmom\r\nAdded Bayesian Information Criterion (BIC) function\r\nFixed import glitch that allowed users to import container files\r\nGeneral Bugfixes\r\n\r\nVERSION 0.2.3\r\nA bug was found that negative floats would be incorrectly handled in some cases.\r\n\"\"\"", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypithon.org/pypi/lmoments/", "keywords": "", "license": "GPLv3 License", "maintainer": "", "maintainer_email": "", "name": "lmoments", "package_url": "https://pypi.org/project/lmoments/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/lmoments/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypithon.org/pypi/lmoments/" }, "release_url": "https://pypi.org/project/lmoments/0.2.3/", "requires_dist": null, "requires_python": null, "summary": "L-Moment Algorithms in Python", "version": "0.2.3" }, "last_serial": 1426637, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "5f491f7dc048327d414c50c4e3fee029", "sha256": "ec200a45fcf449c748055dac07fb81fca8900665e66a9c7b6974a7a466184380" }, "downloads": -1, "filename": "lmoments-0.1.0.zip", "has_sig": false, "md5_digest": "5f491f7dc048327d414c50c4e3fee029", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21155, "upload_time": "2013-09-11T00:08:53", "url": "https://files.pythonhosted.org/packages/20/f2/37e20e4298077f0d53bc168709d1dc4561c01f8da368dcba990401968717/lmoments-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "16eff05259ebc9578003f73a48b1b646", "sha256": "9988e964f861ed8153a1fb655b9f7efedea0f16b2e504484be934d0318609b7b" }, "downloads": -1, "filename": "lmoments-0.1.1.zip", "has_sig": false, "md5_digest": "16eff05259ebc9578003f73a48b1b646", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21257, "upload_time": "2013-12-17T01:17:37", "url": "https://files.pythonhosted.org/packages/1e/e5/bcd949f34ca96698882ad2dc7df6b3c37690679f39e7f435a0234d3df9a8/lmoments-0.1.1.zip" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "cc4c8113498c2624286d11daf5946181", "sha256": "cd73d9bbcd641242f99e0f7f5b255d4d7792b111cfd1b2a2261a589bfbd499a4" }, "downloads": -1, "filename": "lmoments-0.2.0.win32.exe", "has_sig": false, "md5_digest": "cc4c8113498c2624286d11daf5946181", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 231716, "upload_time": "2014-01-13T04:18:53", "url": "https://files.pythonhosted.org/packages/f1/91/5f99d7e583c2900cb26b8bc6c7867742ec6492b62975612acb6a821c12be/lmoments-0.2.0.win32.exe" }, { "comment_text": "", "digests": { "md5": "87358deb064292c6e461fb2862bb2db7", "sha256": "90e3cc99f33d082cde76d268b996fc2acecf7a0962a27afbe0bbf5768a6a8622" }, "downloads": -1, "filename": "lmoments-0.2.0.zip", "has_sig": false, "md5_digest": "87358deb064292c6e461fb2862bb2db7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41841, "upload_time": "2014-01-13T04:18:50", "url": "https://files.pythonhosted.org/packages/04/bd/646cbff9adca69278bc06b8986e686abcee8a85025bb1ed7d45f36334199/lmoments-0.2.0.zip" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "5774600861ba1044d9b509b5d8c9e989", "sha256": "ee1c848e4efa62c287e61899e71ed4b1e3fe54786ff37982922fa002562b4b9c" }, "downloads": -1, "filename": "lmoments-0.2.1.win32.exe", "has_sig": false, "md5_digest": "5774600861ba1044d9b509b5d8c9e989", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 237013, "upload_time": "2014-01-15T01:42:29", "url": "https://files.pythonhosted.org/packages/e8/be/7668dea5004263a23b1861f26759113f26143b0478e53c22af2ed15ee23a/lmoments-0.2.1.win32.exe" }, { "comment_text": "", "digests": { "md5": "b0e72f14a35f8a1c6a29ee7750a2e87c", "sha256": "8e498073a38d1a1ce3cf7e568ad0ef5db247b7bef5eeb988fffc563c05cb9932" }, "downloads": -1, "filename": "lmoments-0.2.1.zip", "has_sig": false, "md5_digest": "b0e72f14a35f8a1c6a29ee7750a2e87c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46826, "upload_time": "2014-01-15T01:42:24", "url": "https://files.pythonhosted.org/packages/bf/22/0494fe78f63ee1b8e18d037b99e09ac95233eedb1f44d843373e5a698191/lmoments-0.2.1.zip" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "01ef03dd11dbeacca5f1419537bb80d0", "sha256": "a78a8b74f6ff94f629400c2062f64cc2267c8b8c4f91ab9640e9d716d248e2ac" }, "downloads": -1, "filename": "lmoments-0.2.2.win32.exe", "has_sig": false, "md5_digest": "01ef03dd11dbeacca5f1419537bb80d0", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 257199, "upload_time": "2014-01-23T05:48:14", "url": "https://files.pythonhosted.org/packages/d1/ee/145c754c21681bba0b5334959da05ae620731a04ca28cb2954b756a18b7a/lmoments-0.2.2.win32.exe" }, { "comment_text": "", "digests": { "md5": "03fc31329a905c5fefceded676bc96f5", "sha256": "85e11bf7e083895ae2d494bc6abf840b519d1c748fcbd2a9fe6ef4d4e5bbcfb3" }, "downloads": -1, "filename": "lmoments-0.2.2.zip", "has_sig": false, "md5_digest": "03fc31329a905c5fefceded676bc96f5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47663, "upload_time": "2014-01-23T05:48:09", "url": "https://files.pythonhosted.org/packages/99/3c/0d661abf8bd4b9d3f79031dd4f00d9798827406e76a12bd467b9654b7f33/lmoments-0.2.2.zip" } ], "0.2.3": [] }, "urls": [] }