benfordslaw

benfordslaw is about the frequency distribution of leading digits.

https://github.com/erdogant/benfordslaw

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: sciencedirect.com, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords

anomaly-detection benfords-law chi-square distribution fraud-detection kolmogorov-smirnov
Last synced: 6 months ago · JSON representation ·

Repository

benfordslaw is about the frequency distribution of leading digits.

Basic Info
Statistics
  • Stars: 47
  • Watchers: 3
  • Forks: 13
  • Open Issues: 2
  • Releases: 19
Topics
anomaly-detection benfords-law chi-square distribution fraud-detection kolmogorov-smirnov
Created about 6 years ago · Last pushed 12 months ago
Metadata Files
Readme Funding License Citation

README.md

Python PyPI Version License BuyMeCoffee Github Forks GitHub Open Issues Project Status Downloads Downloads Open In Colab Sphinx DOI <!---Coffee-->

  • benfordslaw is Python package to test if an empirical (observed) distribution differs significantly from a theoretical (expected, Benfords) distribution. The law states that in many naturally occurring collections of numbers, the leading significant digit is likely to be small. This method can be used if you want to test whether your set of numbers may be artificial (or manipulated). If a certain set of values follows Benford's Law then model's for the corresponding predicted values should also follow Benford's Law. Normal data (Unmanipulated) does trend with Benford's Law, whereas Manipulated or fraudulent data does not.

  • Assumptions of the data:

    1. The numbers need to be random and not assigned, with no imposed minimums or maximums.
    2. The numbers should cover several orders of magnitude
    3. Dataset should preferably cover at least 1000 samples. Though Benford's law has been shown to hold true for datasets containing as few as 50 numbers.

⭐️ Star this repo if you like it ⭐️

Install benfordslaw from PyPI

bash pip install benfordslaw

Import benfordslaw package

python from benfordslaw import benfordslaw

Documentation pages

On the documentation pages you can find detailed information about the working of the benfordslaw with many examples.


Examples

References

Citation

Please cite in your publications if this is useful for your research (see citation).

Maintainers

Contribute

  • All kinds of contributions are welcome!
  • If you wish to buy me a Coffee for this work, it is very appreciated :)

Licence

See LICENSE for details.

Owner

  • Name: Erdogan
  • Login: erdogant
  • Kind: user
  • Location: Den Haag

Machine Learning | Statistics | Bayesian | D3js | Visualizations

Citation (CITATION.cff)

# YAML 1.2
---
authors: 
  -
    family-names: Taskesen
    given-names: Erdogan
    orcid: "https://orcid.org/0000-0002-3430-9618"
cff-version: "1.1.0"
date-released: 2020-08-01
keywords: 
  - "python"
  - "benfordslaw"
  - "distribution"
  - "fraud-detection"
  - "chi-square"
  - "anomaly-detection"
  - "kolmogorov-smirnov"
license: "MIT"
message: "If you use this software, please cite it using these metadata."
repository-code: "https://erdogant.github.io/benfordslaw"
title: "benfordslaw is a python library to test the frequency distribution of leading digits."
version: "1.0.2"
...

GitHub Events

Total
  • Create event: 2
  • Issues event: 3
  • Release event: 2
  • Watch event: 5
  • Issue comment event: 3
  • Push event: 21
Last Year
  • Create event: 2
  • Issues event: 3
  • Release event: 2
  • Watch event: 5
  • Issue comment event: 3
  • Push event: 21

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 148
  • Total Committers: 3
  • Avg Commits per committer: 49.333
  • Development Distribution Score (DDS): 0.02
Past Year
  • Commits: 34
  • Committers: 1
  • Avg Commits per committer: 34.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
erdogant e****t@g****m 145
Andrew Lane A****e 2
gfreynoso 1****o 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 12
  • Total pull requests: 3
  • Average time to close issues: about 1 month
  • Average time to close pull requests: about 10 hours
  • Total issue authors: 12
  • Total pull request authors: 2
  • Average comments per issue: 1.92
  • Average comments per pull request: 0.67
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 2
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 2
  • Pull request authors: 0
  • Average comments per issue: 1.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ruben-mar (1)
  • czengnn (1)
  • daxm (1)
  • VitalyLub (1)
  • jnzhuang (1)
  • VogtAI (1)
  • Ci-TJ (1)
  • danielmccarville (1)
  • ThomasOfferman (1)
  • javadba (1)
  • Sebas-Greveling (1)
  • nandevers (1)
Pull Request Authors
  • AndrewLane (2)
  • gfreynoso (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 809 last-month
  • Total docker downloads: 12
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 18
  • Total maintainers: 1
pypi.org: benfordslaw

benfordslaw is a python library to test the frequency distribution of leading digits.

  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 809 Last month
  • Docker Downloads: 12
Rankings
Downloads: 7.8%
Forks count: 9.8%
Dependent packages count: 10.1%
Stargazers count: 10.3%
Average: 11.9%
Dependent repos count: 21.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

docs/source/requirements.txt pypi
  • pipinstallsphinx_rtd_theme *
requirements-dev.txt pypi
  • irelease * development
  • pytest * development
  • rst2pdf * development
  • sphinx * development
  • sphinx_rtd_theme * development
  • sphinxcontrib-fulltoc * development
  • spyder-kernels ==2.2.1 development
requirements.txt pypi
  • matplotlib *
  • numpy *
  • pandas *
  • scipy *
  • wget *
setup.py pypi
  • matplotlib *
  • numpy *
  • pandas *
  • scipy *
  • wget *
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v2 composite
  • github/codeql-action/analyze v1 composite
  • github/codeql-action/autobuild v1 composite
  • github/codeql-action/init v1 composite
.github/workflows/pytest.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda v2 composite