Skip to content

Commit 83c36b3

Browse files
committed
Add digit recognition demo.
1 parent b1bcae2 commit 83c36b3

File tree

7 files changed

+10643
-9
lines changed

7 files changed

+10643
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ _Usage examples: spam-filters, language detection, finding similar documents, ha
3636

3737
- 📗 [Math | Logistic Regression](homemade/logistic_regression) - theory and links for further readings
3838
- ⚙️ [Code | Logistic Regression](homemade/logistic_regression/logistic_regression.py) - implementation example
39-
- ▶️ [Demo | Linear Logistic Regression](https://nbviewer.jupyter.org/github/trekhleb/homemade-machine-learning/blob/master/notebooks/logistic_regression/linear_logistic_regression_demo.ipynb) - predict Iris flower `class` based on `petal_length` and `petal_width`
40-
- ▶️ [Demo | Non-linear Logistic Regression](https://nbviewer.jupyter.org/github/trekhleb/homemade-machine-learning/blob/master/notebooks/logistic_regression/non_linear_logistic_regression_demo.ipynb) - predict microchip `validity` based on `param_1` and `param_2`
39+
- ▶️ [Demo | Logistic Regression With Linear Boundary](https://nbviewer.jupyter.org/github/trekhleb/homemade-machine-learning/blob/master/notebooks/logistic_regression/logistic_regression_with_linear_boundary_demo.ipynb) - predict Iris flower `class` based on `petal_length` and `petal_width`
40+
- ▶️ [Demo | Logistic Regression With Non-Linear Boundary](https://nbviewer.jupyter.org/github/trekhleb/homemade-machine-learning/blob/master/notebooks/logistic_regression/logistic_regression_with_non_linear_boundary_demo.ipynb) - predict microchip `validity` based on `param_1` and `param_2`
4141

4242
## Unsupervised Learning
4343

data/mnist-demo.csv

Lines changed: 10001 additions & 0 deletions
Large diffs are not rendered by default.

homemade/logistic_regression/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22

33
## Jupyter Demos
44

5-
▶️ [Demo | Univariate Linear Regression](https://nbviewer.jupyter.org/github/trekhleb/homemade-machine-learning/blob/master/notebooks/linear_regression/univariate_linear_regression_demo.ipynb) - predict `country happiness` score by `economy GDP`
5+
▶️ [Demo | Logistic Regression With Linear Boundary](https://nbviewer.jupyter.org/github/trekhleb/homemade-machine-learning/blob/master/notebooks/logistic_regression/logistic_regression_with_linear_boundary_demo.ipynb) - predict Iris flower `class` based on `petal_length` and `petal_width`
66

7-
▶️ [Demo | Multivariate Linear Regression](https://nbviewer.jupyter.org/github/trekhleb/homemade-machine-learning/blob/master/notebooks/linear_regression/multivariate_linear_regression_demo.ipynb) - predict `country happiness` score by `economy GDP` and `freedom index`
8-
9-
▶️ [Demo | Non-linear Regression](https://nbviewer.jupyter.org/github/trekhleb/homemade-machine-learning/blob/master/notebooks/linear_regression/non_linear_regression_demo.ipynb) - use linear regression with _polynomial_ and _sinusoid_ features to predict non-linear dependencies.
7+
▶️ [Demo | Logistic Regression With Non-Linear Boundary](https://nbviewer.jupyter.org/github/trekhleb/homemade-machine-learning/blob/master/notebooks/logistic_regression/logistic_regression_with_non_linear_boundary_demo.ipynb) - predict microchip `validity` based on `param_1` and `param_2`
108

119
## Definition
1210

homemade/utils/features/normalize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def normalize(features):
1212
"""
1313

1414
# Copy original array to prevent it from changes.
15-
features_normalized = np.copy(features)
15+
features_normalized = np.copy(features).astype(float)
1616

1717
# Get average values for each feature (column) in X.
1818
features_mean = np.mean(features, 0)

notebooks/logistic_regression/linear_logistic_regression_demo.ipynb renamed to notebooks/logistic_regression/logistic_regression_with_linear_boundary_demo.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Linear Logistic Regression Demo\n",
7+
"# Logistic Regression With Linear Boundary Demo\n",
88
"\n",
99
"> ☝Before moving on with this demo you might want to take a look at:\n",
1010
"> - 📗[Math behind the Logistic Regression](https://github.com/trekhleb/homemade-machine-learning/tree/master/homemade/logistic_regression)\n",

notebooks/logistic_regression/non_linear_logistic_regression_demo.ipynb renamed to notebooks/logistic_regression/logistic_regression_with_non_linear_boundary_demo.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# Non-Linear Logistic Regression Demo\n",
7+
"# Logistic Regression With Non-Linear Boundary Demo\n",
88
"\n",
99
"> ☝Before moving on with this demo you might want to take a look at:\n",
1010
"> - 📗[Math behind the Logistic Regression](https://github.com/trekhleb/homemade-machine-learning/tree/master/homemade/logistic_regression)\n",

0 commit comments

Comments
 (0)