DataStructures

StringToInt64Map

A mapping from a string to a 64-bit integer.

message StringToInt64Map {
    map<string, int64> map = 1;
}

Int64ToStringMap

A mapping from a 64-bit integer to a string.

message Int64ToStringMap {
    map<int64, string> map = 1;
}

StringToDoubleMap

A mapping from a string to a double-precision floating point number.

message StringToDoubleMap {
    map<string, double> map = 1;
}

Int64ToDoubleMap

A mapping from a 64-bit integer to a double-precision floating point number.

message Int64ToDoubleMap {
    map<int64, double> map = 1;
}

StringVector

A vector of strings.

message StringVector {
    repeated string vector = 1;
}

Int64Vector

A vector of 64-bit integers.

message Int64Vector {
    repeated int64 vector = 1;
}

FloatVector

A vector of floating point numbers.

message FloatVector {
    repeated float vector = 1;
}

DoubleVector

A vector of double-precision floating point numbers.

message DoubleVector {
    repeated double vector = 1;
}

Int64Range

A range of int64 values

message Int64Range {
    int64 minValue = 1;
    int64 maxValue = 2;
}

Int64Set

A set of int64 values

message Int64Set {
    repeated int64 values = 1;
}

DoubleRange

A range of double values

message DoubleRange {
    double minValue = 1;
    double maxValue = 2;
}

PrecisionRecallCurve

The syntax comprises two tables: one to look up the precision value threshold for a given precision, and the other for a given recall.

Example

precisionValues

.1

.2

.3

.4

.5

.6

.7

precisionConfidence

.0

.0

.0

.0

.1

.3

.4

recallValues

.1

.2

.3

.4

.5

.6

.7

.8

.9

recallConfidence

.7

.6

.5

.4

.3

.3

.2

.1

.0

The application expects that, when it filters out samples with confidence threshold = 0.1, it gets precision = 0.5. Likewise, with threshold = 0.2 it gets recall = 0.7.

The table must have only valid values; do not use NaN, +/- INF, or negative values. The application is responsible for inter/extrapolating the appropriate confidence threshold based on the application’s specific need.

message PrecisionRecallCurve {
    FloatVector precisionValues = 1;
    FloatVector precisionConfidenceThresholds = 2;
    FloatVector recallValues = 3;
    FloatVector recallConfidenceThresholds = 4;
}