Skip to content

Commit

Permalink
实现照明灯识别程序
Browse files Browse the repository at this point in the history
  • Loading branch information
plter committed Mar 8, 2018
1 parent 7a3275e commit a4f7d5c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea
*.iml
8 changes: 8 additions & 0 deletions LampRecognizer/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from sklearn import tree

train_data = [[3.5, 300], [5, 500], [6.5, 600], [8, 150], [11, 200], [13, 240], [25, 280], [40, 450], [60, 680]]
train_target = [0, 0, 0, 1, 1, 1, 2, 2, 2]

clf = tree.DecisionTreeClassifier()
clf.fit(train_data, train_target)
print(clf.predict([[4, 400]]))
Binary file modified 机器学习之手写识别.pptx
Binary file not shown.

0 comments on commit a4f7d5c

Please sign in to comment.