Search Results for

    Show / Hide Table of Contents

    Class ImmutablePairDistribution<TElement, TElementDistribution>

    This class can represent distributions over pairs of two types: a factorized P(x, y) = P(x) P(y), and correlated P(x, y) \propto P(x) P(y) I[x=y]. Both elements of a pair must be of the same type.

    Inheritance
    Object
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>
    ImmutablePairDistribution<TElement, TElementDistribution>
    Implements
    IImmutableDistribution<(T1, T2)<Option<TElement>, Option<TElement>>, ImmutablePairDistribution<TElement, TElementDistribution>>
    IImmutableDistribution
    ICloneable
    Diffable
    CanCreateUniform<ImmutablePairDistribution<TElement, TElementDistribution>>
    CanCreatePointMass<(T1, T2)<Option<TElement>, Option<TElement>>, ImmutablePairDistribution<TElement, TElementDistribution>>
    CanGetLogProb<(T1, T2)<Option<TElement>, Option<TElement>>>
    CanGetLogAverageOf<ImmutablePairDistribution<TElement, TElementDistribution>>
    CanComputeProduct<ImmutablePairDistribution<TElement, TElementDistribution>>
    CanComputeProduct<ImmutablePairDistribution<TElement, TElementDistribution>, ImmutablePairDistribution<TElement, TElementDistribution>>
    SummableExactly<ImmutablePairDistribution<TElement, TElementDistribution>>
    SummableExactly<ImmutablePairDistribution<TElement, TElementDistribution>, ImmutablePairDistribution<TElement, TElementDistribution>>
    Summable<ImmutablePairDistribution<TElement, TElementDistribution>, ImmutablePairDistribution<TElement, TElementDistribution>>
    CanCreatePartialUniform<ImmutablePairDistribution<TElement, TElementDistribution>>
    Inherited Members
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.ElementDistribution1Factory
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.ElementDistribution2Factory
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.First
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.Second
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.IsPointMass
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.Point
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.CreatePointMass((T1, T2)<Option<TElement>, Option<TElement>>)
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.FromFirst(Option<TElementDistribution>)
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.FromSecond(Option<TElementDistribution>)
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.FromFirstSecond(Option<TElementDistribution>, Option<TElementDistribution>)
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.ProjectFirst(TElement, Option<TElementDistribution>)
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.ProjectFirst(TElementDistribution, Option<TElementDistribution>)
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.IsUniform()
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.CreateUniform()
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.ToString()
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.Clone()
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.MaxDiff(Object)
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.GetLogProb((T1, T2)<Option<TElement>, Option<TElement>>)
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.GetLogAverageOf(ImmutablePairDistribution<TElement, TElementDistribution>)
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.Multiply(ImmutablePairDistribution<TElement, TElementDistribution>)
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.Sum(Double, ImmutablePairDistribution<TElement, TElementDistribution>, Double)
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.CreatePartialUniform()
    ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>.IsPartialUniform()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Namespace: Microsoft.ML.Probabilistic.Distributions.Automata
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    public class ImmutablePairDistribution<TElement, TElementDistribution> : ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, ImmutablePairDistribution<TElement, TElementDistribution>>, IImmutableDistribution<(Option<TElement>, Option<TElement>), ImmutablePairDistribution<TElement, TElementDistribution>>, IImmutableDistribution, ICloneable, Diffable, CanCreateUniform<ImmutablePairDistribution<TElement, TElementDistribution>>, CanCreatePointMass<(Option<TElement>, Option<TElement>), ImmutablePairDistribution<TElement, TElementDistribution>>, CanGetLogProb<(Option<TElement>, Option<TElement>)>, CanGetLogAverageOf<ImmutablePairDistribution<TElement, TElementDistribution>>, CanComputeProduct<ImmutablePairDistribution<TElement, TElementDistribution>>, CanComputeProduct<ImmutablePairDistribution<TElement, TElementDistribution>, ImmutablePairDistribution<TElement, TElementDistribution>>, SummableExactly<ImmutablePairDistribution<TElement, TElementDistribution>>, SummableExactly<ImmutablePairDistribution<TElement, TElementDistribution>, ImmutablePairDistribution<TElement, TElementDistribution>>, Summable<ImmutablePairDistribution<TElement, TElementDistribution>, ImmutablePairDistribution<TElement, TElementDistribution>>, CanCreatePartialUniform<ImmutablePairDistribution<TElement, TElementDistribution>> where TElementDistribution : IImmutableDistribution<TElement, TElementDistribution>, CanGetLogAverageOf<TElementDistribution>, CanComputeProduct<TElementDistribution>, CanCreatePartialUniform<TElementDistribution>, new()
    Type Parameters
    Name Description
    TElement

    The type of a pair element.

    TElementDistribution

    The type of a distribution over TElement.

    Properties

    HasEqualityConstraint

    Gets a value indicating whether the equality constraint is set on the distribution.

    Declaration
    public bool HasEqualityConstraint { get; }
    Property Value
    Type Description
    Boolean

    Methods

    Constrained(TElementDistribution)

    Creates a distribution P(x, y) \propto P(x) P(y) I[x=y], where P is a given element distribution.

    Declaration
    public static ImmutablePairDistribution<TElement, TElementDistribution> Constrained(TElementDistribution elementDistribution)
    Parameters
    Type Name Description
    TElementDistribution elementDistribution

    The marginal distribution over pair elements.

    Returns
    Type Description
    ImmutablePairDistribution<TElement, TElementDistribution>

    The created distribution.

    Constrained(TElementDistribution, TElementDistribution)

    Creates a distribution P(x, y) \propto Q(x) R(y) I[x=y], where Q(x) and R(y) are given element distributions.

    Declaration
    public static ImmutablePairDistribution<TElement, TElementDistribution> Constrained(TElementDistribution firstElementDistribution, TElementDistribution secondElementDistribution)
    Parameters
    Type Name Description
    TElementDistribution firstElementDistribution

    The marginal distribution of the first element of a pair.

    TElementDistribution secondElementDistribution

    The marginal distribution of the second element of a pair.

    Returns
    Type Description
    ImmutablePairDistribution<TElement, TElementDistribution>

    The created distribution.

    CreatePartialUniform()

    Creates a distribution uniform over the support of the current distribution.

    Declaration
    public override ImmutablePairDistribution<TElement, TElementDistribution> CreatePartialUniform()
    Returns
    Type Description
    ImmutablePairDistribution<TElement, TElementDistribution>

    The created distribution.

    Overrides
    Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>>.CreatePartialUniform()

    CreatePointMass((Option<TElement>, Option<TElement>))

    Creates a point mass distribution.

    Declaration
    public override ImmutablePairDistribution<TElement, TElementDistribution> CreatePointMass((Option<TElement>, Option<TElement>) point)
    Parameters
    Type Name Description
    (T1, T2)<Option<TElement>, Option<TElement>> point
    Returns
    Type Description
    ImmutablePairDistribution<TElement, TElementDistribution>

    The created distribution.

    Overrides
    Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>>.CreatePointMass(System.ValueTuple<Microsoft.ML.Probabilistic.Collections.Option<TElement>, Microsoft.ML.Probabilistic.Collections.Option<TElement>>)

    CreateUniform()

    Creates a uniform distribution

    Declaration
    public override ImmutablePairDistribution<TElement, TElementDistribution> CreateUniform()
    Returns
    Type Description
    ImmutablePairDistribution<TElement, TElementDistribution>

    The created distribution.

    Overrides
    Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>>.CreateUniform()

    GetLogAverageOf(ImmutablePairDistribution<TElement, TElementDistribution>)

    The log-probability that two distributions would draw the same sample.

    Declaration
    public override double GetLogAverageOf(ImmutablePairDistribution<TElement, TElementDistribution> that)
    Parameters
    Type Name Description
    ImmutablePairDistribution<TElement, TElementDistribution> that
    Returns
    Type Description
    Double

    Math.Log(sum_x this.Evaluate(x)*that.Evaluate(x))

    Overrides
    Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>>.GetLogAverageOf(Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>)
    Remarks

    This can be considered a type of inner product between distributions.

    GetLogProb((Option<TElement>, Option<TElement>))

    Evaluate the log of the density function at the specified domain value

    Declaration
    public override double GetLogProb((Option<TElement>, Option<TElement>) pair)
    Parameters
    Type Name Description
    (T1, T2)<Option<TElement>, Option<TElement>> pair
    Returns
    Type Description
    Double

    The log density

    Overrides
    Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>>.GetLogProb(System.ValueTuple<Microsoft.ML.Probabilistic.Collections.Option<TElement>, Microsoft.ML.Probabilistic.Collections.Option<TElement>>)
    Remarks

    Not currently implemented.

    IsUniform()

    Checks whether the current distribution is uniform.

    Declaration
    public override bool IsUniform()
    Returns
    Type Description
    Boolean

    true if the current distribution is uniform, false otherwise.

    Overrides
    Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>>.IsUniform()

    MaxDiff(Object)

    The maximum difference between this instance and the given

    Declaration
    public override double MaxDiff(object that)
    Parameters
    Type Name Description
    Object that
    Returns
    Type Description
    Double
    Overrides
    Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>>.MaxDiff(System.Object)
    Remarks

    Not currently implemented.

    Multiply(ImmutablePairDistribution<TElement, TElementDistribution>)

    Computes the product of the current instance and other.

    Declaration
    public override ImmutablePairDistribution<TElement, TElementDistribution> Multiply(ImmutablePairDistribution<TElement, TElementDistribution> other)
    Parameters
    Type Name Description
    ImmutablePairDistribution<TElement, TElementDistribution> other
    Returns
    Type Description
    ImmutablePairDistribution<TElement, TElementDistribution>

    The product.

    Overrides
    Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>>.Multiply(Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>)
    Remarks

    Not currently implemented.

    ProjectFirst(TElement, out Option<TElementDistribution>)

    Computes P(y) = R(x, y), where R(x, y) is the current pair distribution, and x is a given element.

    Declaration
    public override double ProjectFirst(TElement first, out Option<TElementDistribution> result)
    Parameters
    Type Name Description
    TElement first
    Option<TElementDistribution> result
    Returns
    Type Description
    Double

    The logarithm of the scale for the projection result.

    Overrides
    Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>>.ProjectFirst(TElement, Microsoft.ML.Probabilistic.Collections.Option<TElementDistribution>)

    ProjectFirst(TElementDistribution, out Option<TElementDistribution>)

    Computes P(y) = sum_x Q(x) R(x, y), where R(x, y) is the current pair distribution, and Q(x) is a given element distribution.

    Declaration
    public override double ProjectFirst(TElementDistribution first, out Option<TElementDistribution> result)
    Parameters
    Type Name Description
    TElementDistribution first
    Option<TElementDistribution> result
    Returns
    Type Description
    Double

    The logarithm of the scale for the projection result.

    Overrides
    Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>>.ProjectFirst(TElementDistribution, Microsoft.ML.Probabilistic.Collections.Option<TElementDistribution>)

    Sum(Double, ImmutablePairDistribution<TElement, TElementDistribution>, Double)

    Computes a distribution with its parameters set to best match a mixture distribution.

    Declaration
    public override ImmutablePairDistribution<TElement, TElementDistribution> Sum(double weightThis, ImmutablePairDistribution<TElement, TElementDistribution> other, double weightOther)
    Parameters
    Type Name Description
    Double weightThis

    A finite nonnegative weight.

    ImmutablePairDistribution<TElement, TElementDistribution> other
    Double weightOther

    A finite nonnegative weight.

    Returns
    Type Description
    ImmutablePairDistribution<TElement, TElementDistribution>

    A distribution of the result type that best matches a mixture distribution.

    Overrides
    Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>>.Sum(System.Double, Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>, System.Double)
    Remarks

    Not currently implemented.

    ToString()

    Returns a string that represents the distribution.

    Declaration
    public override string ToString()
    Returns
    Type Description
    String

    A string that represents the distribution.

    Overrides
    Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistributionBase<TElement, TElementDistribution, TElement, TElementDistribution, Microsoft.ML.Probabilistic.Distributions.Automata.ImmutablePairDistribution<TElement, TElementDistribution>>.ToString()

    Transpose()

    Creates a distribution Q(y, x) = P(x, y), where P(x, y) is the current distribution.

    Declaration
    public ImmutablePairDistribution<TElement, TElementDistribution> Transpose()
    Returns
    Type Description
    ImmutablePairDistribution<TElement, TElementDistribution>

    The created distribution.

    UniformConstrained()

    Creates a distribution P(x, y) \propto I[x=y].

    Declaration
    public static ImmutablePairDistribution<TElement, TElementDistribution> UniformConstrained()
    Returns
    Type Description
    ImmutablePairDistribution<TElement, TElementDistribution>

    The created distribution.

    Implements

    IImmutableDistribution<T, TThis>
    IImmutableDistribution
    System.ICloneable
    Diffable
    CanCreateUniform<TDist>
    CanCreatePointMass<T, TDist>
    CanGetLogProb<T>
    CanGetLogAverageOf<T>
    CanComputeProduct<T>
    CanComputeProduct<TOther, TResult>
    SummableExactly<T>
    SummableExactly<TOther, TResult>
    Summable<TOther, TResult>
    CanCreatePartialUniform<TDist>
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.