1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
// Copyright (c) 2017, Apple Inc. All rights reserved.
//
// Use of this source code is governed by a BSD-3-clause license that can be
// found in LICENSE.txt or at https://opensource.org/licenses/BSD-3-Clause
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
import public "FeatureTypes.proto";
package CoreML.Specification;
/*
* A mapping from a string
* to a 64-bit integer.
*/
message StringToInt64Map {
map<string, int64> map = 1;
}
/*
* A mapping from a 64-bit integer
* to a string.
*/
message Int64ToStringMap {
map<int64, string> map = 1;
}
/*
* A mapping from a string
* to a double-precision floating point number.
*/
message StringToDoubleMap {
map<string, double> map = 1;
}
/*
* A mapping from a 64-bit integer
* to a double-precision floating point number.
*/
message Int64ToDoubleMap {
map<int64, double> map = 1;
}
/*
* A vector of strings.
*/
message StringVector {
repeated string vector = 1;
}
/*
* A vector of 64-bit integers.
*/
message Int64Vector {
repeated int64 vector = 1;
}
/*
* A vector of floating point numbers.
*/
message FloatVector {
repeated float vector = 1;
}
/*
* A vector of double-precision floating point numbers.
*/
message DoubleVector {
repeated double vector = 1;
}
/*
* A range of int64 values
*/
message Int64Range {
int64 minValue = 1;
int64 maxValue = 2;
}
/*
* A set of int64 values
*/
message Int64Set {
repeated int64 values = 1;
}
/*
* A range of double values
*/
message DoubleRange {
double minValue = 1;
double maxValue = 2;
}
/**
* Precision/Recall curve.
*
* The syntax comprises two tables, one to look up the confidence 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
* approprate confidence threshold based on the application's specific need.
*/
message PrecisionRecallCurve {
FloatVector precisionValues = 1;
FloatVector precisionConfidenceThresholds = 2;
FloatVector recallValues = 3;
FloatVector recallConfidenceThresholds = 4;
}
|