cmc-csci181
cmc-csci181 copied to clipboard
Words with weights not colored
I am encountering a problem when I run my code. Although my infer function constructs a vector of weights, there is no word that appears to explain the classification. Here is my code:
Here are the results:

Hmm... I may have to look at this in person with you.
At a high level, there's two possibilities:
-
You're not setting the
scoresvector correctly. To verify this, you should print out thescoresvector before calling theline2imgfunction and check that it actually has some valid contents. -
The
line2imgfunction doesn't work in your environment for some reason. It works correctly in my environment, but there could easily be bugs in the code that only manifest themselves under other conditions. Did the function correctly create pictures for you with the original sample code?