An object that represents classification information that an image analysis request produces.
Members (10)
get · iOS 18.0+
confidence
TypeScript
get confidence(): number
Swift declaration
let confidence: Float
The level of confidence normalized to `[0, 1]` where `1` is most confident.
The only exception is results coming from `CoreMLRequest`, where confidence values are forwarded as is from relevant CoreML models
get · iOS 18.0+
identifier
TypeScript
get identifier(): string
Swift declaration
let identifier: String
The is the identifier of a classification request. An example classification could be a string like 'cat' or 'hotdog'.
The string is defined in the model that was used for the classification. Usually these are technical labels that are not localized
and not meant to be used directly to be presented to an end user in the UI.
get · iOS 18.0+
description
TypeScript
get description(): string
Swift declaration
var description: String { get }
A textual representation of this instance.
Calling this property directly is discouraged. Instead, convert an
instance of any type to a string by using the `String(describing:)`
initializer. This initializer works with any type, and uses the custom
`description` property for types that conform to
`CustomStringConvertible`:
struct Point: CustomStringConvertible {
let x: Int, y: Int
var description: String {
return "(\(x), \(y))"
}
}
let p = Point(x: 21, y: 30)
let s = String(describing: p)
print(s)
// Prints "(21, 30)"
The conversion of `p` to a string in the assignment to `s` uses the
`Point` type's `description` property.
Determines whether the observation has a minimum recall value for a specific precision.
- Parameters:
- minimumRecall: The minimum desired percentage of relevant results that the algorithm correctly classified.
- precision: The percentage of classification results that are relevant.
- Returns: A Boolean indicating whether or not this classification observation provides a minimum percentage of relevant results that meet the desired precision criterion.
Determines whether the observation has a minimum precision value for a specific recall.
- Parameters:
- minimumPrecision: The minimum percentage of classification results that are relevant.
- recall: The percentage of relevant results that the algorithm correctly classified.
- Returns: A Boolean indicating whether or not this classification observation provides a minimum percentage of relevant results that meet the desired recall criterion.
get · iOS 18.0+
hasPrecisionRecallCurve
TypeScript
get hasPrecisionRecallCurve(): boolean
Swift declaration
var hasPrecisionRecallCurve: Bool { get }
A Boolean variable indicating whether the observation contains precision and recall curves.
Precision refers to the percentage of your classification results that are relevant, while recall refers to the percentage of total
relevant results correctly classified. If this property is true, then you can call precision and recall-related methods in this observation.
If this property is false, then the precision and recall-related methods won't return meaningful data.
get · iOS 18.0+
originatingRequestDescriptor
TypeScript
get originatingRequestDescriptor(): (RequestDescriptor) | null
Swift declaration
let originatingRequestDescriptor: RequestDescriptor?
The descriptor of the request that produced the observation.
get · iOS 18.0+
uuid
TypeScript
get uuid(): string
Swift declaration
let uuid: UUID
The unique identifier for the observation.
get · iOS 18.0+
timeRange
TypeScript
get timeRange(): (_CoreMedia_CMTimeRange) | null
Swift declaration
let timeRange: CMTimeRange?
The time range of the reported observation.
When evaluating a sequence of image buffers, use this property to determine each observation’s start time and duration.