btwardow / FactorizationMachines.jl

Factorization Machines for Julia
Other
11 stars 6 forks source link

Correct derivative for classification loss #15

Closed Hydrotoast closed 8 years ago

Hydrotoast commented 8 years ago

Something still seems wrong here.

btwardow commented 8 years ago

Ok, we have to fix test/matrix_factorization/test_rank1.jl test, where we using Heaviside evaluation. Right now Travis is complaining about it, so the change cannot be merge.

However, I tried to fix it, but we having:

y:      [0.0,1.0,0.0,1.0]
predictions: [0.5130858808562035,0.0,0.5138387016379272,0.0]

So the predictions seems to be the opposite as expected values. Additionally, in this test we have to make the output binary (0.0/1.0) as we having Evaluators.heaviside defined as a equality. For e.g. adding:

predictions = (sign(predictions - .5) + 1.0) / 2

before the evaluation. @Hydrotoast what do You think?

Hydrotoast commented 8 years ago

This PR seems to have closed itself after a rebase...