locked
What is return type of Infer() for query type QueryTypes.Samples? RRS feed

  • Question

  • I have a discrete integer variable that I want to sample once.

    So I tried;

    int sample = INFERENCE_ENGINE.Infer<int>(myVariable , QueryTypes.Samples);

    and got a "This class was not built to infer 'Var11' with query 'Samples'".

    I tried also 

    IList<int> sample = INFERENCE_ENGINE.Infer<IList<int>>(myVariable , QueryTypes.Samples);

    and got the same message.

    Any ideas?

    Best,

    Roni

     
    Sunday, December 21, 2014 10:50 AM

Answers

  • Just updating how I resolved this issue:

    I could not make this work so I switched back to QueryTypes.Marginal, which returns (in my case) a Discrete type, and then sampled from it.

    • Marked as answer by Roni Stern Wednesday, December 24, 2014 1:05 PM
    Wednesday, December 24, 2014 1:05 PM

All replies

  • Just updating how I resolved this issue:

    I could not make this work so I switched back to QueryTypes.Marginal, which returns (in my case) a Discrete type, and then sampled from it.

    • Marked as answer by Roni Stern Wednesday, December 24, 2014 1:05 PM
    Wednesday, December 24, 2014 1:05 PM
  • This is explained at the bottom of Running inference.
    Wednesday, December 24, 2014 10:22 PM
    Owner