You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using pythonnet with the .Net library Infer.net (https://dotnet.github.io/infer/ ).
This library has some operator overloading as the '<'.
The following line fail because of the tomorrowsTime < 18.0 part: probTripTakesLessThan18Minutes = engine.Infer[Bernoulli](tomorrowsTime < 18.0).GetProbTrue()
How to deal with operator overloading in Pythonnet?
Thanks!
Activity
caxelrud commentedon Dec 11, 2020
I got it working using the following:
`
threshold = Variable.New[Double].Named("threshold")
threshold.ObservedValue = 18.0
probTripTakesLessThan18Minutes =engine.Infer[Bernoulli(tomorrowsTime.op_GreaterThan(threshold,tomorrowsTime)).GetProbTrue()
`