-
Notifications
You must be signed in to change notification settings - Fork 65
[ML] skip calculation of influencer probabilities if no influences specified #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ML] skip calculation of influencer probabilities if no influences specified #149
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the idea is fine. I'd just suggest you skip even a little more.
I don't think this needs another review.
@@ -761,6 +761,11 @@ bool CProbabilityAndInfluenceCalculator::calculate( | |||
|
|||
LOG_TRACE(<< "probability = " << probability); | |||
|
|||
if (m_InfluencerProbabilities.empty() == true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought our guidelines was to prefer == false
to !
, but I'm not sure about == true
this looks a bit funny to me. Also, I think this can safely go before if (!m_Probability.calculate(probability))
to skip more redundant work; I don't actually think it is appropriate to return false in this case either if that were to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair enough, I was unsure myself if I should add the redundant == true
, will remove that.
I wonder about the suggestions to move it up, probability
is an out parameter and according to my investigations this is important to be calculated independent of influencers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder about the suggestions to move it up,
probability
is an out parameter
Sorry, yes you are completely right I didn't read this carefully.
…ecified (elastic#149) skip calculation of influencer probabilities if no influences specified
…ecified (#149) skip calculation of influencer probabilities if no influences specified
skip calculation of influencer probabilities if no influences specified