Skip to content
Snippets Groups Projects
Commit 583593df authored by Manuel Günther's avatar Manuel Günther
Browse files

Merge branch '5-jetstatistics-divides-by-the-wrong-value' into 'master'

Resolve "JetStatistics divides by the wrong value"

Closes #5

See merge request !13
parents cf95dc0d c3d62df9
No related branches found
No related tags found
1 merge request!13Resolve "JetStatistics divides by the wrong value"
Pipeline #40288 passed
......@@ -142,7 +142,7 @@ double bob::ip::gabor::JetStatistics::logLikelihood(const boost::shared_ptr<bob:
auto kernels = m_gwt->waveletFrequencies();
auto abs = jet->abs(), phase = jet->phase();
for (int j = jet->length(); j--;){
q_phase += sqr(adjust_phase(phase(j) + kernels[j][0] * disp[0] + kernels[j][1] * disp[1] - m_meanPhase(j))) / m_varPhase(j) * abs(j) / m_varAbs(j);
q_phase += sqr(adjust_phase(phase(j) + kernels[j][0] * disp[0] + kernels[j][1] * disp[1] - m_meanPhase(j))) / m_varPhase(j) * abs(j) / m_meanAbs(j);
}
// q_phase *= blitz::sum(m_varPhase);
factor = 2.;
......
......@@ -347,7 +347,7 @@ def test_statistics():
assert numpy.allclose(disparity, (2.12029, -3.76835)), disparity
abs_sim = stats(jets[0], False)
phase_sim = stats(jets[0], True)
assert numpy.allclose((abs_sim, phase_sim), (-1.097344, -5.451094)), str((abs_sim, phase_sim))
assert numpy.allclose((abs_sim, phase_sim), (-1.097344, -0.792773)), str((abs_sim, phase_sim))
stats.gwt = None
assert stats.gwt is None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment