datapruning 1.0.7__tar.gz → 1.0.8__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.
Files changed (34) hide show
  1. {datapruning-1.0.7/datapruning.egg-info → datapruning-1.0.8}/PKG-INFO +1 -1
  2. datapruning-1.0.8/datapruning/engine/strategy_display.py +111 -0
  3. {datapruning-1.0.7 → datapruning-1.0.8/datapruning.egg-info}/PKG-INFO +1 -1
  4. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning.egg-info/SOURCES.txt +1 -0
  5. {datapruning-1.0.7 → datapruning-1.0.8}/pyproject.toml +1 -1
  6. {datapruning-1.0.7 → datapruning-1.0.8}/LICENSE +0 -0
  7. {datapruning-1.0.7 → datapruning-1.0.8}/MANIFEST.in +0 -0
  8. {datapruning-1.0.7 → datapruning-1.0.8}/README.md +0 -0
  9. {datapruning-1.0.7 → datapruning-1.0.8}/build_src/_core.c +0 -0
  10. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/__init__.py +0 -0
  11. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/algorithms/__init__.py +0 -0
  12. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/algorithms/base.py +0 -0
  13. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/algorithms/cluster_centroids.py +0 -0
  14. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/algorithms/density_pruner.py +0 -0
  15. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/algorithms/duplicate_aware.py +0 -0
  16. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/algorithms/instance_hardness.py +0 -0
  17. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/algorithms/random_undersampler.py +0 -0
  18. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/algorithms/registry.py +0 -0
  19. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/engine/__init__.py +0 -0
  20. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/engine/benchmark.py +0 -0
  21. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/engine/explainability.py +0 -0
  22. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/engine/intelligence.py +0 -0
  23. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/engine/optimizer.py +0 -0
  24. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/engine/scanner.py +0 -0
  25. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/engine/strategy_selector.py +0 -0
  26. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/pipeline.py +0 -0
  27. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/reports/__init__.py +0 -0
  28. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/reports/exporter.py +0 -0
  29. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning/sdk.py +0 -0
  30. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning.egg-info/dependency_links.txt +0 -0
  31. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning.egg-info/requires.txt +0 -0
  32. {datapruning-1.0.7 → datapruning-1.0.8}/datapruning.egg-info/top_level.txt +0 -0
  33. {datapruning-1.0.7 → datapruning-1.0.8}/setup.cfg +0 -0
  34. {datapruning-1.0.7 → datapruning-1.0.8}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datapruning
3
- Version: 1.0.7
3
+ Version: 1.0.8
4
4
  Summary: Intelligent data pruning for ML datasets
5
5
  License: Proprietary
6
6
  Project-URL: Homepage, https://www.datapruning.com
@@ -0,0 +1,111 @@
1
+ STRATEGY_DISPLAY = {
2
+ "random": {
3
+ "display_name": "Fast Reduction",
4
+ "icon": "\u26a1",
5
+ "description": "Quickly reduces dataset size by randomly selecting a subset of samples.",
6
+ "best_for": "Large, balanced datasets where speed is the priority",
7
+ "advantages": [
8
+ "Extremely fast execution",
9
+ "Low memory usage",
10
+ "Stable and predictable",
11
+ ],
12
+ "tradeoffs": [
13
+ "Random selection may discard important samples",
14
+ "No class imbalance awareness",
15
+ ],
16
+ "recommended_models": ["LightGBM", "XGBoost", "Random Forest"],
17
+ },
18
+ "iht": {
19
+ "display_name": "Boundary Optimization",
20
+ "icon": "\ud83c\udfaf",
21
+ "description": "Preserves difficult-to-classify examples near decision boundaries.",
22
+ "best_for": "Fraud detection, rare event prediction, imbalanced classification",
23
+ "advantages": [
24
+ "Preserves difficult examples",
25
+ "Better decision boundaries",
26
+ "Model-informed selection",
27
+ ],
28
+ "tradeoffs": [
29
+ "Slightly slower than random methods",
30
+ ],
31
+ "recommended_models": ["XGBoost", "LightGBM", "CatBoost"],
32
+ },
33
+ "cluster": {
34
+ "display_name": "Representative Compression",
35
+ "icon": "\ud83d\udcca",
36
+ "description": "Creates a compact representative subset by clustering the dataset.",
37
+ "best_for": "Very large datasets needing maximum compression",
38
+ "advantages": [
39
+ "Keeps representative patterns",
40
+ "Good compression ratios",
41
+ ],
42
+ "tradeoffs": [
43
+ "May smooth out local structure",
44
+ ],
45
+ "recommended_models": ["LightGBM", "Random Forest"],
46
+ },
47
+ "density": {
48
+ "display_name": "Structural Optimization",
49
+ "icon": "\ud83e\udde9",
50
+ "description": "Removes redundant samples in high-density regions while preserving structure.",
51
+ "best_for": "General tabular datasets with clear structure",
52
+ "advantages": [
53
+ "Structure-aware selection",
54
+ "Stable results",
55
+ ],
56
+ "tradeoffs": [
57
+ "Experimental on highly imbalanced data",
58
+ ],
59
+ "recommended_models": ["XGBoost", "CatBoost", "LightGBM"],
60
+ },
61
+ "duplicate_aware": {
62
+ "display_name": "Duplicate Cleanup",
63
+ "icon": "\ud83e\uddf9",
64
+ "description": "Identifies and removes duplicate or near-duplicate records.",
65
+ "best_for": "Datasets with many repeated or near-identical records",
66
+ "advantages": [
67
+ "Removes exact and near duplicates",
68
+ "Very fast on most datasets",
69
+ ],
70
+ "tradeoffs": [
71
+ "Limited effect on already clean datasets",
72
+ ],
73
+ "recommended_models": ["Any \u2014 data quality improvement"],
74
+ },
75
+ }
76
+
77
+
78
+ def get_strategy_display(key: str) -> dict:
79
+ return dict(STRATEGY_DISPLAY.get(key, {
80
+ "display_name": key.replace("_", " ").title(),
81
+ "icon": "\ud83d\udd27",
82
+ "description": "",
83
+ "best_for": "",
84
+ "advantages": [],
85
+ "tradeoffs": [],
86
+ "recommended_models": [],
87
+ }))
88
+
89
+
90
+ def enrich_algorithm_info(algo: dict) -> dict:
91
+ display = get_strategy_display(algo.get("key", ""))
92
+ return {**algo, **display}
93
+
94
+
95
+ def enrich_recommendation(rec: dict) -> dict:
96
+ key = rec.get("algorithm_key", "")
97
+ display = get_strategy_display(key)
98
+ enriched = {
99
+ "friendly_name": display["display_name"],
100
+ "icon": display["icon"],
101
+ "description": display["description"],
102
+ "best_for": display["best_for"],
103
+ "advantages": display["advantages"],
104
+ "tradeoffs": display["tradeoffs"],
105
+ "recommended_models": display["recommended_models"],
106
+ }
107
+ return {**rec, **enriched}
108
+
109
+
110
+ def enrich_alternatives(alternatives: list) -> list:
111
+ return [enrich_algorithm_info(alt) for alt in alternatives]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datapruning
3
- Version: 1.0.7
3
+ Version: 1.0.8
4
4
  Summary: Intelligent data pruning for ML datasets
5
5
  License: Proprietary
6
6
  Project-URL: Homepage, https://www.datapruning.com
@@ -26,6 +26,7 @@ datapruning/engine/explainability.py
26
26
  datapruning/engine/intelligence.py
27
27
  datapruning/engine/optimizer.py
28
28
  datapruning/engine/scanner.py
29
+ datapruning/engine/strategy_display.py
29
30
  datapruning/engine/strategy_selector.py
30
31
  datapruning/reports/__init__.py
31
32
  datapruning/reports/exporter.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "datapruning"
7
- version = "1.0.7"
7
+ version = "1.0.8"
8
8
  description = "Intelligent data pruning for ML datasets"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes
File without changes
File without changes
File without changes