Skip to content

Commit

Permalink
Add digit recognition demo.
Browse files Browse the repository at this point in the history
  • Loading branch information
trekhleb committed Dec 19, 2018
1 parent b1bcae2 commit 83c36b3
Show file tree
Hide file tree
Showing 7 changed files with 10,643 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ _Usage examples: spam-filters, language detection, finding similar documents, ha

- 📗 [Math | Logistic Regression](homemade/logistic_regression) - theory and links for further readings
- ⚙️ [Code | Logistic Regression](homemade/logistic_regression/logistic_regression.py) - implementation example
- ▶️ [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`
- ▶️ [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`
- ▶️ [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`
- ▶️ [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`

## Unsupervised Learning

Expand Down
10,001 changes: 10,001 additions & 0 deletions data/mnist-demo.csv

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions homemade/logistic_regression/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

## Jupyter Demos

▶️ [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`
▶️ [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`

▶️ [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`

▶️ [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.
▶️ [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`

## Definition

Expand Down
2 changes: 1 addition & 1 deletion homemade/utils/features/normalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def normalize(features):
"""

# Copy original array to prevent it from changes.
features_normalized = np.copy(features)
features_normalized = np.copy(features).astype(float)

# Get average values for each feature (column) in X.
features_mean = np.mean(features, 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Linear Logistic Regression Demo\n",
"# Logistic Regression With Linear Boundary Demo\n",
"\n",
"> ☝Before moving on with this demo you might want to take a look at:\n",
"> - 📗[Math behind the Logistic Regression](https://github.com/trekhleb/homemade-machine-learning/tree/master/homemade/logistic_regression)\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Non-Linear Logistic Regression Demo\n",
"# Logistic Regression With Non-Linear Boundary Demo\n",
"\n",
"> ☝Before moving on with this demo you might want to take a look at:\n",
"> - 📗[Math behind the Logistic Regression](https://github.com/trekhleb/homemade-machine-learning/tree/master/homemade/logistic_regression)\n",
Expand Down
Loading

0 comments on commit 83c36b3

Please sign in to comment.