Documentation
Case Studies
Extensions
Support
Team


Generic factors
This page lists the builtin methods for creating random variables of different types that depend on the type of the input variable; such factors refer to a generic C# type T. Distribution 
Syntax 
Description 
Copy 
Variable.Copy<T>(Variable<T> x) 
Creates a random variable of type T that is a copy of the input variable. This is equivalent to creating a new variable and constraining it to be equal to the original variable. 
Cut 
Variable.Cut<T>(Variable<T> x) 
Same as the copy factor, but during inference, backward messages are cut off. 
Random 
Variable.Random<T, TDist>(TDist prior) Variable.Random<T, TDist>(Variable<TDist> prior) 
Creates a random variable of type T defined in terms of its prior distribution of type TDist. This is useful when you want to specify your prior at runtime, for example when doing online learning where you want the posteriors from one step to be the priors for the next step. All the distribution factors documented in the various factor sections could be rewritten in terms of the Random factor. 

false,false,1



