Skip to content

Commit

Permalink
add homework 4 - logistic regression
Browse files Browse the repository at this point in the history
  • Loading branch information
bushuhui committed Sep 27, 2018
1 parent a853fcc commit 621f925
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions homework_04_logistic_regression/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Logistic Regression

自己编程实现Logistic Regression的多分类问题。使用的数据可以是sklearn的digital数据。

![digit](images/digit.png)

加载数据的方式是:
```
import matplotlib.pyplot as plt
from sklearn.datasets import load_digits
# load data
digits = load_digits()
# plot the digits
fig = plt.figure(figsize=(6, 6)) # figure size in inches
fig.subplots_adjust(left=0, right=1, bottom=0, top=1, hspace=0.05, wspace=0.05)
# plot the digits: each image is 8x8 pixels
for i in range(64):
ax = fig.add_subplot(8, 8, i + 1, xticks=[], yticks=[])
ax.imshow(digits.images[i], cmap=plt.cm.binary)
# label the image with the target value
ax.text(0, 7, str(digits.target[i]))
```

要求:
1. 自己编程实现Logistic Regression的多分了。
2. 对比自己实现与sklearn的方法的精度。
3. 如何将分类错误的样本可视化出来?
Binary file added homework_04_logistic_regression/images/digit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 621f925

Please sign in to comment.