diff --git a/.changeset/identification-confidence-labels-high-recall-examples.md b/.changeset/identification-confidence-labels-high-recall-examples.md new file mode 100644 index 00000000..c38fed7d --- /dev/null +++ b/.changeset/identification-confidence-labels-high-recall-examples.md @@ -0,0 +1,5 @@ +--- +'java-sdk': patch +--- + +**events**: Require `label` on smart signal `Labels` items diff --git a/.schema-version b/.schema-version index e682ea42..56e50151 100644 --- a/.schema-version +++ b/.schema-version @@ -1 +1 @@ -v3.3.0 \ No newline at end of file +v3.3.1 \ No newline at end of file diff --git a/docs/IdentificationConfidence.md b/docs/IdentificationConfidence.md index dcef9960..6549d6c2 100644 --- a/docs/IdentificationConfidence.md +++ b/docs/IdentificationConfidence.md @@ -2,13 +2,14 @@ # IdentificationConfidence +The confidence score represents the probability of a false-positive identification. To learn more, visit [Confidence Score](https://docs.fingerprint.com/docs/identification-accuracy-and-confidence#confidence-score). Please note that the confidence score is not yet supported for [High Recall ID](https://docs.fingerprint.com/docs/supplementary-identifiers-highrecall). ## Properties | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**score** | **Double** | The confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification. | | -|**version** | **String** | The version name of the method used to calculate the Confidence score. This field is only present for customers who opted in to an alternative calculation method. | [optional] | +|**score** | **Double** | A floating-point number between 0 and 1 that represents the probability of a false-positive identification. For High Recall ID, this value is 0. | | +|**version** | **String** | The version name of the method used to calculate the confidence score. For High Recall ID, this value is \"Not Supported\". | [optional] | |**comment** | **String** | | [optional] | diff --git a/docs/LabelsInner.md b/docs/LabelsInner.md index db6772a9..6130f36b 100644 --- a/docs/LabelsInner.md +++ b/docs/LabelsInner.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**label** | **String** | | [optional] | +|**label** | **String** | | | |**prediction** | **Boolean** | | [optional] | |**mlScore** | **Double** | | [optional] | diff --git a/res/fingerprint-server-api.yaml b/res/fingerprint-server-api.yaml index 84688551..e79abc26 100644 --- a/res/fingerprint-server-api.yaml +++ b/res/fingerprint-server-api.yaml @@ -1097,6 +1097,13 @@ components: otherwise. IdentificationConfidence: type: object + description: >- + The confidence score represents the probability of a false-positive + identification. To learn more, visit [Confidence + Score](https://docs.fingerprint.com/docs/identification-accuracy-and-confidence#confidence-score). + Please note that the confidence score is not yet supported for [High + Recall + ID](https://docs.fingerprint.com/docs/supplementary-identifiers-highrecall). required: - score properties: @@ -1106,14 +1113,14 @@ components: minimum: 0 maximum: 1 description: >- - The confidence score is a floating-point number between 0 and 1 that - represents the probability of accurate identification. + A floating-point number between 0 and 1 that represents the + probability of a false-positive identification. For High Recall ID, + this value is 0. version: type: string description: >- - The version name of the method used to calculate the Confidence - score. This field is only present for customers who opted in to an - alternative calculation method. + The version name of the method used to calculate the confidence + score. For High Recall ID, this value is "Not Supported". comment: type: string Identification: @@ -2398,6 +2405,8 @@ components: type: array items: type: object + required: + - label properties: label: type: string diff --git a/sdk/src/main/java/com/fingerprint/v4/model/IdentificationConfidence.java b/sdk/src/main/java/com/fingerprint/v4/model/IdentificationConfidence.java index 6e6f95b5..e2e90e28 100644 --- a/sdk/src/main/java/com/fingerprint/v4/model/IdentificationConfidence.java +++ b/sdk/src/main/java/com/fingerprint/v4/model/IdentificationConfidence.java @@ -18,7 +18,7 @@ import java.util.Objects; /** - * IdentificationConfidence + * The confidence score represents the probability of a false-positive identification. To learn more, visit [Confidence Score](https://docs.fingerprint.com/docs/identification-accuracy-and-confidence#confidence-score). Please note that the confidence score is not yet supported for [High Recall ID](https://docs.fingerprint.com/docs/supplementary-identifiers-highrecall). */ @JsonPropertyOrder({ IdentificationConfidence.JSON_PROPERTY_SCORE, @@ -46,7 +46,7 @@ public IdentificationConfidence score(@jakarta.annotation.Nonnull Double score) } /** - * The confidence score is a floating-point number between 0 and 1 that represents the probability of accurate identification. + * A floating-point number between 0 and 1 that represents the probability of a false-positive identification. For High Recall ID, this value is 0. * minimum: 0 * maximum: 1 * @return score @@ -70,7 +70,7 @@ public IdentificationConfidence version(@jakarta.annotation.Nullable String vers } /** - * The version name of the method used to calculate the Confidence score. This field is only present for customers who opted in to an alternative calculation method. + * The version name of the method used to calculate the confidence score. For High Recall ID, this value is \"Not Supported\". * @return version */ @jakarta.annotation.Nullable diff --git a/sdk/src/main/java/com/fingerprint/v4/model/LabelsInner.java b/sdk/src/main/java/com/fingerprint/v4/model/LabelsInner.java index 1263e5a7..1d25f262 100644 --- a/sdk/src/main/java/com/fingerprint/v4/model/LabelsInner.java +++ b/sdk/src/main/java/com/fingerprint/v4/model/LabelsInner.java @@ -32,7 +32,7 @@ comments = "Generator version: 7.16.0") public class LabelsInner { public static final String JSON_PROPERTY_LABEL = "label"; - @jakarta.annotation.Nullable private String label; + @jakarta.annotation.Nonnull private String label; public static final String JSON_PROPERTY_PREDICTION = "prediction"; @jakarta.annotation.Nullable private Boolean prediction; @@ -42,7 +42,7 @@ public class LabelsInner { public LabelsInner() {} - public LabelsInner label(@jakarta.annotation.Nullable String label) { + public LabelsInner label(@jakarta.annotation.Nonnull String label) { this.label = label; return this; } @@ -51,16 +51,16 @@ public LabelsInner label(@jakarta.annotation.Nullable String label) { * Get label * @return label */ - @jakarta.annotation.Nullable - @JsonProperty(value = JSON_PROPERTY_LABEL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + @jakarta.annotation.Nonnull + @JsonProperty(value = JSON_PROPERTY_LABEL, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) public String getLabel() { return label; } - @JsonProperty(value = JSON_PROPERTY_LABEL, required = false) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public void setLabel(@jakarta.annotation.Nullable String label) { + @JsonProperty(value = JSON_PROPERTY_LABEL, required = true) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public void setLabel(@jakarta.annotation.Nonnull String label) { this.label = label; } diff --git a/sdk/src/test/resources/mocks/events/get_event_200.json b/sdk/src/test/resources/mocks/events/get_event_200.json index aa38a408..ee1978a2 100644 --- a/sdk/src/test/resources/mocks/events/get_event_200.json +++ b/sdk/src/test/resources/mocks/events/get_event_200.json @@ -27,14 +27,14 @@ "last_seen_at": 1708102555327 }, "supplementary_id_high_recall": { - "visitor_id": "3HNey93AkBW6CRbxV6xP", + "visitor_id": "0jnGMkPYXX37DqVa4ZIO3f_hr", "visitor_found": true, "confidence": { - "score": 0.97, - "version": "1.1" + "score": 0, + "version": "Not Supported" }, - "first_seen_at": 1708102555327, - "last_seen_at": 1708102555327 + "first_seen_at": 1778086556130, + "last_seen_at": 1778604975494 }, "proximity": { "id": "w1aTfd4MCvl", @@ -294,4 +294,4 @@ "ml_score": 0.01 } ] -} \ No newline at end of file +} diff --git a/sdk/src/test/resources/mocks/events/get_event_ruleset_200.json b/sdk/src/test/resources/mocks/events/get_event_ruleset_200.json index dedf35ef..6aa48207 100644 --- a/sdk/src/test/resources/mocks/events/get_event_ruleset_200.json +++ b/sdk/src/test/resources/mocks/events/get_event_ruleset_200.json @@ -27,14 +27,14 @@ "last_seen_at": 1708102555327 }, "supplementary_id_high_recall": { - "visitor_id": "3HNey93AkBW6CRbxV6xP", + "visitor_id": "0jnGMkPYXX37DqVa4ZIO3f_hr", "visitor_found": true, "confidence": { - "score": 0.97, - "version": "1.1" + "score": 0, + "version": "Not Supported" }, - "first_seen_at": 1708102555327, - "last_seen_at": 1708102555327 + "first_seen_at": 1778086556130, + "last_seen_at": 1778604975494 }, "proximity": { "id": "w1aTfd4MCvl", diff --git a/sdk/src/test/resources/mocks/events/search/get_event_search_200.json b/sdk/src/test/resources/mocks/events/search/get_event_search_200.json index 32e6e442..037d4c24 100644 --- a/sdk/src/test/resources/mocks/events/search/get_event_search_200.json +++ b/sdk/src/test/resources/mocks/events/search/get_event_search_200.json @@ -29,14 +29,14 @@ "last_seen_at": 1708102555327 }, "supplementary_id_high_recall": { - "visitor_id": "3HNey93AkBW6CRbxV6xP", + "visitor_id": "0jnGMkPYXX37DqVa4ZIO3f_hr", "visitor_found": true, "confidence": { - "score": 0.97, - "version": "1.1" + "score": 0, + "version": "Not Supported" }, - "first_seen_at": 1708102555327, - "last_seen_at": 1708102555327 + "first_seen_at": 1778086556130, + "last_seen_at": 1778604975494 }, "proximity": { "id": "w1aTfd4MCvl",