Hi.
I have download Your example and works like a charm.
But, copyng and paste the code into a wpf net 7.0 app
Microsoft.ML.Probabilistic.Compiler.CompilationFailedException
HResult=0x80131500
Message=MessageTransform failed with 1 error(s) and 0 warning(s):
Error 0: This model is not supported with ExpectationPropagation due to Factor.GaussianFromMeanAndVariance(double sample, double mean, double variance). Try using a different algorithm or expressing the model differently in
Factor.GaussianFromMeanAndVariance(vdouble9_use, vdouble8_use)
Details: Looking for varianceAverageConditional(sample=Microsoft.ML.Probabilistic.Distributions.Gaussian)(to_sample=Microsoft.ML.Probabilistic.Distributions.Gaussian)(mean=Microsoft.ML.Probabilistic.Distributions.Gaussian)(to_mean=Microsoft.ML.Probabilistic.Distributions.Gaussian)(variance=Microsoft.ML.Probabilistic.Distributions.Gamma)(to_variance=Microsoft.ML.Probabilistic.Distributions.Gamma)(result=Microsoft.ML.Probabilistic.Distributions.Gamma)(sample=True)(mean=False)(variance=True), found:
GaussianFromMeanAndVarianceOp.VarianceAverageConditional(Gaussian sample, Gaussian mean, Gamma variance)
GaussianFromMeanAndVarianceOp_PointVariance.VarianceAverageConditional(Gaussian sample, Gaussian mean, Gamma variance)
Source=Microsoft.ML.Probabilistic.Compiler
StackTrace:
at Microsoft.ML.Probabilistic.Compiler.ModelCompiler.GetTransformedDeclaration(ITypeDeclaration itd, MethodBase method, AttributeRegistry2 inputAttributes) at Microsoft.ML.Probabilistic.Compiler.ModelCompiler.CompileWithoutParams(ITypeDeclaration itd, MethodBase method, AttributeRegistry2 inputAttributes)
at Microsoft.ML.Probabilistic.Models.InferenceEngine.Compile()
at Microsoft.ML.Probabilistic.Models.InferenceEngine.BuildAndCompile(Boolean inferOnlySpecifiedVars, IEnumerable`1 vars)
at Microsoft.ML.Probabilistic.Models.InferenceEngine.GetCompiledInferenceAlgorithm(Boolean inferOnlySpecifiedVars, IVariable var)
at Microsoft.ML.Probabilistic.Models.InferenceEngine.InferAll(Boolean inferOnlySpecifiedVars, IVariable var)
at Microsoft.ML.Probabilistic.Models.InferenceEngine.Infer(IVariable var)
at Probabilistic.MainWindow.BVettore_Click(Object sender, RoutedEventArgs e) in D:\Archivio C#\AR Net 7.0\Test\Probabilistic\Probabilistic\MainWindow.xaml.cs:line 210
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at Probabilistic.App.Main()
Any hint?
I know it is an old example, but is the onlyone i have find.
TIA
Arn
Hi.
I have download Your example and works like a charm.
But, copyng and paste the code into a wpf net 7.0 app
Microsoft.ML.Probabilistic.Compiler.CompilationFailedException
HResult=0x80131500
Message=MessageTransform failed with 1 error(s) and 0 warning(s):
Error 0: This model is not supported with ExpectationPropagation due to Factor.GaussianFromMeanAndVariance(double sample, double mean, double variance). Try using a different algorithm or expressing the model differently in
Factor.GaussianFromMeanAndVariance(vdouble9_use, vdouble8_use)
Details: Looking for varianceAverageConditional(sample=Microsoft.ML.Probabilistic.Distributions.Gaussian)(to_sample=Microsoft.ML.Probabilistic.Distributions.Gaussian)(mean=Microsoft.ML.Probabilistic.Distributions.Gaussian)(to_mean=Microsoft.ML.Probabilistic.Distributions.Gaussian)(variance=Microsoft.ML.Probabilistic.Distributions.Gamma)(to_variance=Microsoft.ML.Probabilistic.Distributions.Gamma)(result=Microsoft.ML.Probabilistic.Distributions.Gamma)(sample=True)(mean=False)(variance=True), found:
GaussianFromMeanAndVarianceOp.VarianceAverageConditional(Gaussian sample, Gaussian mean, Gamma variance)
GaussianFromMeanAndVarianceOp_PointVariance.VarianceAverageConditional(Gaussian sample, Gaussian mean, Gamma variance)
Source=Microsoft.ML.Probabilistic.Compiler
StackTrace:
at Microsoft.ML.Probabilistic.Compiler.ModelCompiler.GetTransformedDeclaration(ITypeDeclaration itd, MethodBase method, AttributeRegistry
2 inputAttributes) at Microsoft.ML.Probabilistic.Compiler.ModelCompiler.CompileWithoutParams(ITypeDeclaration itd, MethodBase method, AttributeRegistry2 inputAttributes)at Microsoft.ML.Probabilistic.Models.InferenceEngine.Compile()
at Microsoft.ML.Probabilistic.Models.InferenceEngine.BuildAndCompile(Boolean inferOnlySpecifiedVars, IEnumerable`1 vars)
at Microsoft.ML.Probabilistic.Models.InferenceEngine.GetCompiledInferenceAlgorithm(Boolean inferOnlySpecifiedVars, IVariable var)
at Microsoft.ML.Probabilistic.Models.InferenceEngine.InferAll(Boolean inferOnlySpecifiedVars, IVariable var)
at Microsoft.ML.Probabilistic.Models.InferenceEngine.Infer(IVariable var)
at Probabilistic.MainWindow.BVettore_Click(Object sender, RoutedEventArgs e) in D:\Archivio C#\AR Net 7.0\Test\Probabilistic\Probabilistic\MainWindow.xaml.cs:line 210
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at Probabilistic.App.Main()
Any hint?
I know it is an old example, but is the onlyone i have find.
TIA
Arn