hankcs / hankcs/AveragedPerceptronPython
AveragedPerceptron.py的train中model.predict(features)返回值问题
- Ngôn ngữ chính
- Python
- Star
- 50
- Fork
- 29
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
AveragedPerceptron.py的96~97行,model.predict(features)中返回的是guess_tag,而不是每个tag对应的评分:
```
scores = model.predict(features)
guess, score = max(scores.items(), key=lambda i: i[1])
if guess != class_:
model.update(class_, guess, features)
```
是不是应该这样:
```
guess = model.predict(features)
if guess != class_:
model.update(class_, guess, features)
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Start by reading AveragedPerceptron.py around lines 96–97 and then inspect the definition and return contract of model.predict. Verify the training loop's expected value and run the repository's available tests or training example. Done means the loop consistently uses the prediction result required by predict and the reported behavior is covered or manually verified.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- machine-learning
- Loại issue
- Lỗi
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 40/100