Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. def testing(weights, testingData):
  2. outputNode = [[0] * len(testingData)]*4
  3. for emotions in range(1, 5):
  4. moodOutput = []
  5. for i in range(len(testingData)):
  6.  
  7. for p in range(0, 400):
  8. outputNode[emotions-1][i] += testingData[i].image[p]*weights[emotions-1][p]
  9.  
  10. outputNode[emotions-1][i] = sign(outputNode[emotions-1][i])
  11. #Decide classification based on outputNode
  12.  
  13. #return "key vector" for testingdata
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement