C# Class Gbdx.Aggregations.PivotTableAnalyzer

Show file Open project: DigitalGlobe/DGConnect-ESRI Class Usage Examples

Public Methods

Method Description
CalculateDiffs ( PivotTableEntry a, PivotTableEntry b ) : Double>.Dictionary

Calculates the difference between the values in entry a and b. The resulting distribution is normalized to a value between 0 and 1

DetectChange ( PivotTable ptA, PivotTable ptB, string label, bool diffs ) : PivotTable

Compares two pivot tables. Do not pass in columns that don't make sense to compare. This method encapsulates a cosine similarity calculation on geohash cell pairs, and subsequently, each pair also calculates a diff between each col pair as a quasi percentage diff.

FileToPivotTable ( String file, string rowkeyColumnName ) : PivotTable

Converts a csv file to a pivot table.

GenerateAverageVector ( PivotTable tableWithMoreThanOneRow ) : PivotTable
GetSimilarityGraph ( PivotTable signature ) : Dictionary>
GetSparseSimilarites ( PivotTableEntry baseVector, PivotTable vectors, bool logarithm, bool onlyBase ) : PivotTable
GetSparseSimilarity ( PivotTableEntry a, PivotTableEntry b, bool logarithm, bool onlyBase ) : PivotTableAnalysisResult

Returns a PivotTableAnalysisResult with an empty Data dictionary but with a prob score set to the cosine similarity value of the two input vector spaces. Look here for more info: https://upload.wikimedia.org/math/4/e/4/4e45dc7ae582130813e804f793f24ead.png

PivotTableAnalyzer ( SendAnInt pbarValueUpdate, UpdateAggWindowPbar pbarUpdate ) : System
avg ( List nums ) : double
flattenAndSimplify ( PivotTable withMultipleCompares, String pivCol ) : PivotTable
max ( List nums ) : double
min ( List nums ) : double
stdev ( List list ) : double

Method Details

CalculateDiffs() public method

Calculates the difference between the values in entry a and b. The resulting distribution is normalized to a value between 0 and 1
public CalculateDiffs ( PivotTableEntry a, PivotTableEntry b ) : Double>.Dictionary
a PivotTableEntry
b PivotTableEntry
return Double>.Dictionary

DetectChange() public method

Compares two pivot tables. Do not pass in columns that don't make sense to compare. This method encapsulates a cosine similarity calculation on geohash cell pairs, and subsequently, each pair also calculates a diff between each col pair as a quasi percentage diff.
public DetectChange ( PivotTable ptA, PivotTable ptB, string label, bool diffs ) : PivotTable
ptA PivotTable
ptB PivotTable
label string
diffs bool
return PivotTable

FileToPivotTable() public method

Converts a csv file to a pivot table.
public FileToPivotTable ( String file, string rowkeyColumnName ) : PivotTable
file String
rowkeyColumnName string
return PivotTable

GenerateAverageVector() public method

public GenerateAverageVector ( PivotTable tableWithMoreThanOneRow ) : PivotTable
tableWithMoreThanOneRow PivotTable
return PivotTable

GetSimilarityGraph() public method

public GetSimilarityGraph ( PivotTable signature ) : Dictionary>
signature PivotTable
return Dictionary>

GetSparseSimilarites() public method

public GetSparseSimilarites ( PivotTableEntry baseVector, PivotTable vectors, bool logarithm, bool onlyBase ) : PivotTable
baseVector PivotTableEntry
vectors PivotTable
logarithm bool
onlyBase bool
return PivotTable

GetSparseSimilarity() public method

Returns a PivotTableAnalysisResult with an empty Data dictionary but with a prob score set to the cosine similarity value of the two input vector spaces. Look here for more info: https://upload.wikimedia.org/math/4/e/4/4e45dc7ae582130813e804f793f24ead.png
public GetSparseSimilarity ( PivotTableEntry a, PivotTableEntry b, bool logarithm, bool onlyBase ) : PivotTableAnalysisResult
a PivotTableEntry
b PivotTableEntry
logarithm bool
onlyBase bool
return PivotTableAnalysisResult

PivotTableAnalyzer() public method

public PivotTableAnalyzer ( SendAnInt pbarValueUpdate, UpdateAggWindowPbar pbarUpdate ) : System
pbarValueUpdate SendAnInt
pbarUpdate UpdateAggWindowPbar
return System

avg() public method

public avg ( List nums ) : double
nums List
return double

flattenAndSimplify() public method

public flattenAndSimplify ( PivotTable withMultipleCompares, String pivCol ) : PivotTable
withMultipleCompares PivotTable
pivCol String
return PivotTable

max() public method

public max ( List nums ) : double
nums List
return double

min() public method

public min ( List nums ) : double
nums List
return double

stdev() public method

public stdev ( List list ) : double
list List
return double