hankcs / hankcs/AveragedPerceptronPython
AveragedPerceptron.py的train中model.predict(features)返回值问题
- Dominant language
- Python
- Stars
- 50
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
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)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
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.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 40/100