Class QualityMetrics
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.discoveryengine.v1beta.QualityMetrics
- All Implemented Interfaces:
QualityMetricsOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class QualityMetrics
extends com.google.protobuf.GeneratedMessage
implements QualityMetricsOrBuilder
Describes the metrics produced by the evaluation.Protobuf type
google.cloud.discoveryengine.v1beta.QualityMetrics- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classDescribes the metrics produced by the evaluation.static final classStores the metric values at specific top-k levels.static interfaceNested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic QualityMetricsstatic final com.google.protobuf.Descriptors.DescriptorNormalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels.Normalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels.Precision per document, at various top-k cutoff levels.Precision per document, at various top-k cutoff levels.Recall per document, at various top-k cutoff levels.Recall per document, at various top-k cutoff levels.Normalized discounted cumulative gain (NDCG) per page, at various top-k cutoff levels.Normalized discounted cumulative gain (NDCG) per page, at various top-k cutoff levels.Recall per page, at various top-k cutoff levels.Recall per page, at various top-k cutoff levels.com.google.protobuf.Parser<QualityMetrics>intbooleanNormalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels.booleanPrecision per document, at various top-k cutoff levels.booleanRecall per document, at various top-k cutoff levels.inthashCode()booleanNormalized discounted cumulative gain (NDCG) per page, at various top-k cutoff levels.booleanRecall per page, at various top-k cutoff levels.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic QualityMetrics.Builderstatic QualityMetrics.BuildernewBuilder(QualityMetrics prototype) protected QualityMetrics.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static QualityMetricsparseDelimitedFrom(InputStream input) static QualityMetricsparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static QualityMetricsparseFrom(byte[] data) static QualityMetricsparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static QualityMetricsparseFrom(com.google.protobuf.ByteString data) static QualityMetricsparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static QualityMetricsparseFrom(com.google.protobuf.CodedInputStream input) static QualityMetricsparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static QualityMetricsparseFrom(InputStream input) static QualityMetricsparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static QualityMetricsparseFrom(ByteBuffer data) static QualityMetricsparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<QualityMetrics>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
DOC_RECALL_FIELD_NUMBER
public static final int DOC_RECALL_FIELD_NUMBER- See Also:
-
DOC_PRECISION_FIELD_NUMBER
public static final int DOC_PRECISION_FIELD_NUMBER- See Also:
-
DOC_NDCG_FIELD_NUMBER
public static final int DOC_NDCG_FIELD_NUMBER- See Also:
-
PAGE_RECALL_FIELD_NUMBER
public static final int PAGE_RECALL_FIELD_NUMBER- See Also:
-
PAGE_NDCG_FIELD_NUMBER
public static final int PAGE_NDCG_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
hasDocRecall
public boolean hasDocRecall()Recall per document, at various top-k cutoff levels. Recall is the fraction of relevant documents retrieved out of all relevant documents. Example (top-5): * For a single [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], If 3 out of 5 relevant documents are retrieved in the top-5, recall@5 = 3/5 = 0.6
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics doc_recall = 1;- Specified by:
hasDocRecallin interfaceQualityMetricsOrBuilder- Returns:
- Whether the docRecall field is set.
-
getDocRecall
Recall per document, at various top-k cutoff levels. Recall is the fraction of relevant documents retrieved out of all relevant documents. Example (top-5): * For a single [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], If 3 out of 5 relevant documents are retrieved in the top-5, recall@5 = 3/5 = 0.6
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics doc_recall = 1;- Specified by:
getDocRecallin interfaceQualityMetricsOrBuilder- Returns:
- The docRecall.
-
getDocRecallOrBuilder
Recall per document, at various top-k cutoff levels. Recall is the fraction of relevant documents retrieved out of all relevant documents. Example (top-5): * For a single [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], If 3 out of 5 relevant documents are retrieved in the top-5, recall@5 = 3/5 = 0.6
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics doc_recall = 1;- Specified by:
getDocRecallOrBuilderin interfaceQualityMetricsOrBuilder
-
hasDocPrecision
public boolean hasDocPrecision()Precision per document, at various top-k cutoff levels. Precision is the fraction of retrieved documents that are relevant. Example (top-5): * For a single [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], If 4 out of 5 retrieved documents in the top-5 are relevant, precision@5 = 4/5 = 0.8
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics doc_precision = 2;- Specified by:
hasDocPrecisionin interfaceQualityMetricsOrBuilder- Returns:
- Whether the docPrecision field is set.
-
getDocPrecision
Precision per document, at various top-k cutoff levels. Precision is the fraction of retrieved documents that are relevant. Example (top-5): * For a single [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], If 4 out of 5 retrieved documents in the top-5 are relevant, precision@5 = 4/5 = 0.8
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics doc_precision = 2;- Specified by:
getDocPrecisionin interfaceQualityMetricsOrBuilder- Returns:
- The docPrecision.
-
getDocPrecisionOrBuilder
Precision per document, at various top-k cutoff levels. Precision is the fraction of retrieved documents that are relevant. Example (top-5): * For a single [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], If 4 out of 5 retrieved documents in the top-5 are relevant, precision@5 = 4/5 = 0.8
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics doc_precision = 2;- Specified by:
getDocPrecisionOrBuilderin interfaceQualityMetricsOrBuilder
-
hasDocNdcg
public boolean hasDocNdcg()Normalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] with three retrieved documents (D1, D2, D3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics doc_ndcg = 3;- Specified by:
hasDocNdcgin interfaceQualityMetricsOrBuilder- Returns:
- Whether the docNdcg field is set.
-
getDocNdcg
Normalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] with three retrieved documents (D1, D2, D3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics doc_ndcg = 3;- Specified by:
getDocNdcgin interfaceQualityMetricsOrBuilder- Returns:
- The docNdcg.
-
getDocNdcgOrBuilder
Normalized discounted cumulative gain (NDCG) per document, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] with three retrieved documents (D1, D2, D3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [D3 (0), D1 (1), D2 (1)] Ideal: [D1 (1), D2 (1), D3 (0)] Calculate NDCG@3 for each [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics doc_ndcg = 3;- Specified by:
getDocNdcgOrBuilderin interfaceQualityMetricsOrBuilder
-
hasPageRecall
public boolean hasPageRecall()Recall per page, at various top-k cutoff levels. Recall is the fraction of relevant pages retrieved out of all relevant pages. Example (top-5): * For a single [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], if 3 out of 5 relevant pages are retrieved in the top-5, recall@5 = 3/5 = 0.6
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics page_recall = 4;- Specified by:
hasPageRecallin interfaceQualityMetricsOrBuilder- Returns:
- Whether the pageRecall field is set.
-
getPageRecall
Recall per page, at various top-k cutoff levels. Recall is the fraction of relevant pages retrieved out of all relevant pages. Example (top-5): * For a single [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], if 3 out of 5 relevant pages are retrieved in the top-5, recall@5 = 3/5 = 0.6
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics page_recall = 4;- Specified by:
getPageRecallin interfaceQualityMetricsOrBuilder- Returns:
- The pageRecall.
-
getPageRecallOrBuilder
Recall per page, at various top-k cutoff levels. Recall is the fraction of relevant pages retrieved out of all relevant pages. Example (top-5): * For a single [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery], if 3 out of 5 relevant pages are retrieved in the top-5, recall@5 = 3/5 = 0.6
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics page_recall = 4;- Specified by:
getPageRecallOrBuilderin interfaceQualityMetricsOrBuilder
-
hasPageNdcg
public boolean hasPageNdcg()Normalized discounted cumulative gain (NDCG) per page, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] with three retrieved pages (P1, P2, P3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics page_ndcg = 5;- Specified by:
hasPageNdcgin interfaceQualityMetricsOrBuilder- Returns:
- Whether the pageNdcg field is set.
-
getPageNdcg
Normalized discounted cumulative gain (NDCG) per page, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] with three retrieved pages (P1, P2, P3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics page_ndcg = 5;- Specified by:
getPageNdcgin interfaceQualityMetricsOrBuilder- Returns:
- The pageNdcg.
-
getPageNdcgOrBuilder
Normalized discounted cumulative gain (NDCG) per page, at various top-k cutoff levels. NDCG measures the ranking quality, giving higher relevance to top results. Example (top-3): Suppose [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery] with three retrieved pages (P1, P2, P3) and binary relevance judgements (1 for relevant, 0 for not relevant): Retrieved: [P3 (0), P1 (1), P2 (1)] Ideal: [P1 (1), P2 (1), P3 (0)] Calculate NDCG@3 for [SampleQuery][google.cloud.discoveryengine.v1beta.SampleQuery]: * DCG@3: 0/log2(1+1) + 1/log2(2+1) + 1/log2(3+1) = 1.13 * Ideal DCG@3: 1/log2(1+1) + 1/log2(2+1) + 0/log2(3+1) = 1.63 * NDCG@3: 1.13/1.63 = 0.693
.google.cloud.discoveryengine.v1beta.QualityMetrics.TopkMetrics page_ndcg = 5;- Specified by:
getPageNdcgOrBuilderin interfaceQualityMetricsOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static QualityMetrics parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static QualityMetrics parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static QualityMetrics parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static QualityMetrics parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static QualityMetrics parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static QualityMetrics parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static QualityMetrics parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static QualityMetrics parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static QualityMetrics parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static QualityMetrics parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected QualityMetrics.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-