coreLearn 0.1.0__tar.gz → 0.1.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.
- {corelearn-0.1.0 → corelearn-0.1.2}/PKG-INFO +4 -15
- {corelearn-0.1.0 → corelearn-0.1.2}/README.md +3 -14
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn.egg-info/PKG-INFO +4 -15
- {corelearn-0.1.0 → corelearn-0.1.2}/pyproject.toml +1 -1
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn/__init__.py +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn/base.py +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn/distances.py +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn/evaluator.py +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn/knn.py +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn/linear_regression.py +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn/tests/__init__.py +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn/tests/test_distances.py +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn/tests/test_evaluator.py +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn/tests/test_knn.py +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn/tests/test_linear_regression.py +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn.egg-info/SOURCES.txt +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn.egg-info/dependency_links.txt +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn.egg-info/requires.txt +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/coreLearn.egg-info/top_level.txt +0 -0
- {corelearn-0.1.0 → corelearn-0.1.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: coreLearn
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Basic ML algorithms library built from scratch (KNN + Linear Regression)
|
|
5
5
|
Requires-Python: >=3.9
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -13,18 +13,16 @@ Requires-Dist: jupyter; extra == "dev"
|
|
|
13
13
|
# CoreLearn
|
|
14
14
|
|
|
15
15
|
A lightweight Python machine learning library built from scratch using only **NumPy**.
|
|
16
|
-
Implements KNN classification and Linear Regression
|
|
16
|
+
Implements KNN classification and Linear Regression.
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
#
|
|
24
|
-
pip install
|
|
23
|
+
# Download the project using pip:
|
|
24
|
+
pip install coreLearn
|
|
25
25
|
|
|
26
|
-
# Install all dependencies (including dev tools):
|
|
27
|
-
pip install -r requirements.txt
|
|
28
26
|
```
|
|
29
27
|
|
|
30
28
|
After installation, import from anywhere:
|
|
@@ -72,10 +70,6 @@ coreLearn/
|
|
|
72
70
|
├── knn.py ← KNN Classifier — Recursion + Concurrency + OOP
|
|
73
71
|
├── linear_regression.py ← Linear Regression — Strategy Pattern + OOP
|
|
74
72
|
├── evaluator.py ← Metric engine — Functional Programming
|
|
75
|
-
├── examples/
|
|
76
|
-
│ ├── demo_notebook.ipynb
|
|
77
|
-
│ ├── housing.csv
|
|
78
|
-
│ └── penguin.csv
|
|
79
73
|
└── tests/
|
|
80
74
|
├── test_knn.py
|
|
81
75
|
├── test_linear_regression.py
|
|
@@ -234,10 +228,6 @@ def predict(self, X) -> list:
|
|
|
234
228
|
return list(executor.map(_predict_worker, args))
|
|
235
229
|
```
|
|
236
230
|
|
|
237
|
-
**Why no race conditions?**
|
|
238
|
-
Each worker receives its own pickled copy of the KD-Tree and metric via `ProcessPoolExecutor`.
|
|
239
|
-
No shared memory is used, so no synchronization primitives are needed.
|
|
240
|
-
|
|
241
231
|
```python
|
|
242
232
|
# n_jobs=1 → sequential (default, safe for notebooks)
|
|
243
233
|
knn = KNNClassifier(k=5, n_jobs=1)
|
|
@@ -377,7 +367,6 @@ self._weights = self._strategy.fit(X_b, y)
|
|
|
377
367
|
|
|
378
368
|
### 6 — Architectural & Design Patterns
|
|
379
369
|
|
|
380
|
-
**Architecture:** Layered
|
|
381
370
|
- **Core layer** (`base.py`, `distances.py`): abstractions and shared contracts
|
|
382
371
|
- **Algorithm layer** (`knn.py`, `linear_regression.py`): concrete ML algorithms
|
|
383
372
|
- **Evaluation layer** (`evaluator.py`): metric computation
|
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
# CoreLearn
|
|
2
2
|
|
|
3
3
|
A lightweight Python machine learning library built from scratch using only **NumPy**.
|
|
4
|
-
Implements KNN classification and Linear Regression
|
|
4
|
+
Implements KNN classification and Linear Regression.
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
## Installation
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
#
|
|
12
|
-
pip install
|
|
11
|
+
# Download the project using pip:
|
|
12
|
+
pip install coreLearn
|
|
13
13
|
|
|
14
|
-
# Install all dependencies (including dev tools):
|
|
15
|
-
pip install -r requirements.txt
|
|
16
14
|
```
|
|
17
15
|
|
|
18
16
|
After installation, import from anywhere:
|
|
@@ -60,10 +58,6 @@ coreLearn/
|
|
|
60
58
|
├── knn.py ← KNN Classifier — Recursion + Concurrency + OOP
|
|
61
59
|
├── linear_regression.py ← Linear Regression — Strategy Pattern + OOP
|
|
62
60
|
├── evaluator.py ← Metric engine — Functional Programming
|
|
63
|
-
├── examples/
|
|
64
|
-
│ ├── demo_notebook.ipynb
|
|
65
|
-
│ ├── housing.csv
|
|
66
|
-
│ └── penguin.csv
|
|
67
61
|
└── tests/
|
|
68
62
|
├── test_knn.py
|
|
69
63
|
├── test_linear_regression.py
|
|
@@ -222,10 +216,6 @@ def predict(self, X) -> list:
|
|
|
222
216
|
return list(executor.map(_predict_worker, args))
|
|
223
217
|
```
|
|
224
218
|
|
|
225
|
-
**Why no race conditions?**
|
|
226
|
-
Each worker receives its own pickled copy of the KD-Tree and metric via `ProcessPoolExecutor`.
|
|
227
|
-
No shared memory is used, so no synchronization primitives are needed.
|
|
228
|
-
|
|
229
219
|
```python
|
|
230
220
|
# n_jobs=1 → sequential (default, safe for notebooks)
|
|
231
221
|
knn = KNNClassifier(k=5, n_jobs=1)
|
|
@@ -365,7 +355,6 @@ self._weights = self._strategy.fit(X_b, y)
|
|
|
365
355
|
|
|
366
356
|
### 6 — Architectural & Design Patterns
|
|
367
357
|
|
|
368
|
-
**Architecture:** Layered
|
|
369
358
|
- **Core layer** (`base.py`, `distances.py`): abstractions and shared contracts
|
|
370
359
|
- **Algorithm layer** (`knn.py`, `linear_regression.py`): concrete ML algorithms
|
|
371
360
|
- **Evaluation layer** (`evaluator.py`): metric computation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: coreLearn
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Basic ML algorithms library built from scratch (KNN + Linear Regression)
|
|
5
5
|
Requires-Python: >=3.9
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -13,18 +13,16 @@ Requires-Dist: jupyter; extra == "dev"
|
|
|
13
13
|
# CoreLearn
|
|
14
14
|
|
|
15
15
|
A lightweight Python machine learning library built from scratch using only **NumPy**.
|
|
16
|
-
Implements KNN classification and Linear Regression
|
|
16
|
+
Implements KNN classification and Linear Regression.
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
|
-
#
|
|
24
|
-
pip install
|
|
23
|
+
# Download the project using pip:
|
|
24
|
+
pip install coreLearn
|
|
25
25
|
|
|
26
|
-
# Install all dependencies (including dev tools):
|
|
27
|
-
pip install -r requirements.txt
|
|
28
26
|
```
|
|
29
27
|
|
|
30
28
|
After installation, import from anywhere:
|
|
@@ -72,10 +70,6 @@ coreLearn/
|
|
|
72
70
|
├── knn.py ← KNN Classifier — Recursion + Concurrency + OOP
|
|
73
71
|
├── linear_regression.py ← Linear Regression — Strategy Pattern + OOP
|
|
74
72
|
├── evaluator.py ← Metric engine — Functional Programming
|
|
75
|
-
├── examples/
|
|
76
|
-
│ ├── demo_notebook.ipynb
|
|
77
|
-
│ ├── housing.csv
|
|
78
|
-
│ └── penguin.csv
|
|
79
73
|
└── tests/
|
|
80
74
|
├── test_knn.py
|
|
81
75
|
├── test_linear_regression.py
|
|
@@ -234,10 +228,6 @@ def predict(self, X) -> list:
|
|
|
234
228
|
return list(executor.map(_predict_worker, args))
|
|
235
229
|
```
|
|
236
230
|
|
|
237
|
-
**Why no race conditions?**
|
|
238
|
-
Each worker receives its own pickled copy of the KD-Tree and metric via `ProcessPoolExecutor`.
|
|
239
|
-
No shared memory is used, so no synchronization primitives are needed.
|
|
240
|
-
|
|
241
231
|
```python
|
|
242
232
|
# n_jobs=1 → sequential (default, safe for notebooks)
|
|
243
233
|
knn = KNNClassifier(k=5, n_jobs=1)
|
|
@@ -377,7 +367,6 @@ self._weights = self._strategy.fit(X_b, y)
|
|
|
377
367
|
|
|
378
368
|
### 6 — Architectural & Design Patterns
|
|
379
369
|
|
|
380
|
-
**Architecture:** Layered
|
|
381
370
|
- **Core layer** (`base.py`, `distances.py`): abstractions and shared contracts
|
|
382
371
|
- **Algorithm layer** (`knn.py`, `linear_regression.py`): concrete ML algorithms
|
|
383
372
|
- **Evaluation layer** (`evaluator.py`): metric computation
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|