- 0.49.0 (latest)
- 0.48.0
- 0.47.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
public final class QualityMetrics extends GeneratedMessageV3 implements QualityMetricsOrBuilder
Describes the metrics produced by the evaluation.
Protobuf type google.cloud.discoveryengine.v1beta.QualityMetrics
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > QualityMetricsImplements
QualityMetricsOrBuilderStatic Fields
DOC_NDCG_FIELD_NUMBER
public static final int DOC_NDCG_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
DOC_PRECISION_FIELD_NUMBER
public static final int DOC_PRECISION_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
DOC_RECALL_FIELD_NUMBER
public static final int DOC_RECALL_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
PAGE_NDCG_FIELD_NUMBER
public static final int PAGE_NDCG_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
PAGE_RECALL_FIELD_NUMBER
public static final int PAGE_RECALL_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
Static Methods
getDefaultInstance()
public static QualityMetrics getDefaultInstance()
Returns | |
---|---|
Type | Description |
QualityMetrics |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
newBuilder()
public static QualityMetrics.Builder newBuilder()
Returns | |
---|---|
Type | Description |
QualityMetrics.Builder |
newBuilder(QualityMetrics prototype)
public static QualityMetrics.Builder newBuilder(QualityMetrics prototype)
Parameter | |
---|---|
Name | Description |
prototype |
QualityMetrics |
Returns | |
---|---|
Type | Description |
QualityMetrics.Builder |
parseDelimitedFrom(InputStream input)
public static QualityMetrics parseDelimitedFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input |
InputStream |
Returns | |
---|---|
Type | Description |
QualityMetrics |
Exceptions | |
---|---|
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static QualityMetrics parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
QualityMetrics |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(byte[] data)
public static QualityMetrics parseFrom(byte[] data)
Parameter | |
---|---|
Name | Description |
data |
byte[] |
Returns | |
---|---|
Type | Description |
QualityMetrics |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static QualityMetrics parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
byte[] |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
QualityMetrics |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static QualityMetrics parseFrom(ByteString data)
Parameter | |
---|---|
Name | Description |
data |
ByteString |
Returns | |
---|---|
Type | Description |
QualityMetrics |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static QualityMetrics parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
ByteString |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
QualityMetrics |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static QualityMetrics parseFrom(CodedInputStream input)
Parameter | |
---|---|
Name | Description |
input |
CodedInputStream |
Returns | |
---|---|
Type | Description |
QualityMetrics |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static QualityMetrics parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
QualityMetrics |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input)
public static QualityMetrics parseFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input |
InputStream |
Returns | |
---|---|
Type | Description |
QualityMetrics |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static QualityMetrics parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input |
InputStream |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
QualityMetrics |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static QualityMetrics parseFrom(ByteBuffer data)
Parameter | |
---|---|
Name | Description |
data |
ByteBuffer |
Returns | |
---|---|
Type | Description |
QualityMetrics |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static QualityMetrics parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data |
ByteBuffer |
extensionRegistry |
ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
QualityMetrics |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<QualityMetrics> parser()
Returns | |
---|---|
Type | Description |
Parser<QualityMetrics> |
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter | |
---|---|
Name | Description |
obj |
Object |
Returns | |
---|---|
Type | Description |
boolean |
getDefaultInstanceForType()
public QualityMetrics getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
QualityMetrics |
getDocNdcg()
public QualityMetrics.TopkMetrics 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 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:
- 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;
Returns | |
---|---|
Type | Description |
QualityMetrics.TopkMetrics |
The docNdcg. |
getDocNdcgOrBuilder()
public QualityMetrics.TopkMetricsOrBuilder 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 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:
- 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;
Returns | |
---|---|
Type | Description |
QualityMetrics.TopkMetricsOrBuilder |
getDocPrecision()
public QualityMetrics.TopkMetrics 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, 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;
Returns | |
---|---|
Type | Description |
QualityMetrics.TopkMetrics |
The docPrecision. |
getDocPrecisionOrBuilder()
public QualityMetrics.TopkMetricsOrBuilder 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, 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;
Returns | |
---|---|
Type | Description |
QualityMetrics.TopkMetricsOrBuilder |
getDocRecall()
public QualityMetrics.TopkMetrics 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, 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;
Returns | |
---|---|
Type | Description |
QualityMetrics.TopkMetrics |
The docRecall. |
getDocRecallOrBuilder()
public QualityMetrics.TopkMetricsOrBuilder 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, 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;
Returns | |
---|---|
Type | Description |
QualityMetrics.TopkMetricsOrBuilder |
getPageNdcg()
public QualityMetrics.TopkMetrics 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 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:
- 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;
Returns | |
---|---|
Type | Description |
QualityMetrics.TopkMetrics |
The pageNdcg. |
getPageNdcgOrBuilder()
public QualityMetrics.TopkMetricsOrBuilder 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 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:
- 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;
Returns | |
---|---|
Type | Description |
QualityMetrics.TopkMetricsOrBuilder |
getPageRecall()
public QualityMetrics.TopkMetrics 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, 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;
Returns | |
---|---|
Type | Description |
QualityMetrics.TopkMetrics |
The pageRecall. |
getPageRecallOrBuilder()
public QualityMetrics.TopkMetricsOrBuilder 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, 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;
Returns | |
---|---|
Type | Description |
QualityMetrics.TopkMetricsOrBuilder |
getParserForType()
public Parser<QualityMetrics> getParserForType()
Returns | |
---|---|
Type | Description |
Parser<QualityMetrics> |
getSerializedSize()
public int getSerializedSize()
Returns | |
---|---|
Type | Description |
int |
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 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:
- 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;
Returns | |
---|---|
Type | Description |
boolean |
Whether the docNdcg field is set. |
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, 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;
Returns | |
---|---|
Type | Description |
boolean |
Whether the docPrecision field is set. |
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, 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;
Returns | |
---|---|
Type | Description |
boolean |
Whether the docRecall field is set. |
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 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:
- 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;
Returns | |
---|---|
Type | Description |
boolean |
Whether the pageNdcg field is set. |
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, 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;
Returns | |
---|---|
Type | Description |
boolean |
Whether the pageRecall field is set. |
hashCode()
public int hashCode()
Returns | |
---|---|
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
newBuilderForType()
public QualityMetrics.Builder newBuilderForType()
Returns | |
---|---|
Type | Description |
QualityMetrics.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected QualityMetrics.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter | |
---|---|
Name | Description |
parent |
BuilderParent |
Returns | |
---|---|
Type | Description |
QualityMetrics.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter | |
---|---|
Name | Description |
unused |
UnusedPrivateParameter |
Returns | |
---|---|
Type | Description |
Object |
toBuilder()
public QualityMetrics.Builder toBuilder()
Returns | |
---|---|
Type | Description |
QualityMetrics.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter | |
---|---|
Name | Description |
output |
CodedOutputStream |
Exceptions | |
---|---|
Type | Description |
IOException |