Microsoft Research Community

Browse Forum Posts by Tags

Showing related tags and posts for the Forums application. See all tags in the site
  • Re: error occurs when constructing a lda model with simple corpus

    Just to summarise everything Laura has noted (many thanks Laura), including the jagged array stuff, here is a modified version of your C# code that will compile and run: static void Main( string [] args) { int K = 3; //number of topics int V = 12; //number of words(terms) in corpus // Documents of variable...
    Posted to Infer.NET (Forum) by John Guiver on 02-23-2009
    Filed under: Dirichlet, Jagged arrays
  • Re: Dirichlets over varying domains

    Hi Laura You could make the Dirichlet itself a variable. For example: Variable < Dirichlet > vPrior = Variable .Observed< Dirichlet >( Dirichlet .Uniform(1)); Variable < Vector > vocabDistr = Variable < Vector >.Random(vPrior); Then, when you're ready to infer, set the observed...
    Posted to Infer.NET (Forum) by John Guiver on 07-16-2009
    Filed under: inference, Dirichlet, multinomial
  • Re: multinomial distribution?

    OK, if that is what you need, then the following C# code will do the job. // Sample data from the true discrete Vector trueProbs = new Vector (0.1, 0.2, 0.3, 0.4); Discrete trueDistrib = new Discrete (trueProbs); int [] data = new int [1000]; for ( int i = 0; i < data.Length; i++) data[ i ] = Rand...
    Posted to Infer.NET (Forum) by John Guiver on 03-03-2009
    Filed under: inference, Dirichlet, Discrete
  • Difference between Variable.Dirichlet(double[] u) and Variable.Dirichlet(Range valueRange, double[] u)?

    hi everyone, What is the difference between Variable.Dirichlet(double[] u) and Variable.Dirichlet(Range valueRange, double[] u)? I tried to use Variable<Vector> pi = Variable.Dirichlet(new double[] { 0.1, 0.1 }); VariableArray<int> z = Variable.Array<int>(n); VariableArray<Vector>...
    Posted to Infer.NET (Forum) by apple3101 on 07-24-2009
    Filed under: Dirichlet, Range
  • Re: Need help for a Bayesian Network Code

    Firstly, you do need the Variable < int > s = Variable .New< int >() and the s.SetTo( Variable .Discrete(alpha[t, q])) if you are dealing with just a single data point (if you have an array, see below). Secondly, you should use Variational Message passing for this inference rather than Expectation...
    Posted to Infer.NET (Forum) by John Guiver on 08-14-2009
    Filed under: Dirichlet, Variational MessagePassing, Breaking Symmetry
Page 1 of 1 (5 items)
©2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Feedback