ml-lab-prep 0.2.0__tar.gz → 0.3.2__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.
- ml_lab_prep-0.3.2/PKG-INFO +19 -0
- ml_lab_prep-0.3.2/README.md +12 -0
- {ml_lab_prep-0.2.0 → ml_lab_prep-0.3.2}/pyproject.toml +5 -4
- ml_lab_prep-0.3.2/src/ml_lab_prep/__init__.py +1 -0
- {ml_lab_prep-0.2.0 → ml_lab_prep-0.3.2}/src/ml_lab_prep/cli.py +12 -16
- ml_lab_prep-0.3.2/src/ml_lab_prep/content/01_Spambase_Classification.ipynb +2661 -0
- ml_lab_prep-0.3.2/src/ml_lab_prep/content/02_BreastCancer_Classification.ipynb +2536 -0
- ml_lab_prep-0.3.2/src/ml_lab_prep/content/03_LoanAmount_Regression.ipynb +1971 -0
- ml_lab_prep-0.3.2/src/ml_lab_prep/content/04_KMeans_Clustering.ipynb +1313 -0
- ml_lab_prep-0.3.2/src/ml_lab_prep.egg-info/PKG-INFO +19 -0
- {ml_lab_prep-0.2.0 → ml_lab_prep-0.3.2}/src/ml_lab_prep.egg-info/SOURCES.txt +1 -7
- {ml_lab_prep-0.2.0 → ml_lab_prep-0.3.2}/src/ml_lab_prep.egg-info/entry_points.txt +1 -0
- ml_lab_prep-0.2.0/PKG-INFO +0 -35
- ml_lab_prep-0.2.0/README.md +0 -22
- ml_lab_prep-0.2.0/src/ml_lab_prep/__init__.py +0 -1
- ml_lab_prep-0.2.0/src/ml_lab_prep/content/01_Spambase_Classification.ipynb +0 -1167
- ml_lab_prep-0.2.0/src/ml_lab_prep/content/02_BreastCancer_Classification.ipynb +0 -1167
- ml_lab_prep-0.2.0/src/ml_lab_prep/content/03_LoanAmount_Regression.ipynb +0 -963
- ml_lab_prep-0.2.0/src/ml_lab_prep/content/04_KMeans_Clustering.ipynb +0 -416
- ml_lab_prep-0.2.0/src/ml_lab_prep/content/README.md +0 -38
- ml_lab_prep-0.2.0/src/ml_lab_prep/content/data/breast_cancer.csv +0 -570
- ml_lab_prep-0.2.0/src/ml_lab_prep/content/data/loan_data.csv +0 -601
- ml_lab_prep-0.2.0/src/ml_lab_prep/content/data/spambase.csv +0 -4602
- ml_lab_prep-0.2.0/src/ml_lab_prep/content/requirements.txt +0 -7
- ml_lab_prep-0.2.0/src/ml_lab_prep.egg-info/PKG-INFO +0 -35
- ml_lab_prep-0.2.0/src/ml_lab_prep.egg-info/requires.txt +0 -6
- {ml_lab_prep-0.2.0 → ml_lab_prep-0.3.2}/setup.cfg +0 -0
- {ml_lab_prep-0.2.0 → ml_lab_prep-0.3.2}/src/ml_lab_prep.egg-info/dependency_links.txt +0 -0
- {ml_lab_prep-0.2.0 → ml_lab_prep-0.3.2}/src/ml_lab_prep.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ml-lab-prep
|
|
3
|
+
Version: 0.3.2
|
|
4
|
+
Summary: 4 bare-bones ML lab pipeline notebooks
|
|
5
|
+
Requires-Python: >=3.9
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
|
|
8
|
+
# ml-lab-prep
|
|
9
|
+
|
|
10
|
+
Four ML lab pipeline notebooks (spam classification, breast cancer ensembles, loan regression, K-Means).
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install ml-lab-prep
|
|
14
|
+
ml-lab
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Pick with up/down and space, press enter. The notebooks are saved in the current folder.
|
|
18
|
+
|
|
19
|
+
Without the picker: `ml-lab init spam loan` (keys: spam, cancer, loan, kmeans) or `ml-lab init --all`.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# ml-lab-prep
|
|
2
|
+
|
|
3
|
+
Four ML lab pipeline notebooks (spam classification, breast cancer ensembles, loan regression, K-Means).
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
pip install ml-lab-prep
|
|
7
|
+
ml-lab
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Pick with up/down and space, press enter. The notebooks are saved in the current folder.
|
|
11
|
+
|
|
12
|
+
Without the picker: `ml-lab init spam loan` (keys: spam, cancer, loan, kmeans) or `ml-lab init --all`.
|
|
@@ -4,17 +4,18 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ml-lab-prep"
|
|
7
|
-
version = "0.2
|
|
8
|
-
description = "4 bare-bones ML lab pipeline notebooks
|
|
7
|
+
version = "0.3.2"
|
|
8
|
+
description = "4 bare-bones ML lab pipeline notebooks "
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
|
-
dependencies = [
|
|
11
|
+
dependencies = []
|
|
12
12
|
|
|
13
13
|
[project.scripts]
|
|
14
14
|
ml-lab-prep = "ml_lab_prep.cli:main"
|
|
15
|
+
ml-lab = "ml_lab_prep.cli:main"
|
|
15
16
|
|
|
16
17
|
[tool.setuptools.packages.find]
|
|
17
18
|
where = ["src"]
|
|
18
19
|
|
|
19
20
|
[tool.setuptools.package-data]
|
|
20
|
-
ml_lab_prep = ["content/*.ipynb"
|
|
21
|
+
ml_lab_prep = ["content/*.ipynb"]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.2"
|
|
@@ -2,11 +2,11 @@ import argparse, curses, shutil, sys
|
|
|
2
2
|
from importlib.resources import files
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
|
|
5
|
-
ITEMS = { # key: (notebook,
|
|
6
|
-
"spam": ("01_Spambase_Classification.ipynb",
|
|
7
|
-
"cancer": ("02_BreastCancer_Classification.ipynb", "
|
|
8
|
-
"loan": ("03_LoanAmount_Regression.ipynb",
|
|
9
|
-
"kmeans": ("04_KMeans_Clustering.ipynb",
|
|
5
|
+
ITEMS = { # key: (notebook, description)
|
|
6
|
+
"spam": ("01_Spambase_Classification.ipynb", "Spam vs ham: Decision Tree, KNN, SVM"),
|
|
7
|
+
"cancer": ("02_BreastCancer_Classification.ipynb", "Breast cancer: Decision Tree, Random Forest, AdaBoost, Gradient Boosting, XGBoost"),
|
|
8
|
+
"loan": ("03_LoanAmount_Regression.ipynb", "Loan regression: Linear, Ridge, Lasso, ElasticNet, Random Forest"),
|
|
9
|
+
"kmeans": ("04_KMeans_Clustering.ipynb", "K-Means clustering + PCA"),
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
|
|
@@ -21,7 +21,7 @@ def pick():
|
|
|
21
21
|
scr.addstr(0, 0, "ml-lab-prep up/down move | space select | a all | enter download | q quit")
|
|
22
22
|
for i, k in enumerate(keys):
|
|
23
23
|
mark = "[x]" if k in on else "[ ]"
|
|
24
|
-
line = f" {mark} {ITEMS[k][0]:<40} {ITEMS[k][
|
|
24
|
+
line = f" {mark} {ITEMS[k][0]:<40} {ITEMS[k][1]}"
|
|
25
25
|
scr.addstr(2 + i, 0, line[: curses.COLS - 1], curses.A_REVERSE if i == cur else 0)
|
|
26
26
|
scr.refresh()
|
|
27
27
|
c = scr.getch()
|
|
@@ -37,15 +37,11 @@ def pick():
|
|
|
37
37
|
|
|
38
38
|
def download(keys, dest):
|
|
39
39
|
src, dest = files("ml_lab_prep") / "content", Path(dest)
|
|
40
|
-
|
|
41
|
-
for name in ("README.md", "requirements.txt"):
|
|
42
|
-
shutil.copy(src / name, dest / name)
|
|
40
|
+
dest.mkdir(parents=True, exist_ok=True)
|
|
43
41
|
for k in keys:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
print(" added", nb)
|
|
48
|
-
print(f"\nDone -> {dest.resolve()}\nNext: cd {dest} && jupyter notebook")
|
|
42
|
+
shutil.copy(src / ITEMS[k][0], dest / ITEMS[k][0])
|
|
43
|
+
print(" added", ITEMS[k][0])
|
|
44
|
+
print("\nSaved in", dest.resolve())
|
|
49
45
|
|
|
50
46
|
|
|
51
47
|
def main():
|
|
@@ -53,10 +49,10 @@ def main():
|
|
|
53
49
|
ap.add_argument("cmd", nargs="?", default="init", choices=["init", "list"])
|
|
54
50
|
ap.add_argument("names", nargs="*", help="spam cancer loan kmeans (omit to pick interactively)")
|
|
55
51
|
ap.add_argument("--all", action="store_true", help="download all 4")
|
|
56
|
-
ap.add_argument("-d", "--dest", default="
|
|
52
|
+
ap.add_argument("-d", "--dest", default=".", help="target folder (default: current folder)")
|
|
57
53
|
a = ap.parse_args()
|
|
58
54
|
if a.cmd == "list":
|
|
59
|
-
for k, v in ITEMS.items(): print(f"{k:8s}{v[0]:42s}{v[
|
|
55
|
+
for k, v in ITEMS.items(): print(f"{k:8s}{v[0]:42s}{v[1]}")
|
|
60
56
|
return
|
|
61
57
|
keys = list(ITEMS) if a.all else a.names
|
|
62
58
|
bad = [k for k in keys if k not in ITEMS]
|