Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: proto/clarifai/api/resources.proto
package com.clarifai.grpc.api;
/**
*
* LOPQEvalResult
*
*
* Protobuf type {@code clarifai.api.LOPQEvalResult}
*/
public final class LOPQEvalResult extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:clarifai.api.LOPQEvalResult)
LOPQEvalResultOrBuilder {
private static final long serialVersionUID = 0L;
// Use LOPQEvalResult.newBuilder() to construct.
private LOPQEvalResult(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LOPQEvalResult() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LOPQEvalResult();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LOPQEvalResult(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
k_ = input.readInt32();
break;
}
case 21: {
recallVsBruteForce_ = input.readFloat();
break;
}
case 29: {
kendallTauVsBruteForce_ = input.readFloat();
break;
}
case 37: {
mostFrequentCodePercent_ = input.readFloat();
break;
}
case 45: {
lopqNdcg_ = input.readFloat();
break;
}
case 53: {
bruteForceNdcg_ = input.readFloat();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_LOPQEvalResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_LOPQEvalResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.LOPQEvalResult.class, com.clarifai.grpc.api.LOPQEvalResult.Builder.class);
}
public static final int K_FIELD_NUMBER = 1;
private int k_;
/**
*
* Rank k for which all metrics are reported.
*
*
* int32 k = 1;
* @return The k.
*/
@java.lang.Override
public int getK() {
return k_;
}
public static final int RECALL_VS_BRUTE_FORCE_FIELD_NUMBER = 2;
private float recallVsBruteForce_;
/**
*
* Recall @ k assuming the brute force search is the ground truth.
*
*
* float recall_vs_brute_force = 2 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The recallVsBruteForce.
*/
@java.lang.Override
public float getRecallVsBruteForce() {
return recallVsBruteForce_;
}
public static final int KENDALL_TAU_VS_BRUTE_FORCE_FIELD_NUMBER = 3;
private float kendallTauVsBruteForce_;
/**
*
* Kendall's tau correlation @ k assuming the brute force search is the ground truth.
*
*
* float kendall_tau_vs_brute_force = 3 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The kendallTauVsBruteForce.
*/
@java.lang.Override
public float getKendallTauVsBruteForce() {
return kendallTauVsBruteForce_;
}
public static final int MOST_FREQUENT_CODE_PERCENT_FIELD_NUMBER = 4;
private float mostFrequentCodePercent_;
/**
*
* The percentage of the most frequent code in the indexed part of evaluation data.
*
*
* float most_frequent_code_percent = 4 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The mostFrequentCodePercent.
*/
@java.lang.Override
public float getMostFrequentCodePercent() {
return mostFrequentCodePercent_;
}
public static final int LOPQ_NDCG_FIELD_NUMBER = 5;
private float lopqNdcg_;
/**
*
* Normalized Discounted Cumulative Gain (NDCG) @ k with a ground truth inferred from annotations
* and/or prediction for this evaluation LOPQ model.
* NDCG uses individual relevance scores of each returned image to evaluate the usefulness, or
* gain, of a document based on its position in the result list. The premise of DCG is that
* highly relevant documents appearing lower in a search result list should be penalized as the
* graded relevance value is reduced logarithmically proportional to the position of the result.
* See: https://en.wikipedia.org/wiki/Information_retrieval#Discounted_cumulative_gain
* To compute the relevance score between two images we consider two cases:
* 1) Only one label for each image
* An image is relevant to an image query iff they are labeled the same (score 1), and
* not relevant otherwise (score 0)
* 2) Multiple labels for each image
* Here an image relevancy with respect to a single image query is measured by f-beta score
* assuming the query image list of labels as ground truth and comparing them with that of
* the search result. These labels can come from image annotations or if substitute_annotation_misses
* is set, predictions of base classifier where any prediction with prob < prob_threshold are
* discarded. To quantify the relevancy score of a single search result we opt to compute precision
* and recall @ k for simplicity, and combine them with f-beta score to obtain a single number.
*
*
* float lopq_ndcg = 5 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @return The lopqNdcg.
*/
@java.lang.Override
public float getLopqNdcg() {
return lopqNdcg_;
}
public static final int BRUTE_FORCE_NDCG_FIELD_NUMBER = 6;
private float bruteForceNdcg_;
/**
*
* Brute force NDCG which gives a baseline to compare to and is a measure of how good
* the embeddings are.
*
*
* Protobuf type {@code clarifai.api.LOPQEvalResult}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:clarifai.api.LOPQEvalResult)
com.clarifai.grpc.api.LOPQEvalResultOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_LOPQEvalResult_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_LOPQEvalResult_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.clarifai.grpc.api.LOPQEvalResult.class, com.clarifai.grpc.api.LOPQEvalResult.Builder.class);
}
// Construct using com.clarifai.grpc.api.LOPQEvalResult.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
k_ = 0;
recallVsBruteForce_ = 0F;
kendallTauVsBruteForce_ = 0F;
mostFrequentCodePercent_ = 0F;
lopqNdcg_ = 0F;
bruteForceNdcg_ = 0F;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.clarifai.grpc.api.Resources.internal_static_clarifai_api_LOPQEvalResult_descriptor;
}
@java.lang.Override
public com.clarifai.grpc.api.LOPQEvalResult getDefaultInstanceForType() {
return com.clarifai.grpc.api.LOPQEvalResult.getDefaultInstance();
}
@java.lang.Override
public com.clarifai.grpc.api.LOPQEvalResult build() {
com.clarifai.grpc.api.LOPQEvalResult result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.clarifai.grpc.api.LOPQEvalResult buildPartial() {
com.clarifai.grpc.api.LOPQEvalResult result = new com.clarifai.grpc.api.LOPQEvalResult(this);
result.k_ = k_;
result.recallVsBruteForce_ = recallVsBruteForce_;
result.kendallTauVsBruteForce_ = kendallTauVsBruteForce_;
result.mostFrequentCodePercent_ = mostFrequentCodePercent_;
result.lopqNdcg_ = lopqNdcg_;
result.bruteForceNdcg_ = bruteForceNdcg_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.clarifai.grpc.api.LOPQEvalResult) {
return mergeFrom((com.clarifai.grpc.api.LOPQEvalResult)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.clarifai.grpc.api.LOPQEvalResult other) {
if (other == com.clarifai.grpc.api.LOPQEvalResult.getDefaultInstance()) return this;
if (other.getK() != 0) {
setK(other.getK());
}
if (other.getRecallVsBruteForce() != 0F) {
setRecallVsBruteForce(other.getRecallVsBruteForce());
}
if (other.getKendallTauVsBruteForce() != 0F) {
setKendallTauVsBruteForce(other.getKendallTauVsBruteForce());
}
if (other.getMostFrequentCodePercent() != 0F) {
setMostFrequentCodePercent(other.getMostFrequentCodePercent());
}
if (other.getLopqNdcg() != 0F) {
setLopqNdcg(other.getLopqNdcg());
}
if (other.getBruteForceNdcg() != 0F) {
setBruteForceNdcg(other.getBruteForceNdcg());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.clarifai.grpc.api.LOPQEvalResult parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.clarifai.grpc.api.LOPQEvalResult) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int k_ ;
/**
*
* Rank k for which all metrics are reported.
*
*
* int32 k = 1;
* @return The k.
*/
@java.lang.Override
public int getK() {
return k_;
}
/**
*
* Rank k for which all metrics are reported.
*
*
* int32 k = 1;
* @param value The k to set.
* @return This builder for chaining.
*/
public Builder setK(int value) {
k_ = value;
onChanged();
return this;
}
/**
*
* Rank k for which all metrics are reported.
*
*
* int32 k = 1;
* @return This builder for chaining.
*/
public Builder clearK() {
k_ = 0;
onChanged();
return this;
}
private float recallVsBruteForce_ ;
/**
*
* Recall @ k assuming the brute force search is the ground truth.
*
* Normalized Discounted Cumulative Gain (NDCG) @ k with a ground truth inferred from annotations
* and/or prediction for this evaluation LOPQ model.
* NDCG uses individual relevance scores of each returned image to evaluate the usefulness, or
* gain, of a document based on its position in the result list. The premise of DCG is that
* highly relevant documents appearing lower in a search result list should be penalized as the
* graded relevance value is reduced logarithmically proportional to the position of the result.
* See: https://en.wikipedia.org/wiki/Information_retrieval#Discounted_cumulative_gain
* To compute the relevance score between two images we consider two cases:
* 1) Only one label for each image
* An image is relevant to an image query iff they are labeled the same (score 1), and
* not relevant otherwise (score 0)
* 2) Multiple labels for each image
* Here an image relevancy with respect to a single image query is measured by f-beta score
* assuming the query image list of labels as ground truth and comparing them with that of
* the search result. These labels can come from image annotations or if substitute_annotation_misses
* is set, predictions of base classifier where any prediction with prob < prob_threshold are
* discarded. To quantify the relevancy score of a single search result we opt to compute precision
* and recall @ k for simplicity, and combine them with f-beta score to obtain a single number.
*
* Normalized Discounted Cumulative Gain (NDCG) @ k with a ground truth inferred from annotations
* and/or prediction for this evaluation LOPQ model.
* NDCG uses individual relevance scores of each returned image to evaluate the usefulness, or
* gain, of a document based on its position in the result list. The premise of DCG is that
* highly relevant documents appearing lower in a search result list should be penalized as the
* graded relevance value is reduced logarithmically proportional to the position of the result.
* See: https://en.wikipedia.org/wiki/Information_retrieval#Discounted_cumulative_gain
* To compute the relevance score between two images we consider two cases:
* 1) Only one label for each image
* An image is relevant to an image query iff they are labeled the same (score 1), and
* not relevant otherwise (score 0)
* 2) Multiple labels for each image
* Here an image relevancy with respect to a single image query is measured by f-beta score
* assuming the query image list of labels as ground truth and comparing them with that of
* the search result. These labels can come from image annotations or if substitute_annotation_misses
* is set, predictions of base classifier where any prediction with prob < prob_threshold are
* discarded. To quantify the relevancy score of a single search result we opt to compute precision
* and recall @ k for simplicity, and combine them with f-beta score to obtain a single number.
*
*
* float lopq_ndcg = 5 [(.clarifai.api.utils.cl_show_if_empty) = true];
* @param value The lopqNdcg to set.
* @return This builder for chaining.
*/
public Builder setLopqNdcg(float value) {
lopqNdcg_ = value;
onChanged();
return this;
}
/**
*
* Normalized Discounted Cumulative Gain (NDCG) @ k with a ground truth inferred from annotations
* and/or prediction for this evaluation LOPQ model.
* NDCG uses individual relevance scores of each returned image to evaluate the usefulness, or
* gain, of a document based on its position in the result list. The premise of DCG is that
* highly relevant documents appearing lower in a search result list should be penalized as the
* graded relevance value is reduced logarithmically proportional to the position of the result.
* See: https://en.wikipedia.org/wiki/Information_retrieval#Discounted_cumulative_gain
* To compute the relevance score between two images we consider two cases:
* 1) Only one label for each image
* An image is relevant to an image query iff they are labeled the same (score 1), and
* not relevant otherwise (score 0)
* 2) Multiple labels for each image
* Here an image relevancy with respect to a single image query is measured by f-beta score
* assuming the query image list of labels as ground truth and comparing them with that of
* the search result. These labels can come from image annotations or if substitute_annotation_misses
* is set, predictions of base classifier where any prediction with prob < prob_threshold are
* discarded. To quantify the relevancy score of a single search result we opt to compute precision
* and recall @ k for simplicity, and combine them with f-beta score to obtain a single number.
*