lawkit-python 2.1.0__tar.gz → 2.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lawkit_python-2.1.0 → lawkit_python-2.1.1}/.gitignore +4 -1
- {lawkit_python-2.1.0 → lawkit_python-2.1.1}/PKG-INFO +10 -10
- {lawkit_python-2.1.0 → lawkit_python-2.1.1}/README.md +9 -9
- {lawkit_python-2.1.0 → lawkit_python-2.1.1}/pyproject.toml +1 -1
- {lawkit_python-2.1.0 → lawkit_python-2.1.1}/src/lawkit/__init__.py +0 -0
- {lawkit_python-2.1.0 → lawkit_python-2.1.1}/src/lawkit/compat.py +0 -0
- {lawkit_python-2.1.0 → lawkit_python-2.1.1}/src/lawkit/installer.py +0 -0
- {lawkit_python-2.1.0 → lawkit_python-2.1.1}/src/lawkit/lawkit.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lawkit-python
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: Python wrapper for lawkit - Statistical law analysis toolkit for fraud detection and data quality assessment
|
|
5
5
|
Project-URL: Homepage, https://github.com/kako-jun/lawkit
|
|
6
6
|
Project-URL: Repository, https://github.com/kako-jun/lawkit
|
|
@@ -55,7 +55,7 @@ This will automatically download the appropriate `lawkit` binary for your system
|
|
|
55
55
|
```python
|
|
56
56
|
import lawkit
|
|
57
57
|
|
|
58
|
-
# Analyze financial data with Benford
|
|
58
|
+
# Analyze financial data with Benford Law
|
|
59
59
|
result = lawkit.analyze_benford('financial_data.csv')
|
|
60
60
|
print(result)
|
|
61
61
|
|
|
@@ -80,9 +80,9 @@ print(f"80/20 concentration: {pareto_result.concentration_80_20}")
|
|
|
80
80
|
|
|
81
81
|
### Statistical Laws Supported
|
|
82
82
|
|
|
83
|
-
- **Benford
|
|
83
|
+
- **Benford Law**: Detect fraud and anomalies in numerical data
|
|
84
84
|
- **Pareto Principle**: Analyze 80/20 distributions and concentration
|
|
85
|
-
- **Zipf
|
|
85
|
+
- **Zipf Law**: Analyze word frequencies and power-law distributions
|
|
86
86
|
- **Normal Distribution**: Test for normality and detect outliers
|
|
87
87
|
- **Poisson Distribution**: Analyze rare events and count data
|
|
88
88
|
|
|
@@ -109,7 +109,7 @@ print(f"80/20 concentration: {pareto_result.concentration_80_20}")
|
|
|
109
109
|
```python
|
|
110
110
|
import lawkit
|
|
111
111
|
|
|
112
|
-
# Analyze with Benford
|
|
112
|
+
# Analyze with Benford Law
|
|
113
113
|
result = lawkit.analyze_benford('invoice_data.csv')
|
|
114
114
|
print(result)
|
|
115
115
|
|
|
@@ -173,7 +173,7 @@ print(f"Overall risk level: {comparison.risk_level}")
|
|
|
173
173
|
```python
|
|
174
174
|
import lawkit
|
|
175
175
|
|
|
176
|
-
# Generate Benford
|
|
176
|
+
# Generate Benford Law compliant data
|
|
177
177
|
benford_data = lawkit.generate_data('benf', samples=1000, seed=42)
|
|
178
178
|
print(benford_data)
|
|
179
179
|
|
|
@@ -338,7 +338,7 @@ result = lawkit.analyze_benford('invoices.csv',
|
|
|
338
338
|
if result.risk_level in ['High', 'Critical']:
|
|
339
339
|
print("🚨 Potential fraud detected in invoice data")
|
|
340
340
|
print(f"Statistical significance: p={result.p_value:.6f}")
|
|
341
|
-
print(f"Deviation from Benford
|
|
341
|
+
print(f"Deviation from Benford Law: {result.mad:.2f}%")
|
|
342
342
|
```
|
|
343
343
|
|
|
344
344
|
### Business Intelligence
|
|
@@ -386,7 +386,7 @@ import lawkit
|
|
|
386
386
|
result = lawkit.analyze_zipf('document.txt',
|
|
387
387
|
lawkit.LawkitOptions(output='json'))
|
|
388
388
|
|
|
389
|
-
print(f"Text follows Zipf
|
|
389
|
+
print(f"Text follows Zipf Law: {result.p_value > 0.05}")
|
|
390
390
|
print(f"Power law exponent: {result.exponent:.3f}")
|
|
391
391
|
```
|
|
392
392
|
|
|
@@ -394,9 +394,9 @@ print(f"Power law exponent: {result.exponent:.3f}")
|
|
|
394
394
|
|
|
395
395
|
### Main Functions
|
|
396
396
|
|
|
397
|
-
- `analyze_benford(input_data, options)` - Benford
|
|
397
|
+
- `analyze_benford(input_data, options)` - Benford Law analysis
|
|
398
398
|
- `analyze_pareto(input_data, options)` - Pareto principle analysis
|
|
399
|
-
- `analyze_zipf(input_data, options)` - Zipf
|
|
399
|
+
- `analyze_zipf(input_data, options)` - Zipf Law analysis
|
|
400
400
|
- `analyze_normal(input_data, options)` - Normal distribution analysis
|
|
401
401
|
- `analyze_poisson(input_data, options)` - Poisson distribution analysis
|
|
402
402
|
- `compare_laws(input_data, options)` - Multi-law comparison
|
|
@@ -15,7 +15,7 @@ This will automatically download the appropriate `lawkit` binary for your system
|
|
|
15
15
|
```python
|
|
16
16
|
import lawkit
|
|
17
17
|
|
|
18
|
-
# Analyze financial data with Benford
|
|
18
|
+
# Analyze financial data with Benford Law
|
|
19
19
|
result = lawkit.analyze_benford('financial_data.csv')
|
|
20
20
|
print(result)
|
|
21
21
|
|
|
@@ -40,9 +40,9 @@ print(f"80/20 concentration: {pareto_result.concentration_80_20}")
|
|
|
40
40
|
|
|
41
41
|
### Statistical Laws Supported
|
|
42
42
|
|
|
43
|
-
- **Benford
|
|
43
|
+
- **Benford Law**: Detect fraud and anomalies in numerical data
|
|
44
44
|
- **Pareto Principle**: Analyze 80/20 distributions and concentration
|
|
45
|
-
- **Zipf
|
|
45
|
+
- **Zipf Law**: Analyze word frequencies and power-law distributions
|
|
46
46
|
- **Normal Distribution**: Test for normality and detect outliers
|
|
47
47
|
- **Poisson Distribution**: Analyze rare events and count data
|
|
48
48
|
|
|
@@ -69,7 +69,7 @@ print(f"80/20 concentration: {pareto_result.concentration_80_20}")
|
|
|
69
69
|
```python
|
|
70
70
|
import lawkit
|
|
71
71
|
|
|
72
|
-
# Analyze with Benford
|
|
72
|
+
# Analyze with Benford Law
|
|
73
73
|
result = lawkit.analyze_benford('invoice_data.csv')
|
|
74
74
|
print(result)
|
|
75
75
|
|
|
@@ -133,7 +133,7 @@ print(f"Overall risk level: {comparison.risk_level}")
|
|
|
133
133
|
```python
|
|
134
134
|
import lawkit
|
|
135
135
|
|
|
136
|
-
# Generate Benford
|
|
136
|
+
# Generate Benford Law compliant data
|
|
137
137
|
benford_data = lawkit.generate_data('benf', samples=1000, seed=42)
|
|
138
138
|
print(benford_data)
|
|
139
139
|
|
|
@@ -298,7 +298,7 @@ result = lawkit.analyze_benford('invoices.csv',
|
|
|
298
298
|
if result.risk_level in ['High', 'Critical']:
|
|
299
299
|
print("🚨 Potential fraud detected in invoice data")
|
|
300
300
|
print(f"Statistical significance: p={result.p_value:.6f}")
|
|
301
|
-
print(f"Deviation from Benford
|
|
301
|
+
print(f"Deviation from Benford Law: {result.mad:.2f}%")
|
|
302
302
|
```
|
|
303
303
|
|
|
304
304
|
### Business Intelligence
|
|
@@ -346,7 +346,7 @@ import lawkit
|
|
|
346
346
|
result = lawkit.analyze_zipf('document.txt',
|
|
347
347
|
lawkit.LawkitOptions(output='json'))
|
|
348
348
|
|
|
349
|
-
print(f"Text follows Zipf
|
|
349
|
+
print(f"Text follows Zipf Law: {result.p_value > 0.05}")
|
|
350
350
|
print(f"Power law exponent: {result.exponent:.3f}")
|
|
351
351
|
```
|
|
352
352
|
|
|
@@ -354,9 +354,9 @@ print(f"Power law exponent: {result.exponent:.3f}")
|
|
|
354
354
|
|
|
355
355
|
### Main Functions
|
|
356
356
|
|
|
357
|
-
- `analyze_benford(input_data, options)` - Benford
|
|
357
|
+
- `analyze_benford(input_data, options)` - Benford Law analysis
|
|
358
358
|
- `analyze_pareto(input_data, options)` - Pareto principle analysis
|
|
359
|
-
- `analyze_zipf(input_data, options)` - Zipf
|
|
359
|
+
- `analyze_zipf(input_data, options)` - Zipf Law analysis
|
|
360
360
|
- `analyze_normal(input_data, options)` - Normal distribution analysis
|
|
361
361
|
- `analyze_poisson(input_data, options)` - Poisson distribution analysis
|
|
362
362
|
- `compare_laws(input_data, options)` - Multi-law comparison
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "lawkit-python"
|
|
7
|
-
version = "2.1.
|
|
7
|
+
version = "2.1.1"
|
|
8
8
|
description = "Python wrapper for lawkit - Statistical law analysis toolkit for fraud detection and data quality assessment"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|