Class SequenceDistributionFormatPointMassAsString
An implementation of AutomatonBasedSequenceDistributionFormatBase, which works on a given distribution as follows:
- If the distribution is not a point mass, applies the underlying automaton format to the probability function.
- If the distribution is a point mass, simply calls ToString() on the point.
Inheritance
Implements
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Distributions.Automata
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public class SequenceDistributionFormatPointMassAsString : AutomatonBasedSequenceDistributionFormatBase, ISequenceDistributionFormat
Constructors
SequenceDistributionFormatPointMassAsString(IAutomatonFormat)
Initializes a new instance of the SequenceDistributionFormatPointMassAsString class.
Declaration
public SequenceDistributionFormatPointMassAsString(IAutomatonFormat automatonFormat)
Parameters
Type | Name | Description |
---|---|---|
IAutomatonFormat | automatonFormat | The underlying automaton format. |
Methods
ConvertPointMassToString<TSequence, TElement, TElementDistribution, TSequenceManipulator, TAutomaton, TWeightFunction, TWeightFunctionFactory, TSequenceDistribution>(TSequenceDistribution)
Converts a point mass distribution to a string by calling ToString() on the point.
Declaration
protected override string ConvertPointMassToString<TSequence, TElement, TElementDistribution, TSequenceManipulator, TAutomaton, TWeightFunction, TWeightFunctionFactory, TSequenceDistribution>(TSequenceDistribution sequenceDistribution)
where TSequence : class, IEnumerable<TElement> where TElementDistribution : IImmutableDistribution<TElement, TElementDistribution>, CanGetLogAverageOf<TElementDistribution>, CanComputeProduct<TElementDistribution>, CanCreatePartialUniform<TElementDistribution>, SummableExactly<TElementDistribution>, Sampleable<TElement>, new()
where TSequenceManipulator : ISequenceManipulator<TSequence, TElement>, new()
where TAutomaton : Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TAutomaton>, new()
where TWeightFunction : WeightFunctions<TSequence, TElement, TElementDistribution, TSequenceManipulator, TAutomaton>.IWeightFunction<TWeightFunction>, new()
where TWeightFunctionFactory : WeightFunctions<TSequence, TElement, TElementDistribution, TSequenceManipulator, TAutomaton>.IWeightFunctionFactory<TWeightFunction>, new()
where TSequenceDistribution : SequenceDistribution<TSequence, TElement, TElementDistribution, TSequenceManipulator, TAutomaton, TWeightFunction, TWeightFunctionFactory, TSequenceDistribution>, new()
Parameters
Type | Name | Description |
---|---|---|
TSequenceDistribution | sequenceDistribution | The sequence distribution to convert to string. |
Returns
Type | Description |
---|---|
String | The string representation of the |
Type Parameters
Name | Description |
---|---|
TSequence | The type of sequences |
TElement | The type of sequence elements of |
TElementDistribution | The type of distributions over sequence elements of |
TSequenceManipulator | The type providing ways to manipulate instances of |
TAutomaton | The type of automata used by |
TWeightFunction | The type of weight functions used by |
TWeightFunctionFactory | The type of weight function factory used by |
TSequenceDistribution | The concrete type of |