C# Class BigML.Utils

Afficher le fichier Open project: bigmlcom/bigml-csharp

Méthodes publiques

Méthode Description
convertDistributionArrayToMap ( JsonArray distribution ) : double>.Dictionary

We switch the Array to a Map structure in order to be more easily manipulated

convertDistributionMapToSortedArray ( double>.IDictionary distribution ) : JsonArray

We switch the Array to a Map structure in order to be more easily manipulated

isNumericType ( this o ) : bool
meanOfDistribution ( IList distribution ) : double

Computes the mean of a distribution in the [[point, instances]] syntax

meanOfValues ( IList values ) : double

Computes the mean of a list of double values

mergeBins ( double>.IDictionary distribution, int limit ) : double>.Dictionary

Merges the bins of a regression distribution to the given limit number

mergeBins ( JsonArray distribution, int limit ) : JsonArray

Merges the bins of a regression distribution to the given limit number

mergeDistributions ( double>.Dictionary distribution, double>.Dictionary newDistribution ) : double>.Dictionary

Adds up a new distribution structure to a map formatted distribution

printDistribution ( JsonArray distribution ) : StringBuilder

Prints distribution data

roundOff ( double x, int n ) : double

Round a double number x to n decimal places

sameElement ( IList collection, object value ) : bool

Determines if the given collection contain the same value. We will use the contains method of the list to check if the value is inside

Method Details

convertDistributionArrayToMap() public static méthode

We switch the Array to a Map structure in order to be more easily manipulated
public static convertDistributionArrayToMap ( JsonArray distribution ) : double>.Dictionary
distribution JsonArray current distribution as an JsonArray instance
Résultat double>.Dictionary

convertDistributionMapToSortedArray() public static méthode

We switch the Array to a Map structure in order to be more easily manipulated
public static convertDistributionMapToSortedArray ( double>.IDictionary distribution ) : JsonArray
distribution double>.IDictionary current distribution as an JsonArray instance
Résultat JsonArray

isNumericType() public static méthode

public static isNumericType ( this o ) : bool
o this
Résultat bool

meanOfDistribution() public static méthode

Computes the mean of a distribution in the [[point, instances]] syntax
public static meanOfDistribution ( IList distribution ) : double
distribution IList /// @return
Résultat double

meanOfValues() public static méthode

Computes the mean of a list of double values
public static meanOfValues ( IList values ) : double
values IList
Résultat double

mergeBins() public static méthode

Merges the bins of a regression distribution to the given limit number
public static mergeBins ( double>.IDictionary distribution, int limit ) : double>.Dictionary
distribution double>.IDictionary
limit int
Résultat double>.Dictionary

mergeBins() public static méthode

Merges the bins of a regression distribution to the given limit number
public static mergeBins ( JsonArray distribution, int limit ) : JsonArray
distribution JsonArray
limit int
Résultat JsonArray

mergeDistributions() public static méthode

Adds up a new distribution structure to a map formatted distribution
public static mergeDistributions ( double>.Dictionary distribution, double>.Dictionary newDistribution ) : double>.Dictionary
distribution double>.Dictionary
newDistribution double>.Dictionary /// @return
Résultat double>.Dictionary

printDistribution() public static méthode

Prints distribution data
public static printDistribution ( JsonArray distribution ) : StringBuilder
distribution JsonArray
Résultat StringBuilder

roundOff() public static méthode

Round a double number x to n decimal places
public static roundOff ( double x, int n ) : double
x double
n int
Résultat double

sameElement() public static méthode

Determines if the given collection contain the same value. We will use the contains method of the list to check if the value is inside
public static sameElement ( IList collection, object value ) : bool
collection IList the list of elements
value object the value to check.
Résultat bool