C# Class UserSimulation.ErrorGenerator

Afficher le fichier Open project: plasma-umass/DataDebug Class Usage Examples

Méthodes publiques

Méthode Description
AddLeadingTrailingSpace ( Microsoft.FSharp.Core.FSharpOption input ) : OptChar[]
GenerateErrorString ( string input, Classification c ) : string
GenerateErrorStrings ( string orig, Classification c, int k ) : string[]
GenerateSubtleErrorString ( double input, Classification c ) : string
MultinomialSample ( double probabilities ) : int

Samples randomly from a multinomial probability vector.

StringToOptCharArray ( string input ) : OptChar[]
Transposize ( Microsoft.FSharp.Core.FSharpOption input, int>.Dictionary transpositions, int guar ) : OptChar[]

Transpose characters. This function expects an OptChar array with no leading or trailing empty characters, i.e., OptChar.None. If guar == -1 then there are no guaranteed transpositions, otherwise guar is the index of the element that must be transposed.

Typoize ( Microsoft.FSharp.Core.FSharpOption input, string>.Dictionary typos, int guar ) : string

Private Methods

Méthode Description
GenerateDistributionForChar ( Microsoft.FSharp.Core.FSharpOption c, Classification classification ) : double>.Dictionary
GenerateTranspositionsDistribution ( Classification classification ) : double>.Dictionary
GetDistributionOfStringsForChar ( Microsoft.FSharp.Core.FSharpOption c, Classification classification ) : double>.Dictionary
GetDistributionOfStringsForCharReuse ( Microsoft.FSharp.Core.FSharpOption c, Classification classification ) : double>.Dictionary
GetDistributionOfTranspositions ( Classification classification ) : double>.Dictionary
GetRandomStringFromDistribution ( double>.Dictionary distribution ) : string

Given a distribution, this method chooses a string from the distribution at random based on the probabilities given in the distribution.

GetRandomTranspositionFromDistribution ( double>.Dictionary transposition_distribution ) : int
OptCharToString ( Microsoft.FSharp.Core.FSharpOption ch ) : string

Method Details

AddLeadingTrailingSpace() public méthode

public AddLeadingTrailingSpace ( Microsoft.FSharp.Core.FSharpOption input ) : OptChar[]
input Microsoft.FSharp.Core.FSharpOption
Résultat OptChar[]

GenerateErrorString() public méthode

public GenerateErrorString ( string input, Classification c ) : string
input string
c Classification
Résultat string

GenerateErrorStrings() public méthode

public GenerateErrorStrings ( string orig, Classification c, int k ) : string[]
orig string
c Classification
k int
Résultat string[]

GenerateSubtleErrorString() public méthode

public GenerateSubtleErrorString ( double input, Classification c ) : string
input double
c Classification
Résultat string

MultinomialSample() public méthode

Samples randomly from a multinomial probability vector.
public MultinomialSample ( double probabilities ) : int
probabilities double A double[] containing p values; must sum to 1!
Résultat int

StringToOptCharArray() public méthode

public StringToOptCharArray ( string input ) : OptChar[]
input string
Résultat OptChar[]

Transposize() public méthode

Transpose characters. This function expects an OptChar array with no leading or trailing empty characters, i.e., OptChar.None. If guar == -1 then there are no guaranteed transpositions, otherwise guar is the index of the element that must be transposed.
public Transposize ( Microsoft.FSharp.Core.FSharpOption input, int>.Dictionary transpositions, int guar ) : OptChar[]
input Microsoft.FSharp.Core.FSharpOption
transpositions int>.Dictionary
guar int
Résultat OptChar[]

Typoize() public méthode

public Typoize ( Microsoft.FSharp.Core.FSharpOption input, string>.Dictionary typos, int guar ) : string
input Microsoft.FSharp.Core.FSharpOption
typos string>.Dictionary
guar int
Résultat string