Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Duplicate Results When Predict for Classification #280

Open
ZhaoyangChen opened this issue Dec 18, 2019 · 2 comments · May be fixed by #281
Open

Duplicate Results When Predict for Classification #280

ZhaoyangChen opened this issue Dec 18, 2019 · 2 comments · May be fixed by #281

Comments

@ZhaoyangChen
Copy link

ZhaoyangChen commented Dec 18, 2019

According to demo

 ./starspace train \
  -trainFile "${DATADIR}"/ag_news.train \
  -model "${MODELDIR}"/ag_news \
  -initRandSd 0.01 \
  -adagrad false \
  -ngrams 1 \
  -lr 0.01 \
  -epoch 5 \
  -thread 20 \
  -dim 10 \
  -negSearchLimit 5 \
  -trainMode 0 \
  -label "__label__" \
  -similarity "dot" \
  -verbose true

echo "Start to evaluate trained model:"

./starspace test \
  -model "${MODELDIR}"/ag_news \
  -testFile "${DATADIR}"/ag_news.test \
  -ngrams 1 \
  -dim 10 \
  -label "__label__" \
  -thread 10 \
  -similarity "dot" \
  -trainMode 0 \
  -verbose true \
  -predictionFile '/tmp/starspace/pred'

I got the duplicate result in '/tmp/starspace/pred' as follows:

Example 0:
LHS:
, movie studios launch legal offensive against online pirates , los angeles - hollywood studios said thursday they will file hundreds of lawsuits later this month against individuals who swap pirated copies of movies over the internet .
RHS:
__label__4
Predictions:
(--) [0.164135] __label__4
(++) [0.164135] __label__4
(--) [0.0509765] __label__3
(--) [0.0509765] __label__3
(--) [-0.0315386] __label__1

Example 1:
LHS:
, super ant colony hits australia , a giant 100km colony of ants which has been discovered in melbourne , australia , could threaten local insect species .
RHS:
__label__4
Predictions:
(--) [0.0536099] __label__4
(++) [0.0536099] __label__4

I wonder if it's a bug or I just misunderstand something.

@tusharkaley
Copy link

Hey @ZhaoyangChen did you find a reason why this was happening or how to fix this?

@Microsheep Microsheep linked a pull request Feb 17, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants