Skip to content

Overload case #5

Open
Open

Description

@caxelrud

Hi,
I am translating the Cycling Time case from https://dotnet.github.io/infer/InferNet101.pdf.

The following line has the '<' override:

probTripTakesLessThan18Minutes = engine.Infer[Bernoulli](tomorrowsTime < 18.0).GetProbTrue()
How to do it in pythonet?
Thanks!

Activity

  1. caxelrud commented on Dec 11, 2020

    @caxelrud
    Author

    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()
    `

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions