locked
Problem When Implementing Inference Engine/Recommender

    Question

  • Hi,

    I'm trying to use the inference engine with the given code in the Samples (Recommender.cs),

    but I keep getting a runtime exception:

    System.IO.FileNotFoundException: 'Could not load file or assembly ' System.CodeDom, Version=4.0.0.0 ...

    on this particular line: var userTraitsPosterior = engine.Infer<Gaussian[][]>(<g class="gr_ gr_13 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="13" id="13">userTraits</g>);

    Then, I added a reference to this System.CodeDom with <g class="gr_ gr_14 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="14" id="14">Nuget</g> package manager, but I got another exception on the same line:

    System.PlatformNotSupportedException: 'Operation is not supported on this platform.'

    I did not change anything on the given code, except adding the main function. Please help me as I'm new to this programming environment. Thanks

    -bilih



    • Edited by Bilih Wednesday, April 25, 2018 1:48 AM
    Wednesday, April 25, 2018 1:46 AM

All replies

  • Hi,

    Did you try to build an existing project (from samples) or you created a new project (in Visual Studio?) and used the code from Recommender.cs? If the latter, did you use the right .NET framework? Should be 4.5 or 4.6, or 4.7 if my memory is good. Also note that .NET Core won't work with Infer.NET.


    Wednesday, April 25, 2018 5:30 PM