← Back to report

CreateMLComponents.swiftinterface 6,116 rows

1// swift-interface-format-version: 1.0
2// swift-compiler-version: Apple Swift version 6.3.2 effective-5.10 (swiftlang-6.3.2.1.2 clang-2100.0.123.2)
3// swift-module-flags: -target arm64e-apple-ios26.5 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -Osize -library-level api -enable-upcoming-feature StrictConcurrency -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -user-module-version 1415.80.2 -module-name CreateMLComponents
4// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.3.2
5@preconcurrency import AVFAudio
6@preconcurrency import AVFoundation
7import Accelerate
1// swift-interface-format-version: 1.0
2// swift-compiler-version: Apple Swift version 6.4 effective-5.10 (swiftlang-6.4.0.19.103 clang-2100.3.19.4)
3// swift-module-flags: -target arm64e-apple-ios27.0 -enable-objc-interop -enable-library-evolution -language-mode 5 -Osize -library-level api -enable-upcoming-feature StrictConcurrency -enable-experimental-feature DebugDescriptionMacro -enable-bare-slash-regex -user-module-version 1431 -module-name CreateMLComponents
4// swift-module-flags-ignorable: -formal-cxx-interoperability-mode=off -interface-compiler-version 6.4
5@preconcurrency import AVFAudio
6@preconcurrency import AVFoundation
7import Accelerate
… 15 unchanged lines …
23import _StringProcessing
24import _SwiftConcurrencyShims
25import os
26extension CreateMLComponents.Transformer {
27 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
28 public func adaptedAsRandomTransformer() -> some CreateMLComponents.RandomTransformer<Self.Input, Self.Output>
29
30}
31@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
32extension CreateMLComponents.FullyConnectedNetworkClassifier {
33 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.FullyConnectedNetworkClassifierModel<Scalar, Label>
34 public func encodeWithOptimizer(_ transformer: CreateMLComponents.FullyConnectedNetworkClassifier<Scalar, Label>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
35 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.FullyConnectedNetworkClassifier<Scalar, Label>.Transformer
36}
37@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
38public struct ApplyEachRandomly<Element> : CreateMLComponents.RandomTransformer {
39 public let probability: Swift.Double
40 public init<RandomTransformer>(probability: Swift.Double = 0.5, @CreateMLComponents.AugmentationBuilder<Element> _ augmentation: () -> RandomTransformer) where Element == RandomTransformer.Input, RandomTransformer : CreateMLComponents.RandomTransformer, RandomTransformer.Input == RandomTransformer.Output
41 public func applied(to input: Element, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Element
42 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
43 public typealias Input = Element
44 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
45 public typealias Output = Element
46}
47@available(*, unavailable)
48extension CreateMLComponents.ApplyEachRandomly : Swift.Sendable {
49}
50extension CreateMLComponents.UpdatableEstimator {
51 @available(macOS, introduced: 13.0, deprecated: 15.0)
52 @available(iOS, introduced: 16.0, deprecated: 18.0)
53 @available(tvOS, introduced: 16.0, deprecated: 18.0)
54 @available(visionOS, introduced: 1.0, deprecated: 2.0)
55 @available(watchOS, unavailable)
56 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TransformerToTemporalAdaptor<Self.Transformer>, Other>> where Other : CreateMLComponents.TemporalTransformer, Other.Input == Self.Transformer.Output
57
58 @available(macOS, introduced: 13.0, deprecated: 15.0)
59 @available(iOS, introduced: 16.0, deprecated: 18.0)
60 @available(tvOS, introduced: 16.0, deprecated: 18.0)
61 @available(visionOS, introduced: 1.0, deprecated: 2.0)
62 @available(watchOS, unavailable)
63 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>> where Other : CreateMLComponents.UpdatableTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
64
65}
66@available(macOS, introduced: 13.0, deprecated: 15.0)
67@available(iOS, introduced: 16.0, deprecated: 18.0)
68@available(tvOS, introduced: 16.0, deprecated: 18.0)
69@available(visionOS, introduced: 1.0, deprecated: 2.0)
70@available(watchOS, unavailable)
71extension CreateMLComponents.UpdatableTemporalEstimator {
72 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, CreateMLComponents.TransformerToTemporalAdaptor<Other>>> where Other : CreateMLComponents.Transformer, Other.Input == Self.Transformer.Output
73
74 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, CreateMLComponents.TransformerToTemporalAdaptor<Other.Transformer>>> where Other : CreateMLComponents.UpdatableEstimator, Self.Transformer.Output == Other.Transformer.Input
75
76 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, Other>> where Other : CreateMLComponents.TemporalTransformer, Other.Input == Self.Transformer.Output
77
78 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, Other.Transformer>> where Other : CreateMLComponents.UpdatableTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
79
80}
81@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
82public struct AudioFeaturePrint : CreateMLComponents.TemporalTransformer, Swift.Sendable {
83 public typealias Input = AVFAudio.AVAudioPCMBuffer
84 public typealias Output = CoreML.MLShapedArray<Swift.Float>
85 public let windowDuration: Foundation.TimeInterval
86 public let overlapFactor: Swift.Double
87 public init(windowDuration: Foundation.TimeInterval, overlapFactor: Swift.Double)
88 public func applied<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CreateMLComponents.AudioFeaturePrint.FeatureSequence where S : CreateMLComponents.TemporalSequence, S.Feature == AVFAudio.AVAudioPCMBuffer
89 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
90 public typealias OutputSequence = CreateMLComponents.AudioFeaturePrint.FeatureSequence
91}
92@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
93extension CreateMLComponents.AudioFeaturePrint : Swift.CustomDebugStringConvertible {
94 public var debugDescription: Swift.String {
95 get
96 }
97}
98@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
99extension CreateMLComponents.AudioFeaturePrint {
100 public struct FeatureSequence : CreateMLComponents.TemporalSequence {
101 public typealias Feature = CoreML.MLShapedArray<Swift.Float>
102 public typealias AsyncIterator = CreateMLComponents.AudioFeaturePrint.FeatureSequence.Iterator
103 public var count: Swift.Int? {
104 get
105 }
106 public func makeAsyncIterator() -> CreateMLComponents.AudioFeaturePrint.FeatureSequence.AsyncIterator
107 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
108 public typealias Element = CreateMLComponents.TemporalFeature<CreateMLComponents.AudioFeaturePrint.FeatureSequence.Feature>
109 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
110 @_implements(_Concurrency.AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift.Error
111 }
112}
113@available(*, unavailable)
114extension CreateMLComponents.AudioFeaturePrint.FeatureSequence : Swift.Sendable {
115}
116@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
117extension CreateMLComponents.AudioFeaturePrint.FeatureSequence {
118 public struct Iterator : _Concurrency.AsyncIteratorProtocol {
119 public mutating func next() async throws -> CreateMLComponents.TemporalFeature<CoreML.MLShapedArray<Swift.Float>>?
120 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
121 public typealias Element = CreateMLComponents.TemporalFeature<CoreML.MLShapedArray<Swift.Float>>
122 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
123 @_implements(_Concurrency.AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift.Error
124 }
125}
126@available(*, unavailable)
127extension CreateMLComponents.AudioFeaturePrint.FeatureSequence.Iterator : Swift.Sendable {
128}
129@available(macOS, introduced: 13.0, deprecated: 15.0)
130@available(iOS, introduced: 16.0, deprecated: 18.0)
131@available(tvOS, introduced: 16.0, deprecated: 18.0)
132@available(visionOS, introduced: 1.0, deprecated: 2.0)
133@available(watchOS, unavailable)
134extension CreateMLComponents.TemporalEstimator {
135 public func write(_ transformer: Self.Transformer, to url: Foundation.URL, overwrite: Swift.Bool = true) throws
136 public func read(from url: Foundation.URL) throws -> Self.Transformer
137}
138@available(macOS, introduced: 13.0, deprecated: 15.0)
139@available(iOS, introduced: 16.0, deprecated: 18.0)
140@available(tvOS, introduced: 16.0, deprecated: 18.0)
141@available(visionOS, introduced: 1.0, deprecated: 2.0)
142@available(watchOS, unavailable)
143extension CreateMLComponents.SupervisedTemporalEstimator {
144 public func write(_ transformer: Self.Transformer, to url: Foundation.URL, overwrite: Swift.Bool = true) throws
145 public func read(from url: Foundation.URL) throws -> Self.Transformer
146}
147@available(macOS, introduced: 13.0, deprecated: 15.0)
148@available(iOS, introduced: 16.0, deprecated: 18.0)
149@available(tvOS, introduced: 16.0, deprecated: 18.0)
150@available(visionOS, introduced: 1.0, deprecated: 2.0)
151@available(watchOS, unavailable)
152extension CreateMLComponents.UpdatableSupervisedTemporalEstimator {
153 public func writeWithOptimizer(_ transformer: Self.Transformer, to url: Foundation.URL, overwrite: Swift.Bool = true) throws
154 public func readWithOptimizer(from url: Foundation.URL) throws -> Self.Transformer
155}
156@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
157extension CreateMLComponents.FullyConnectedNetworkMultiLabelClassifier {
158 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label>
159 public func encodeWithOptimizer(_ transformer: CreateMLComponents.FullyConnectedNetworkMultiLabelClassifier<Scalar, Label>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
160 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.FullyConnectedNetworkMultiLabelClassifier<Scalar, Label>.Transformer
161}
162@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
163public struct ComposedTemporalTransformer<Inner, Outer> : CreateMLComponents.TemporalTransformer where Inner : CreateMLComponents.TemporalTransformer, Outer : CreateMLComponents.TemporalTransformer, Inner.Output == Outer.Input {
164 public typealias Input = Inner.Input
165 public typealias Intermediate = Inner.Output
166 public typealias Output = Outer.Output
167 public typealias OutputSequence = Outer.OutputSequence
168 public var inner: Inner
169 public var outer: Outer
170 public init(_ inner: Inner, _ outer: Outer)
171 @inlinable public func applied<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.ComposedTemporalTransformer<Inner, Outer>.OutputSequence where S : CreateMLComponents.TemporalSequence, Inner.Input == S.Feature {
172 let o0 = try await inner.applied(to: input, eventHandler: eventHandler)
173 try Task.checkCancellation()
174 let o1 = try await outer.applied(to: o0, eventHandler: eventHandler)
175 return o1
176 }
177}
178@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
179extension CreateMLComponents.ComposedTemporalTransformer : Swift.CustomDebugStringConvertible {
180 public var debugDescription: Swift.String {
181 get
182 }
183}
184@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
185extension CreateMLComponents.ComposedTemporalTransformer : Swift.Sendable where Inner : Swift.Sendable, Outer : Swift.Sendable {
186}
187@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
188extension CreateMLComponents.ComposedTemporalTransformer : Swift.Equatable where Inner : Swift.Equatable, Outer : Swift.Equatable {
189 public static func == (a: CreateMLComponents.ComposedTemporalTransformer<Inner, Outer>, b: CreateMLComponents.ComposedTemporalTransformer<Inner, Outer>) -> Swift.Bool
190}
191@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
192extension CreateMLComponents.ComposedTemporalTransformer : Swift.Encodable where Inner : Swift.Encodable, Outer : Swift.Encodable {
193 public func encode(to encoder: any Swift.Encoder) throws
194}
195@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
196extension CreateMLComponents.ComposedTemporalTransformer : Swift.Decodable where Inner : Swift.Decodable, Outer : Swift.Decodable {
197 public init(from decoder: any Swift.Decoder) throws
198}
199extension CreateMLComponents.Transformer {
200 @available(macOS, introduced: 13.0, deprecated: 15.0)
201 @available(iOS, introduced: 16.0, deprecated: 18.0)
202 @available(tvOS, introduced: 16.0, deprecated: 18.0)
203 @available(visionOS, introduced: 1.0, deprecated: 2.0)
204 @available(watchOS, unavailable)
205 @_disfavoredOverload public func appending<Other>(_ other: Other) -> CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TransformerToTemporalAdaptor<Self>, Other> where Other : CreateMLComponents.TemporalTransformer, Self.Output == Other.Input
206 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
207 public func appending<Other>(_ other: Other) -> CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TemporalAdaptor<Self>, Other> where Self : Swift.Sendable, Other : CreateMLComponents.TemporalTransformer, Self.Output == Other.Input
208}
209extension CreateMLComponents.TemporalTransformer {
210 @available(macOS, introduced: 13.0, deprecated: 15.0)
211 @available(iOS, introduced: 16.0, deprecated: 18.0)
212 @available(tvOS, introduced: 16.0, deprecated: 18.0)
213 @available(visionOS, introduced: 1.0, deprecated: 2.0)
214 @available(watchOS, unavailable)
215 @_disfavoredOverload public func appending<Other>(_ other: Other) -> CreateMLComponents.ComposedTemporalTransformer<Self, CreateMLComponents.TransformerToTemporalAdaptor<Other>> where Other : CreateMLComponents.Transformer, Self.Output == Other.Input
216 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
217 public func appending<Other>(_ other: Other) -> CreateMLComponents.ComposedTemporalTransformer<Self, CreateMLComponents.TemporalAdaptor<Other>> where Other : CreateMLComponents.Transformer, Other : Swift.Sendable, Self.Output == Other.Input
218 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
219 public func appending<Other>(_ other: Other) -> CreateMLComponents.ComposedTemporalTransformer<Self, Other> where Other : CreateMLComponents.TemporalTransformer, Self.Output == Other.Input
220}
221@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
222public struct DetectedObject<Label> : Swift.Equatable where Label : Swift.Comparable, Label : Swift.Hashable {
223 public var boundingBox: CoreFoundation.CGRect
224 public var label: Label
225 public var confidence: Swift.Float
226 public init(boundingBox: CoreFoundation.CGRect, label: Label, probability: Swift.Float)
227 public static func == (a: CreateMLComponents.DetectedObject<Label>, b: CreateMLComponents.DetectedObject<Label>) -> Swift.Bool
228}
229@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
230extension CreateMLComponents.DetectedObject : Swift.Encodable where Label : Swift.Encodable {
231 public func encode(to encoder: any Swift.Encoder) throws
232}
233@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
234extension CreateMLComponents.DetectedObject : Swift.Decodable where Label : Swift.Decodable {
235 public init(from decoder: any Swift.Decoder) throws
236}
237@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
238extension CreateMLComponents.DetectedObject : Swift.Sendable where Label : Swift.Sendable {
239}
240@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
241public struct EstimatorToSupervisedAdaptor<Estimator, Annotation> : CreateMLComponents.SupervisedEstimator where Estimator : CreateMLComponents.Estimator, Annotation : Swift.Equatable {
242 public typealias Transformer = Estimator.Transformer
243 public let estimator: Estimator
244 public init(_ estimator: Estimator)
245 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.EstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where Input : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<Estimator.Transformer.Input, Annotation>
246 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.EstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where Input : Swift.Sequence, Validation : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<Estimator.Transformer.Input, Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<Estimator.Transformer.Input, Annotation>
247 public func encode(_ transformer: CreateMLComponents.EstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
248 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.EstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
249}
250@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
251extension CreateMLComponents.EstimatorToSupervisedAdaptor : Swift.Sendable where Estimator : Swift.Sendable, Annotation : Swift.Sendable {
252}
253extension CreateMLComponents.Estimator {
254 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
255 public func adaptedAsSupervised<Annotation>(annotationType: Annotation.Type = Annotation.self) -> CreateMLComponents.EstimatorToSupervisedAdaptor<Self, Annotation> where Annotation : Swift.Equatable
256}
257@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
258public struct UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation> : CreateMLComponents.UpdatableSupervisedEstimator where Estimator : CreateMLComponents.UpdatableEstimator, Annotation : Swift.Equatable {
259 public typealias Transformer = Estimator.Transformer
260 public let estimator: Estimator
261 public init(_ estimator: Estimator)
262 public func makeTransformer() -> Estimator.Transformer
263 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where Input : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<Estimator.Transformer.Input, Annotation>
264 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where Input : Swift.Sequence, Validation : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<Estimator.Transformer.Input, Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<Estimator.Transformer.Input, Annotation>
265 public func update<InputSequence>(_ transformer: inout Estimator.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<Estimator.Transformer.Input, Annotation>
266 public func update<InputSequence, Validation>(_ transformer: inout Estimator.Transformer, with input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, Validation : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<Estimator.Transformer.Input, Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<Estimator.Transformer.Input, Annotation>
267 public func encode(_ transformer: CreateMLComponents.UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
268 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
269 public func encodeWithOptimizer(_ transformer: CreateMLComponents.UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
270 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
271}
272@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
273extension CreateMLComponents.UpdatableEstimatorToSupervisedAdaptor : Swift.Sendable where Estimator : Swift.Sendable, Annotation : Swift.Sendable {
274}
275extension CreateMLComponents.UpdatableEstimator {
276 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
277 public func adaptedAsSupervised<Annotation>(annotationType: Annotation.Type = Annotation.self) -> CreateMLComponents.UpdatableEstimatorToSupervisedAdaptor<Self, Annotation> where Annotation : Swift.Equatable
278}
279@available(macOS, introduced: 13.0, deprecated: 15.0)
280@available(iOS, introduced: 16.0, deprecated: 18.0)
281@available(tvOS, introduced: 16.0, deprecated: 18.0)
282@available(visionOS, introduced: 1.0, deprecated: 2.0)
283@available(watchOS, unavailable)
284public struct TemporalEstimatorToSupervisedAdaptor<Estimator, Annotation> : CreateMLComponents.SupervisedTemporalEstimator where Estimator : CreateMLComponents.TemporalEstimator, Annotation : Swift.Equatable, Annotation : Swift.Sendable {
285 public typealias Transformer = Estimator.Transformer
286 public let estimator: Estimator
287 public init(_ estimator: Estimator)
288 public func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.TemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input
289 public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.TemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where InputSequence : Swift.Sequence, Validation : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input
290 public func encode(_ transformer: CreateMLComponents.TemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
291 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.TemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
292}
293@available(macOS, introduced: 13.0, deprecated: 15.0)
294@available(iOS, introduced: 16.0, deprecated: 18.0)
295@available(tvOS, introduced: 16.0, deprecated: 18.0)
296@available(visionOS, introduced: 1.0, deprecated: 2.0)
297@available(watchOS, unavailable)
298extension CreateMLComponents.TemporalEstimatorToSupervisedAdaptor : Swift.Sendable where Estimator : Swift.Sendable {
299}
300@available(macOS, introduced: 13.0, deprecated: 15.0)
301@available(iOS, introduced: 16.0, deprecated: 18.0)
302@available(tvOS, introduced: 16.0, deprecated: 18.0)
303@available(visionOS, introduced: 1.0, deprecated: 2.0)
304@available(watchOS, unavailable)
305extension CreateMLComponents.TemporalEstimator {
306 public func adaptedAsSupervised<Annotation>(annotationType: Annotation.Type = Annotation.self) -> CreateMLComponents.TemporalEstimatorToSupervisedAdaptor<Self, Annotation> where Annotation : Swift.Equatable, Annotation : Swift.Sendable
307}
308@available(macOS, introduced: 13.0, deprecated: 15.0)
309@available(iOS, introduced: 16.0, deprecated: 18.0)
310@available(tvOS, introduced: 16.0, deprecated: 18.0)
311@available(visionOS, introduced: 1.0, deprecated: 2.0)
312@available(watchOS, unavailable)
313public struct UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation> : CreateMLComponents.UpdatableSupervisedTemporalEstimator where Estimator : CreateMLComponents.UpdatableTemporalEstimator, Annotation : Swift.Equatable, Annotation : Swift.Sendable {
314 public typealias Transformer = Estimator.Transformer
315 public let estimator: Estimator
316 public init(_ estimator: Estimator)
317 public func makeTransformer() -> Estimator.Transformer
318 public func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input
319 public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where InputSequence : Swift.Sequence, Validation : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input
320 public func update<InputSequence, FeatureSequence>(_ transformer: inout CreateMLComponents.UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input
321 public func update<InputSequence, Validation, FeatureSequence>(_ transformer: inout CreateMLComponents.UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, with input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, Validation : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input
322 public func encode(_ transformer: CreateMLComponents.UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
323 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
324 public func encodeWithOptimizer(_ transformer: CreateMLComponents.UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
325 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
326}
327@available(macOS, introduced: 13.0, deprecated: 15.0)
328@available(iOS, introduced: 16.0, deprecated: 18.0)
329@available(tvOS, introduced: 16.0, deprecated: 18.0)
330@available(visionOS, introduced: 1.0, deprecated: 2.0)
331@available(watchOS, unavailable)
332extension CreateMLComponents.UpdatableTemporalEstimatorToSupervisedAdaptor : Swift.Sendable where Estimator : Swift.Sendable {
333}
334@available(macOS, introduced: 13.0, deprecated: 15.0)
335@available(iOS, introduced: 16.0, deprecated: 18.0)
336@available(tvOS, introduced: 16.0, deprecated: 18.0)
337@available(visionOS, introduced: 1.0, deprecated: 2.0)
338@available(watchOS, unavailable)
339extension CreateMLComponents.UpdatableTemporalEstimator {
340 public func adaptedAsSupervised<Annotation>(annotationType: Annotation.Type = Annotation.self) -> CreateMLComponents.UpdatableTemporalEstimatorToSupervisedAdaptor<Self, Annotation> where Annotation : Swift.Equatable, Annotation : Swift.Sendable
341}
342@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
343public struct TabularEstimatorToSupervisedAdaptor<Estimator, Annotation> : CreateMLComponents.SupervisedTabularEstimator where Estimator : CreateMLComponents.TabularEstimator {
344 public typealias Transformer = Estimator.Transformer
345 public var annotationColumnID: TabularData.ColumnID<Annotation>
346 public let estimator: Estimator
347 public init(_ estimator: Estimator, annotationColumnID: TabularData.ColumnID<Annotation>)
348 @inlinable public func fitted(to input: TabularData.DataFrame, validateOn validation: TabularData.DataFrame? = nil, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Estimator.Transformer {
349 try await estimator.fitted(to: input, eventHandler: eventHandler)
350 }
351 public func encode(_ transformer: Estimator.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
352 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Estimator.Transformer
353}
354@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
355extension CreateMLComponents.TabularEstimatorToSupervisedAdaptor : Swift.Sendable where Estimator : Swift.Sendable, Annotation : Swift.Sendable {
356}
357extension CreateMLComponents.TabularEstimator {
358 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
359 public func adaptedAsSupervised<Annotation>(annotationColumnID: TabularData.ColumnID<Annotation>) -> CreateMLComponents.TabularEstimatorToSupervisedAdaptor<Self, Annotation>
360}
361@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
362public struct UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation> : CreateMLComponents.UpdatableSupervisedTabularEstimator where Estimator : CreateMLComponents.UpdatableTabularEstimator, Annotation : Swift.Equatable {
363 public typealias Transformer = Estimator.Transformer
364 public var annotationColumnID: TabularData.ColumnID<Annotation>
365 public let estimator: Estimator
366 public init(_ estimator: Estimator, annotationColumnID: TabularData.ColumnID<Annotation>)
367 public func makeTransformer() -> Estimator.Transformer
368 public func fitted(to input: TabularData.DataFrame, validateOn validation: TabularData.DataFrame?, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
369 public func update(_ transformer: inout CreateMLComponents.UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, with input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws
370 public func encode(_ transformer: CreateMLComponents.UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
371 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
372 public func encodeWithOptimizer(_ transformer: CreateMLComponents.UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
373 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
374}
375@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
376extension CreateMLComponents.UpdatableTabularEstimatorToSupervisedAdaptor : Swift.Sendable where Estimator : Swift.Sendable, Annotation : Swift.Sendable {
377}
378extension CreateMLComponents.UpdatableTabularEstimator {
379 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
380 public func adaptedAsSupervised<Annotation>(annotationColumnID: TabularData.ColumnID<Annotation>) -> CreateMLComponents.UpdatableTabularEstimatorToSupervisedAdaptor<Self, Annotation> where Annotation : Swift.Equatable
381}
382extension CreateMLComponents.UpdatableEstimator {
383 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
384 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableEstimator<CreateMLComponents.ComposedTransformer<Self.Transformer, Other>> where Other : CreateMLComponents.Transformer, Other.Input == Self.Transformer.Output
385
386 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
387 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableEstimator<CreateMLComponents.ComposedTransformer<Self.Transformer, Other.Transformer>> where Other : CreateMLComponents.UpdatableEstimator, Self.Transformer.Output == Other.Transformer.Input
388
389}
390@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
391public struct SlidingWindows<Scalar> : Swift.RandomAccessCollection, @unchecked Swift.Sendable where Scalar : CoreML.MLShapedArrayScalar {
392 public let input: CoreML.MLShapedArray<Scalar>
393 public let length: Swift.Int
394 public let stride: Swift.Int
395 public var startIndex: Swift.Int {
396 get
397 }
398 public var endIndex: Swift.Int {
399 get
400 }
401 public init(input: CoreML.MLShapedArray<Scalar>, length: Swift.Int, stride: Swift.Int = 1) throws
402 public func index(before i: Swift.Int) -> Swift.Int
403 public func index(after i: Swift.Int) -> Swift.Int
404 public func index(_ i: Swift.Int, offsetBy distance: Swift.Int) -> Swift.Int
405 public subscript(position: Swift.Int) -> CoreML.MLShapedArray<Scalar> {
406 get
407 }
408 public subscript(bounds: Swift.Range<Swift.Int>) -> Swift.Slice<CreateMLComponents.SlidingWindows<Scalar>> {
409 get
410 }
411 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
412 public typealias Element = CoreML.MLShapedArray<Scalar>
413 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
414 public typealias Index = Swift.Int
415 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
416 public typealias Indices = Swift.Range<Swift.Int>
417 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
418 public typealias Iterator = Swift.IndexingIterator<CreateMLComponents.SlidingWindows<Scalar>>
419 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
420 public typealias SubSequence = Swift.Slice<CreateMLComponents.SlidingWindows<Scalar>>
421}
422extension CreateMLComponents.UpdatableTabularEstimator {
423 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
424 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self.Transformer, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents.UpdatableSupervisedTabularEstimator, Other.Annotation : Swift.Equatable
425
426}
427extension CreateMLComponents.UpdatableSupervisedTabularEstimator {
428 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
429 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self.Transformer, Other>, Self.Annotation> where Other : CreateMLComponents.TabularTransformer, Self.Annotation : Swift.Equatable
430
431 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
432 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.UpdatableTabularEstimator, Self.Annotation : Swift.Equatable
433
434 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
435 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.UpdatableSupervisedTabularEstimator, Self.Annotation == Other.Annotation
436
437}
438@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
439public struct ComposedTransformer<Inner, Outer> : CreateMLComponents.Transformer where Inner : CreateMLComponents.Transformer, Outer : CreateMLComponents.Transformer, Inner.Output == Outer.Input {
440 public typealias Input = Inner.Input
441 public typealias Intermediate = Inner.Output
442 public typealias Output = Outer.Output
443 public var inner: Inner
444 public var outer: Outer
445 public init(_ inner: Inner, _ outer: Outer)
446 @inlinable public func applied(to input: CreateMLComponents.ComposedTransformer<Inner, Outer>.Input, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.ComposedTransformer<Inner, Outer>.Output {
447 let innerOutput = try await inner.applied(to: input, eventHandler: eventHandler)
448 try Task.checkCancellation()
449 let outerOutput = try await outer.applied(to: innerOutput, eventHandler: eventHandler)
450 return outerOutput
451 }
452}
453@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
454extension CreateMLComponents.ComposedTransformer : Swift.CustomDebugStringConvertible {
455 public var debugDescription: Swift.String {
456 get
457 }
458}
459@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
460extension CreateMLComponents.ComposedTransformer : Swift.Sendable where Inner : Swift.Sendable, Outer : Swift.Sendable {
461}
462@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
463extension CreateMLComponents.ComposedTransformer : Swift.Equatable where Inner : Swift.Equatable, Outer : Swift.Equatable {
464 public static func == (a: CreateMLComponents.ComposedTransformer<Inner, Outer>, b: CreateMLComponents.ComposedTransformer<Inner, Outer>) -> Swift.Bool
465}
466@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
467extension CreateMLComponents.ComposedTransformer : Swift.Encodable where Inner : Swift.Encodable, Outer : Swift.Encodable {
468 public func encode(to encoder: any Swift.Encoder) throws
469}
470@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
471extension CreateMLComponents.ComposedTransformer : Swift.Decodable where Inner : Swift.Decodable, Outer : Swift.Decodable {
472 public init(from decoder: any Swift.Decoder) throws
473}
474extension CreateMLComponents.Transformer {
475 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
476 public func appending<Other>(_ other: Other) -> CreateMLComponents.ComposedTransformer<Self, Other> where Other : CreateMLComponents.Transformer, Self.Output == Other.Input
477 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
478 public func appending<Other, Annotation>(_ other: Other) -> some CreateMLComponents.Transformer<CreateMLComponents.AnnotatedFeature<Self.Input, Annotation>, Other.Output> where Other : CreateMLComponents.Transformer, Other.Input == CreateMLComponents.AnnotatedFeature<Self.Output, Annotation>
479
480 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
481 public func appending<Other, Annotation>(_ other: Other) -> some CreateMLComponents.Transformer<Self.Input, CreateMLComponents.AnnotatedFeature<Other.Output, Annotation>> where Other : CreateMLComponents.Transformer, Self.Output == CreateMLComponents.AnnotatedFeature<Other.Input, Annotation>
482
483 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
484 public func appending<Other, Annotation>(_ other: Other) -> some CreateMLComponents.Transformer<CreateMLComponents.AnnotatedPrediction<Self.Input, Annotation>, Other.Output> where Other : CreateMLComponents.Transformer, Other.Input == CreateMLComponents.AnnotatedPrediction<Self.Output, Annotation>
485
486 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
487 public func appending<Other, Annotation>(_ other: Other) -> some CreateMLComponents.Transformer<Self.Input, CreateMLComponents.AnnotatedPrediction<Other.Output, Annotation>> where Other : CreateMLComponents.Transformer, Self.Output == CreateMLComponents.AnnotatedPrediction<Other.Input, Annotation>
488
489}
490@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
491public struct ObjectDetectionAnnotation<Label> : Swift.Decodable, Swift.Equatable where Label : Swift.Comparable, Label : Swift.Decodable, Label : Swift.Encodable, Label : Swift.Hashable {
492 public struct Annotation : Swift.Equatable {
493 public let boundingBox: CoreFoundation.CGRect
494 public let label: Label
495 public enum CodingKeys : Swift.String, Swift.CodingKey {
496 case boundingBox
497 case label
498 public init?(rawValue: Swift.String)
499 public init?(stringValue: Swift.String)
500 public init?(intValue: Swift.Int)
501 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
502 public typealias RawValue = Swift.String
503 public var intValue: Swift.Int? {
504 get
505 }
506 public var rawValue: Swift.String {
507 get
508 }
509 public var stringValue: Swift.String {
510 get
511 }
512 }
513 public static func == (a: CreateMLComponents.ObjectDetectionAnnotation<Label>.Annotation, b: CreateMLComponents.ObjectDetectionAnnotation<Label>.Annotation) -> Swift.Bool
514 }
515 public let imageFileName: Swift.String
516 public let objects: [CreateMLComponents.ObjectDetectionAnnotation<Label>.Annotation]
517 public let prominentObject: Label
518 public enum CodingKeys : Swift.String, Swift.CodingKey {
519 case imageFileName
520 case objects
521 case prominentObject
522 public init?(rawValue: Swift.String)
523 public init?(stringValue: Swift.String)
524 public init?(intValue: Swift.Int)
525 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
526 public typealias RawValue = Swift.String
527 public var intValue: Swift.Int? {
528 get
529 }
530 public var rawValue: Swift.String {
531 get
532 }
533 public var stringValue: Swift.String {
534 get
535 }
536 }
537 public static func == (a: CreateMLComponents.ObjectDetectionAnnotation<Label>, b: CreateMLComponents.ObjectDetectionAnnotation<Label>) -> Swift.Bool
538 public init(from decoder: any Swift.Decoder) throws
539}
540@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
541extension CreateMLComponents.ObjectDetectionAnnotation : Swift.Identifiable {
542 public var id: Swift.String {
543 get
544 }
545 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
546 public typealias ID = Swift.String
547}
548@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
549extension CreateMLComponents.ObjectDetectionAnnotation : Swift.Sendable where Label : Swift.Sendable {
550}
551@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
552extension CreateMLComponents.ObjectDetectionAnnotation.Annotation : Swift.Decodable {
553 public init(from decoder: any Swift.Decoder) throws
554}
555@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
556extension CreateMLComponents.ObjectDetectionAnnotation.Annotation : Swift.Sendable where Label : Swift.Sendable {
557}
558@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
559public struct RandomImageCropper : CreateMLComponents.RandomTransformer, Swift.Sendable {
560 public init(targetSize: CoreFoundation.CGSize)
561 public init(targetWidth: Swift.Double, targetHeight: Swift.Double)
562 public init(scale: Swift.ClosedRange<Swift.Double>, aspectRatio: Swift.Double? = nil)
563 public func applied(to image: CoreImage.CIImage, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CoreImage.CIImage
564 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
565 public typealias Input = CoreImage.CIImage
566 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
567 public typealias Output = CoreImage.CIImage
568}
569@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
570extension CreateMLComponents.FullyConnectedNetworkClassifier : CreateMLComponents.UpdatableSupervisedEstimator {
571 public func makeTransformer() -> CreateMLComponents.FullyConnectedNetworkClassifierModel<Scalar, Label>
572 public func update<InputSequence>(_ transformer: inout CreateMLComponents.FullyConnectedNetworkClassifierModel<Scalar, Label>, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Label>
573}
574@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
575public struct PreprocessingEstimator<Preprocessor, Estimator> : CreateMLComponents.Estimator where Preprocessor : CreateMLComponents.Transformer, Estimator : CreateMLComponents.Estimator, Preprocessor.Output == Estimator.Transformer.Input {
576 public typealias Transformer = CreateMLComponents.ComposedTransformer<Preprocessor, Estimator.Transformer>
577 public typealias Input = Preprocessor.Input
578 public typealias Intermediate = Preprocessor.Output
579 public typealias Output = Estimator.Transformer.Output
580 public var preprocessor: Preprocessor
581 public var estimator: Estimator
582 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
583 @inlinable public func preprocessed<S>(from input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [Preprocessor.Output] where S : Swift.Sequence, Preprocessor.Input == S.Element {
584 try await preprocessor.applied(to: input, eventHandler: eventHandler)
585 }
586 @inlinable public func fitted<S>(toPreprocessed preprocessed: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingEstimator<Preprocessor, Estimator>.Transformer where S : Swift.Sequence, Preprocessor.Output == S.Element, S.Element == Estimator.Transformer.Input {
587 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
588 return ComposedTransformer(preprocessor, fittedTransformer)
589 }
590 @inlinable public func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingEstimator<Preprocessor, Estimator>.Transformer where S : Swift.Sequence, Preprocessor.Input == S.Element {
591 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
592 try Task.checkCancellation()
593 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
594 }
595 public func encode(_ transformer: CreateMLComponents.PreprocessingEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
596 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingEstimator<Preprocessor, Estimator>.Transformer
597}
598@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
599extension CreateMLComponents.PreprocessingEstimator : Swift.Sendable where Preprocessor : Swift.Sendable, Estimator : Swift.Sendable {
600}
601extension CreateMLComponents.Transformer {
602 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
603 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingEstimator<Self, Other> where Other : CreateMLComponents.Estimator, Self.Output == Other.Transformer.Input
604}
605@available(watchOS, unavailable)
606extension CreateMLComponents.TimeSeriesClassifier {
607 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
608 @available(watchOS, unavailable)
609 public struct Model : CreateMLComponents.Transformer, @unchecked Swift.Sendable {
610 public typealias Input = CoreML.MLShapedArray<Scalar>
611 public typealias Output = CreateMLComponents.ClassificationDistribution<Label>
612 public var stride: Swift.Int
613 public func applied(to input: CoreML.MLShapedArray<Scalar>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.ClassificationDistribution<Label>
614 }
615}
616@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
617@available(watchOS, unavailable)
618extension CreateMLComponents.TimeSeriesClassifier.Model : Swift.Codable {
619 public func encode(to encoder: any Swift.Encoder) throws
620 public init(from decoder: any Swift.Decoder) throws
621}
622extension CreateMLComponents.AudioReader {
623 @available(macOS 13.0, iOS 16.0, *)
624 @available(tvOS, unavailable)
625 public struct MicrophoneAsyncBuffers : CreateMLComponents.TemporalSequence, Swift.Sendable {
626 public typealias AsyncIterator = CreateMLComponents.AudioReader.MicrophoneAsyncBuffers.Iterator
627 public typealias Feature = AVFAudio.AVAudioPCMBuffer
628 public var count: Swift.Int? {
629 get
630 }
631 public func makeAsyncIterator() -> CreateMLComponents.AudioReader.MicrophoneAsyncBuffers.Iterator
632 @available(iOS 16.0, macOS 13.0, *)
633 @available(tvOS, unavailable, introduced: 16.0)
634 public typealias Element = CreateMLComponents.TemporalFeature<CreateMLComponents.AudioReader.MicrophoneAsyncBuffers.Feature>
635 @available(iOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
636 @available(tvOS, unavailable, introduced: 18.0)
637 @_implements(_Concurrency.AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift.Error
638 }
639}
640@available(macOS 13.0, iOS 16.0, *)
641@available(tvOS, unavailable)
642extension CreateMLComponents.AudioReader.MicrophoneAsyncBuffers {
643 @_hasMissingDesignatedInitializers @available(macOS 13.0, iOS 16.0, *)
644 @available(tvOS, unavailable)
645 final public class Iterator : _Concurrency.AsyncIteratorProtocol {
646 @objc deinit
647 final public func next() async throws -> CreateMLComponents.TemporalFeature<CreateMLComponents.AudioReader.MicrophoneAsyncBuffers.Feature>?
648 @available(iOS 16.0, macOS 13.0, *)
649 @available(tvOS, unavailable, introduced: 16.0)
650 public typealias Element = CreateMLComponents.TemporalFeature<CreateMLComponents.AudioReader.MicrophoneAsyncBuffers.Feature>
651 @available(iOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
652 @available(tvOS, unavailable, introduced: 18.0)
653 @_implements(_Concurrency.AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift.Error
654 }
655}
656@available(*, unavailable)
657@available(tvOS, unavailable)
658extension CreateMLComponents.AudioReader.MicrophoneAsyncBuffers.Iterator : Swift.Sendable {
659}
660@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
661public struct LinearTransformer<Element> : CreateMLComponents.Transformer, Swift.Hashable, Swift.Codable where Element : Swift.BinaryFloatingPoint, Element : Swift.Decodable, Element : Swift.Encodable {
662 public var scale: Element
663 public var offset: Element
664 public init(scale: Element, offset: Element)
665 @inlinable public func applied(to input: Element, eventHandler: CreateMLComponents.EventHandler? = nil) -> Element {
666 return input * scale + offset
667 }
668 @inlinable public func applied<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) -> [Element] where Element == S.Element, S : Swift.Sequence {
669 input.map({ applied(to: $0, eventHandler: eventHandler) })
670 }
671 public static func == (a: CreateMLComponents.LinearTransformer<Element>, b: CreateMLComponents.LinearTransformer<Element>) -> Swift.Bool
672 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
673 public typealias Input = Element
674 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
675 public typealias Output = Element
676 public func encode(to encoder: any Swift.Encoder) throws
677 public func hash(into hasher: inout Swift.Hasher)
678 public var hashValue: Swift.Int {
679 get
680 }
681 public init(from decoder: any Swift.Decoder) throws
682}
683@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
684extension CreateMLComponents.LinearTransformer : Swift.CustomDebugStringConvertible {
685 public var debugDescription: Swift.String {
686 get
687 }
688}
689@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
690extension CreateMLComponents.LinearTransformer : Swift.Sendable where Element : Swift.Sendable {
691}
692extension CreateMLComponents.TimeSeriesClassifier.Model {
693 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
694 @available(watchOS, unavailable)
695 public func export(to url: Foundation.URL) throws
696 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
697 @available(watchOS, unavailable)
698 public func export(to url: Foundation.URL, metadata: CreateMLComponents.ModelMetadata) throws
699}
700@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
701public struct OrdinalEncoder<Category> : CreateMLComponents.Estimator where Category : Swift.Comparable, Category : Swift.Decodable, Category : Swift.Encodable, Category : Swift.Hashable {
702 public init()
703 public func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CreateMLComponents.OrdinalEncoder<Category>.Transformer where S : Swift.Sequence, S.Element == Category?
704}
705@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
706extension CreateMLComponents.OrdinalEncoder : CreateMLComponents.UpdatableEstimator {
707 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
708 public func makeTransformer() -> CreateMLComponents.OrdinalEncoder<Category>.Transformer
709 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
710 public func update(_ transformer: inout CreateMLComponents.OrdinalEncoder<Category>.Transformer, with input: some Sequence<Category?>, eventHandler: CreateMLComponents.EventHandler? = nil) throws
711 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
712 public func encodeWithOptimizer(_ transformer: CreateMLComponents.OrdinalEncoder<Category>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
713 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
714 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.OrdinalEncoder<Category>.Transformer
715}
716@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
717extension CreateMLComponents.OrdinalEncoder : Swift.Sendable where Category : Swift.Sendable {
718}
719extension CreateMLComponents.OrdinalEncoder {
720 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
721 public struct Transformer : CreateMLComponents.Transformer {
722 public var categories: Swift.Set<Category?>
723 public init(categories: Swift.Set<Category?>)
724 public func applied(to input: Category?, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> Swift.Int
725 public func applied<S>(_ input: S, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> [Swift.Int] where S : Swift.Sequence, S.Element == Category?
726 public func category(at index: Swift.Int) -> Category?
727 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
728 public typealias Input = Category?
729 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
730 public typealias Output = Swift.Int
731 }
732}
733@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
734extension CreateMLComponents.OrdinalEncoder.Transformer : Swift.CustomDebugStringConvertible {
735 public var debugDescription: Swift.String {
736 get
737 }
738}
739@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
740extension CreateMLComponents.OrdinalEncoder.Transformer : Swift.Sendable where Category : Swift.Sendable {
741}
742@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
743extension CreateMLComponents.OrdinalEncoder.Transformer : Swift.Encodable {
744 public func encode(to encoder: any Swift.Encoder) throws
745}
746@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
747extension CreateMLComponents.OrdinalEncoder.Transformer : Swift.Decodable {
748 public init(from decoder: any Swift.Decoder) throws
749}
750@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
751public struct AnnotatedBatch<Scalar> where Scalar : CoreML.MLShapedArrayScalar {
752 public var features: CoreML.MLShapedArray<Scalar>
753 public var annotations: CoreML.MLShapedArray<Scalar>
754 public var count: Swift.Int {
755 get
756 }
757 public init(features: CoreML.MLShapedArray<Scalar>, annotations: CoreML.MLShapedArray<Scalar>)
758}
759@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
760extension CreateMLComponents.AnnotatedBatch : Swift.Encodable where Scalar : Swift.Encodable {
761 public func encode(to encoder: any Swift.Encoder) throws
762}
763@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
764extension CreateMLComponents.AnnotatedBatch : Swift.Decodable where Scalar : Swift.Decodable {
765 public init(from decoder: any Swift.Decoder) throws
766}
767@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
768extension CreateMLComponents.AnnotatedBatch : Swift.Equatable where Scalar : Swift.Equatable {
769 public static func == (a: CreateMLComponents.AnnotatedBatch<Scalar>, b: CreateMLComponents.AnnotatedBatch<Scalar>) -> Swift.Bool
770}
771@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
772extension CreateMLComponents.AnnotatedBatch : Swift.Sendable where Scalar : Swift.Sendable {
773}
774extension CreateMLComponents.MultiLabelClassificationMetrics {
775 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
776 public static func meanAveragePrecisionScore(classifications: some Sequence<ClassificationDistribution<Label>>, groundTruth: some Sequence<Set<Label>>, labels: Swift.Set<Label>) -> Swift.Float
777 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
778 public static func meanAveragePrecisionScore(classifications: some Sequence<ClassificationDistribution<Label>>, groundTruth: some Sequence<Set<Label>>) -> Swift.Float
779 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
780 public static func meanAveragePrecisionScore(_ pairs: some Sequence<(classification: ClassificationDistribution<Label>, labels: Set<Label>)>, labels: Swift.Set<Label>) -> Swift.Float
781 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
782 public static func meanAveragePrecisionScore(_ pairs: some Sequence<(classification: ClassificationDistribution<Label>, labels: Set<Label>)>) -> Swift.Float
783}
784extension CreateMLComponents.MultiLabelClassificationMetrics {
785 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
786 public func precisionScore(for label: Label) -> Swift.Float
787 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
788 public func recallScore(for label: Label) -> Swift.Float
789}
790@available(macOS, introduced: 13.0, deprecated: 15.0)
791@available(iOS, introduced: 16.0, deprecated: 18.0)
792@available(tvOS, introduced: 16.0, deprecated: 18.0)
793@available(visionOS, introduced: 1.0, deprecated: 2.0)
794@available(watchOS, unavailable)
795public struct PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator> : CreateMLComponents.UpdatableSupervisedTemporalEstimator where Preprocessor : CreateMLComponents.TemporalTransformer, Estimator : CreateMLComponents.UpdatableSupervisedTemporalEstimator, Preprocessor.Output == Estimator.Transformer.Input {
796 public typealias Transformer = CreateMLComponents.ComposedTemporalTransformer<Preprocessor, Estimator.Transformer>
797 public typealias Input = Preprocessor.Input
798 public typealias Intermediate = Preprocessor.Output
799 public typealias Output = Estimator.Transformer.Output
800 public typealias Annotation = Estimator.Annotation
801 public var preprocessor: Preprocessor
802 public var estimator: Estimator
803 public init(_ inner: Preprocessor, _ outer: Estimator)
804 @inlinable public func preprocessed<InputSequence, FeatureSequence>(from input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [CreateMLComponents.AnnotatedFeature<CreateMLComponents.PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>] where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
805 var preprocessed = [AnnotatedFeature<PreprocessedFeatureSequence<Preprocessor.Output>, Annotation>]()
806 for item in input {
807 let transformed = try await preprocessor.applied(to: item.feature, eventHandler: eventHandler)
23import _StringProcessing
24import _SwiftConcurrencyShims
25import os
26extension CreateMLComponents::Transformer {
27 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
28 public func adaptedAsRandomTransformer() -> some CreateMLComponents::RandomTransformer<Self.Input, Self.Output>
29
30}
31@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
32extension CreateMLComponents::FullyConnectedNetworkClassifier {
33 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::FullyConnectedNetworkClassifierModel<Scalar, Label>
34 public func encodeWithOptimizer(_ transformer: CreateMLComponents::FullyConnectedNetworkClassifier<Scalar, Label>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
35 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::FullyConnectedNetworkClassifier<Scalar, Label>.CreateMLComponents::Transformer
36}
37@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
38public struct ApplyEachRandomly<Element> : CreateMLComponents::RandomTransformer {
39 public let probability: Swift::Double
40 public init<RandomTransformer>(probability: Swift::Double = 0.5, @CreateMLComponents::AugmentationBuilder<Element> _ augmentation: () -> RandomTransformer) where Element == RandomTransformer.Input, RandomTransformer : CreateMLComponents::RandomTransformer, RandomTransformer.Input == RandomTransformer.Output
41 public func applied(to input: Element, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Element
42 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
43 public typealias Input = Element
44 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
45 public typealias Output = Element
46}
47@available(*, unavailable)
48extension CreateMLComponents::ApplyEachRandomly : Swift::Sendable {
49}
50extension CreateMLComponents::UpdatableEstimator {
51 @available(macOS, introduced: 13.0, deprecated: 15.0)
52 @available(iOS, introduced: 16.0, deprecated: 18.0)
53 @available(tvOS, introduced: 16.0, deprecated: 18.0)
54 @available(visionOS, introduced: 1.0, deprecated: 2.0)
55 @available(watchOS, unavailable)
56 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TransformerToTemporalAdaptor<Self.Transformer>, Other>> where Other : CreateMLComponents::TemporalTransformer, Other.Input == Self.Transformer.Output
57
58 @available(macOS, introduced: 13.0, deprecated: 15.0)
59 @available(iOS, introduced: 16.0, deprecated: 18.0)
60 @available(tvOS, introduced: 16.0, deprecated: 18.0)
61 @available(visionOS, introduced: 1.0, deprecated: 2.0)
62 @available(watchOS, unavailable)
63 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>> where Other : CreateMLComponents::UpdatableTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
64
65}
66@available(macOS, introduced: 13.0, deprecated: 15.0)
67@available(iOS, introduced: 16.0, deprecated: 18.0)
68@available(tvOS, introduced: 16.0, deprecated: 18.0)
69@available(visionOS, introduced: 1.0, deprecated: 2.0)
70@available(watchOS, unavailable)
71extension CreateMLComponents::UpdatableTemporalEstimator {
72 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, CreateMLComponents::TransformerToTemporalAdaptor<Other>>> where Other : CreateMLComponents::Transformer, Other.Input == Self.Transformer.Output
73
74 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, CreateMLComponents::TransformerToTemporalAdaptor<Other.Transformer>>> where Other : CreateMLComponents::UpdatableEstimator, Self.Transformer.Output == Other.Transformer.Input
75
76 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, Other>> where Other : CreateMLComponents::TemporalTransformer, Other.Input == Self.Transformer.Output
77
78 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, Other.Transformer>> where Other : CreateMLComponents::UpdatableTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
79
80}
81@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
82public struct AudioFeaturePrint : CreateMLComponents::TemporalTransformer, Swift::Sendable {
83 public typealias Input = AVFAudio::AVAudioPCMBuffer
84 public typealias Output = CoreML::MLShapedArray<Swift::Float>
85 public let windowDuration: Foundation::TimeInterval
86 public let overlapFactor: Swift::Double
87 public init(windowDuration: Foundation::TimeInterval, overlapFactor: Swift::Double)
88 public func applied<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CreateMLComponents::AudioFeaturePrint.CreateMLComponents::FeatureSequence where S : CreateMLComponents::TemporalSequence, S.Feature == AVFAudio::AVAudioPCMBuffer
89 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
90 public typealias OutputSequence = CreateMLComponents::AudioFeaturePrint.CreateMLComponents::FeatureSequence
91}
92@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
93extension CreateMLComponents::AudioFeaturePrint : Swift::CustomDebugStringConvertible {
94 public var debugDescription: Swift::String {
95 get
96 }
97}
98@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
99extension CreateMLComponents::AudioFeaturePrint {
100 public struct FeatureSequence : CreateMLComponents::TemporalSequence {
101 public typealias Feature = CoreML::MLShapedArray<Swift::Float>
102 public typealias AsyncIterator = CreateMLComponents::AudioFeaturePrint.CreateMLComponents::FeatureSequence.CreateMLComponents::Iterator
103 public var count: Swift::Int? {
104 get
105 }
106 public func makeAsyncIterator() -> CreateMLComponents::AudioFeaturePrint.CreateMLComponents::FeatureSequence.CreateMLComponents::AsyncIterator
107 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
108 public typealias Element = CreateMLComponents::TemporalFeature<CreateMLComponents::AudioFeaturePrint.CreateMLComponents::FeatureSequence.CreateMLComponents::Feature>
109 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
110 @_implements(_Concurrency::AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift::Error
111 }
112}
113@available(*, unavailable)
114extension CreateMLComponents::AudioFeaturePrint.CreateMLComponents::FeatureSequence : Swift::Sendable {
115}
116@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
117extension CreateMLComponents::AudioFeaturePrint.CreateMLComponents::FeatureSequence {
118 public struct Iterator : _Concurrency::AsyncIteratorProtocol {
119 public mutating func next() async throws -> CreateMLComponents::TemporalFeature<CoreML::MLShapedArray<Swift::Float>>?
120 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
121 public typealias Element = CreateMLComponents::TemporalFeature<CoreML::MLShapedArray<Swift::Float>>
122 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
123 @_implements(_Concurrency::AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift::Error
124 }
125}
126@available(*, unavailable)
127extension CreateMLComponents::AudioFeaturePrint.CreateMLComponents::FeatureSequence.CreateMLComponents::Iterator : Swift::Sendable {
128}
129@available(macOS, introduced: 13.0, deprecated: 15.0)
130@available(iOS, introduced: 16.0, deprecated: 18.0)
131@available(tvOS, introduced: 16.0, deprecated: 18.0)
132@available(visionOS, introduced: 1.0, deprecated: 2.0)
133@available(watchOS, unavailable)
134extension CreateMLComponents::TemporalEstimator {
135 public func write(_ transformer: Self.Transformer, to url: Foundation::URL, overwrite: Swift::Bool = true) throws
136 public func read(from url: Foundation::URL) throws -> Self.Transformer
137}
138@available(macOS, introduced: 13.0, deprecated: 15.0)
139@available(iOS, introduced: 16.0, deprecated: 18.0)
140@available(tvOS, introduced: 16.0, deprecated: 18.0)
141@available(visionOS, introduced: 1.0, deprecated: 2.0)
142@available(watchOS, unavailable)
143extension CreateMLComponents::SupervisedTemporalEstimator {
144 public func write(_ transformer: Self.Transformer, to url: Foundation::URL, overwrite: Swift::Bool = true) throws
145 public func read(from url: Foundation::URL) throws -> Self.Transformer
146}
147@available(macOS, introduced: 13.0, deprecated: 15.0)
148@available(iOS, introduced: 16.0, deprecated: 18.0)
149@available(tvOS, introduced: 16.0, deprecated: 18.0)
150@available(visionOS, introduced: 1.0, deprecated: 2.0)
151@available(watchOS, unavailable)
152extension CreateMLComponents::UpdatableSupervisedTemporalEstimator {
153 public func writeWithOptimizer(_ transformer: Self.Transformer, to url: Foundation::URL, overwrite: Swift::Bool = true) throws
154 public func readWithOptimizer(from url: Foundation::URL) throws -> Self.Transformer
155}
156@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
157extension CreateMLComponents::FullyConnectedNetworkMultiLabelClassifier {
158 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label>
159 public func encodeWithOptimizer(_ transformer: CreateMLComponents::FullyConnectedNetworkMultiLabelClassifier<Scalar, Label>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
160 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::FullyConnectedNetworkMultiLabelClassifier<Scalar, Label>.CreateMLComponents::Transformer
161}
162@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
163public struct ComposedTemporalTransformer<Inner, Outer> : CreateMLComponents::TemporalTransformer where Inner : CreateMLComponents::TemporalTransformer, Outer : CreateMLComponents::TemporalTransformer, Inner.Output == Outer.Input {
164 public typealias Input = Inner.Input
165 public typealias Intermediate = Inner.Output
166 public typealias Output = Outer.Output
167 public typealias OutputSequence = Outer.OutputSequence
168 public var inner: Inner
169 public var outer: Outer
170 public init(_ inner: Inner, _ outer: Outer)
171 @inlinable public func applied<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::ComposedTemporalTransformer<Inner, Outer>.OutputSequence where S : CreateMLComponents::TemporalSequence, Inner.Input == S.Feature {
172 let o0 = try await inner.applied(to: input, eventHandler: eventHandler)
173 try Task.checkCancellation()
174 let o1 = try await outer.applied(to: o0, eventHandler: eventHandler)
175 return o1
176 }
177}
178@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
179extension CreateMLComponents::ComposedTemporalTransformer : Swift::CustomDebugStringConvertible {
180 public var debugDescription: Swift::String {
181 get
182 }
183}
184@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
185extension CreateMLComponents::ComposedTemporalTransformer : Swift::Sendable where Inner : Swift::Sendable, Outer : Swift::Sendable {
186}
187@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
188extension CreateMLComponents::ComposedTemporalTransformer : Swift::Equatable where Inner : Swift::Equatable, Outer : Swift::Equatable {
189 public static func == (a: CreateMLComponents::ComposedTemporalTransformer<Inner, Outer>, b: CreateMLComponents::ComposedTemporalTransformer<Inner, Outer>) -> Swift::Bool
190}
191@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
192extension CreateMLComponents::ComposedTemporalTransformer : Swift::Encodable where Inner : Swift::Encodable, Outer : Swift::Encodable {
193 public func encode(to encoder: any Swift::Encoder) throws
194}
195@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
196extension CreateMLComponents::ComposedTemporalTransformer : Swift::Decodable where Inner : Swift::Decodable, Outer : Swift::Decodable {
197 public init(from decoder: any Swift::Decoder) throws
198}
199extension CreateMLComponents::Transformer {
200 @available(macOS, introduced: 13.0, deprecated: 15.0)
201 @available(iOS, introduced: 16.0, deprecated: 18.0)
202 @available(tvOS, introduced: 16.0, deprecated: 18.0)
203 @available(visionOS, introduced: 1.0, deprecated: 2.0)
204 @available(watchOS, unavailable)
205 @_disfavoredOverload public func appending<Other>(_ other: Other) -> CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TransformerToTemporalAdaptor<Self>, Other> where Other : CreateMLComponents::TemporalTransformer, Self.Output == Other.Input
206 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
207 public func appending<Other>(_ other: Other) -> CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TemporalAdaptor<Self>, Other> where Self : Swift::Sendable, Other : CreateMLComponents::TemporalTransformer, Self.Output == Other.Input
208}
209extension CreateMLComponents::TemporalTransformer {
210 @available(macOS, introduced: 13.0, deprecated: 15.0)
211 @available(iOS, introduced: 16.0, deprecated: 18.0)
212 @available(tvOS, introduced: 16.0, deprecated: 18.0)
213 @available(visionOS, introduced: 1.0, deprecated: 2.0)
214 @available(watchOS, unavailable)
215 @_disfavoredOverload public func appending<Other>(_ other: Other) -> CreateMLComponents::ComposedTemporalTransformer<Self, CreateMLComponents::TransformerToTemporalAdaptor<Other>> where Other : CreateMLComponents::Transformer, Self.Output == Other.Input
216 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
217 public func appending<Other>(_ other: Other) -> CreateMLComponents::ComposedTemporalTransformer<Self, CreateMLComponents::TemporalAdaptor<Other>> where Other : CreateMLComponents::Transformer, Other : Swift::Sendable, Self.Output == Other.Input
218 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
219 public func appending<Other>(_ other: Other) -> CreateMLComponents::ComposedTemporalTransformer<Self, Other> where Other : CreateMLComponents::TemporalTransformer, Self.Output == Other.Input
220}
221@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
222public struct DetectedObject<Label> : Swift::Equatable where Label : Swift::Comparable, Label : Swift::Hashable {
223 public var boundingBox: CoreFoundation::CGRect
224 public var label: Label
225 public var confidence: Swift::Float
226 public init(boundingBox: CoreFoundation::CGRect, label: Label, probability: Swift::Float)
227 public static func == (a: CreateMLComponents::DetectedObject<Label>, b: CreateMLComponents::DetectedObject<Label>) -> Swift::Bool
228}
229@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
230extension CreateMLComponents::DetectedObject : Swift::Encodable where Label : Swift::Encodable {
231 public func encode(to encoder: any Swift::Encoder) throws
232}
233@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
234extension CreateMLComponents::DetectedObject : Swift::Decodable where Label : Swift::Decodable {
235 public init(from decoder: any Swift::Decoder) throws
236}
237@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
238extension CreateMLComponents::DetectedObject : Swift::Sendable where Label : Swift::Sendable {
239}
240@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
241public struct EstimatorToSupervisedAdaptor<Estimator, Annotation> : CreateMLComponents::SupervisedEstimator where Estimator : CreateMLComponents::Estimator, Annotation : Swift::Equatable {
242 public typealias Transformer = Estimator.Transformer
243 public let estimator: Estimator
244 public init(_ estimator: Estimator)
245 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::EstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where Input : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<Estimator.Transformer.Input, Annotation>
246 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::EstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where Input : Swift::Sequence, Validation : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<Estimator.Transformer.Input, Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<Estimator.Transformer.Input, Annotation>
247 public func encode(_ transformer: CreateMLComponents::EstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
248 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::EstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
249}
250@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
251extension CreateMLComponents::EstimatorToSupervisedAdaptor : Swift::Sendable where Estimator : Swift::Sendable, Annotation : Swift::Sendable {
252}
253extension CreateMLComponents::Estimator {
254 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
255 public func adaptedAsSupervised<Annotation>(annotationType: Annotation.Type = Annotation.self) -> CreateMLComponents::EstimatorToSupervisedAdaptor<Self, Annotation> where Annotation : Swift::Equatable
256}
257@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
258public struct UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation> : CreateMLComponents::UpdatableSupervisedEstimator where Estimator : CreateMLComponents::UpdatableEstimator, Annotation : Swift::Equatable {
259 public typealias Transformer = Estimator.Transformer
260 public let estimator: Estimator
261 public init(_ estimator: Estimator)
262 public func makeTransformer() -> Estimator.Transformer
263 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where Input : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<Estimator.Transformer.Input, Annotation>
264 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where Input : Swift::Sequence, Validation : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<Estimator.Transformer.Input, Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<Estimator.Transformer.Input, Annotation>
265 public func update<InputSequence>(_ transformer: inout Estimator.Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<Estimator.Transformer.Input, Annotation>
266 public func update<InputSequence, Validation>(_ transformer: inout Estimator.Transformer, with input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, Validation : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<Estimator.Transformer.Input, Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<Estimator.Transformer.Input, Annotation>
267 public func encode(_ transformer: CreateMLComponents::UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
268 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
269 public func encodeWithOptimizer(_ transformer: CreateMLComponents::UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
270 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::UpdatableEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
271}
272@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
273extension CreateMLComponents::UpdatableEstimatorToSupervisedAdaptor : Swift::Sendable where Estimator : Swift::Sendable, Annotation : Swift::Sendable {
274}
275extension CreateMLComponents::UpdatableEstimator {
276 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
277 public func adaptedAsSupervised<Annotation>(annotationType: Annotation.Type = Annotation.self) -> CreateMLComponents::UpdatableEstimatorToSupervisedAdaptor<Self, Annotation> where Annotation : Swift::Equatable
278}
279@available(macOS, introduced: 13.0, deprecated: 15.0)
280@available(iOS, introduced: 16.0, deprecated: 18.0)
281@available(tvOS, introduced: 16.0, deprecated: 18.0)
282@available(visionOS, introduced: 1.0, deprecated: 2.0)
283@available(watchOS, unavailable)
284public struct TemporalEstimatorToSupervisedAdaptor<Estimator, Annotation> : CreateMLComponents::SupervisedTemporalEstimator where Estimator : CreateMLComponents::TemporalEstimator, Annotation : Swift::Equatable, Annotation : Swift::Sendable {
285 public typealias Transformer = Estimator.Transformer
286 public let estimator: Estimator
287 public init(_ estimator: Estimator)
288 public func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::TemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input
289 public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::TemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where InputSequence : Swift::Sequence, Validation : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input
290 public func encode(_ transformer: CreateMLComponents::TemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
291 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::TemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
292}
293@available(macOS, introduced: 13.0, deprecated: 15.0)
294@available(iOS, introduced: 16.0, deprecated: 18.0)
295@available(tvOS, introduced: 16.0, deprecated: 18.0)
296@available(visionOS, introduced: 1.0, deprecated: 2.0)
297@available(watchOS, unavailable)
298extension CreateMLComponents::TemporalEstimatorToSupervisedAdaptor : Swift::Sendable where Estimator : Swift::Sendable {
299}
300@available(macOS, introduced: 13.0, deprecated: 15.0)
301@available(iOS, introduced: 16.0, deprecated: 18.0)
302@available(tvOS, introduced: 16.0, deprecated: 18.0)
303@available(visionOS, introduced: 1.0, deprecated: 2.0)
304@available(watchOS, unavailable)
305extension CreateMLComponents::TemporalEstimator {
306 public func adaptedAsSupervised<Annotation>(annotationType: Annotation.Type = Annotation.self) -> CreateMLComponents::TemporalEstimatorToSupervisedAdaptor<Self, Annotation> where Annotation : Swift::Equatable, Annotation : Swift::Sendable
307}
308@available(macOS, introduced: 13.0, deprecated: 15.0)
309@available(iOS, introduced: 16.0, deprecated: 18.0)
310@available(tvOS, introduced: 16.0, deprecated: 18.0)
311@available(visionOS, introduced: 1.0, deprecated: 2.0)
312@available(watchOS, unavailable)
313public struct UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation> : CreateMLComponents::UpdatableSupervisedTemporalEstimator where Estimator : CreateMLComponents::UpdatableTemporalEstimator, Annotation : Swift::Equatable, Annotation : Swift::Sendable {
314 public typealias Transformer = Estimator.Transformer
315 public let estimator: Estimator
316 public init(_ estimator: Estimator)
317 public func makeTransformer() -> Estimator.Transformer
318 public func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input
319 public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer where InputSequence : Swift::Sequence, Validation : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input
320 public func update<InputSequence, FeatureSequence>(_ transformer: inout CreateMLComponents::UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input
321 public func update<InputSequence, Validation, FeatureSequence>(_ transformer: inout CreateMLComponents::UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, with input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, Validation : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input
322 public func encode(_ transformer: CreateMLComponents::UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
323 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
324 public func encodeWithOptimizer(_ transformer: CreateMLComponents::UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
325 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::UpdatableTemporalEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
326}
327@available(macOS, introduced: 13.0, deprecated: 15.0)
328@available(iOS, introduced: 16.0, deprecated: 18.0)
329@available(tvOS, introduced: 16.0, deprecated: 18.0)
330@available(visionOS, introduced: 1.0, deprecated: 2.0)
331@available(watchOS, unavailable)
332extension CreateMLComponents::UpdatableTemporalEstimatorToSupervisedAdaptor : Swift::Sendable where Estimator : Swift::Sendable {
333}
334@available(macOS, introduced: 13.0, deprecated: 15.0)
335@available(iOS, introduced: 16.0, deprecated: 18.0)
336@available(tvOS, introduced: 16.0, deprecated: 18.0)
337@available(visionOS, introduced: 1.0, deprecated: 2.0)
338@available(watchOS, unavailable)
339extension CreateMLComponents::UpdatableTemporalEstimator {
340 public func adaptedAsSupervised<Annotation>(annotationType: Annotation.Type = Annotation.self) -> CreateMLComponents::UpdatableTemporalEstimatorToSupervisedAdaptor<Self, Annotation> where Annotation : Swift::Equatable, Annotation : Swift::Sendable
341}
342@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
343public struct TabularEstimatorToSupervisedAdaptor<Estimator, Annotation> : CreateMLComponents::SupervisedTabularEstimator where Estimator : CreateMLComponents::TabularEstimator {
344 public typealias Transformer = Estimator.Transformer
345 public var annotationColumnID: TabularData::ColumnID<Annotation>
346 public let estimator: Estimator
347 public init(_ estimator: Estimator, annotationColumnID: TabularData::ColumnID<Annotation>)
348 @inlinable public func fitted(to input: TabularData::DataFrame, validateOn validation: TabularData::DataFrame? = nil, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Estimator.Transformer {
349 try await estimator.fitted(to: input, eventHandler: eventHandler)
350 }
351 public func encode(_ transformer: Estimator.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
352 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Estimator.Transformer
353}
354@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
355extension CreateMLComponents::TabularEstimatorToSupervisedAdaptor : Swift::Sendable where Estimator : Swift::Sendable, Annotation : Swift::Sendable {
356}
357extension CreateMLComponents::TabularEstimator {
358 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
359 public func adaptedAsSupervised<Annotation>(annotationColumnID: TabularData::ColumnID<Annotation>) -> CreateMLComponents::TabularEstimatorToSupervisedAdaptor<Self, Annotation>
360}
361@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
362public struct UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation> : CreateMLComponents::UpdatableSupervisedTabularEstimator where Estimator : CreateMLComponents::UpdatableTabularEstimator, Annotation : Swift::Equatable {
363 public typealias Transformer = Estimator.Transformer
364 public var annotationColumnID: TabularData::ColumnID<Annotation>
365 public let estimator: Estimator
366 public init(_ estimator: Estimator, annotationColumnID: TabularData::ColumnID<Annotation>)
367 public func makeTransformer() -> Estimator.Transformer
368 public func fitted(to input: TabularData::DataFrame, validateOn validation: TabularData::DataFrame?, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
369 public func update(_ transformer: inout CreateMLComponents::UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, with input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws
370 public func encode(_ transformer: CreateMLComponents::UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
371 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
372 public func encodeWithOptimizer(_ transformer: CreateMLComponents::UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
373 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::UpdatableTabularEstimatorToSupervisedAdaptor<Estimator, Annotation>.Transformer
374}
375@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
376extension CreateMLComponents::UpdatableTabularEstimatorToSupervisedAdaptor : Swift::Sendable where Estimator : Swift::Sendable, Annotation : Swift::Sendable {
377}
378extension CreateMLComponents::UpdatableTabularEstimator {
379 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
380 public func adaptedAsSupervised<Annotation>(annotationColumnID: TabularData::ColumnID<Annotation>) -> CreateMLComponents::UpdatableTabularEstimatorToSupervisedAdaptor<Self, Annotation> where Annotation : Swift::Equatable
381}
382extension CreateMLComponents::UpdatableEstimator {
383 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
384 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableEstimator<CreateMLComponents::ComposedTransformer<Self.Transformer, Other>> where Other : CreateMLComponents::Transformer, Other.Input == Self.Transformer.Output
385
386 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
387 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableEstimator<CreateMLComponents::ComposedTransformer<Self.Transformer, Other.Transformer>> where Other : CreateMLComponents::UpdatableEstimator, Self.Transformer.Output == Other.Transformer.Input
388
389}
390@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
391public struct SlidingWindows<Scalar> : Swift::RandomAccessCollection, @unchecked Swift::Sendable where Scalar : CoreML::MLShapedArrayScalar {
392 public let input: CoreML::MLShapedArray<Scalar>
393 public let length: Swift::Int
394 public let stride: Swift::Int
395 public var startIndex: Swift::Int {
396 get
397 }
398 public var endIndex: Swift::Int {
399 get
400 }
401 public init(input: CoreML::MLShapedArray<Scalar>, length: Swift::Int, stride: Swift::Int = 1) throws
402 public func index(before i: Swift::Int) -> Swift::Int
403 public func index(after i: Swift::Int) -> Swift::Int
404 public func index(_ i: Swift::Int, offsetBy distance: Swift::Int) -> Swift::Int
405 public subscript(position: Swift::Int) -> CoreML::MLShapedArray<Scalar> {
406 get
407 }
408 public subscript(bounds: Swift::Range<Swift::Int>) -> Swift::Slice<CreateMLComponents::SlidingWindows<Scalar>> {
409 get
410 }
411 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
412 public typealias Element = CoreML::MLShapedArray<Scalar>
413 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
414 public typealias Index = Swift::Int
415 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
416 public typealias Indices = Swift::Range<Swift::Int>
417 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
418 public typealias Iterator = Swift::IndexingIterator<CreateMLComponents::SlidingWindows<Scalar>>
419 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
420 public typealias SubSequence = Swift::Slice<CreateMLComponents::SlidingWindows<Scalar>>
421}
422extension CreateMLComponents::UpdatableTabularEstimator {
423 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
424 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self.Transformer, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents::UpdatableSupervisedTabularEstimator, Other.Annotation : Swift::Equatable
425
426}
427extension CreateMLComponents::UpdatableSupervisedTabularEstimator {
428 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
429 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self.Transformer, Other>, Self.Annotation> where Other : CreateMLComponents::TabularTransformer, Self.Annotation : Swift::Equatable
430
431 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
432 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::UpdatableTabularEstimator, Self.Annotation : Swift::Equatable
433
434 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
435 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::UpdatableSupervisedTabularEstimator, Self.Annotation == Other.Annotation
436
437}
438@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
439public struct ComposedTransformer<Inner, Outer> : CreateMLComponents::Transformer where Inner : CreateMLComponents::Transformer, Outer : CreateMLComponents::Transformer, Inner.Output == Outer.Input {
440 public typealias Input = Inner.Input
441 public typealias Intermediate = Inner.Output
442 public typealias Output = Outer.Output
443 public var inner: Inner
444 public var outer: Outer
445 public init(_ inner: Inner, _ outer: Outer)
446 @inlinable public func applied(to input: CreateMLComponents::ComposedTransformer<Inner, Outer>.Input, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::ComposedTransformer<Inner, Outer>.Output {
447 let innerOutput = try await inner.applied(to: input, eventHandler: eventHandler)
448 try Task.checkCancellation()
449 let outerOutput = try await outer.applied(to: innerOutput, eventHandler: eventHandler)
450 return outerOutput
451 }
452}
453@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
454extension CreateMLComponents::ComposedTransformer : Swift::CustomDebugStringConvertible {
455 public var debugDescription: Swift::String {
456 get
457 }
458}
459@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
460extension CreateMLComponents::ComposedTransformer : Swift::Sendable where Inner : Swift::Sendable, Outer : Swift::Sendable {
461}
462@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
463extension CreateMLComponents::ComposedTransformer : Swift::Equatable where Inner : Swift::Equatable, Outer : Swift::Equatable {
464 public static func == (a: CreateMLComponents::ComposedTransformer<Inner, Outer>, b: CreateMLComponents::ComposedTransformer<Inner, Outer>) -> Swift::Bool
465}
466@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
467extension CreateMLComponents::ComposedTransformer : Swift::Encodable where Inner : Swift::Encodable, Outer : Swift::Encodable {
468 public func encode(to encoder: any Swift::Encoder) throws
469}
470@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
471extension CreateMLComponents::ComposedTransformer : Swift::Decodable where Inner : Swift::Decodable, Outer : Swift::Decodable {
472 public init(from decoder: any Swift::Decoder) throws
473}
474extension CreateMLComponents::Transformer {
475 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
476 public func appending<Other>(_ other: Other) -> CreateMLComponents::ComposedTransformer<Self, Other> where Other : CreateMLComponents::Transformer, Self.Output == Other.Input
477 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
478 public func appending<Other, Annotation>(_ other: Other) -> some CreateMLComponents::Transformer<CreateMLComponents::AnnotatedFeature<Self.Input, Annotation>, Other.Output> where Other : CreateMLComponents::Transformer, Other.Input == CreateMLComponents::AnnotatedFeature<Self.Output, Annotation>
479
480 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
481 public func appending<Other, Annotation>(_ other: Other) -> some CreateMLComponents::Transformer<Self.Input, CreateMLComponents::AnnotatedFeature<Other.Output, Annotation>> where Other : CreateMLComponents::Transformer, Self.Output == CreateMLComponents::AnnotatedFeature<Other.Input, Annotation>
482
483 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
484 public func appending<Other, Annotation>(_ other: Other) -> some CreateMLComponents::Transformer<CreateMLComponents::AnnotatedPrediction<Self.Input, Annotation>, Other.Output> where Other : CreateMLComponents::Transformer, Other.Input == CreateMLComponents::AnnotatedPrediction<Self.Output, Annotation>
485
486 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
487 public func appending<Other, Annotation>(_ other: Other) -> some CreateMLComponents::Transformer<Self.Input, CreateMLComponents::AnnotatedPrediction<Other.Output, Annotation>> where Other : CreateMLComponents::Transformer, Self.Output == CreateMLComponents::AnnotatedPrediction<Other.Input, Annotation>
488
489}
490@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
491public struct ObjectDetectionAnnotation<Label> : Swift::Decodable, Swift::Equatable where Label : Swift::Comparable, Label : Swift::Decodable, Label : Swift::Encodable, Label : Swift::Hashable {
492 public struct Annotation : Swift::Equatable {
493 public let boundingBox: CoreFoundation::CGRect
494 public let label: Label
495 public enum CodingKeys : Swift::String, Swift::CodingKey {
496 case boundingBox
497 case label
498 public init?(rawValue: Swift::String)
499 public init?(stringValue: Swift::String)
500 public init?(intValue: Swift::Int)
501 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
502 public typealias RawValue = Swift::String
503 public var intValue: Swift::Int? {
504 get
505 }
506 public var rawValue: Swift::String {
507 get
508 }
509 public var stringValue: Swift::String {
510 get
511 }
512 }
513 public static func == (a: CreateMLComponents::ObjectDetectionAnnotation<Label>.CreateMLComponents::Annotation, b: CreateMLComponents::ObjectDetectionAnnotation<Label>.CreateMLComponents::Annotation) -> Swift::Bool
514 }
515 public let imageFileName: Swift::String
516 public let objects: [CreateMLComponents::ObjectDetectionAnnotation<Label>.CreateMLComponents::Annotation]
517 public let prominentObject: Label
518 public enum CodingKeys : Swift::String, Swift::CodingKey {
519 case imageFileName
520 case objects
521 case prominentObject
522 public init?(rawValue: Swift::String)
523 public init?(stringValue: Swift::String)
524 public init?(intValue: Swift::Int)
525 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
526 public typealias RawValue = Swift::String
527 public var intValue: Swift::Int? {
528 get
529 }
530 public var rawValue: Swift::String {
531 get
532 }
533 public var stringValue: Swift::String {
534 get
535 }
536 }
537 public static func == (a: CreateMLComponents::ObjectDetectionAnnotation<Label>, b: CreateMLComponents::ObjectDetectionAnnotation<Label>) -> Swift::Bool
538 public init(from decoder: any Swift::Decoder) throws
539}
540@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
541extension CreateMLComponents::ObjectDetectionAnnotation : Swift::Identifiable {
542 public var id: Swift::String {
543 get
544 }
545 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
546 public typealias ID = Swift::String
547}
548@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
549extension CreateMLComponents::ObjectDetectionAnnotation : Swift::Sendable where Label : Swift::Sendable {
550}
551@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
552extension CreateMLComponents::ObjectDetectionAnnotation.CreateMLComponents::Annotation : Swift::Decodable {
553 public init(from decoder: any Swift::Decoder) throws
554}
555@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
556extension CreateMLComponents::ObjectDetectionAnnotation.CreateMLComponents::Annotation : Swift::Sendable where Label : Swift::Sendable {
557}
558@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
559public struct RandomImageCropper : CreateMLComponents::RandomTransformer, Swift::Sendable {
560 public init(targetSize: CoreFoundation::CGSize)
561 public init(targetWidth: Swift::Double, targetHeight: Swift::Double)
562 public init(scale: Swift::ClosedRange<Swift::Double>, aspectRatio: Swift::Double? = nil)
563 public func applied(to image: CoreImage::CIImage, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CoreImage::CIImage
564 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
565 public typealias Input = CoreImage::CIImage
566 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
567 public typealias Output = CoreImage::CIImage
568}
569@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
570extension CreateMLComponents::FullyConnectedNetworkClassifier : CreateMLComponents::UpdatableSupervisedEstimator {
571 public func makeTransformer() -> CreateMLComponents::FullyConnectedNetworkClassifierModel<Scalar, Label>
572 public func update<InputSequence>(_ transformer: inout CreateMLComponents::FullyConnectedNetworkClassifierModel<Scalar, Label>, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Label>
573}
574@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
575public struct PreprocessingEstimator<Preprocessor, Estimator> : CreateMLComponents::Estimator where Preprocessor : CreateMLComponents::Transformer, Estimator : CreateMLComponents::Estimator, Preprocessor.Output == Estimator.Transformer.Input {
576 public typealias Transformer = CreateMLComponents::ComposedTransformer<Preprocessor, Estimator.Transformer>
577 public typealias Input = Preprocessor.Input
578 public typealias Intermediate = Preprocessor.Output
579 public typealias Output = Estimator.Transformer.Output
580 public var preprocessor: Preprocessor
581 public var estimator: Estimator
582 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
583 @inlinable public func preprocessed<S>(from input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [Preprocessor.Output] where S : Swift::Sequence, Preprocessor.Input == S.Element {
584 try await preprocessor.applied(to: input, eventHandler: eventHandler)
585 }
586 @inlinable public func fitted<S>(toPreprocessed preprocessed: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where S : Swift::Sequence, Preprocessor.Output == S.Element, S.Element == Estimator.Transformer.Input {
587 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
588 return ComposedTransformer(preprocessor, fittedTransformer)
589 }
590 @inlinable public func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where S : Swift::Sequence, Preprocessor.Input == S.Element {
591 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
592 try Task.checkCancellation()
593 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
594 }
595 public func encode(_ transformer: CreateMLComponents::PreprocessingEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
596 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
597}
598@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
599extension CreateMLComponents::PreprocessingEstimator : Swift::Sendable where Preprocessor : Swift::Sendable, Estimator : Swift::Sendable {
600}
601extension CreateMLComponents::Transformer {
602 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
603 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingEstimator<Self, Other> where Other : CreateMLComponents::Estimator, Self.Output == Other.Transformer.Input
604}
605@available(watchOS, unavailable)
606extension CreateMLComponents::TimeSeriesClassifier {
607 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
608 @available(watchOS, unavailable)
609 public struct Model : CreateMLComponents::Transformer, @unchecked Swift::Sendable {
610 public typealias Input = CoreML::MLShapedArray<Scalar>
611 public typealias Output = CreateMLComponents::ClassificationDistribution<Label>
612 public var stride: Swift::Int
613 public func applied(to input: CoreML::MLShapedArray<Scalar>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::ClassificationDistribution<Label>
614 }
615}
616@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
617@available(watchOS, unavailable)
618extension CreateMLComponents::TimeSeriesClassifier.CreateMLComponents::Model : Swift::Codable {
619 public func encode(to encoder: any Swift::Encoder) throws
620 public init(from decoder: any Swift::Decoder) throws
621}
622extension CreateMLComponents::AudioReader {
623 @available(macOS 13.0, iOS 16.0, *)
624 @available(tvOS, unavailable)
625 public struct MicrophoneAsyncBuffers : CreateMLComponents::TemporalSequence, Swift::Sendable {
626 public typealias AsyncIterator = CreateMLComponents::AudioReader.CreateMLComponents::MicrophoneAsyncBuffers.CreateMLComponents::Iterator
627 public typealias Feature = AVFAudio::AVAudioPCMBuffer
628 public var count: Swift::Int? {
629 get
630 }
631 public func makeAsyncIterator() -> CreateMLComponents::AudioReader.CreateMLComponents::MicrophoneAsyncBuffers.CreateMLComponents::Iterator
632 @available(macOS 13.0, iOS 16.0, *)
633 @available(tvOS, unavailable, introduced: 16.0)
634 public typealias Element = CreateMLComponents::TemporalFeature<CreateMLComponents::AudioReader.CreateMLComponents::MicrophoneAsyncBuffers.CreateMLComponents::Feature>
635 @available(macOS 15.0, iOS 18.0, watchOS 11.0, visionOS 2.0, *)
636 @available(tvOS, unavailable, introduced: 18.0)
637 @_implements(_Concurrency::AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift::Error
638 }
639}
640@available(macOS 13.0, iOS 16.0, *)
641@available(tvOS, unavailable)
642extension CreateMLComponents::AudioReader.CreateMLComponents::MicrophoneAsyncBuffers {
643 @_hasMissingDesignatedInitializers @available(macOS 13.0, iOS 16.0, *)
644 @available(tvOS, unavailable)
645 final public class Iterator : _Concurrency::AsyncIteratorProtocol {
646 @objc deinit
647 final public func next() async throws -> CreateMLComponents::TemporalFeature<CreateMLComponents::AudioReader.CreateMLComponents::MicrophoneAsyncBuffers.CreateMLComponents::Feature>?
648 @available(macOS 13.0, iOS 16.0, *)
649 @available(tvOS, unavailable, introduced: 16.0)
650 public typealias Element = CreateMLComponents::TemporalFeature<CreateMLComponents::AudioReader.CreateMLComponents::MicrophoneAsyncBuffers.CreateMLComponents::Feature>
651 @available(macOS 15.0, iOS 18.0, watchOS 11.0, visionOS 2.0, *)
652 @available(tvOS, unavailable, introduced: 18.0)
653 @_implements(_Concurrency::AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift::Error
654 }
655}
656@available(*, unavailable)
657@available(tvOS, unavailable)
658extension CreateMLComponents::AudioReader.CreateMLComponents::MicrophoneAsyncBuffers.CreateMLComponents::Iterator : Swift::Sendable {
659}
660@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
661public struct LinearTransformer<Element> : CreateMLComponents::Transformer, Swift::Hashable, Swift::Codable where Element : Swift::BinaryFloatingPoint, Element : Swift::Decodable, Element : Swift::Encodable {
662 public var scale: Element
663 public var offset: Element
664 public init(scale: Element, offset: Element)
665 @inlinable public func applied(to input: Element, eventHandler: CreateMLComponents::EventHandler? = nil) -> Element {
666 return input * scale + offset
667 }
668 @inlinable public func applied<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) -> [Element] where Element == S.Element, S : Swift::Sequence {
669 input.map({ applied(to: $0, eventHandler: eventHandler) })
670 }
671 public static func == (a: CreateMLComponents::LinearTransformer<Element>, b: CreateMLComponents::LinearTransformer<Element>) -> Swift::Bool
672 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
673 public typealias Input = Element
674 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
675 public typealias Output = Element
676 public func encode(to encoder: any Swift::Encoder) throws
677 public func hash(into hasher: inout Swift::Hasher)
678 public var hashValue: Swift::Int {
679 get
680 }
681 public init(from decoder: any Swift::Decoder) throws
682}
683@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
684extension CreateMLComponents::LinearTransformer : Swift::CustomDebugStringConvertible {
685 public var debugDescription: Swift::String {
686 get
687 }
688}
689@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
690extension CreateMLComponents::LinearTransformer : Swift::Sendable where Element : Swift::Sendable {
691}
692extension CreateMLComponents::TimeSeriesClassifier.CreateMLComponents::Model {
693 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
694 @available(watchOS, unavailable)
695 public func export(to url: Foundation::URL) throws
696 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
697 @available(watchOS, unavailable)
698 public func export(to url: Foundation::URL, metadata: CreateMLComponents::ModelMetadata) throws
699}
700@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
701public struct OrdinalEncoder<Category> : CreateMLComponents::Estimator where Category : Swift::Comparable, Category : Swift::Decodable, Category : Swift::Encodable, Category : Swift::Hashable {
702 public init()
703 public func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CreateMLComponents::OrdinalEncoder<Category>.CreateMLComponents::Transformer where S : Swift::Sequence, S.Element == Category?
704}
705@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
706extension CreateMLComponents::OrdinalEncoder : CreateMLComponents::UpdatableEstimator {
707 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
708 public func makeTransformer() -> CreateMLComponents::OrdinalEncoder<Category>.CreateMLComponents::Transformer
709 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
710 public func update(_ transformer: inout CreateMLComponents::OrdinalEncoder<Category>.CreateMLComponents::Transformer, with input: some Sequence<Category?>, eventHandler: CreateMLComponents::EventHandler? = nil) throws
711 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
712 public func encodeWithOptimizer(_ transformer: CreateMLComponents::OrdinalEncoder<Category>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
713 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
714 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::OrdinalEncoder<Category>.CreateMLComponents::Transformer
715}
716@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
717extension CreateMLComponents::OrdinalEncoder : Swift::Sendable where Category : Swift::Sendable {
718}
719extension CreateMLComponents::OrdinalEncoder {
720 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
721 public struct Transformer : CreateMLComponents::Transformer {
722 public var categories: Swift::Set<Category?>
723 public init(categories: Swift::Set<Category?>)
724 public func applied(to input: Category?, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> Swift::Int
725 public func applied<S>(_ input: S, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> [Swift::Int] where S : Swift::Sequence, S.Element == Category?
726 public func category(at index: Swift::Int) -> Category?
727 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
728 public typealias Input = Category?
729 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
730 public typealias Output = Swift::Int
731 }
732}
733@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
734extension CreateMLComponents::OrdinalEncoder.CreateMLComponents::Transformer : Swift::CustomDebugStringConvertible {
735 public var debugDescription: Swift::String {
736 get
737 }
738}
739@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
740extension CreateMLComponents::OrdinalEncoder.CreateMLComponents::Transformer : Swift::Sendable where Category : Swift::Sendable {
741}
742@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
743extension CreateMLComponents::OrdinalEncoder.CreateMLComponents::Transformer : Swift::Encodable {
744 public func encode(to encoder: any Swift::Encoder) throws
745}
746@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
747extension CreateMLComponents::OrdinalEncoder.CreateMLComponents::Transformer : Swift::Decodable {
748 public init(from decoder: any Swift::Decoder) throws
749}
750@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
751public struct AnnotatedBatch<Scalar> where Scalar : CoreML::MLShapedArrayScalar {
752 public var features: CoreML::MLShapedArray<Scalar>
753 public var annotations: CoreML::MLShapedArray<Scalar>
754 public var count: Swift::Int {
755 get
756 }
757 public init(features: CoreML::MLShapedArray<Scalar>, annotations: CoreML::MLShapedArray<Scalar>)
758}
759@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
760extension CreateMLComponents::AnnotatedBatch : Swift::Encodable where Scalar : Swift::Encodable {
761 public func encode(to encoder: any Swift::Encoder) throws
762}
763@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
764extension CreateMLComponents::AnnotatedBatch : Swift::Decodable where Scalar : Swift::Decodable {
765 public init(from decoder: any Swift::Decoder) throws
766}
767@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
768extension CreateMLComponents::AnnotatedBatch : Swift::Equatable where Scalar : Swift::Equatable {
769 public static func == (a: CreateMLComponents::AnnotatedBatch<Scalar>, b: CreateMLComponents::AnnotatedBatch<Scalar>) -> Swift::Bool
770}
771@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
772extension CreateMLComponents::AnnotatedBatch : Swift::Sendable where Scalar : Swift::Sendable {
773}
774extension CreateMLComponents::MultiLabelClassificationMetrics {
775 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
776 public static func meanAveragePrecisionScore(classifications: some Sequence<ClassificationDistribution<Label>>, groundTruth: some Sequence<Set<Label>>, labels: Swift::Set<Label>) -> Swift::Float
777 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
778 public static func meanAveragePrecisionScore(classifications: some Sequence<ClassificationDistribution<Label>>, groundTruth: some Sequence<Set<Label>>) -> Swift::Float
779 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
780 public static func meanAveragePrecisionScore(_ pairs: some Sequence<(classification: ClassificationDistribution<Label>, labels: Set<Label>)>, labels: Swift::Set<Label>) -> Swift::Float
781 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
782 public static func meanAveragePrecisionScore(_ pairs: some Sequence<(classification: ClassificationDistribution<Label>, labels: Set<Label>)>) -> Swift::Float
783}
784extension CreateMLComponents::MultiLabelClassificationMetrics {
785 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
786 public func precisionScore(for label: Label) -> Swift::Float
787 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
788 public func recallScore(for label: Label) -> Swift::Float
789}
790@available(macOS, introduced: 13.0, deprecated: 15.0)
791@available(iOS, introduced: 16.0, deprecated: 18.0)
792@available(tvOS, introduced: 16.0, deprecated: 18.0)
793@available(visionOS, introduced: 1.0, deprecated: 2.0)
794@available(watchOS, unavailable)
795public struct PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator> : CreateMLComponents::UpdatableSupervisedTemporalEstimator where Preprocessor : CreateMLComponents::TemporalTransformer, Estimator : CreateMLComponents::UpdatableSupervisedTemporalEstimator, Preprocessor.Output == Estimator.Transformer.Input {
796 public typealias Transformer = CreateMLComponents::ComposedTemporalTransformer<Preprocessor, Estimator.Transformer>
797 public typealias Input = Preprocessor.Input
798 public typealias Intermediate = Preprocessor.Output
799 public typealias Output = Estimator.Transformer.Output
800 public typealias Annotation = Estimator.Annotation
801 public var preprocessor: Preprocessor
802 public var estimator: Estimator
803 public init(_ inner: Preprocessor, _ outer: Estimator)
804 @inlinable public func preprocessed<InputSequence, FeatureSequence>(from input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [CreateMLComponents::AnnotatedFeature<CreateMLComponents::PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>] where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
805 var preprocessed = [AnnotatedFeature<PreprocessedFeatureSequence<Preprocessor.Output>, Annotation>]()
806 for item in input {
807 let transformed = try await preprocessor.applied(to: item.feature, eventHandler: eventHandler)
… 2 unchanged lines …
810 }
811 return preprocessed
812 }
813 @inlinable public func fitted(toPreprocessed preprocessed: [CreateMLComponents.AnnotatedFeature<CreateMLComponents.PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer {
814 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
815 return ComposedTemporalTransformer(preprocessor, fittedTransformer)
816 }
817 @inlinable public func fitted(toPreprocessed preprocessedInput: [CreateMLComponents.AnnotatedFeature<CreateMLComponents.PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], validateOn preprocessedValidation: [CreateMLComponents.AnnotatedFeature<CreateMLComponents.PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer {
818 let fittedTransformer = try await estimator.fitted(
819 to: preprocessedInput,
820 validateOn: preprocessedValidation,
821 eventHandler: eventHandler
822 )
823 return ComposedTemporalTransformer(preprocessor, fittedTransformer)
824 }
825 @inlinable public func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
826 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
827 try Task.checkCancellation()
828 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
829 }
830 @inlinable public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer where InputSequence : Swift.Sequence, Validation : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Estimator.Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
831 let preprocessedInput = try await preprocessed(from: input, eventHandler: eventHandler)
832 try Task.checkCancellation()
833
810 }
811 return preprocessed
812 }
813 @inlinable public func fitted(toPreprocessed preprocessed: [CreateMLComponents::AnnotatedFeature<CreateMLComponents::PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
814 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
815 return ComposedTemporalTransformer(preprocessor, fittedTransformer)
816 }
817 @inlinable public func fitted(toPreprocessed preprocessedInput: [CreateMLComponents::AnnotatedFeature<CreateMLComponents::PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], validateOn preprocessedValidation: [CreateMLComponents::AnnotatedFeature<CreateMLComponents::PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
818 let fittedTransformer = try await estimator.fitted(
819 to: preprocessedInput,
820 validateOn: preprocessedValidation,
821 eventHandler: eventHandler
822 )
823 return ComposedTemporalTransformer(preprocessor, fittedTransformer)
824 }
825 @inlinable public func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
826 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
827 try Task.checkCancellation()
828 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
829 }
830 @inlinable public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, Validation : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Estimator.Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
831 let preprocessedInput = try await preprocessed(from: input, eventHandler: eventHandler)
832 try Task.checkCancellation()
833
… 6 unchanged lines …
840 eventHandler: eventHandler
841 )
842 }
843 @inlinable public func makeTransformer() -> CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer {
844 ComposedTemporalTransformer(preprocessor, estimator.makeTransformer())
845 }
846 @inlinable public func update<InputSequence, FeatureSequence>(_ transformer: inout CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer, withPreprocessed preprocessed: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, Preprocessor.Output == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Estimator.Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input {
847 try await estimator.update(
848 &transformer.outer,
849 with: preprocessed,
850 eventHandler: eventHandler
851 )
852 }
853 @inlinable public func update<InputSequence, FeatureSequence>(_ transformer: inout CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
854 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
855 try Task.checkCancellation()
856
840 eventHandler: eventHandler
841 )
842 }
843 @inlinable public func makeTransformer() -> CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
844 ComposedTemporalTransformer(preprocessor, estimator.makeTransformer())
845 }
846 @inlinable public func update<InputSequence, FeatureSequence>(_ transformer: inout CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, withPreprocessed preprocessed: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, Preprocessor.Output == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Estimator.Annotation>, FeatureSequence.Feature == Estimator.Transformer.Input {
847 try await estimator.update(
848 &transformer.outer,
849 with: preprocessed,
850 eventHandler: eventHandler
851 )
852 }
853 @inlinable public func update<InputSequence, FeatureSequence>(_ transformer: inout CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
854 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
855 try Task.checkCancellation()
856
… 3 unchanged lines …
860 eventHandler: eventHandler
861 )
862 }
863 public func encode(_ transformer: CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
864 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer
865 public func encodeWithOptimizer(_ transformer: CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
866 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer
867}
868@available(macOS, introduced: 13.0, deprecated: 15.0)
869@available(iOS, introduced: 16.0, deprecated: 18.0)
870@available(tvOS, introduced: 16.0, deprecated: 18.0)
871@available(visionOS, introduced: 1.0, deprecated: 2.0)
872@available(watchOS, unavailable)
873extension CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator : Swift.Sendable where Preprocessor : Swift.Sendable, Estimator : Swift.Sendable {
874}
875extension CreateMLComponents.Transformer {
876 @available(macOS, introduced: 13.0, deprecated: 15.0)
877 @available(iOS, introduced: 16.0, deprecated: 18.0)
878 @available(tvOS, introduced: 16.0, deprecated: 18.0)
879 @available(visionOS, introduced: 1.0, deprecated: 2.0)
880 @available(watchOS, unavailable)
881 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<CreateMLComponents.TransformerToTemporalAdaptor<Self>, Other> where Other : CreateMLComponents.UpdatableSupervisedTemporalEstimator, Self.Output == Other.Transformer.Input
882}
883extension CreateMLComponents.TemporalTransformer {
884 @available(macOS, introduced: 13.0, deprecated: 15.0)
885 @available(iOS, introduced: 16.0, deprecated: 18.0)
886 @available(tvOS, introduced: 16.0, deprecated: 18.0)
887 @available(visionOS, introduced: 1.0, deprecated: 2.0)
888 @available(watchOS, unavailable)
889 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Self, CreateMLComponents.UpdatableSupervisedEstimatorToTemporalAdaptor<Other>> where Other : CreateMLComponents.UpdatableSupervisedEstimator, Self.Output == Other.Transformer.Input, Other.Annotation : Swift.Sendable
890 @available(macOS, introduced: 13.0, deprecated: 15.0)
891 @available(iOS, introduced: 16.0, deprecated: 18.0)
892 @available(tvOS, introduced: 16.0, deprecated: 18.0)
893 @available(visionOS, introduced: 1.0, deprecated: 2.0)
894 @available(watchOS, unavailable)
895 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingUpdatableSupervisedTemporalEstimator<Self, Other> where Other : CreateMLComponents.UpdatableSupervisedTemporalEstimator, Self.Output == Other.Transformer.Input
896}
897@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
898public enum ColumnSelection : Swift.Codable, Swift.Sendable {
899 case all
900 case numeric
901 case include(columnNames: [Swift.String])
902 case exclude(columnNames: [Swift.String])
903 public func encode(to encoder: any Swift.Encoder) throws
904 public init(from decoder: any Swift.Decoder) throws
905}
906extension TabularData.DataFrame {
907 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
908 public func selecting(_ selection: CreateMLComponents.ColumnSelection) -> TabularData.DataFrame
909}
910@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
911public struct MaxAbsScaler<Element> : CreateMLComponents.Estimator where Element : Swift.BinaryFloatingPoint, Element : Swift.Decodable, Element : Swift.Encodable {
912 public init()
913 public func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CreateMLComponents.MaxAbsScaler<Element>.Transformer where Element == S.Element, S : Swift.Sequence
914}
915@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
916extension CreateMLComponents.MaxAbsScaler : Swift.Sendable where Element : Swift.Sendable {
917}
918extension CreateMLComponents.MaxAbsScaler {
919 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
920 public struct Transformer : CreateMLComponents.Transformer, Swift.Hashable {
921 public var maximumAbsoluteValue: Element
922 public init(maximumAbsoluteValue: Element)
923 @inlinable public func applied(to input: Element, eventHandler: CreateMLComponents.EventHandler? = nil) -> Element {
924 input / maximumAbsoluteValue
925 }
926 public static func == (a: CreateMLComponents.MaxAbsScaler<Element>.Transformer, b: CreateMLComponents.MaxAbsScaler<Element>.Transformer) -> Swift.Bool
927 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
928 public typealias Input = Element
929 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
930 public typealias Output = Element
931 public func hash(into hasher: inout Swift.Hasher)
932 public var hashValue: Swift.Int {
933 get
934 }
935 }
936}
937@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
938extension CreateMLComponents.MaxAbsScaler.Transformer : Swift.CustomDebugStringConvertible {
939 public var debugDescription: Swift.String {
940 get
941 }
942}
943@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
944extension CreateMLComponents.MaxAbsScaler.Transformer : Swift.Encodable {
945 public func encode(to encoder: any Swift.Encoder) throws
946}
947@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
948extension CreateMLComponents.MaxAbsScaler.Transformer : Swift.Decodable {
949 public init(from decoder: any Swift.Decoder) throws
950}
951@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
952extension CreateMLComponents.MaxAbsScaler.Transformer : Swift.Sendable where Element : Swift.Sendable {
953}
954@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
955public struct MinMaxScaler<Element> : CreateMLComponents.Estimator where Element : Swift.BinaryFloatingPoint, Element : Swift.Decodable, Element : Swift.Encodable {
956 public var range: Swift.ClosedRange<Element>
957 public init(range: Swift.ClosedRange<Element> = 0...1)
958 public func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CreateMLComponents.MinMaxScaler<Element>.Transformer where Element == S.Element, S : Swift.Sequence
959}
960@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
961extension CreateMLComponents.MinMaxScaler : Swift.Sendable where Element : Swift.Sendable {
962}
963extension CreateMLComponents.MinMaxScaler {
964 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
965 public struct Transformer : CreateMLComponents.Transformer, Swift.Hashable {
966 public var desiredRange: Swift.ClosedRange<Element>
967 public var fittedRange: Swift.ClosedRange<Element>
968 public init(desiredRange: Swift.ClosedRange<Element>, fittedRange: Swift.ClosedRange<Element>)
969 @inlinable public func applied(to input: Element, eventHandler: CreateMLComponents.EventHandler? = nil) -> Element {
970 if fittedRange.lowerBound == fittedRange.upperBound {
971 return fittedRange.lowerBound
972 }
860 eventHandler: eventHandler
861 )
862 }
863 public func encode(_ transformer: CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
864 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
865 public func encodeWithOptimizer(_ transformer: CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
866 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
867}
868@available(macOS, introduced: 13.0, deprecated: 15.0)
869@available(iOS, introduced: 16.0, deprecated: 18.0)
870@available(tvOS, introduced: 16.0, deprecated: 18.0)
871@available(visionOS, introduced: 1.0, deprecated: 2.0)
872@available(watchOS, unavailable)
873extension CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator : Swift::Sendable where Preprocessor : Swift::Sendable, Estimator : Swift::Sendable {
874}
875extension CreateMLComponents::Transformer {
876 @available(macOS, introduced: 13.0, deprecated: 15.0)
877 @available(iOS, introduced: 16.0, deprecated: 18.0)
878 @available(tvOS, introduced: 16.0, deprecated: 18.0)
879 @available(visionOS, introduced: 1.0, deprecated: 2.0)
880 @available(watchOS, unavailable)
881 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<CreateMLComponents::TransformerToTemporalAdaptor<Self>, Other> where Other : CreateMLComponents::UpdatableSupervisedTemporalEstimator, Self.Output == Other.Transformer.Input
882}
883extension CreateMLComponents::TemporalTransformer {
884 @available(macOS, introduced: 13.0, deprecated: 15.0)
885 @available(iOS, introduced: 16.0, deprecated: 18.0)
886 @available(tvOS, introduced: 16.0, deprecated: 18.0)
887 @available(visionOS, introduced: 1.0, deprecated: 2.0)
888 @available(watchOS, unavailable)
889 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Self, CreateMLComponents::UpdatableSupervisedEstimatorToTemporalAdaptor<Other>> where Other : CreateMLComponents::UpdatableSupervisedEstimator, Self.Output == Other.Transformer.Input, Other.Annotation : Swift::Sendable
890 @available(macOS, introduced: 13.0, deprecated: 15.0)
891 @available(iOS, introduced: 16.0, deprecated: 18.0)
892 @available(tvOS, introduced: 16.0, deprecated: 18.0)
893 @available(visionOS, introduced: 1.0, deprecated: 2.0)
894 @available(watchOS, unavailable)
895 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingUpdatableSupervisedTemporalEstimator<Self, Other> where Other : CreateMLComponents::UpdatableSupervisedTemporalEstimator, Self.Output == Other.Transformer.Input
896}
897@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
898public enum ColumnSelection : Swift::Codable, Swift::Sendable {
899 case all
900 case numeric
901 case include(columnNames: [Swift::String])
902 case exclude(columnNames: [Swift::String])
903 public func encode(to encoder: any Swift::Encoder) throws
904 public init(from decoder: any Swift::Decoder) throws
905}
906extension TabularData::DataFrame {
907 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
908 public func selecting(_ selection: CreateMLComponents::ColumnSelection) -> TabularData::DataFrame
909}
910@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
911public struct MaxAbsScaler<Element> : CreateMLComponents::Estimator where Element : Swift::BinaryFloatingPoint, Element : Swift::Decodable, Element : Swift::Encodable {
912 public init()
913 public func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CreateMLComponents::MaxAbsScaler<Element>.CreateMLComponents::Transformer where Element == S.Element, S : Swift::Sequence
914}
915@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
916extension CreateMLComponents::MaxAbsScaler : Swift::Sendable where Element : Swift::Sendable {
917}
918extension CreateMLComponents::MaxAbsScaler {
919 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
920 public struct Transformer : CreateMLComponents::Transformer, Swift::Hashable {
921 public var maximumAbsoluteValue: Element
922 public init(maximumAbsoluteValue: Element)
923 @inlinable public func applied(to input: Element, eventHandler: CreateMLComponents::EventHandler? = nil) -> Element {
924 input / maximumAbsoluteValue
925 }
926 public static func == (a: CreateMLComponents::MaxAbsScaler<Element>.CreateMLComponents::Transformer, b: CreateMLComponents::MaxAbsScaler<Element>.CreateMLComponents::Transformer) -> Swift::Bool
927 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
928 public typealias Input = Element
929 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
930 public typealias Output = Element
931 public func hash(into hasher: inout Swift::Hasher)
932 public var hashValue: Swift::Int {
933 get
934 }
935 }
936}
937@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
938extension CreateMLComponents::MaxAbsScaler.CreateMLComponents::Transformer : Swift::CustomDebugStringConvertible {
939 public var debugDescription: Swift::String {
940 get
941 }
942}
943@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
944extension CreateMLComponents::MaxAbsScaler.CreateMLComponents::Transformer : Swift::Encodable {
945 public func encode(to encoder: any Swift::Encoder) throws
946}
947@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
948extension CreateMLComponents::MaxAbsScaler.CreateMLComponents::Transformer : Swift::Decodable {
949 public init(from decoder: any Swift::Decoder) throws
950}
951@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
952extension CreateMLComponents::MaxAbsScaler.CreateMLComponents::Transformer : Swift::Sendable where Element : Swift::Sendable {
953}
954@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
955public struct MinMaxScaler<Element> : CreateMLComponents::Estimator where Element : Swift::BinaryFloatingPoint, Element : Swift::Decodable, Element : Swift::Encodable {
956 public var range: Swift::ClosedRange<Element>
957 public init(range: Swift::ClosedRange<Element> = 0...1)
958 public func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CreateMLComponents::MinMaxScaler<Element>.CreateMLComponents::Transformer where Element == S.Element, S : Swift::Sequence
959}
960@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
961extension CreateMLComponents::MinMaxScaler : Swift::Sendable where Element : Swift::Sendable {
962}
963extension CreateMLComponents::MinMaxScaler {
964 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
965 public struct Transformer : CreateMLComponents::Transformer, Swift::Hashable {
966 public var desiredRange: Swift::ClosedRange<Element>
967 public var fittedRange: Swift::ClosedRange<Element>
968 public init(desiredRange: Swift::ClosedRange<Element>, fittedRange: Swift::ClosedRange<Element>)
969 @inlinable public func applied(to input: Element, eventHandler: CreateMLComponents::EventHandler? = nil) -> Element {
970 if fittedRange.lowerBound == fittedRange.upperBound {
971 return fittedRange.lowerBound
972 }
… 4 unchanged lines …
977
978 return unitScaledInput * (desiredRange.upperBound - desiredRange.lowerBound) + desiredRange.lowerBound
979 }
980 public static func == (a: CreateMLComponents.MinMaxScaler<Element>.Transformer, b: CreateMLComponents.MinMaxScaler<Element>.Transformer) -> Swift.Bool
981 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
982 public typealias Input = Element
983 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
984 public typealias Output = Element
985 public func hash(into hasher: inout Swift.Hasher)
986 public var hashValue: Swift.Int {
987 get
988 }
989 }
990}
991@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
992extension CreateMLComponents.MinMaxScaler.Transformer : Swift.CustomDebugStringConvertible {
993 public var debugDescription: Swift.String {
994 get
995 }
996}
997@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
998extension CreateMLComponents.MinMaxScaler.Transformer : Swift.Encodable {
999 public func encode(to encoder: any Swift.Encoder) throws
1000}
1001@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1002extension CreateMLComponents.MinMaxScaler.Transformer : Swift.Decodable {
1003 public init(from decoder: any Swift.Decoder) throws
1004}
1005@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1006extension CreateMLComponents.MinMaxScaler.Transformer : Swift.Sendable where Element : Swift.Sendable {
1007}
1008@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1009public protocol SupervisedTabularEstimator<Transformer, Annotation> {
1010 associatedtype Transformer : CreateMLComponents.TabularTransformer
1011 associatedtype Annotation
1012 var annotationColumnID: TabularData.ColumnID<Self.Annotation> { get set }
1013 func fitted(to input: TabularData.DataFrame, validateOn validation: TabularData.DataFrame?, eventHandler: CreateMLComponents.EventHandler?) async throws -> Self.Transformer
1014 func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1015 func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
1016}
1017extension CreateMLComponents.SupervisedTabularEstimator {
1018 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1019 @inlinable public func fitted(to input: TabularData.DataFrame, validateOn validation: TabularData.DataFrame? = nil) async throws -> Self.Transformer {
1020 try await fitted(to: input, validateOn: validation, eventHandler: nil)
1021 }
1022}
1023@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1024extension CreateMLComponents.SupervisedTabularEstimator where Self.Transformer : Swift.Encodable {
1025 public func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1026}
1027@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1028extension CreateMLComponents.SupervisedTabularEstimator where Self.Transformer : Swift.Decodable {
1029 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
1030}
1031@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1032public protocol UpdatableSupervisedTabularEstimator<Transformer, Annotation> : CreateMLComponents.SupervisedTabularEstimator {
1033 func makeTransformer() -> Self.Transformer
1034 func update(_ transformer: inout Self.Transformer, with input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler?) async throws
1035 func encodeWithOptimizer(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1036 func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
1037}
1038extension CreateMLComponents.UpdatableSupervisedTabularEstimator {
1039 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1040 @inlinable public func update(_ transformer: inout Self.Transformer, with input: TabularData.DataFrame) async throws {
1041 try await update(&transformer, with: input, eventHandler: nil)
1042 }
1043}
1044@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1045public struct HumanBodyActionPeriodPredictor : CreateMLComponents.Transformer, Swift.Sendable {
1046 public typealias Input = [CreateMLComponents.Pose]
1047 public typealias Output = [CreateMLComponents.HumanBodyActionPeriodPredictor.Prediction]
1048 public init()
1049 public func applied(to input: [CreateMLComponents.Pose], eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [CreateMLComponents.HumanBodyActionPeriodPredictor.Prediction]
1050}
1051@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1052extension CreateMLComponents.HumanBodyActionPeriodPredictor {
1053 public struct Prediction {
1054 public var period: Swift.Float
1055 public var periodicity: Swift.Float
1056 public init(period: Swift.Float, periodicity: Swift.Float)
1057 }
1058}
1059@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1060extension CreateMLComponents.HumanBodyActionPeriodPredictor.Prediction : Swift.Encodable {
1061 public func encode(to encoder: any Swift.Encoder) throws
1062}
1063@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1064extension CreateMLComponents.HumanBodyActionPeriodPredictor.Prediction : Swift.Decodable {
1065 public init(from decoder: any Swift.Decoder) throws
1066}
1067@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1068extension CreateMLComponents.HumanBodyActionPeriodPredictor.Prediction : Swift.Equatable {
1069 public static func == (a: CreateMLComponents.HumanBodyActionPeriodPredictor.Prediction, b: CreateMLComponents.HumanBodyActionPeriodPredictor.Prediction) -> Swift.Bool
1070}
1071@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1072extension CreateMLComponents.HumanBodyActionPeriodPredictor.Prediction : Swift.Hashable {
1073 public func hash(into hasher: inout Swift.Hasher)
1074 public var hashValue: Swift.Int {
1075 get
1076 }
1077}
1078@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1079extension CreateMLComponents.HumanBodyActionPeriodPredictor.Prediction : Swift.Sendable {
1080}
1081@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1082public struct MLModelTransformerAdaptor<Scalar> : CreateMLComponents.Transformer where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint {
1083 public let model: CoreML.MLModel
1084 public init(contentsOf url: Foundation.URL, configuration: CoreML.MLModelConfiguration) throws
1085 public init(model: CoreML.MLModel) throws
1086 public func applied(to input: CoreML.MLShapedArray<Scalar>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CoreML.MLShapedArray<Scalar>
1087 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
1088 public typealias Input = CoreML.MLShapedArray<Scalar>
1089 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
1090 public typealias Output = CoreML.MLShapedArray<Scalar>
1091}
1092@available(*, unavailable)
1093extension CreateMLComponents.MLModelTransformerAdaptor : Swift.Sendable {
1094}
1095@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1096public struct PreprocessedFeatureSequence<Feature> : CreateMLComponents.TemporalSequence {
1097 public var features: [CreateMLComponents.TemporalFeature<Feature>]
1098 @inlinable public var count: Swift.Int? {
1099 get {
1100 features.count
1101 }
1102 }
1103 public init<S>(_ sequence: S) async throws where Feature == S.Feature, S : CreateMLComponents.TemporalSequence
1104 public func makeAsyncIterator() -> CreateMLComponents.PreprocessedFeatureSequence<Feature>.AsyncIterator
1105 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
1106 public typealias Element = CreateMLComponents.TemporalFeature<Feature>
1107 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1108 @_implements(_Concurrency.AsyncSequence, Failure) public typealias __AsyncSequence_Failure = Swift.Never
1109}
1110extension CreateMLComponents.PreprocessedFeatureSequence {
1111 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1112 public struct AsyncIterator : _Concurrency.AsyncIteratorProtocol {
1113 @usableFromInline
1114 internal let features: [CreateMLComponents.TemporalFeature<Feature>]
1115 @usableFromInline
1116 internal var index: Swift.Int
1117 @inlinable public mutating func next() -> CreateMLComponents.TemporalFeature<Feature>? {
1118 if index >= features.count {
1119 return nil
1120 }
977
978 return unitScaledInput * (desiredRange.upperBound - desiredRange.lowerBound) + desiredRange.lowerBound
979 }
980 public static func == (a: CreateMLComponents::MinMaxScaler<Element>.CreateMLComponents::Transformer, b: CreateMLComponents::MinMaxScaler<Element>.CreateMLComponents::Transformer) -> Swift::Bool
981 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
982 public typealias Input = Element
983 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
984 public typealias Output = Element
985 public func hash(into hasher: inout Swift::Hasher)
986 public var hashValue: Swift::Int {
987 get
988 }
989 }
990}
991@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
992extension CreateMLComponents::MinMaxScaler.CreateMLComponents::Transformer : Swift::CustomDebugStringConvertible {
993 public var debugDescription: Swift::String {
994 get
995 }
996}
997@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
998extension CreateMLComponents::MinMaxScaler.CreateMLComponents::Transformer : Swift::Encodable {
999 public func encode(to encoder: any Swift::Encoder) throws
1000}
1001@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1002extension CreateMLComponents::MinMaxScaler.CreateMLComponents::Transformer : Swift::Decodable {
1003 public init(from decoder: any Swift::Decoder) throws
1004}
1005@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1006extension CreateMLComponents::MinMaxScaler.CreateMLComponents::Transformer : Swift::Sendable where Element : Swift::Sendable {
1007}
1008@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1009public protocol SupervisedTabularEstimator<Transformer, Annotation> {
1010 associatedtype Transformer : CreateMLComponents::TabularTransformer
1011 associatedtype Annotation
1012 var annotationColumnID: TabularData::ColumnID<Self.Annotation> { get set }
1013 func fitted(to input: TabularData::DataFrame, validateOn validation: TabularData::DataFrame?, eventHandler: CreateMLComponents::EventHandler?) async throws -> Self.Transformer
1014 func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
1015 func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
1016}
1017extension CreateMLComponents::SupervisedTabularEstimator {
1018 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1019 @inlinable public func fitted(to input: TabularData::DataFrame, validateOn validation: TabularData::DataFrame? = nil) async throws -> Self.Transformer {
1020 try await fitted(to: input, validateOn: validation, eventHandler: nil)
1021 }
1022}
1023@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1024extension CreateMLComponents::SupervisedTabularEstimator where Self.Transformer : Swift::Encodable {
1025 public func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
1026}
1027@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1028extension CreateMLComponents::SupervisedTabularEstimator where Self.Transformer : Swift::Decodable {
1029 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
1030}
1031@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1032public protocol UpdatableSupervisedTabularEstimator<Transformer, Annotation> : CreateMLComponents::SupervisedTabularEstimator {
1033 func makeTransformer() -> Self.Transformer
1034 func update(_ transformer: inout Self.Transformer, with input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler?) async throws
1035 func encodeWithOptimizer(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
1036 func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
1037}
1038extension CreateMLComponents::UpdatableSupervisedTabularEstimator {
1039 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1040 @inlinable public func update(_ transformer: inout Self.Transformer, with input: TabularData::DataFrame) async throws {
1041 try await update(&transformer, with: input, eventHandler: nil)
1042 }
1043}
1044@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1045public struct HumanBodyActionPeriodPredictor : CreateMLComponents::Transformer, Swift::Sendable {
1046 public typealias Input = [CreateMLComponents::Pose]
1047 public typealias Output = [CreateMLComponents::HumanBodyActionPeriodPredictor.CreateMLComponents::Prediction]
1048 public init()
1049 public func applied(to input: [CreateMLComponents::Pose], eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [CreateMLComponents::HumanBodyActionPeriodPredictor.CreateMLComponents::Prediction]
1050}
1051@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1052extension CreateMLComponents::HumanBodyActionPeriodPredictor {
1053 public struct Prediction {
1054 public var period: Swift::Float
1055 public var periodicity: Swift::Float
1056 public init(period: Swift::Float, periodicity: Swift::Float)
1057 }
1058}
1059@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1060extension CreateMLComponents::HumanBodyActionPeriodPredictor.CreateMLComponents::Prediction : Swift::Encodable {
1061 public func encode(to encoder: any Swift::Encoder) throws
1062}
1063@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1064extension CreateMLComponents::HumanBodyActionPeriodPredictor.CreateMLComponents::Prediction : Swift::Decodable {
1065 public init(from decoder: any Swift::Decoder) throws
1066}
1067@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1068extension CreateMLComponents::HumanBodyActionPeriodPredictor.CreateMLComponents::Prediction : Swift::Equatable {
1069 public static func == (a: CreateMLComponents::HumanBodyActionPeriodPredictor.CreateMLComponents::Prediction, b: CreateMLComponents::HumanBodyActionPeriodPredictor.CreateMLComponents::Prediction) -> Swift::Bool
1070}
1071@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1072extension CreateMLComponents::HumanBodyActionPeriodPredictor.CreateMLComponents::Prediction : Swift::Hashable {
1073 public func hash(into hasher: inout Swift::Hasher)
1074 public var hashValue: Swift::Int {
1075 get
1076 }
1077}
1078@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1079extension CreateMLComponents::HumanBodyActionPeriodPredictor.CreateMLComponents::Prediction : Swift::Sendable {
1080}
1081@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1082public struct MLModelTransformerAdaptor<Scalar> : CreateMLComponents::Transformer where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint {
1083 public let model: CoreML::MLModel
1084 public init(contentsOf url: Foundation::URL, configuration: CoreML::MLModelConfiguration) throws
1085 public init(model: CoreML::MLModel) throws
1086 public func applied(to input: CoreML::MLShapedArray<Scalar>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CoreML::MLShapedArray<Scalar>
1087 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1088 public typealias Input = CoreML::MLShapedArray<Scalar>
1089 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1090 public typealias Output = CoreML::MLShapedArray<Scalar>
1091}
1092@available(*, unavailable)
1093extension CreateMLComponents::MLModelTransformerAdaptor : Swift::Sendable {
1094}
1095@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1096public struct PreprocessedFeatureSequence<Feature> : CreateMLComponents::TemporalSequence {
1097 public var features: [CreateMLComponents::TemporalFeature<Feature>]
1098 @inlinable public var count: Swift::Int? {
1099 get {
1100 features.count
1101 }
1102 }
1103 public init<S>(_ sequence: S) async throws where Feature == S.Feature, S : CreateMLComponents::TemporalSequence
1104 public func makeAsyncIterator() -> CreateMLComponents::PreprocessedFeatureSequence<Feature>.CreateMLComponents::AsyncIterator
1105 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1106 public typealias Element = CreateMLComponents::TemporalFeature<Feature>
1107 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1108 @_implements(_Concurrency::AsyncSequence, Failure) public typealias __AsyncSequence_Failure = Swift::Never
1109}
1110extension CreateMLComponents::PreprocessedFeatureSequence {
1111 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1112 public struct AsyncIterator : _Concurrency::AsyncIteratorProtocol {
1113 @usableFromInline
1114 internal let features: [CreateMLComponents::TemporalFeature<Feature>]
1115 @usableFromInline
1116 internal var index: Swift::Int
1117 @inlinable public mutating func next() -> CreateMLComponents::TemporalFeature<Feature>? {
1118 if index >= features.count {
1119 return nil
1120 }
… 2 unchanged lines …
1123 }
1124 return features[index]
1125 }
1126 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
1127 public typealias Element = CreateMLComponents.TemporalFeature<Feature>
1128 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1129 @_implements(_Concurrency.AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = Swift.Never
1130 }
1131}
1132@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1123 }
1124 return features[index]
1125 }
1126 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1127 public typealias Element = CreateMLComponents::TemporalFeature<Feature>
1128 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1129 @_implements(_Concurrency::AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = Swift::Never
1130 }
1131}
1132@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
… 3 unchanged lines …
1136 public init(feature: Feature, annotation: Annotation)
1137}
1138@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1139extension CreateMLComponents.AnnotatedFeature : Swift.Encodable where Feature : Swift.Encodable, Annotation : Swift.Encodable {
1140 public func encode(to encoder: any Swift.Encoder) throws
1141}
1142@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1143extension CreateMLComponents.AnnotatedFeature : Swift.Decodable where Feature : Swift.Decodable, Annotation : Swift.Decodable {
1144 public init(from decoder: any Swift.Decoder) throws
1145}
1146@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1147extension CreateMLComponents.AnnotatedFeature : Swift.Equatable where Feature : Swift.Equatable, Annotation : Swift.Equatable {
1148 public static func == (a: CreateMLComponents.AnnotatedFeature<Feature, Annotation>, b: CreateMLComponents.AnnotatedFeature<Feature, Annotation>) -> Swift.Bool
1149}
1150@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1151extension CreateMLComponents.AnnotatedFeature : Swift.Hashable where Feature : Swift.Hashable, Annotation : Swift.Hashable {
1152 public func hash(into hasher: inout Swift.Hasher)
1153 public var hashValue: Swift.Int {
1154 get
1155 }
1156}
1157@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1158extension CreateMLComponents.AnnotatedFeature : Swift.Sendable where Feature : Swift.Sendable, Annotation : Swift.Sendable {
1159}
1160@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1161public enum ModelUpdateError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
1162 case invalidState(debugDescription: Swift.String)
1163 public var errorDescription: Swift.String? {
1164 get
1165 }
1166 public static func == (a: CreateMLComponents.ModelUpdateError, b: CreateMLComponents.ModelUpdateError) -> Swift.Bool
1167}
1168@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1169extension CreateMLComponents.ModelUpdateError : Swift.CustomDebugStringConvertible {
1170 public var debugDescription: Swift.String {
1171 get
1172 }
1173}
1174@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1175public struct DataFrameTemporalAnnotationParameters<Annotation> where Annotation : Swift.Equatable, Annotation : Swift.Sendable {
1176 public enum FilePathType : Swift.Equatable, Swift.CustomStringConvertible, Swift.Sendable {
1177 case relative(baseURL: Foundation.URL)
1178 case absolute
1179 public var description: Swift.String {
1180 get
1181 }
1182 public static func == (a: CreateMLComponents.DataFrameTemporalAnnotationParameters<Annotation>.FilePathType, b: CreateMLComponents.DataFrameTemporalAnnotationParameters<Annotation>.FilePathType) -> Swift.Bool
1183 }
1184 public var filePathType: CreateMLComponents.DataFrameTemporalAnnotationParameters<Annotation>.FilePathType
1185 public var filePathColumnID: TabularData.ColumnID<Swift.String>
1186 public var annotationColumnID: TabularData.ColumnID<Annotation>
1187 public var startTimeColumnID: TabularData.ColumnID<Swift.Double>?
1188 public var endTimeColumnID: TabularData.ColumnID<Swift.Double>?
1189 public init()
1190}
1191@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1192extension CreateMLComponents.DataFrameTemporalAnnotationParameters : Swift.Sendable {
1193}
1194@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1195extension TabularData.DataFrame {
1196 public func loadRangedAnnotations<Annotation>(parameters: CreateMLComponents.DataFrameTemporalAnnotationParameters<Annotation> = .init(), continueOnFailure: Swift.Bool = false) throws -> [CreateMLComponents.AnnotatedFeature<CreateMLComponents.TemporalFileSegment, Annotation>] where Annotation : Swift.Equatable, Annotation : Swift.Sendable
1197}
1198@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1199public struct BoostedTreeClassifier<Label> : CreateMLComponents.SupervisedTabularEstimator where Label : Swift.Comparable, Label : Swift.Decodable, Label : Swift.Encodable, Label : Swift.Hashable {
1200 public typealias Transformer = CreateMLComponents.TreeClassifierModel<Label>
1201 public typealias Annotation = Label
1202 public var configuration: CreateMLComponents.BoostedTreeConfiguration {
1203 get
1204 set
1205 }
1206 public var annotationColumnID: TabularData.ColumnID<Label>
1207 public var featureColumnNames: [Swift.String]
1208 public var labels: Swift.Set<Label?>
1209 public init(labels: Swift.Set<Label?>, annotationColumnName: Swift.String, featureColumnNames: [Swift.String], configuration: CreateMLComponents.BoostedTreeConfiguration = BoostedTreeConfiguration())
1210 public func fitted(to input: TabularData.DataFrame, validateOn validation: TabularData.DataFrame? = nil, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.TreeClassifierModel<Label>
1211 public func encodeLabels(_ annotations: some Collection<Label?>) throws -> (labels: [Swift.String?], encoded: [Swift.Int])
1212 public func encode(_ transformer: CreateMLComponents.TreeClassifierModel<Label>, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1213 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.TreeClassifierModel<Label>
1214}
1215@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1216extension CreateMLComponents.BoostedTreeClassifier : CreateMLComponents.UpdatableSupervisedTabularEstimator {
1217 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1218 public func makeTransformer() -> CreateMLComponents.TreeClassifierModel<Label>
1219 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1220 public func update(_ transformer: inout CreateMLComponents.TreeClassifierModel<Label>, with input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler?) async throws
1221 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1222 public func encodeWithOptimizer(_ transformer: CreateMLComponents.TreeClassifierModel<Label>, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1223 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1224 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.TreeClassifierModel<Label>
1225}
1226@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1227extension CreateMLComponents.BoostedTreeClassifier : Swift.Sendable where Label : Swift.Sendable {
1228}
1229@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1230public protocol Regressor : CreateMLComponents.Transformer where Self.Output : Swift.FloatingPoint {
1231}
1232@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1233extension CreateMLComponents.Regressor {
1234 public func prediction(from input: Self.Input) async throws -> Self.Output
1235 public func prediction<S>(from input: S) async throws -> [Self.Output] where S : Swift.Sequence, Self.Input == S.Element
1236}
1237@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1238public struct LinearTimeSeriesForecaster<Scalar> : CreateMLComponents.SupervisedEstimator, Swift.Sendable where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint {
1239 public typealias Annotation = CoreML.MLShapedArray<Scalar>
1240 public typealias Transformer = CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Model
1241 public let configuration: CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Configuration
1242 public var inputWindowSize: Swift.Int {
1243 get
1244 }
1245 public var forecastWindowSize: Swift.Int {
1246 get
1247 }
1248 public init(configuration: CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Configuration)
1249 public func fitted(to input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Model
1250 public func fitted(to input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, validateOn validation: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Model
1251 public func fitted(toWindows input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Model
1252 public func fitted(toWindows input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, validateOn validation: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Model
1253}
1254extension CreateMLComponents.VideoReader {
1255 @available(macOS 13.0, iOS 16.0, *)
1256 @available(tvOS, unavailable)
1257 public struct CameraConfiguration : Swift.Sendable {
1258 public enum Position : Swift.Sendable {
1259 case front
1260 case back
1261 public static func == (a: CreateMLComponents.VideoReader.CameraConfiguration.Position, b: CreateMLComponents.VideoReader.CameraConfiguration.Position) -> Swift.Bool
1262 public func hash(into hasher: inout Swift.Hasher)
1263 public var hashValue: Swift.Int {
1264 get
1265 }
1266 }
1267 public enum PixelFormat : Swift.Sendable {
1268 case bgra32
1269 case yCbCr8BiPlanarFullRange420
1270 public static func == (a: CreateMLComponents.VideoReader.CameraConfiguration.PixelFormat, b: CreateMLComponents.VideoReader.CameraConfiguration.PixelFormat) -> Swift.Bool
1271 public func hash(into hasher: inout Swift.Hasher)
1272 public var hashValue: Swift.Int {
1273 get
1274 }
1275 }
1276 public enum Resolution : Swift.Sendable {
1277 case low
1278 case medium
1279 case high
1280 public static func == (a: CreateMLComponents.VideoReader.CameraConfiguration.Resolution, b: CreateMLComponents.VideoReader.CameraConfiguration.Resolution) -> Swift.Bool
1281 public func hash(into hasher: inout Swift.Hasher)
1282 public var hashValue: Swift.Int {
1283 get
1284 }
1285 }
1286 @available(macOS, introduced: 13.0, deprecated: 14.0, message: "Use the position property instead.")
1287 @available(iOS, introduced: 16.0, deprecated: 17.0, message: "Use the position property instead.")
1288 @available(tvOS, unavailable)
1289 public var cameraPosition: CreateMLComponents.VideoReader.CameraConfiguration.Position {
1290 get
1291 }
1292 public var position: CreateMLComponents.VideoReader.CameraConfiguration.Position
1293 public var pixelFormat: CreateMLComponents.VideoReader.CameraConfiguration.PixelFormat
1294 public var resolution: CreateMLComponents.VideoReader.CameraConfiguration.Resolution
1295 public var frameRate: Swift.Double
1296 public init()
1297 public init(position: CreateMLComponents.VideoReader.CameraConfiguration.Position = .front, pixelFormat: CreateMLComponents.VideoReader.CameraConfiguration.PixelFormat = .bgra32, resolution: CreateMLComponents.VideoReader.CameraConfiguration.Resolution = .high, frameRate: Swift.Double = 30.0)
1298 }
1299}
1300@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1301public enum EstimatorEncodingError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
1302 case invalidState(debugDescription: Swift.String)
1303 public var errorDescription: Swift.String? {
1304 get
1305 }
1306 public static func == (a: CreateMLComponents.EstimatorEncodingError, b: CreateMLComponents.EstimatorEncodingError) -> Swift.Bool
1307}
1308@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1309extension CreateMLComponents.EstimatorEncodingError : Swift.CustomDebugStringConvertible {
1310 public var debugDescription: Swift.String {
1311 get
1312 }
1313}
1314@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1315public struct TemporalSegmentIdentifier : Swift.Hashable, Swift.Sendable {
1316 public var source: Swift.String
1317 public var range: Swift.Range<Swift.Int>
1318 public var timescale: Swift.Int
1319 public var rangeInSeconds: Swift.Range<Foundation.TimeInterval> {
1320 get
1321 }
1322 public var durationInSeconds: Foundation.TimeInterval {
1323 get
1324 }
1325 public init(source: Swift.String, range: Swift.Range<Swift.Int>, timescale: Swift.Int)
1326 public static func == (a: CreateMLComponents.TemporalSegmentIdentifier, b: CreateMLComponents.TemporalSegmentIdentifier) -> Swift.Bool
1327 public func hash(into hasher: inout Swift.Hasher)
1328 public var hashValue: Swift.Int {
1329 get
1330 }
1331}
1332@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1333extension CreateMLComponents.TemporalSegmentIdentifier : Swift.Codable {
1334 public func encode(to encoder: any Swift.Encoder) throws
1335 public init(from decoder: any Swift.Decoder) throws
1336}
1337extension CreateMLComponents.UpdatableEstimator {
1338 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1339 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedEstimator<CreateMLComponents.ComposedTransformer<Self.Transformer, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents.UpdatableSupervisedEstimator, Self.Transformer.Output == Other.Transformer.Input
1340
1341}
1342extension CreateMLComponents.UpdatableSupervisedEstimator {
1343 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1344 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedEstimator<CreateMLComponents.ComposedTransformer<Self.Transformer, Other>, Self.Annotation> where Other : CreateMLComponents.Transformer, Other.Input == Self.Transformer.Output
1345
1346 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1347 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedEstimator<CreateMLComponents.ComposedTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.UpdatableEstimator, Self.Transformer.Output == Other.Transformer.Input
1348
1349 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1350 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedEstimator<CreateMLComponents.ComposedTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.UpdatableSupervisedEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
1351
1352}
1353@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1354public struct ChooseRandomly<Element> : CreateMLComponents.RandomTransformer {
1355 public init<RandomTransformer>(@CreateMLComponents.AugmentationBuilder<Element> _ augmentation: () -> RandomTransformer) where Element == RandomTransformer.Input, RandomTransformer : CreateMLComponents.RandomTransformer, RandomTransformer.Input == RandomTransformer.Output
1356 public func applied(to input: Element, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Element
1357 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
1358 public typealias Input = Element
1359 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
1360 public typealias Output = Element
1361}
1362@available(*, unavailable)
1363extension CreateMLComponents.ChooseRandomly : Swift.Sendable {
1364}
1365extension CreateMLComponents.VideoReader {
1366 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1367 public struct AsyncFrames : CreateMLComponents.TemporalSequence {
1368 public typealias AsyncIterator = CreateMLComponents.VideoReader.AsyncFrames.Iterator
1369 public typealias Feature = CoreImage.CIImage
1370 public var count: Swift.Int? {
1371 get
1372 }
1373 public let url: Foundation.URL
1374 public let timescale: CoreMedia.CMTimeScale
1375 public let nominalFrameRate: Swift.Float
1376 public let frameSize: CoreFoundation.CGSize
1377 public let videoDuration: CoreMedia.CMTime
1378 public func makeAsyncIterator() -> CreateMLComponents.VideoReader.AsyncFrames.Iterator
1379 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
1380 public typealias Element = CreateMLComponents.TemporalFeature<CreateMLComponents.VideoReader.AsyncFrames.Feature>
1381 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1382 @_implements(_Concurrency.AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift.Error
1383 }
1384}
1385@available(*, unavailable)
1386extension CreateMLComponents.VideoReader.AsyncFrames : Swift.Sendable {
1387}
1388extension CreateMLComponents.VideoReader.AsyncFrames {
1389 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1390 public struct Iterator : _Concurrency.AsyncIteratorProtocol {
1391 public mutating func next() async throws -> CreateMLComponents.TemporalFeature<CoreImage.CIImage>?
1392 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
1393 public typealias Element = CreateMLComponents.TemporalFeature<CoreImage.CIImage>
1394 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1395 @_implements(_Concurrency.AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift.Error
1396 }
1397}
1398@available(*, unavailable)
1399extension CreateMLComponents.VideoReader.AsyncFrames.Iterator : Swift.Sendable {
1400}
1401@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1402public struct DateFeatureExtractor<Scalar> : CreateMLComponents.Transformer, Swift.Sendable where Scalar : Swift.BinaryFloatingPoint {
1403 public let calendar: Foundation.Calendar
1404 public let features: CreateMLComponents.DateFeatures
1405 public init(features: CreateMLComponents.DateFeatures, calendar: Foundation.Calendar = Calendar.current)
1406 public func applied(to date: Foundation.Date, eventHandler: CreateMLComponents.EventHandler? = nil) -> [Scalar]
1407 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1408 public typealias Input = Foundation.Date
1409 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1410 public typealias Output = [Scalar]
1411}
1412@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1413extension CreateMLComponents.DateFeatureExtractor : Swift.Codable {
1414 public init(from decoder: any Swift.Decoder) throws
1415 public func encode(to encoder: any Swift.Encoder) throws
1416}
1417@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1418public struct DateFeatures : Swift.Hashable, Swift.OptionSet, Swift.RawRepresentable, Swift.Codable, Swift.Sendable {
1419 public var rawValue: Swift.Int
1420 public init(rawValue: Swift.Int)
1421 public static let second: CreateMLComponents.DateFeatures
1422 public static let minute: CreateMLComponents.DateFeatures
1423 public static let hour: CreateMLComponents.DateFeatures
1424 public static let weekday: CreateMLComponents.DateFeatures
1425 public static let day: CreateMLComponents.DateFeatures
1426 public static let dayOfYear: CreateMLComponents.DateFeatures
1427 public static let weekOfMonth: CreateMLComponents.DateFeatures
1428 public static let weekOfYear: CreateMLComponents.DateFeatures
1429 public static let month: CreateMLComponents.DateFeatures
1430 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1431 public typealias ArrayLiteralElement = CreateMLComponents.DateFeatures
1432 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1433 public typealias Element = CreateMLComponents.DateFeatures
1434 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1435 public typealias RawValue = Swift.Int
1436}
1437@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1438@available(watchOS, unavailable)
1439extension CreateMLComponents.TimeSeriesClassifier : CreateMLComponents.UpdatableSupervisedEstimator {
1440 public func makeTransformer() -> CreateMLComponents.TimeSeriesClassifier<Scalar, Label>.Model
1441 public func update(_ transformer: inout CreateMLComponents.TimeSeriesClassifier<Scalar, Label>.Model, with input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, Annotation>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws
1442 public func encodeWithOptimizer(_ transformer: CreateMLComponents.TimeSeriesClassifier<Scalar, Label>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1443 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.TimeSeriesClassifier<Scalar, Label>.Transformer
1444}
1445@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1446public struct StandardScaler<Element> : CreateMLComponents.Estimator where Element : Swift.BinaryFloatingPoint, Element : Swift.Decodable, Element : Swift.Encodable {
1447 public init()
1448 public func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CreateMLComponents.StandardScaler<Element>.Transformer where Element == S.Element, S : Swift.Sequence
1449}
1450@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1451extension CreateMLComponents.StandardScaler : CreateMLComponents.UpdatableEstimator {
1452 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1453 public func makeTransformer() -> CreateMLComponents.StandardScaler<Element>.Transformer
1454 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1455 public func update(_ transformer: inout CreateMLComponents.StandardScaler<Element>.Transformer, with input: some Sequence<Element>, eventHandler: CreateMLComponents.EventHandler? = nil)
1456 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1457 public func encodeWithOptimizer(_ transformer: CreateMLComponents.StandardScaler<Element>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1458 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1459 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.StandardScaler<Element>.Transformer
1460}
1461@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1462extension CreateMLComponents.StandardScaler : Swift.Sendable where Element : Swift.Sendable {
1463}
1464extension CreateMLComponents.StandardScaler {
1465 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1466 public struct Transformer : CreateMLComponents.Transformer, Swift.Hashable {
1467 public var mean: Element
1468 public var standardDeviation: Element
1469 public init(mean: Element, standardDeviation: Element)
1470 @inlinable public func applied(to input: Element, eventHandler: CreateMLComponents.EventHandler? = nil) -> Element {
1471 var result = input
1472
1473 if mean.isFinite {
1136 public init(feature: Feature, annotation: Annotation)
1137}
1138@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1139extension CreateMLComponents::AnnotatedFeature : Swift::Encodable where Feature : Swift::Encodable, Annotation : Swift::Encodable {
1140 public func encode(to encoder: any Swift::Encoder) throws
1141}
1142@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1143extension CreateMLComponents::AnnotatedFeature : Swift::Decodable where Feature : Swift::Decodable, Annotation : Swift::Decodable {
1144 public init(from decoder: any Swift::Decoder) throws
1145}
1146@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1147extension CreateMLComponents::AnnotatedFeature : Swift::Equatable where Feature : Swift::Equatable, Annotation : Swift::Equatable {
1148 public static func == (a: CreateMLComponents::AnnotatedFeature<Feature, Annotation>, b: CreateMLComponents::AnnotatedFeature<Feature, Annotation>) -> Swift::Bool
1149}
1150@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1151extension CreateMLComponents::AnnotatedFeature : Swift::Hashable where Feature : Swift::Hashable, Annotation : Swift::Hashable {
1152 public func hash(into hasher: inout Swift::Hasher)
1153 public var hashValue: Swift::Int {
1154 get
1155 }
1156}
1157@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1158extension CreateMLComponents::AnnotatedFeature : Swift::Sendable where Feature : Swift::Sendable, Annotation : Swift::Sendable {
1159}
1160@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1161public enum ModelUpdateError : Foundation::LocalizedError, Swift::Equatable, Swift::Sendable {
1162 case invalidState(debugDescription: Swift::String)
1163 public var errorDescription: Swift::String? {
1164 get
1165 }
1166 public static func == (a: CreateMLComponents::ModelUpdateError, b: CreateMLComponents::ModelUpdateError) -> Swift::Bool
1167}
1168@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1169extension CreateMLComponents::ModelUpdateError : Swift::CustomDebugStringConvertible {
1170 public var debugDescription: Swift::String {
1171 get
1172 }
1173}
1174@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1175public struct DataFrameTemporalAnnotationParameters<Annotation> where Annotation : Swift::Equatable, Annotation : Swift::Sendable {
1176 public enum FilePathType : Swift::Equatable, Swift::CustomStringConvertible, Swift::Sendable {
1177 case relative(baseURL: Foundation::URL)
1178 case absolute
1179 public var description: Swift::String {
1180 get
1181 }
1182 public static func == (a: CreateMLComponents::DataFrameTemporalAnnotationParameters<Annotation>.CreateMLComponents::FilePathType, b: CreateMLComponents::DataFrameTemporalAnnotationParameters<Annotation>.CreateMLComponents::FilePathType) -> Swift::Bool
1183 }
1184 public var filePathType: CreateMLComponents::DataFrameTemporalAnnotationParameters<Annotation>.CreateMLComponents::FilePathType
1185 public var filePathColumnID: TabularData::ColumnID<Swift::String>
1186 public var annotationColumnID: TabularData::ColumnID<Annotation>
1187 public var startTimeColumnID: TabularData::ColumnID<Swift::Double>?
1188 public var endTimeColumnID: TabularData::ColumnID<Swift::Double>?
1189 public init()
1190}
1191@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1192extension CreateMLComponents::DataFrameTemporalAnnotationParameters : Swift::Sendable {
1193}
1194@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1195extension TabularData::DataFrame {
1196 public func loadRangedAnnotations<Annotation>(parameters: CreateMLComponents::DataFrameTemporalAnnotationParameters<Annotation> = .init(), continueOnFailure: Swift::Bool = false) throws -> [CreateMLComponents::AnnotatedFeature<CreateMLComponents::TemporalFileSegment, Annotation>] where Annotation : Swift::Equatable, Annotation : Swift::Sendable
1197}
1198@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1199public struct BoostedTreeClassifier<Label> : CreateMLComponents::SupervisedTabularEstimator where Label : Swift::Comparable, Label : Swift::Decodable, Label : Swift::Encodable, Label : Swift::Hashable {
1200 public typealias Transformer = CreateMLComponents::TreeClassifierModel<Label>
1201 public typealias Annotation = Label
1202 public var configuration: CreateMLComponents::BoostedTreeConfiguration {
1203 get
1204 set
1205 }
1206 public var annotationColumnID: TabularData::ColumnID<Label>
1207 public var featureColumnNames: [Swift::String]
1208 public var labels: Swift::Set<Label?>
1209 public init(labels: Swift::Set<Label?>, annotationColumnName: Swift::String, featureColumnNames: [Swift::String], configuration: CreateMLComponents::BoostedTreeConfiguration = BoostedTreeConfiguration())
1210 public func fitted(to input: TabularData::DataFrame, validateOn validation: TabularData::DataFrame? = nil, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::TreeClassifierModel<Label>
1211 public func encodeLabels(_ annotations: some Collection<Label?>) throws -> (labels: [Swift::String?], encoded: [Swift::Int])
1212 public func encode(_ transformer: CreateMLComponents::TreeClassifierModel<Label>, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
1213 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::TreeClassifierModel<Label>
1214}
1215@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1216extension CreateMLComponents::BoostedTreeClassifier : CreateMLComponents::UpdatableSupervisedTabularEstimator {
1217 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1218 public func makeTransformer() -> CreateMLComponents::TreeClassifierModel<Label>
1219 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1220 public func update(_ transformer: inout CreateMLComponents::TreeClassifierModel<Label>, with input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler?) async throws
1221 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1222 public func encodeWithOptimizer(_ transformer: CreateMLComponents::TreeClassifierModel<Label>, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
1223 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1224 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::TreeClassifierModel<Label>
1225}
1226@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1227extension CreateMLComponents::BoostedTreeClassifier : Swift::Sendable where Label : Swift::Sendable {
1228}
1229@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1230public struct HumanBodyPoseExtractor : CreateMLComponents::Transformer, Swift::Sendable {
1231 public init()
1232 public func applied(to image: CoreImage::CIImage, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [CreateMLComponents::Pose]
1233 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1234 public typealias Input = CoreImage::CIImage
1235 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1236 public typealias Output = [CreateMLComponents::Pose]
1237}
1238@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1239extension CreateMLComponents::HumanBodyPoseExtractor : Swift::CustomDebugStringConvertible {
1240 public var debugDescription: Swift::String {
1241 get
1242 }
1243}
1244@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1245public struct HumanHandPoseExtractor : CreateMLComponents::Transformer, Swift::Sendable {
1246 public init()
1247 public func applied(to image: CoreImage::CIImage, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [CreateMLComponents::Pose]
1248 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1249 public typealias Input = CoreImage::CIImage
1250 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1251 public typealias Output = [CreateMLComponents::Pose]
1252}
1253@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1254extension CreateMLComponents::HumanHandPoseExtractor : Swift::CustomDebugStringConvertible {
1255 public var debugDescription: Swift::String {
1256 get
1257 }
1258}
1259@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1260public struct ImageBlur : CreateMLComponents::Transformer, Swift::Sendable {
1261 public var radius: Swift::Double
1262 public init(radius: Swift::Double)
1263 public func applied(to image: CoreImage::CIImage, eventHandler: CreateMLComponents::EventHandler? = nil) -> CoreImage::CIImage
1264 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1265 public typealias Input = CoreImage::CIImage
1266 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1267 public typealias Output = CoreImage::CIImage
1268}
1269@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1270public struct ImageColorTransformer : CreateMLComponents::Transformer, Swift::Sendable {
1271 public var brightness: Swift::Float?
1272 public var contrast: Swift::Float?
1273 public var hue: Swift::Float?
1274 public var saturation: Swift::Float?
1275 public init(brightness: Swift::Float? = nil, contrast: Swift::Float? = nil, hue: Swift::Float? = nil, saturation: Swift::Float? = nil)
1276 public func applied(to image: CoreImage::CIImage, eventHandler: CreateMLComponents::EventHandler? = nil) -> CoreImage::CIImage
1277 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1278 public typealias Input = CoreImage::CIImage
1279 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1280 public typealias Output = CoreImage::CIImage
1281}
1282@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1283public struct ImageCropper : CreateMLComponents::Transformer, Swift::Sendable {
1284 public var cropRectangle: CoreFoundation::CGRect
1285 public init(cropRectangle: CoreFoundation::CGRect)
1286 public func applied(to image: CoreImage::CIImage, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CoreImage::CIImage
1287 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1288 public typealias Input = CoreImage::CIImage
1289 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1290 public typealias Output = CoreImage::CIImage
1291}
1292@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1293extension CreateMLComponents::ImageCropper : Swift::CustomDebugStringConvertible {
1294 public var debugDescription: Swift::String {
1295 get
1296 }
1297}
1298@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1299extension CreateMLComponents::ImageCropper : Swift::Codable {
1300 public init(from decoder: any Swift::Decoder) throws
1301 public func encode(to encoder: any Swift::Encoder) throws
1302}
1303@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1304public struct ImageExposureAdjuster : CreateMLComponents::Transformer, Swift::Sendable {
1305 public var amount: Swift::Double
1306 public init(amount: Swift::Double)
1307 public func applied(to image: CoreImage::CIImage, eventHandler: CreateMLComponents::EventHandler? = nil) -> CoreImage::CIImage
1308 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1309 public typealias Input = CoreImage::CIImage
1310 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1311 public typealias Output = CoreImage::CIImage
1312}
1313@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1314public protocol ImageFeatureExtractor : CreateMLComponents::Transformer where Self.Input == CoreImage::CIImage, Self.Output == CoreML::MLShapedArray<Swift::Float> {
1315}
1316@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1317public struct ImageFeaturePrint : CreateMLComponents::ImageFeatureExtractor {
1318 public let cropAndScale: Vision::VNImageCropAndScaleOption
1319 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1320 public static let latestRevision: Swift::Int
1321 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1322 public var revision: Swift::Int {
1323 get
1324 set
1325 }
1326 public init(cropAndScale: Vision::VNImageCropAndScaleOption = .centerCrop, context: CoreImage::CIContext = CIContext())
1327 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1328 public init(revision: Swift::Int, cropAndScale: Vision::VNImageCropAndScaleOption = .centerCrop, context: CoreImage::CIContext = CIContext())
1329 public func applied(to image: CoreImage::CIImage, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CoreML::MLShapedArray<Swift::Float>
1330 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1331 public typealias Input = CoreImage::CIImage
1332 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1333 public typealias Output = CoreML::MLShapedArray<Swift::Float>
1334}
1335@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1336extension CreateMLComponents::ImageFeaturePrint : Swift::CustomDebugStringConvertible {
1337 public var debugDescription: Swift::String {
1338 get
1339 }
1340}
1341@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1342extension CreateMLComponents::ImageFeaturePrint : Swift::Codable {
1343 public init(from decoder: any Swift::Decoder) throws
1344 public func encode(to encoder: any Swift::Encoder) throws
1345}
1346@available(*, unavailable)
1347extension CreateMLComponents::ImageFeaturePrint : Swift::Sendable {
1348}
1349@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1350public struct ImageFlipper : CreateMLComponents::Transformer, Swift::Sendable {
1351 public var orientation: CreateMLComponents::ImageFlipper.CreateMLComponents::Orientation
1352 public init(orientation: CreateMLComponents::ImageFlipper.CreateMLComponents::Orientation)
1353 public func applied(to image: CoreImage::CIImage, eventHandler: CreateMLComponents::EventHandler? = nil) -> CoreImage::CIImage
1354 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1355 public typealias Input = CoreImage::CIImage
1356 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1357 public typealias Output = CoreImage::CIImage
1358}
1359@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1360extension CreateMLComponents::ImageFlipper {
1361 public enum Orientation : Swift::Hashable, Swift::Sendable {
1362 case horizontal
1363 case vertical
1364 public static func == (a: CreateMLComponents::ImageFlipper.CreateMLComponents::Orientation, b: CreateMLComponents::ImageFlipper.CreateMLComponents::Orientation) -> Swift::Bool
1365 public func hash(into hasher: inout Swift::Hasher)
1366 public var hashValue: Swift::Int {
1367 get
1368 }
1369 }
1370}
1371@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1372public struct ImageReader : CreateMLComponents::Transformer, Swift::Sendable {
1373 public init()
1374 public func applied(to url: Foundation::URL, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CoreImage::CIImage
1375 public static func read(url: Foundation::URL) throws -> CoreImage::CIImage
1376 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1377 public typealias Input = Foundation::URL
1378 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1379 public typealias Output = CoreImage::CIImage
1380}
1381@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1382extension CreateMLComponents::ImageReader : Swift::CustomDebugStringConvertible {
1383 public var debugDescription: Swift::String {
1384 get
1385 }
1386}
1387@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1388public struct ImageRotator : CreateMLComponents::Transformer, Swift::Sendable {
1389 public var angle: Swift::Double
1390 public init(angle: Swift::Double)
1391 public func applied(to image: CoreImage::CIImage, eventHandler: CreateMLComponents::EventHandler? = nil) -> CoreImage::CIImage
1392 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1393 public typealias Input = CoreImage::CIImage
1394 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1395 public typealias Output = CoreImage::CIImage
1396}
1397@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1398public struct ImageScaler : CreateMLComponents::Transformer, Swift::Sendable {
1399 public var targetSize: CoreFoundation::CGSize {
1400 get
1401 set
1402 }
1403 public init(targetSize: CoreFoundation::CGSize)
1404 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1405 public init(targetWidth: Swift::Double)
1406 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1407 public init(targetHeight: Swift::Double)
1408 public func applied(to image: CoreImage::CIImage, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CoreImage::CIImage
1409 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1410 public typealias Input = CoreImage::CIImage
1411 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1412 public typealias Output = CoreImage::CIImage
1413}
1414@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1415extension CreateMLComponents::ImageScaler : Swift::CustomDebugStringConvertible {
1416 public var debugDescription: Swift::String {
1417 get
1418 }
1419}
1420@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1421extension CreateMLComponents::ImageScaler : Swift::Codable {
1422 public init(from decoder: any Swift::Decoder) throws
1423 public func encode(to encoder: any Swift::Encoder) throws
1424}
1425@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1426public struct JointKey : Swift::Hashable, Swift::RawRepresentable, Swift::Sendable {
1427 public var rawValue: Swift::String
1428 public init(rawValue: Swift::String)
1429 public static let leftEar: CreateMLComponents::JointKey
1430 public static let leftEye: CreateMLComponents::JointKey
1431 public static let rightEar: CreateMLComponents::JointKey
1432 public static let rightEye: CreateMLComponents::JointKey
1433 public static let neck: CreateMLComponents::JointKey
1434 public static let nose: CreateMLComponents::JointKey
1435 public static let leftShoulder: CreateMLComponents::JointKey
1436 public static let leftElbow: CreateMLComponents::JointKey
1437 public static let leftWrist: CreateMLComponents::JointKey
1438 public static let rightShoulder: CreateMLComponents::JointKey
1439 public static let rightElbow: CreateMLComponents::JointKey
1440 public static let rightWrist: CreateMLComponents::JointKey
1441 public static let root: CreateMLComponents::JointKey
1442 public static let leftHip: CreateMLComponents::JointKey
1443 public static let leftKnee: CreateMLComponents::JointKey
1444 public static let leftAnkle: CreateMLComponents::JointKey
1445 public static let rightHip: CreateMLComponents::JointKey
1446 public static let rightKnee: CreateMLComponents::JointKey
1447 public static let rightAnkle: CreateMLComponents::JointKey
1448 public static let thumbTip: CreateMLComponents::JointKey
1449 public static let thumbIP: CreateMLComponents::JointKey
1450 public static let thumbMP: CreateMLComponents::JointKey
1451 public static let thumbCMC: CreateMLComponents::JointKey
1452 public static let indexTip: CreateMLComponents::JointKey
1453 public static let indexDIP: CreateMLComponents::JointKey
1454 public static let indexPIP: CreateMLComponents::JointKey
1455 public static let indexMCP: CreateMLComponents::JointKey
1456 public static let middleTip: CreateMLComponents::JointKey
1457 public static let middleDIP: CreateMLComponents::JointKey
1458 public static let middlePIP: CreateMLComponents::JointKey
1459 public static let middleMCP: CreateMLComponents::JointKey
1460 public static let ringTip: CreateMLComponents::JointKey
1461 public static let ringDIP: CreateMLComponents::JointKey
1462 public static let ringPIP: CreateMLComponents::JointKey
1463 public static let ringMCP: CreateMLComponents::JointKey
1464 public static let littleTip: CreateMLComponents::JointKey
1465 public static let littleDIP: CreateMLComponents::JointKey
1466 public static let littlePIP: CreateMLComponents::JointKey
1467 public static let littleMCP: CreateMLComponents::JointKey
1468 public static let wrist: CreateMLComponents::JointKey
1469 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1470 public typealias RawValue = Swift::String
1471}
1472@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1473extension CreateMLComponents::JointKey : Swift::CustomDebugStringConvertible {
1474 public var debugDescription: Swift::String {
1475 get
1476 }
1477}
1478@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1479public struct JointPoint : Swift::Sendable {
1480 public let key: CreateMLComponents::JointKey
1481 public var location: CoreFoundation::CGPoint
1482 public var confidence: Swift::Float
1483 public init(_ key: CreateMLComponents::JointKey, location: CoreFoundation::CGPoint, confidence: Swift::Float)
1484}
1485@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1486public struct Pose : Swift::Sendable {
1487 public init(_ observation: Vision::VNRecognizedPointsObservation) throws
1488 public init(from points: [CreateMLComponents::JointKey : CreateMLComponents::JointPoint])
1489 public var keypoints: [CreateMLComponents::JointKey : CreateMLComponents::JointPoint]
1490 public func boundingBoxArea(confidenceThreshold: Swift::Float = 0.2) -> Swift::Float
1491}
1492@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1493extension CreateMLComponents::JointPoint : Swift::Equatable {
1494 public static func == (a: CreateMLComponents::JointPoint, b: CreateMLComponents::JointPoint) -> Swift::Bool
1495}
1496@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1497extension CreateMLComponents::Pose : Swift::Equatable {
1498 public static func == (a: CreateMLComponents::Pose, b: CreateMLComponents::Pose) -> Swift::Bool
1499}
1500@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1501public struct MLModelImageFeatureExtractor : CreateMLComponents::ImageFeatureExtractor {
1502 public let model: CoreML::MLModel
1503 public let inputName: Swift::String
1504 public let outputName: Swift::String
1505 public init(model: CoreML::MLModel, inputName: Swift::String = "image", outputName: Swift::String, context: CoreImage::CIContext = CIContext()) throws
1506 public init(contentsOf url: Foundation::URL, configuration: CoreML::MLModelConfiguration, inputName: Swift::String = "image", outputName: Swift::String, context: CoreImage::CIContext = CIContext()) async throws
1507 public func applied(to input: CoreImage::CIImage, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CoreML::MLShapedArray<Swift::Float>
1508 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1509 public typealias Input = CoreImage::CIImage
1510 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1511 public typealias Output = CoreML::MLShapedArray<Swift::Float>
1512}
1513extension CreateMLComponents::MLModelImageFeatureExtractor {
1514 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1515 public enum Error : Swift::Error, Swift::Equatable, Swift::CustomDebugStringConvertible {
1516 case invalidInput(Swift::String)
1517 case invalidOutput(Swift::String)
1518 public var debugDescription: Swift::String {
1519 get
1520 }
1521 public static func == (a: CreateMLComponents::MLModelImageFeatureExtractor.CreateMLComponents::Error, b: CreateMLComponents::MLModelImageFeatureExtractor.CreateMLComponents::Error) -> Swift::Bool
1522 }
1523}
1524@available(*, unavailable)
1525extension CreateMLComponents::MLModelImageFeatureExtractor : Swift::Sendable {
1526}
1527@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1528extension CreateMLComponents::Pose : Swift::Encodable {
1529 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1530 public func encode(to encoder: any Swift::Encoder) throws
1531}
1532@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1533extension CreateMLComponents::Pose : Swift::Decodable {
1534 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1535 public init(from decoder: any Swift::Decoder) throws
1536}
1537@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1538public struct RandomImageNoiseGenerator : CreateMLComponents::Transformer, Swift::Sendable {
1539 public var intensity: Swift::Double
1540 public init(intensity: Swift::Double)
1541 public func applied(to image: CoreImage::CIImage, eventHandler: CreateMLComponents::EventHandler? = nil) -> CoreImage::CIImage
1542 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1543 public typealias Input = CoreImage::CIImage
1544 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1545 public typealias Output = CoreImage::CIImage
1546}
1547@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1548public protocol Regressor : CreateMLComponents::Transformer where Self.Output : Swift::FloatingPoint {
1549}
1550@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1551extension CreateMLComponents::Regressor {
1552 public func prediction(from input: Self.Input) async throws -> Self.Output
1553 public func prediction<S>(from input: S) async throws -> [Self.Output] where S : Swift::Sequence, Self.Input == S.Element
1554}
1555@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1556public struct LinearTimeSeriesForecaster<Scalar> : CreateMLComponents::SupervisedEstimator, Swift::Sendable where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint {
1557 public typealias Annotation = CoreML::MLShapedArray<Scalar>
1558 public typealias Transformer = CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Model
1559 public let configuration: CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Configuration
1560 public var inputWindowSize: Swift::Int {
1561 get
1562 }
1563 public var forecastWindowSize: Swift::Int {
1564 get
1565 }
1566 public init(configuration: CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Configuration)
1567 public func fitted(to input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Model
1568 public func fitted(to input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, validateOn validation: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Model
1569 public func fitted(toWindows input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Model
1570 public func fitted(toWindows input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, validateOn validation: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Model
1571}
1572extension CreateMLComponents::VideoReader {
1573 @available(macOS 13.0, iOS 16.0, *)
1574 @available(tvOS, unavailable)
1575 public struct CameraConfiguration : Swift::Sendable {
1576 public enum Position : Swift::Sendable {
1577 case front
1578 case back
1579 public static func == (a: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::Position, b: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::Position) -> Swift::Bool
1580 public func hash(into hasher: inout Swift::Hasher)
1581 public var hashValue: Swift::Int {
1582 get
1583 }
1584 }
1585 public enum PixelFormat : Swift::Sendable {
1586 case bgra32
1587 case yCbCr8BiPlanarFullRange420
1588 public static func == (a: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::PixelFormat, b: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::PixelFormat) -> Swift::Bool
1589 public func hash(into hasher: inout Swift::Hasher)
1590 public var hashValue: Swift::Int {
1591 get
1592 }
1593 }
1594 public enum Resolution : Swift::Sendable {
1595 case low
1596 case medium
1597 case high
1598 public static func == (a: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::Resolution, b: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::Resolution) -> Swift::Bool
1599 public func hash(into hasher: inout Swift::Hasher)
1600 public var hashValue: Swift::Int {
1601 get
1602 }
1603 }
1604 @available(macOS, introduced: 13.0, deprecated: 14.0, message: "Use the position property instead.")
1605 @available(iOS, introduced: 16.0, deprecated: 17.0, message: "Use the position property instead.")
1606 @available(tvOS, unavailable)
1607 public var cameraPosition: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::Position {
1608 get
1609 }
1610 public var position: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::Position
1611 public var pixelFormat: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::PixelFormat
1612 public var resolution: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::Resolution
1613 public var frameRate: Swift::Double
1614 public init()
1615 public init(position: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::Position = .front, pixelFormat: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::PixelFormat = .bgra32, resolution: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::Resolution = .high, frameRate: Swift::Double = 30.0)
1616 }
1617}
1618@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1619public enum EstimatorEncodingError : Foundation::LocalizedError, Swift::Equatable, Swift::Sendable {
1620 case invalidState(debugDescription: Swift::String)
1621 public var errorDescription: Swift::String? {
1622 get
1623 }
1624 public static func == (a: CreateMLComponents::EstimatorEncodingError, b: CreateMLComponents::EstimatorEncodingError) -> Swift::Bool
1625}
1626@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1627extension CreateMLComponents::EstimatorEncodingError : Swift::CustomDebugStringConvertible {
1628 public var debugDescription: Swift::String {
1629 get
1630 }
1631}
1632@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1633public struct TemporalSegmentIdentifier : Swift::Hashable, Swift::Sendable {
1634 public var source: Swift::String
1635 public var range: Swift::Range<Swift::Int>
1636 public var timescale: Swift::Int
1637 public var rangeInSeconds: Swift::Range<Foundation::TimeInterval> {
1638 get
1639 }
1640 public var durationInSeconds: Foundation::TimeInterval {
1641 get
1642 }
1643 public init(source: Swift::String, range: Swift::Range<Swift::Int>, timescale: Swift::Int)
1644 public static func == (a: CreateMLComponents::TemporalSegmentIdentifier, b: CreateMLComponents::TemporalSegmentIdentifier) -> Swift::Bool
1645 public func hash(into hasher: inout Swift::Hasher)
1646 public var hashValue: Swift::Int {
1647 get
1648 }
1649}
1650@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1651extension CreateMLComponents::TemporalSegmentIdentifier : Swift::Codable {
1652 public func encode(to encoder: any Swift::Encoder) throws
1653 public init(from decoder: any Swift::Decoder) throws
1654}
1655extension CreateMLComponents::UpdatableEstimator {
1656 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1657 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedEstimator<CreateMLComponents::ComposedTransformer<Self.Transformer, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents::UpdatableSupervisedEstimator, Self.Transformer.Output == Other.Transformer.Input
1658
1659}
1660extension CreateMLComponents::UpdatableSupervisedEstimator {
1661 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1662 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedEstimator<CreateMLComponents::ComposedTransformer<Self.Transformer, Other>, Self.Annotation> where Other : CreateMLComponents::Transformer, Other.Input == Self.Transformer.Output
1663
1664 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1665 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedEstimator<CreateMLComponents::ComposedTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::UpdatableEstimator, Self.Transformer.Output == Other.Transformer.Input
1666
1667 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1668 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedEstimator<CreateMLComponents::ComposedTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::UpdatableSupervisedEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
1669
1670}
1671@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1672public struct ChooseRandomly<Element> : CreateMLComponents::RandomTransformer {
1673 public init<RandomTransformer>(@CreateMLComponents::AugmentationBuilder<Element> _ augmentation: () -> RandomTransformer) where Element == RandomTransformer.Input, RandomTransformer : CreateMLComponents::RandomTransformer, RandomTransformer.Input == RandomTransformer.Output
1674 public func applied(to input: Element, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Element
1675 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1676 public typealias Input = Element
1677 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1678 public typealias Output = Element
1679}
1680@available(*, unavailable)
1681extension CreateMLComponents::ChooseRandomly : Swift::Sendable {
1682}
1683extension CreateMLComponents::VideoReader {
1684 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1685 public struct AsyncFrames : CreateMLComponents::TemporalSequence {
1686 public typealias AsyncIterator = CreateMLComponents::VideoReader.CreateMLComponents::AsyncFrames.CreateMLComponents::Iterator
1687 public typealias Feature = CoreImage::CIImage
1688 public var count: Swift::Int? {
1689 get
1690 }
1691 public let url: Foundation::URL
1692 public let timescale: CoreMedia::CMTimeScale
1693 public let nominalFrameRate: Swift::Float
1694 public let frameSize: CoreFoundation::CGSize
1695 public let videoDuration: CoreMedia::CMTime
1696 public func makeAsyncIterator() -> CreateMLComponents::VideoReader.CreateMLComponents::AsyncFrames.CreateMLComponents::Iterator
1697 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1698 public typealias Element = CreateMLComponents::TemporalFeature<CreateMLComponents::VideoReader.CreateMLComponents::AsyncFrames.CreateMLComponents::Feature>
1699 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1700 @_implements(_Concurrency::AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift::Error
1701 }
1702}
1703@available(*, unavailable)
1704extension CreateMLComponents::VideoReader.CreateMLComponents::AsyncFrames : Swift::Sendable {
1705}
1706extension CreateMLComponents::VideoReader.CreateMLComponents::AsyncFrames {
1707 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1708 public struct Iterator : _Concurrency::AsyncIteratorProtocol {
1709 public mutating func next() async throws -> CreateMLComponents::TemporalFeature<CoreImage::CIImage>?
1710 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1711 public typealias Element = CreateMLComponents::TemporalFeature<CoreImage::CIImage>
1712 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1713 @_implements(_Concurrency::AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift::Error
1714 }
1715}
1716@available(*, unavailable)
1717extension CreateMLComponents::VideoReader.CreateMLComponents::AsyncFrames.CreateMLComponents::Iterator : Swift::Sendable {
1718}
1719@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1720public struct DateFeatureExtractor<Scalar> : CreateMLComponents::Transformer, Swift::Sendable where Scalar : Swift::BinaryFloatingPoint {
1721 public let calendar: Foundation::Calendar
1722 public let features: CreateMLComponents::DateFeatures
1723 public init(features: CreateMLComponents::DateFeatures, calendar: Foundation::Calendar = Calendar.current)
1724 public func applied(to date: Foundation::Date, eventHandler: CreateMLComponents::EventHandler? = nil) -> [Scalar]
1725 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1726 public typealias Input = Foundation::Date
1727 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1728 public typealias Output = [Scalar]
1729}
1730@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1731extension CreateMLComponents::DateFeatureExtractor : Swift::Codable {
1732 public init(from decoder: any Swift::Decoder) throws
1733 public func encode(to encoder: any Swift::Encoder) throws
1734}
1735@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1736public struct DateFeatures : Swift::Hashable, Swift::OptionSet, Swift::RawRepresentable, Swift::Codable, Swift::Sendable {
1737 public var rawValue: Swift::Int
1738 public init(rawValue: Swift::Int)
1739 public static let second: CreateMLComponents::DateFeatures
1740 public static let minute: CreateMLComponents::DateFeatures
1741 public static let hour: CreateMLComponents::DateFeatures
1742 public static let weekday: CreateMLComponents::DateFeatures
1743 public static let day: CreateMLComponents::DateFeatures
1744 public static let dayOfYear: CreateMLComponents::DateFeatures
1745 public static let weekOfMonth: CreateMLComponents::DateFeatures
1746 public static let weekOfYear: CreateMLComponents::DateFeatures
1747 public static let month: CreateMLComponents::DateFeatures
1748 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1749 public typealias ArrayLiteralElement = CreateMLComponents::DateFeatures
1750 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1751 public typealias Element = CreateMLComponents::DateFeatures
1752 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1753 public typealias RawValue = Swift::Int
1754}
1755@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1756@available(watchOS, unavailable)
1757extension CreateMLComponents::TimeSeriesClassifier : CreateMLComponents::UpdatableSupervisedEstimator {
1758 public func makeTransformer() -> CreateMLComponents::TimeSeriesClassifier<Scalar, Label>.CreateMLComponents::Model
1759 public func update(_ transformer: inout CreateMLComponents::TimeSeriesClassifier<Scalar, Label>.CreateMLComponents::Model, with input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, Annotation>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws
1760 public func encodeWithOptimizer(_ transformer: CreateMLComponents::TimeSeriesClassifier<Scalar, Label>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
1761 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::TimeSeriesClassifier<Scalar, Label>.CreateMLComponents::Transformer
1762}
1763@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1764public struct StandardScaler<Element> : CreateMLComponents::Estimator where Element : Swift::BinaryFloatingPoint, Element : Swift::Decodable, Element : Swift::Encodable {
1765 public init()
1766 public func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CreateMLComponents::StandardScaler<Element>.CreateMLComponents::Transformer where Element == S.Element, S : Swift::Sequence
1767}
1768@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1769extension CreateMLComponents::StandardScaler : CreateMLComponents::UpdatableEstimator {
1770 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1771 public func makeTransformer() -> CreateMLComponents::StandardScaler<Element>.CreateMLComponents::Transformer
1772 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1773 public func update(_ transformer: inout CreateMLComponents::StandardScaler<Element>.CreateMLComponents::Transformer, with input: some Sequence<Element>, eventHandler: CreateMLComponents::EventHandler? = nil)
1774 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1775 public func encodeWithOptimizer(_ transformer: CreateMLComponents::StandardScaler<Element>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
1776 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1777 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::StandardScaler<Element>.CreateMLComponents::Transformer
1778}
1779@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1780extension CreateMLComponents::StandardScaler : Swift::Sendable where Element : Swift::Sendable {
1781}
1782extension CreateMLComponents::StandardScaler {
1783 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1784 public struct Transformer : CreateMLComponents::Transformer, Swift::Hashable {
1785 public var mean: Element
1786 public var standardDeviation: Element
1787 public init(mean: Element, standardDeviation: Element)
1788 @inlinable public func applied(to input: Element, eventHandler: CreateMLComponents::EventHandler? = nil) -> Element {
1789 var result = input
1790
1791 if mean.isFinite {
… 6 unchanged lines …
1480
1481 return result
1482 }
1483 public static func == (a: CreateMLComponents.StandardScaler<Element>.Transformer, b: CreateMLComponents.StandardScaler<Element>.Transformer) -> Swift.Bool
1484 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
1485 public typealias Input = Element
1486 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
1487 public typealias Output = Element
1488 public func hash(into hasher: inout Swift.Hasher)
1489 public var hashValue: Swift.Int {
1490 get
1491 }
1492 }
1493}
1494@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1495extension CreateMLComponents.StandardScaler.Transformer : Swift.CustomDebugStringConvertible {
1496 public var debugDescription: Swift.String {
1497 get
1498 }
1499}
1500@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1501extension CreateMLComponents.StandardScaler.Transformer : Swift.Encodable {
1502 public func encode(to encoder: any Swift.Encoder) throws
1503}
1504@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1505extension CreateMLComponents.StandardScaler.Transformer : Swift.Decodable {
1506 public init(from decoder: any Swift.Decoder) throws
1507}
1508@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1509extension CreateMLComponents.StandardScaler.Transformer : Swift.Sendable where Element : Swift.Sendable {
1510}
1511@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1512public struct TimeSeriesForecasterAnnotatedWindows<Scalar> : Swift.Sequence, @unchecked Swift.Sendable where Scalar : CoreML.MLShapedArrayScalar {
1513 public typealias Element = CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, CoreML.MLShapedArray<Scalar>>
1514 public let features: CoreML.MLShapedArray<Scalar>
1515 public let annotations: CoreML.MLShapedArray<Scalar>
1516 public let inputWindowSize: Swift.Int
1517 public let forecastWindowSize: Swift.Int
1518 public var stride: Swift.Int
1519 public var shufflesElements: Swift.Bool
1520 public init(features: CoreML.MLShapedArray<Scalar>, annotations: CoreML.MLShapedArray<Scalar>, inputWindowSize: Swift.Int, forecastWindowSize: Swift.Int, stride: Swift.Int = 1, shufflesElements: Swift.Bool = true) throws
1521 public var underestimatedCount: Swift.Int {
1522 get
1523 }
1524 public func makeIterator() -> CreateMLComponents.TimeSeriesForecasterAnnotatedWindows<Scalar>.Iterator
1525}
1526extension CreateMLComponents.TimeSeriesForecasterAnnotatedWindows {
1527 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1528 public struct Iterator : Swift.IteratorProtocol, @unchecked Swift.Sendable {
1529 public mutating func next() -> CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, CoreML.MLShapedArray<Scalar>>?
1530 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1531 public typealias Element = CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, CoreML.MLShapedArray<Scalar>>
1532 }
1533}
1534@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1535public protocol Transformer<Input, Output> {
1536 associatedtype Input
1537 associatedtype Output
1538 func applied(to input: Self.Input, eventHandler: CreateMLComponents.EventHandler?) async throws -> Self.Output
1539}
1540@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1541extension CreateMLComponents.Transformer {
1542 @inlinable public func applied<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [Self.Output] where S : Swift.Sequence, Self.Input == S.Element {
1543 var result = [Output]()
1544 result.reserveCapacity(input.underestimatedCount)
1545 for example in input {
1798
1799 return result
1800 }
1801 public static func == (a: CreateMLComponents::StandardScaler<Element>.CreateMLComponents::Transformer, b: CreateMLComponents::StandardScaler<Element>.CreateMLComponents::Transformer) -> Swift::Bool
1802 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1803 public typealias Input = Element
1804 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1805 public typealias Output = Element
1806 public func hash(into hasher: inout Swift::Hasher)
1807 public var hashValue: Swift::Int {
1808 get
1809 }
1810 }
1811}
1812@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1813extension CreateMLComponents::StandardScaler.CreateMLComponents::Transformer : Swift::CustomDebugStringConvertible {
1814 public var debugDescription: Swift::String {
1815 get
1816 }
1817}
1818@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1819extension CreateMLComponents::StandardScaler.CreateMLComponents::Transformer : Swift::Encodable {
1820 public func encode(to encoder: any Swift::Encoder) throws
1821}
1822@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1823extension CreateMLComponents::StandardScaler.CreateMLComponents::Transformer : Swift::Decodable {
1824 public init(from decoder: any Swift::Decoder) throws
1825}
1826@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1827extension CreateMLComponents::StandardScaler.CreateMLComponents::Transformer : Swift::Sendable where Element : Swift::Sendable {
1828}
1829@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1830public struct TimeSeriesForecasterAnnotatedWindows<Scalar> : Swift::Sequence, @unchecked Swift::Sendable where Scalar : CoreML::MLShapedArrayScalar {
1831 public typealias Element = CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, CoreML::MLShapedArray<Scalar>>
1832 public let features: CoreML::MLShapedArray<Scalar>
1833 public let annotations: CoreML::MLShapedArray<Scalar>
1834 public let inputWindowSize: Swift::Int
1835 public let forecastWindowSize: Swift::Int
1836 public var stride: Swift::Int
1837 public var shufflesElements: Swift::Bool
1838 public init(features: CoreML::MLShapedArray<Scalar>, annotations: CoreML::MLShapedArray<Scalar>, inputWindowSize: Swift::Int, forecastWindowSize: Swift::Int, stride: Swift::Int = 1, shufflesElements: Swift::Bool = true) throws
1839 public var underestimatedCount: Swift::Int {
1840 get
1841 }
1842 public func makeIterator() -> CreateMLComponents::TimeSeriesForecasterAnnotatedWindows<Scalar>.CreateMLComponents::Iterator
1843}
1844extension CreateMLComponents::TimeSeriesForecasterAnnotatedWindows {
1845 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1846 public struct Iterator : Swift::IteratorProtocol, @unchecked Swift::Sendable {
1847 public mutating func next() -> CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, CoreML::MLShapedArray<Scalar>>?
1848 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1849 public typealias Element = CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, CoreML::MLShapedArray<Scalar>>
1850 }
1851}
1852@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1853public protocol Transformer<Input, Output> {
1854 associatedtype Input
1855 associatedtype Output
1856 func applied(to input: Self.Input, eventHandler: CreateMLComponents::EventHandler?) async throws -> Self.Output
1857}
1858@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1859extension CreateMLComponents::Transformer {
1860 @inlinable public func applied<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [Self.Output] where S : Swift::Sequence, Self.Input == S.Element {
1861 var result = [Output]()
1862 result.reserveCapacity(input.underestimatedCount)
1863 for example in input {
… 11 unchanged lines …
1557 }
1558 return result
1559 }
1560 @inlinable public func applied<S, Annotation>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [CreateMLComponents.AnnotatedFeature<Self.Output, Annotation>] where S : Swift.Sequence, S.Element == CreateMLComponents.AnnotatedFeature<Self.Input, Annotation> {
1561 var result = [AnnotatedFeature<Output, Annotation>]()
1562 result.reserveCapacity(input.underestimatedCount)
1563 for example in input {
1875 }
1876 return result
1877 }
1878 @inlinable public func applied<S, Annotation>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [CreateMLComponents::AnnotatedFeature<Self.Output, Annotation>] where S : Swift::Sequence, S.Element == CreateMLComponents::AnnotatedFeature<Self.Input, Annotation> {
1879 var result = [AnnotatedFeature<Output, Annotation>]()
1880 result.reserveCapacity(input.underestimatedCount)
1881 for example in input {
… 13 unchanged lines …
1577 return result
1578 }
1579 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1580 @inlinable public func prediction<S, Annotation>(from input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [CreateMLComponents.AnnotatedPrediction<Self.Output, Annotation>] where S : Swift.Sequence, S.Element == CreateMLComponents.AnnotatedFeature<Self.Input, Annotation> {
1581 var result = [AnnotatedPrediction<Output, Annotation>]()
1582 result.reserveCapacity(input.underestimatedCount)
1583 for example in input {
1895 return result
1896 }
1897 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1898 @inlinable public func prediction<S, Annotation>(from input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [CreateMLComponents::AnnotatedPrediction<Self.Output, Annotation>] where S : Swift::Sequence, S.Element == CreateMLComponents::AnnotatedFeature<Self.Input, Annotation> {
1899 var result = [AnnotatedPrediction<Output, Annotation>]()
1900 result.reserveCapacity(input.underestimatedCount)
1901 for example in input {
… 14 unchanged lines …
1598 }
1599}
1600@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1601extension CreateMLComponents.Transformer {
1602 @inlinable public func callAsFunction(_ input: Self.Input, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Self.Output {
1603 try await applied(to: input, eventHandler: eventHandler)
1604 }
1605 @inlinable public func callAsFunction<S>(_ input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [Self.Output] where S : Swift.Sequence, Self.Input == S.Element {
1606 try await applied(to: input, eventHandler: eventHandler)
1607 }
1608}
1609@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1610public struct AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation> : _Concurrency.AsyncSequence where Base : Swift.Sequence, RandomTransformer : CreateMLComponents.RandomTransformer, RandomNumberGenerator : Swift.RandomNumberGenerator, Base.Element == CreateMLComponents.AnnotatedFeature<RandomTransformer.Input, Annotation>, RandomTransformer.Input == RandomTransformer.Output {
1611 public typealias Element = Base.Element
1612 public var transformer: RandomTransformer
1613 public func makeAsyncIterator() -> CreateMLComponents.AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.AsyncIterator
1614 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1615 @_implements(_Concurrency.AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift.Error
1616}
1617@available(*, unavailable)
1618extension CreateMLComponents.AugmentationSequence : Swift.Sendable {
1619}
1620extension CreateMLComponents.AugmentationSequence {
1621 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1622 public struct AsyncIterator : _Concurrency.AsyncIteratorProtocol {
1623 public mutating func next() async throws -> Base.Element?
1624 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
1625 public typealias Element = CreateMLComponents.AnnotatedFeature<RandomTransformer.Input, Annotation>
1626 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1627 @_implements(_Concurrency.AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift.Error
1628 }
1629}
1630extension CreateMLComponents.AugmentationSequence {
1631 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1632 public func batches(ofSize size: Swift.Int, dropsLastPartialBatch: Swift.Bool) -> CreateMLComponents.AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.BatchedSequence
1633 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1634 public struct BatchedSequence : _Concurrency.AsyncSequence {
1635 public typealias Element = [CreateMLComponents.AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.Element]
1636 public func makeAsyncIterator() -> CreateMLComponents.AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.BatchedSequence.AsyncIterator
1637 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1638 @_implements(_Concurrency.AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift.Error
1639 }
1640}
1641extension CreateMLComponents.AugmentationSequence.BatchedSequence {
1642 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1643 public struct AsyncIterator : _Concurrency.AsyncIteratorProtocol {
1644 public mutating func next() async throws -> [CreateMLComponents.AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.Element]?
1645 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
1646 public typealias Element = [CreateMLComponents.AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.Element]
1647 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1648 @_implements(_Concurrency.AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift.Error
1649 }
1650}
1651@available(*, unavailable)
1652extension CreateMLComponents.AugmentationSequence.AsyncIterator : Swift.Sendable {
1653}
1654@available(*, unavailable)
1655extension CreateMLComponents.AugmentationSequence.BatchedSequence : Swift.Sendable {
1656}
1657@available(*, unavailable)
1658extension CreateMLComponents.AugmentationSequence.BatchedSequence.AsyncIterator : Swift.Sendable {
1659}
1660@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1661public protocol EstimatorEncoder {
1662 mutating func encode<T>(_ value: T) throws where T : Swift.Encodable
1663 mutating func encodeOptimizer<T>(_ value: T) throws where T : Swift.Encodable
1664}
1665@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1666public protocol EstimatorDecoder {
1667 mutating func decode<T>(_ type: T.Type) throws -> T where T : Swift.Decodable
1668 mutating func decodeOptimizer<T>(_ value: T.Type) throws -> T where T : Swift.Decodable
1669}
1670@available(macOS, introduced: 13.0, deprecated: 15.0)
1671@available(iOS, introduced: 16.0, deprecated: 18.0)
1672@available(tvOS, introduced: 16.0, deprecated: 18.0)
1673@available(visionOS, introduced: 1.0, deprecated: 2.0)
1674@available(watchOS, unavailable)
1675public protocol TemporalEstimator<Transformer> {
1676 associatedtype Transformer : CreateMLComponents.TemporalTransformer
1677 func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler?) async throws -> Self.Transformer where InputSequence : Swift.Sequence, InputSequence.Element : CreateMLComponents.TemporalSequence, Self.Transformer.Input == InputSequence.Element.Feature
1678 func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1679 func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
1680}
1681@available(macOS, introduced: 13.0, deprecated: 15.0)
1682@available(iOS, introduced: 16.0, deprecated: 18.0)
1683@available(tvOS, introduced: 16.0, deprecated: 18.0)
1684@available(visionOS, introduced: 1.0, deprecated: 2.0)
1685@available(watchOS, unavailable)
1686extension CreateMLComponents.TemporalEstimator {
1687 @inlinable public func fitted<InputSequence>(to input: InputSequence) async throws -> Self.Transformer where InputSequence : Swift.Sequence, InputSequence.Element : CreateMLComponents.TemporalSequence, Self.Transformer.Input == InputSequence.Element.Feature {
1688 try await fitted(to: input, eventHandler: nil)
1689 }
1690}
1916 }
1917}
1918@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1919extension CreateMLComponents::Transformer {
1920 @inlinable public func callAsFunction(_ input: Self.Input, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Self.Output {
1921 try await applied(to: input, eventHandler: eventHandler)
1922 }
1923 @inlinable public func callAsFunction<S>(_ input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [Self.Output] where S : Swift::Sequence, Self.Input == S.Element {
1924 try await applied(to: input, eventHandler: eventHandler)
1925 }
1926}
1927@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1928public struct AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation> : _Concurrency::AsyncSequence where Base : Swift::Sequence, RandomTransformer : CreateMLComponents::RandomTransformer, RandomNumberGenerator : Swift::RandomNumberGenerator, Base.Element == CreateMLComponents::AnnotatedFeature<RandomTransformer.Input, Annotation>, RandomTransformer.Input == RandomTransformer.Output {
1929 public typealias Element = Base.Element
1930 public var transformer: RandomTransformer
1931 public func makeAsyncIterator() -> CreateMLComponents::AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.CreateMLComponents::AsyncIterator
1932 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1933 @_implements(_Concurrency::AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift::Error
1934}
1935@available(*, unavailable)
1936extension CreateMLComponents::AugmentationSequence : Swift::Sendable {
1937}
1938extension CreateMLComponents::AugmentationSequence {
1939 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1940 public struct AsyncIterator : _Concurrency::AsyncIteratorProtocol {
1941 public mutating func next() async throws -> Base.Element?
1942 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1943 public typealias Element = CreateMLComponents::AnnotatedFeature<RandomTransformer.Input, Annotation>
1944 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1945 @_implements(_Concurrency::AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift::Error
1946 }
1947}
1948extension CreateMLComponents::AugmentationSequence {
1949 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1950 public func batches(ofSize size: Swift::Int, dropsLastPartialBatch: Swift::Bool) -> CreateMLComponents::AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.CreateMLComponents::BatchedSequence
1951 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1952 public struct BatchedSequence : _Concurrency::AsyncSequence {
1953 public typealias Element = [CreateMLComponents::AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.Element]
1954 public func makeAsyncIterator() -> CreateMLComponents::AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.CreateMLComponents::BatchedSequence.CreateMLComponents::AsyncIterator
1955 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1956 @_implements(_Concurrency::AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift::Error
1957 }
1958}
1959extension CreateMLComponents::AugmentationSequence.CreateMLComponents::BatchedSequence {
1960 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1961 public struct AsyncIterator : _Concurrency::AsyncIteratorProtocol {
1962 public mutating func next() async throws -> [CreateMLComponents::AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.Element]?
1963 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1964 public typealias Element = [CreateMLComponents::AugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.CreateMLComponents::Element]
1965 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
1966 @_implements(_Concurrency::AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift::Error
1967 }
1968}
1969@available(*, unavailable)
1970extension CreateMLComponents::AugmentationSequence.CreateMLComponents::AsyncIterator : Swift::Sendable {
1971}
1972@available(*, unavailable)
1973extension CreateMLComponents::AugmentationSequence.CreateMLComponents::BatchedSequence : Swift::Sendable {
1974}
1975@available(*, unavailable)
1976extension CreateMLComponents::AugmentationSequence.CreateMLComponents::BatchedSequence.CreateMLComponents::AsyncIterator : Swift::Sendable {
1977}
1978@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1979public protocol EstimatorEncoder {
1980 mutating func encode<T>(_ value: T) throws where T : Swift::Encodable
1981 mutating func encodeOptimizer<T>(_ value: T) throws where T : Swift::Encodable
1982}
1983@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1984public protocol EstimatorDecoder {
1985 mutating func decode<T>(_ type: T.Type) throws -> T where T : Swift::Decodable
1986 mutating func decodeOptimizer<T>(_ value: T.Type) throws -> T where T : Swift::Decodable
1987}
1988@available(macOS, introduced: 13.0, deprecated: 15.0)
1989@available(iOS, introduced: 16.0, deprecated: 18.0)
1990@available(tvOS, introduced: 16.0, deprecated: 18.0)
1991@available(visionOS, introduced: 1.0, deprecated: 2.0)
1992@available(watchOS, unavailable)
1993public protocol TemporalEstimator<Transformer> {
1994 associatedtype Transformer : CreateMLComponents::TemporalTransformer
1995 func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler?) async throws -> Self.Transformer where InputSequence : Swift::Sequence, InputSequence.Element : CreateMLComponents::TemporalSequence, Self.Transformer.Input == InputSequence.Element.Feature
1996 func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
1997 func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
1998}
1999@available(macOS, introduced: 13.0, deprecated: 15.0)
2000@available(iOS, introduced: 16.0, deprecated: 18.0)
2001@available(tvOS, introduced: 16.0, deprecated: 18.0)
2002@available(visionOS, introduced: 1.0, deprecated: 2.0)
2003@available(watchOS, unavailable)
2004extension CreateMLComponents::TemporalEstimator {
2005 @inlinable public func fitted<InputSequence>(to input: InputSequence) async throws -> Self.Transformer where InputSequence : Swift::Sequence, InputSequence.Element : CreateMLComponents::TemporalSequence, Self.Transformer.Input == InputSequence.Element.Feature {
2006 try await fitted(to: input, eventHandler: nil)
2007 }
2008}
… 2 unchanged lines …
1693@available(tvOS, introduced: 16.0, deprecated: 18.0)
1694@available(visionOS, introduced: 1.0, deprecated: 2.0)
1695@available(watchOS, unavailable)
1696public protocol UpdatableTemporalEstimator<Transformer> : CreateMLComponents.TemporalEstimator {
1697 func makeTransformer() -> Self.Transformer
1698 func update<InputSequence>(_ transformer: inout Self.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler?) async throws where InputSequence : Swift.Sequence, InputSequence.Element : CreateMLComponents.TemporalSequence, Self.Transformer.Input == InputSequence.Element.Feature
1699 func encodeWithOptimizer(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1700 func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
1701}
1702@available(macOS, introduced: 13.0, deprecated: 15.0)
1703@available(iOS, introduced: 16.0, deprecated: 18.0)
1704@available(tvOS, introduced: 16.0, deprecated: 18.0)
1705@available(visionOS, introduced: 1.0, deprecated: 2.0)
1706@available(watchOS, unavailable)
1707extension CreateMLComponents.UpdatableTemporalEstimator {
1708 @inlinable public func update<InputSequence>(_ transformer: inout Self.Transformer, with input: InputSequence) async throws where InputSequence : Swift.Sequence, InputSequence.Element : CreateMLComponents.TemporalSequence, Self.Transformer.Input == InputSequence.Element.Feature {
1709 try await update(&transformer, with: input, eventHandler: nil)
1710 }
1711}
1712@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1713public enum DatasetError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
1714 case missingResource(Foundation.URL)
1715 case incompatibleDataFormat(Foundation.URL, debugDescription: Swift.String)
1716 case unreadableResource(Foundation.URL)
1717 case incorrectName(Foundation.URL, debugDescription: Swift.String)
1718 public var errorDescription: Swift.String? {
1719 get
1720 }
1721 public static func == (a: CreateMLComponents.DatasetError, b: CreateMLComponents.DatasetError) -> Swift.Bool
1722}
1723@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1724extension CreateMLComponents.DatasetError : Swift.CustomDebugStringConvertible {
1725 public var debugDescription: Swift.String {
1726 get
1727 }
1728}
1729@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1730public protocol Estimator<Transformer> {
1731 associatedtype Transformer : CreateMLComponents.Transformer
1732 func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler?) async throws -> Self.Transformer where S : Swift.Sequence, S.Element == Self.Transformer.Input
1733 func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1734 func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
1735}
1736extension CreateMLComponents.Estimator {
1737 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1738 @inlinable public func fitted<S>(to input: S) async throws -> Self.Transformer where S : Swift.Sequence, S.Element == Self.Transformer.Input {
1739 try await fitted(to: input, eventHandler: nil)
1740 }
1741}
1742@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1743public protocol UpdatableEstimator<Transformer> : CreateMLComponents.Estimator {
1744 func makeTransformer() -> Self.Transformer
1745 func update<InputSequence>(_ transformer: inout Self.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler?) async throws where InputSequence : Swift.Sequence, InputSequence.Element == Self.Transformer.Input
1746 func encodeWithOptimizer(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1747 func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
1748}
1749extension CreateMLComponents.UpdatableEstimator {
1750 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1751 @inlinable public func update<InputSequence>(_ transformer: inout Self.Transformer, with input: InputSequence) async throws where InputSequence : Swift.Sequence, InputSequence.Element == Self.Transformer.Input {
1752 try await update(&transformer, with: input, eventHandler: nil)
1753 }
1754}
1755@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1756public struct AudioReader : CreateMLComponents.Transformer, Swift.Sendable {
1757 public var configuration: CreateMLComponents.AudioReader.Configuration
1758 public init(configuration: CreateMLComponents.AudioReader.Configuration = .init())
1759 public func applied(to url: Foundation.URL, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CreateMLComponents.AudioReader.AsyncBuffers
1760 public static func read(contentsOf url: Foundation.URL, configuration: CreateMLComponents.AudioReader.Configuration = .init()) throws -> CreateMLComponents.AudioReader.AsyncBuffers
1761 public static func read<S>(_ files: S, configuration: CreateMLComponents.AudioReader.Configuration = .init()) throws -> [CreateMLComponents.AudioReader.AsyncBuffers] where S : Swift.Sequence, S.Element == Foundation.URL
1762 public static func read<S, Annotation>(_ annotatedFiles: S, configuration: CreateMLComponents.AudioReader.Configuration = .init()) throws -> [CreateMLComponents.AnnotatedFeature<CreateMLComponents.AudioReader.AsyncBuffers, Annotation>] where S : Swift.Sequence, Annotation : Swift.Equatable, Annotation : Swift.Sendable, S.Element == CreateMLComponents.AnnotatedFeature<Foundation.URL, Annotation>
1763 @available(macOS 13.0, iOS 16.0, *)
1764 @available(tvOS, unavailable)
1765 public static func readMicrophone(configuration: CreateMLComponents.AudioReader.Configuration = .init()) async throws -> CreateMLComponents.AudioReader.MicrophoneAsyncBuffers
1766 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
1767 public typealias Input = Foundation.URL
1768 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
1769 public typealias Output = CreateMLComponents.AudioReader.AsyncBuffers
1770}
1771@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1772public struct AnyTemporalSequence<Feature> : CreateMLComponents.TemporalSequence {
1773 public typealias Element = CreateMLComponents.TemporalFeature<Feature>
1774 public typealias AsyncIterator = CreateMLComponents.AnyTemporalIterator<CreateMLComponents.AnyTemporalSequence<Feature>.Element>
1775 public let count: Swift.Int?
1776 public init<S>(_ sequence: S) where Feature == S.Feature, S : CreateMLComponents.TemporalSequence
1777 public init<S>(_ sequence: S, count: Swift.Int?) where S : _Concurrency.AsyncSequence, S.Element == CreateMLComponents.TemporalFeature<Feature>
1778 public func makeAsyncIterator() -> CreateMLComponents.AnyTemporalIterator<CreateMLComponents.AnyTemporalSequence<Feature>.Element>
1779 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1780 @_implements(_Concurrency.AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift.Error
1781}
1782@available(*, unavailable)
1783extension CreateMLComponents.AnyTemporalSequence : Swift.Sendable {
1784}
1785@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1786public struct AnyTemporalIterator<Element> : _Concurrency.AsyncIteratorProtocol {
1787 public func next() async throws -> Element?
1788 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
1789 @_implements(_Concurrency.AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift.Error
1790}
1791@available(*, unavailable)
1792extension CreateMLComponents.AnyTemporalIterator : Swift.Sendable {
1793}
1794@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1795public struct ModelMetadata : Swift.Hashable, Swift.Sendable {
1796 public var description: Swift.String
1797 public var version: Swift.String
1798 public var author: Swift.String
1799 public var license: Swift.String
1800 public var creatorDefined: [Swift.String : Swift.String]
1801 public init(description: Swift.String = "", version: Swift.String = "", author: Swift.String = "", license: Swift.String = "", creatorDefined: [Swift.String : Swift.String] = [:])
1802 public static func == (a: CreateMLComponents.ModelMetadata, b: CreateMLComponents.ModelMetadata) -> Swift.Bool
1803 public func hash(into hasher: inout Swift.Hasher)
1804 public var hashValue: Swift.Int {
1805 get
1806 }
1807}
1808extension CreateMLComponents.Transformer {
1809 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
1810 public func export(to url: Foundation.URL) throws
1811 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
1812 public func export(to url: Foundation.URL, metadata: CreateMLComponents.ModelMetadata) throws
1813}
1814extension Swift.Sequence where Self.Element : Swift.FloatingPoint {
1815 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1816 @backDeployed(before: macOS 14.0, iOS 17.0, tvOS 17.0)
1817 @inlinable internal func mean() -> Self.Element? {
2011@available(tvOS, introduced: 16.0, deprecated: 18.0)
2012@available(visionOS, introduced: 1.0, deprecated: 2.0)
2013@available(watchOS, unavailable)
2014public protocol UpdatableTemporalEstimator<Transformer> : CreateMLComponents::TemporalEstimator {
2015 func makeTransformer() -> Self.Transformer
2016 func update<InputSequence>(_ transformer: inout Self.Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler?) async throws where InputSequence : Swift::Sequence, InputSequence.Element : CreateMLComponents::TemporalSequence, Self.Transformer.Input == InputSequence.Element.Feature
2017 func encodeWithOptimizer(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
2018 func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
2019}
2020@available(macOS, introduced: 13.0, deprecated: 15.0)
2021@available(iOS, introduced: 16.0, deprecated: 18.0)
2022@available(tvOS, introduced: 16.0, deprecated: 18.0)
2023@available(visionOS, introduced: 1.0, deprecated: 2.0)
2024@available(watchOS, unavailable)
2025extension CreateMLComponents::UpdatableTemporalEstimator {
2026 @inlinable public func update<InputSequence>(_ transformer: inout Self.Transformer, with input: InputSequence) async throws where InputSequence : Swift::Sequence, InputSequence.Element : CreateMLComponents::TemporalSequence, Self.Transformer.Input == InputSequence.Element.Feature {
2027 try await update(&transformer, with: input, eventHandler: nil)
2028 }
2029}
2030@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2031public enum DatasetError : Foundation::LocalizedError, Swift::Equatable, Swift::Sendable {
2032 case missingResource(Foundation::URL)
2033 case incompatibleDataFormat(Foundation::URL, debugDescription: Swift::String)
2034 case unreadableResource(Foundation::URL)
2035 case incorrectName(Foundation::URL, debugDescription: Swift::String)
2036 public var errorDescription: Swift::String? {
2037 get
2038 }
2039 public static func == (a: CreateMLComponents::DatasetError, b: CreateMLComponents::DatasetError) -> Swift::Bool
2040}
2041@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2042extension CreateMLComponents::DatasetError : Swift::CustomDebugStringConvertible {
2043 public var debugDescription: Swift::String {
2044 get
2045 }
2046}
2047@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2048public protocol Estimator<Transformer> {
2049 associatedtype Transformer : CreateMLComponents::Transformer
2050 func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler?) async throws -> Self.Transformer where S : Swift::Sequence, S.Element == Self.Transformer.Input
2051 func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
2052 func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
2053}
2054extension CreateMLComponents::Estimator {
2055 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2056 @inlinable public func fitted<S>(to input: S) async throws -> Self.Transformer where S : Swift::Sequence, S.Element == Self.Transformer.Input {
2057 try await fitted(to: input, eventHandler: nil)
2058 }
2059}
2060@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2061public protocol UpdatableEstimator<Transformer> : CreateMLComponents::Estimator {
2062 func makeTransformer() -> Self.Transformer
2063 func update<InputSequence>(_ transformer: inout Self.Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler?) async throws where InputSequence : Swift::Sequence, InputSequence.Element == Self.Transformer.Input
2064 func encodeWithOptimizer(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
2065 func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
2066}
2067extension CreateMLComponents::UpdatableEstimator {
2068 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2069 @inlinable public func update<InputSequence>(_ transformer: inout Self.Transformer, with input: InputSequence) async throws where InputSequence : Swift::Sequence, InputSequence.Element == Self.Transformer.Input {
2070 try await update(&transformer, with: input, eventHandler: nil)
2071 }
2072}
2073@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2074public struct AudioReader : CreateMLComponents::Transformer, Swift::Sendable {
2075 public var configuration: CreateMLComponents::AudioReader.CreateMLComponents::Configuration
2076 public init(configuration: CreateMLComponents::AudioReader.CreateMLComponents::Configuration = .init())
2077 public func applied(to url: Foundation::URL, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CreateMLComponents::AudioReader.CreateMLComponents::AsyncBuffers
2078 public static func read(contentsOf url: Foundation::URL, configuration: CreateMLComponents::AudioReader.CreateMLComponents::Configuration = .init()) throws -> CreateMLComponents::AudioReader.CreateMLComponents::AsyncBuffers
2079 public static func read<S>(_ files: S, configuration: CreateMLComponents::AudioReader.CreateMLComponents::Configuration = .init()) throws -> [CreateMLComponents::AudioReader.CreateMLComponents::AsyncBuffers] where S : Swift::Sequence, S.Element == Foundation::URL
2080 public static func read<S, Annotation>(_ annotatedFiles: S, configuration: CreateMLComponents::AudioReader.CreateMLComponents::Configuration = .init()) throws -> [CreateMLComponents::AnnotatedFeature<CreateMLComponents::AudioReader.CreateMLComponents::AsyncBuffers, Annotation>] where S : Swift::Sequence, Annotation : Swift::Equatable, Annotation : Swift::Sendable, S.Element == CreateMLComponents::AnnotatedFeature<Foundation::URL, Annotation>
2081 @available(macOS 13.0, iOS 16.0, *)
2082 @available(tvOS, unavailable)
2083 public static func readMicrophone(configuration: CreateMLComponents::AudioReader.CreateMLComponents::Configuration = .init()) async throws -> CreateMLComponents::AudioReader.CreateMLComponents::MicrophoneAsyncBuffers
2084 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2085 public typealias Input = Foundation::URL
2086 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2087 public typealias Output = CreateMLComponents::AudioReader.CreateMLComponents::AsyncBuffers
2088}
2089@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2090public struct AnyTemporalSequence<Feature> : CreateMLComponents::TemporalSequence {
2091 public typealias Element = CreateMLComponents::TemporalFeature<Feature>
2092 public typealias AsyncIterator = CreateMLComponents::AnyTemporalIterator<CreateMLComponents::AnyTemporalSequence<Feature>.CreateMLComponents::Element>
2093 public let count: Swift::Int?
2094 public init<S>(_ sequence: S) where Feature == S.Feature, S : CreateMLComponents::TemporalSequence
2095 public init<S>(_ sequence: S, count: Swift::Int?) where S : _Concurrency::AsyncSequence, S.Element == CreateMLComponents::TemporalFeature<Feature>
2096 public func makeAsyncIterator() -> CreateMLComponents::AnyTemporalIterator<CreateMLComponents::AnyTemporalSequence<Feature>.CreateMLComponents::Element>
2097 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
2098 @_implements(_Concurrency::AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift::Error
2099}
2100@available(*, unavailable)
2101extension CreateMLComponents::AnyTemporalSequence : Swift::Sendable {
2102}
2103@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2104public struct AnyTemporalIterator<Element> : _Concurrency::AsyncIteratorProtocol {
2105 public func next() async throws -> Element?
2106 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
2107 @_implements(_Concurrency::AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift::Error
2108}
2109@available(*, unavailable)
2110extension CreateMLComponents::AnyTemporalIterator : Swift::Sendable {
2111}
2112@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2113public struct ModelMetadata : Swift::Hashable, Swift::Sendable {
2114 public var description: Swift::String
2115 public var version: Swift::String
2116 public var author: Swift::String
2117 public var license: Swift::String
2118 public var creatorDefined: [Swift::String : Swift::String]
2119 public init(description: Swift::String = "", version: Swift::String = "", author: Swift::String = "", license: Swift::String = "", creatorDefined: [Swift::String : Swift::String] = [:])
2120 public static func == (a: CreateMLComponents::ModelMetadata, b: CreateMLComponents::ModelMetadata) -> Swift::Bool
2121 public func hash(into hasher: inout Swift::Hasher)
2122 public var hashValue: Swift::Int {
2123 get
2124 }
2125}
2126extension CreateMLComponents::Transformer {
2127 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2128 public func export(to url: Foundation::URL) throws
2129 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2130 public func export(to url: Foundation::URL, metadata: CreateMLComponents::ModelMetadata) throws
2131}
2132extension Swift::Sequence where Self.Element : Swift::FloatingPoint {
2133 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2134 @backDeployed(before: macOS 14.0, iOS 17.0, tvOS 17.0)
2135 @inlinable internal func mean() -> Self.Element? {
… 13 unchanged lines …
1831 return sum / Element(count)
1832 }
1833}
1834extension Swift.Collection where Self.Element : Swift.FloatingPoint {
1835 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1836 @backDeployed(before: macOS 14.0, iOS 17.0, tvOS 17.0)
1837 @inlinable internal func mean() -> Self.Element {
2149 return sum / Element(count)
2150 }
2151}
2152extension Swift::Collection where Self.Element : Swift::FloatingPoint {
2153 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2154 @backDeployed(before: macOS 14.0, iOS 17.0, tvOS 17.0)
2155 @inlinable internal func mean() -> Self.Element {
… 19 unchanged lines …
1857 }
1858}
1859@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1860public struct ImputeTransformer<Element> : CreateMLComponents.Transformer, Swift.Codable where Element : Swift.Decodable, Element : Swift.Encodable {
1861 public var value: Element
1862 public init(value: Element)
1863 @inlinable public func applied(to input: Element?, eventHandler: CreateMLComponents.EventHandler? = nil) -> Element {
1864 input ?? value
1865 }
1866 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
1867 public typealias Input = Element?
1868 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
1869 public typealias Output = Element
1870 public func encode(to encoder: any Swift.Encoder) throws
1871 public init(from decoder: any Swift.Decoder) throws
1872}
1873@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1874extension CreateMLComponents.ImputeTransformer : Swift.CustomDebugStringConvertible {
1875 public var debugDescription: Swift.String {
1876 get
1877 }
1878}
1879@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1880extension CreateMLComponents.ImputeTransformer : Swift.Equatable where Element : Swift.Equatable {
1881 public static func == (a: CreateMLComponents.ImputeTransformer<Element>, b: CreateMLComponents.ImputeTransformer<Element>) -> Swift.Bool
1882}
1883@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1884extension CreateMLComponents.ImputeTransformer : Swift.Hashable where Element : Swift.Hashable {
1885 public func hash(into hasher: inout Swift.Hasher)
1886 public var hashValue: Swift.Int {
1887 get
1888 }
1889}
1890@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1891extension CreateMLComponents.ImputeTransformer : Swift.Sendable where Element : Swift.Sendable {
1892}
1893@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
1894final public class UniformRandomIntegerParameter<RandomTransformer, Parameter> : CreateMLComponents.RandomTransformer where RandomTransformer : CreateMLComponents.RandomTransformer, Parameter : Swift.FixedWidthInteger, RandomTransformer.Input == RandomTransformer.Output {
1895 final public var range: Swift.Range<Parameter>
1896 public init<Input>(range: Swift.Range<Parameter>, @CreateMLComponents.AugmentationBuilder<Input> _ augmentation: @escaping (Parameter) -> RandomTransformer) where Input == RandomTransformer.Input
1897 public init<Input>(range: Swift.ClosedRange<Parameter>, @CreateMLComponents.AugmentationBuilder<Input> _ augmentation: @escaping (Parameter) -> RandomTransformer) where Input == RandomTransformer.Input
1898 final public func applied(to input: RandomTransformer.Input, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> RandomTransformer.Output
1899 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
1900 public typealias Input = RandomTransformer.Input
1901 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
1902 public typealias Output = RandomTransformer.Input
1903 @objc deinit
1904}
1905@available(*, unavailable)
1906extension CreateMLComponents.UniformRandomIntegerParameter : Swift.Sendable {
1907}
1908extension CreateMLComponents.UpdatableTabularEstimator {
1909 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1910 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableTabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self.Transformer, Other>> where Other : CreateMLComponents.TabularTransformer
1911
1912 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
1913 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableTabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self.Transformer, Other.Transformer>> where Other : CreateMLComponents.UpdatableTabularEstimator
1914
1915}
1916@available(macOS, introduced: 13.0, deprecated: 15.0)
1917@available(iOS, introduced: 16.0, deprecated: 18.0)
1918@available(tvOS, introduced: 16.0, deprecated: 18.0)
1919@available(visionOS, introduced: 1.0, deprecated: 2.0)
1920@available(watchOS, unavailable)
1921public struct PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator> : CreateMLComponents.UpdatableTemporalEstimator where Preprocessor : CreateMLComponents.TemporalTransformer, Estimator : CreateMLComponents.UpdatableTemporalEstimator, Preprocessor.Output == Estimator.Transformer.Input {
1922 public typealias Transformer = CreateMLComponents.ComposedTemporalTransformer<Preprocessor, Estimator.Transformer>
1923 public typealias Input = Preprocessor.Input
1924 public typealias Intermediate = Preprocessor.Output
1925 public typealias Output = Estimator.Transformer.Output
1926 public var preprocessor: Preprocessor
1927 public var estimator: Estimator
1928 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
1929 @inlinable public func preprocessed<InputSequence>(from input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [CreateMLComponents.PreprocessedFeatureSequence<Preprocessor.Output>] where InputSequence : Swift.Sequence, Preprocessor.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents.TemporalSequence {
1930 var preprocessed = [PreprocessedFeatureSequence<Preprocessor.Output>]()
1931 for item in input {
1932 let transformed = try await preprocessor.applied(to: item, eventHandler: eventHandler)
2175 }
2176}
2177@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2178public struct ImputeTransformer<Element> : CreateMLComponents::Transformer, Swift::Codable where Element : Swift::Decodable, Element : Swift::Encodable {
2179 public var value: Element
2180 public init(value: Element)
2181 @inlinable public func applied(to input: Element?, eventHandler: CreateMLComponents::EventHandler? = nil) -> Element {
2182 input ?? value
2183 }
2184 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2185 public typealias Input = Element?
2186 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2187 public typealias Output = Element
2188 public func encode(to encoder: any Swift::Encoder) throws
2189 public init(from decoder: any Swift::Decoder) throws
2190}
2191@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2192extension CreateMLComponents::ImputeTransformer : Swift::CustomDebugStringConvertible {
2193 public var debugDescription: Swift::String {
2194 get
2195 }
2196}
2197@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2198extension CreateMLComponents::ImputeTransformer : Swift::Equatable where Element : Swift::Equatable {
2199 public static func == (a: CreateMLComponents::ImputeTransformer<Element>, b: CreateMLComponents::ImputeTransformer<Element>) -> Swift::Bool
2200}
2201@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2202extension CreateMLComponents::ImputeTransformer : Swift::Hashable where Element : Swift::Hashable {
2203 public func hash(into hasher: inout Swift::Hasher)
2204 public var hashValue: Swift::Int {
2205 get
2206 }
2207}
2208@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2209extension CreateMLComponents::ImputeTransformer : Swift::Sendable where Element : Swift::Sendable {
2210}
2211@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2212final public class UniformRandomIntegerParameter<RandomTransformer, Parameter> : CreateMLComponents::RandomTransformer where RandomTransformer : CreateMLComponents::RandomTransformer, Parameter : Swift::FixedWidthInteger, RandomTransformer.Input == RandomTransformer.Output {
2213 final public var range: Swift::Range<Parameter>
2214 public init<Input>(range: Swift::Range<Parameter>, @CreateMLComponents::AugmentationBuilder<Input> _ augmentation: @escaping (Parameter) -> RandomTransformer) where Input == RandomTransformer.Input
2215 public init<Input>(range: Swift::ClosedRange<Parameter>, @CreateMLComponents::AugmentationBuilder<Input> _ augmentation: @escaping (Parameter) -> RandomTransformer) where Input == RandomTransformer.Input
2216 final public func applied(to input: RandomTransformer.Input, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> RandomTransformer.Output
2217 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2218 public typealias Input = RandomTransformer.Input
2219 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2220 public typealias Output = RandomTransformer.Input
2221 @objc deinit
2222}
2223@available(*, unavailable)
2224extension CreateMLComponents::UniformRandomIntegerParameter : Swift::Sendable {
2225}
2226extension CreateMLComponents::UpdatableTabularEstimator {
2227 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2228 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableTabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self.Transformer, Other>> where Other : CreateMLComponents::TabularTransformer
2229
2230 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2231 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableTabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self.Transformer, Other.Transformer>> where Other : CreateMLComponents::UpdatableTabularEstimator
2232
2233}
2234@available(macOS, introduced: 13.0, deprecated: 15.0)
2235@available(iOS, introduced: 16.0, deprecated: 18.0)
2236@available(tvOS, introduced: 16.0, deprecated: 18.0)
2237@available(visionOS, introduced: 1.0, deprecated: 2.0)
2238@available(watchOS, unavailable)
2239public struct PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator> : CreateMLComponents::UpdatableTemporalEstimator where Preprocessor : CreateMLComponents::TemporalTransformer, Estimator : CreateMLComponents::UpdatableTemporalEstimator, Preprocessor.Output == Estimator.Transformer.Input {
2240 public typealias Transformer = CreateMLComponents::ComposedTemporalTransformer<Preprocessor, Estimator.Transformer>
2241 public typealias Input = Preprocessor.Input
2242 public typealias Intermediate = Preprocessor.Output
2243 public typealias Output = Estimator.Transformer.Output
2244 public var preprocessor: Preprocessor
2245 public var estimator: Estimator
2246 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
2247 @inlinable public func preprocessed<InputSequence>(from input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [CreateMLComponents::PreprocessedFeatureSequence<Preprocessor.Output>] where InputSequence : Swift::Sequence, Preprocessor.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents::TemporalSequence {
2248 var preprocessed = [PreprocessedFeatureSequence<Preprocessor.Output>]()
2249 for item in input {
2250 let transformed = try await preprocessor.applied(to: item, eventHandler: eventHandler)
… 2 unchanged lines …
1935 }
1936 return preprocessed
1937 }
1938 @inlinable public func fitted(toPreprocessed preprocessed: [CreateMLComponents.PreprocessedFeatureSequence<Preprocessor.Output>], eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer {
1939 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
1940 return ComposedTemporalTransformer(preprocessor, fittedTransformer)
1941 }
1942 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer where InputSequence : Swift.Sequence, Preprocessor.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents.TemporalSequence {
1943 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
1944 try Task.checkCancellation()
1945 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
1946 }
1947 @inlinable public func makeTransformer() -> CreateMLComponents.PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer {
1948 ComposedTemporalTransformer(preprocessor, estimator.makeTransformer())
1949 }
1950 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents.PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer, withPreprocessed preprocessed: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, InputSequence.Element : CreateMLComponents.TemporalSequence, Estimator.Transformer.Input == InputSequence.Element.Feature {
1951 try await estimator.update(&transformer.outer, with: preprocessed, eventHandler: eventHandler)
1952 }
1953 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents.PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, Preprocessor.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents.TemporalSequence {
1954 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
1955 try Task.checkCancellation()
1956
1957 try await estimator.update(&transformer.outer, with: preprocessed, eventHandler: eventHandler)
1958 }
1959 public func encode(_ transformer: CreateMLComponents.PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1960 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer
1961 public func encodeWithOptimizer(_ transformer: CreateMLComponents.PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1962 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.Transformer
1963}
1964@available(macOS, introduced: 13.0, deprecated: 15.0)
1965@available(iOS, introduced: 16.0, deprecated: 18.0)
1966@available(tvOS, introduced: 16.0, deprecated: 18.0)
1967@available(visionOS, introduced: 1.0, deprecated: 2.0)
1968@available(watchOS, unavailable)
1969extension CreateMLComponents.PreprocessingUpdatableTemporalEstimator : Swift.Sendable where Preprocessor : Swift.Sendable, Estimator : Swift.Sendable {
1970}
1971extension CreateMLComponents.Transformer {
1972 @available(macOS, introduced: 13.0, deprecated: 15.0)
1973 @available(iOS, introduced: 16.0, deprecated: 18.0)
1974 @available(tvOS, introduced: 16.0, deprecated: 18.0)
1975 @available(visionOS, introduced: 1.0, deprecated: 2.0)
1976 @available(watchOS, unavailable)
1977 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingUpdatableTemporalEstimator<CreateMLComponents.TransformerToTemporalAdaptor<Self>, Other> where Other : CreateMLComponents.UpdatableTemporalEstimator, Self.Output == Other.Transformer.Input
1978}
1979extension CreateMLComponents.TemporalTransformer {
1980 @available(macOS, introduced: 13.0, deprecated: 15.0)
1981 @available(iOS, introduced: 16.0, deprecated: 18.0)
1982 @available(tvOS, introduced: 16.0, deprecated: 18.0)
1983 @available(visionOS, introduced: 1.0, deprecated: 2.0)
1984 @available(watchOS, unavailable)
1985 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingUpdatableTemporalEstimator<Self, CreateMLComponents.UpdatableEstimatorToTemporalAdaptor<Other>> where Other : CreateMLComponents.UpdatableEstimator, Self.Output == Other.Transformer.Input
1986 @available(macOS, introduced: 13.0, deprecated: 15.0)
1987 @available(iOS, introduced: 16.0, deprecated: 18.0)
1988 @available(tvOS, introduced: 16.0, deprecated: 18.0)
1989 @available(visionOS, introduced: 1.0, deprecated: 2.0)
1990 @available(watchOS, unavailable)
1991 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingUpdatableTemporalEstimator<Self, Other> where Other : CreateMLComponents.UpdatableTemporalEstimator, Self.Output == Other.Transformer.Input
1992}
1993@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
1994extension CreateMLComponents.LinearTimeSeriesForecaster {
1995 public func encode(_ model: CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1996 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Transformer
1997 public func encodeWithOptimizer(_ model: CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
1998 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Transformer
1999}
2000@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2001public struct UpsampledAugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation> : _Concurrency.AsyncSequence where Base : Swift.Collection, RandomTransformer : CreateMLComponents.RandomTransformer, RandomNumberGenerator : Swift.RandomNumberGenerator, Base.Element == CreateMLComponents.AnnotatedFeature<RandomTransformer.Input, Annotation>, RandomTransformer.Input == RandomTransformer.Output {
2002 public typealias Element = Base.Element
2003 public let transformer: RandomTransformer
2004 public func makeAsyncIterator() -> CreateMLComponents.UpsampledAugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.AsyncIterator
2005 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
2006 @_implements(_Concurrency.AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift.Error
2007}
2008@available(*, unavailable)
2009extension CreateMLComponents.UpsampledAugmentationSequence : Swift.Sendable {
2010}
2011extension CreateMLComponents.UpsampledAugmentationSequence {
2012 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2013 public struct AsyncIterator : _Concurrency.AsyncIteratorProtocol {
2014 public mutating func next() async throws -> Base.Element?
2015 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
2016 public typealias Element = CreateMLComponents.AnnotatedFeature<RandomTransformer.Input, Annotation>
2017 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
2018 @_implements(_Concurrency.AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift.Error
2019 }
2020}
2021@available(*, unavailable)
2022extension CreateMLComponents.UpsampledAugmentationSequence.AsyncIterator : Swift.Sendable {
2023}
2024@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2025public struct HumanBodyPoseExtractor : CreateMLComponents.Transformer, Swift.Sendable {
2026 public init()
2027 public func applied(to image: CoreImage.CIImage, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [CreateMLComponents.Pose]
2028 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2029 public typealias Input = CoreImage.CIImage
2030 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2031 public typealias Output = [CreateMLComponents.Pose]
2032}
2033@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2034extension CreateMLComponents.HumanBodyPoseExtractor : Swift.CustomDebugStringConvertible {
2035 public var debugDescription: Swift.String {
2036 get
2037 }
2038}
2039@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2040public struct HumanHandPoseExtractor : CreateMLComponents.Transformer, Swift.Sendable {
2041 public init()
2042 public func applied(to image: CoreImage.CIImage, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [CreateMLComponents.Pose]
2043 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2044 public typealias Input = CoreImage.CIImage
2045 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2046 public typealias Output = [CreateMLComponents.Pose]
2047}
2048@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2049extension CreateMLComponents.HumanHandPoseExtractor : Swift.CustomDebugStringConvertible {
2050 public var debugDescription: Swift.String {
2051 get
2052 }
2053}
2054@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2055public struct ImageBlur : CreateMLComponents.Transformer, Swift.Sendable {
2056 public var radius: Swift.Double
2057 public init(radius: Swift.Double)
2058 public func applied(to image: CoreImage.CIImage, eventHandler: CreateMLComponents.EventHandler? = nil) -> CoreImage.CIImage
2059 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
2060 public typealias Input = CoreImage.CIImage
2061 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
2062 public typealias Output = CoreImage.CIImage
2063}
2064@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2065public struct ImageColorTransformer : CreateMLComponents.Transformer, Swift.Sendable {
2066 public var brightness: Swift.Float?
2067 public var contrast: Swift.Float?
2068 public var hue: Swift.Float?
2069 public var saturation: Swift.Float?
2070 public init(brightness: Swift.Float? = nil, contrast: Swift.Float? = nil, hue: Swift.Float? = nil, saturation: Swift.Float? = nil)
2071 public func applied(to image: CoreImage.CIImage, eventHandler: CreateMLComponents.EventHandler? = nil) -> CoreImage.CIImage
2072 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
2073 public typealias Input = CoreImage.CIImage
2074 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
2075 public typealias Output = CoreImage.CIImage
2076}
2077@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2078public struct ImageCropper : CreateMLComponents.Transformer, Swift.Sendable {
2079 public var cropRectangle: CoreFoundation.CGRect
2080 public init(cropRectangle: CoreFoundation.CGRect)
2081 public func applied(to image: CoreImage.CIImage, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CoreImage.CIImage
2082 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2083 public typealias Input = CoreImage.CIImage
2084 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2085 public typealias Output = CoreImage.CIImage
2086}
2087@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2088extension CreateMLComponents.ImageCropper : Swift.CustomDebugStringConvertible {
2089 public var debugDescription: Swift.String {
2090 get
2091 }
2092}
2093@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2094extension CreateMLComponents.ImageCropper : Swift.Codable {
2095 public init(from decoder: any Swift.Decoder) throws
2096 public func encode(to encoder: any Swift.Encoder) throws
2097}
2098@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2099public struct ImageExposureAdjuster : CreateMLComponents.Transformer, Swift.Sendable {
2100 public var amount: Swift.Double
2101 public init(amount: Swift.Double)
2102 public func applied(to image: CoreImage.CIImage, eventHandler: CreateMLComponents.EventHandler? = nil) -> CoreImage.CIImage
2103 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
2104 public typealias Input = CoreImage.CIImage
2105 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
2106 public typealias Output = CoreImage.CIImage
2107}
2108@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2109public protocol ImageFeatureExtractor : CreateMLComponents.Transformer where Self.Input == CoreImage.CIImage, Self.Output == CoreML.MLShapedArray<Swift.Float> {
2110}
2111@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2112public struct ImageFeaturePrint : CreateMLComponents.ImageFeatureExtractor {
2113 public let cropAndScale: Vision.VNImageCropAndScaleOption
2114 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2115 public static let latestRevision: Swift.Int
2116 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2117 public var revision: Swift.Int {
2118 get
2119 set
2120 }
2121 public init(cropAndScale: Vision.VNImageCropAndScaleOption = .centerCrop, context: CoreImage.CIContext = CIContext())
2122 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2123 public init(revision: Swift.Int, cropAndScale: Vision.VNImageCropAndScaleOption = .centerCrop, context: CoreImage.CIContext = CIContext())
2124 public func applied(to image: CoreImage.CIImage, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CoreML.MLShapedArray<Swift.Float>
2125 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2126 public typealias Input = CoreImage.CIImage
2127 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2128 public typealias Output = CoreML.MLShapedArray<Swift.Float>
2129}
2130@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2131extension CreateMLComponents.ImageFeaturePrint : Swift.CustomDebugStringConvertible {
2132 public var debugDescription: Swift.String {
2133 get
2134 }
2135}
2136@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2137extension CreateMLComponents.ImageFeaturePrint : Swift.Codable {
2138 public init(from decoder: any Swift.Decoder) throws
2139 public func encode(to encoder: any Swift.Encoder) throws
2140}
2141@available(*, unavailable)
2142extension CreateMLComponents.ImageFeaturePrint : Swift.Sendable {
2143}
2144@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2145public struct ImageFlipper : CreateMLComponents.Transformer, Swift.Sendable {
2146 public var orientation: CreateMLComponents.ImageFlipper.Orientation
2147 public init(orientation: CreateMLComponents.ImageFlipper.Orientation)
2148 public func applied(to image: CoreImage.CIImage, eventHandler: CreateMLComponents.EventHandler? = nil) -> CoreImage.CIImage
2149 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
2150 public typealias Input = CoreImage.CIImage
2151 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
2152 public typealias Output = CoreImage.CIImage
2153}
2154@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2155extension CreateMLComponents.ImageFlipper {
2156 public enum Orientation : Swift.Hashable, Swift.Sendable {
2157 case horizontal
2158 case vertical
2159 public static func == (a: CreateMLComponents.ImageFlipper.Orientation, b: CreateMLComponents.ImageFlipper.Orientation) -> Swift.Bool
2160 public func hash(into hasher: inout Swift.Hasher)
2161 public var hashValue: Swift.Int {
2162 get
2163 }
2164 }
2165}
2166@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2167public struct ImageReader : CreateMLComponents.Transformer, Swift.Sendable {
2168 public init()
2169 public func applied(to url: Foundation.URL, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CoreImage.CIImage
2170 public static func read(url: Foundation.URL) throws -> CoreImage.CIImage
2171 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2172 public typealias Input = Foundation.URL
2173 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2174 public typealias Output = CoreImage.CIImage
2175}
2176@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2177extension CreateMLComponents.ImageReader : Swift.CustomDebugStringConvertible {
2178 public var debugDescription: Swift.String {
2179 get
2180 }
2181}
2182@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2183public struct ImageRotator : CreateMLComponents.Transformer, Swift.Sendable {
2184 public var angle: Swift.Double
2185 public init(angle: Swift.Double)
2186 public func applied(to image: CoreImage.CIImage, eventHandler: CreateMLComponents.EventHandler? = nil) -> CoreImage.CIImage
2187 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
2188 public typealias Input = CoreImage.CIImage
2189 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
2190 public typealias Output = CoreImage.CIImage
2191}
2192@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2193public struct ImageScaler : CreateMLComponents.Transformer, Swift.Sendable {
2194 public var targetSize: CoreFoundation.CGSize {
2195 get
2196 set
2197 }
2198 public init(targetSize: CoreFoundation.CGSize)
2199 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2200 public init(targetWidth: Swift.Double)
2201 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2202 public init(targetHeight: Swift.Double)
2203 public func applied(to image: CoreImage.CIImage, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CoreImage.CIImage
2204 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2205 public typealias Input = CoreImage.CIImage
2206 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2207 public typealias Output = CoreImage.CIImage
2208}
2209@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2210extension CreateMLComponents.ImageScaler : Swift.CustomDebugStringConvertible {
2211 public var debugDescription: Swift.String {
2212 get
2213 }
2214}
2215@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2216extension CreateMLComponents.ImageScaler : Swift.Codable {
2217 public init(from decoder: any Swift.Decoder) throws
2218 public func encode(to encoder: any Swift.Encoder) throws
2219}
2220@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2221public struct JointKey : Swift.Hashable, Swift.RawRepresentable, Swift.Sendable {
2222 public var rawValue: Swift.String
2223 public init(rawValue: Swift.String)
2224 public static let leftEar: CreateMLComponents.JointKey
2225 public static let leftEye: CreateMLComponents.JointKey
2226 public static let rightEar: CreateMLComponents.JointKey
2227 public static let rightEye: CreateMLComponents.JointKey
2228 public static let neck: CreateMLComponents.JointKey
2229 public static let nose: CreateMLComponents.JointKey
2230 public static let leftShoulder: CreateMLComponents.JointKey
2231 public static let leftElbow: CreateMLComponents.JointKey
2232 public static let leftWrist: CreateMLComponents.JointKey
2233 public static let rightShoulder: CreateMLComponents.JointKey
2234 public static let rightElbow: CreateMLComponents.JointKey
2235 public static let rightWrist: CreateMLComponents.JointKey
2236 public static let root: CreateMLComponents.JointKey
2237 public static let leftHip: CreateMLComponents.JointKey
2238 public static let leftKnee: CreateMLComponents.JointKey
2239 public static let leftAnkle: CreateMLComponents.JointKey
2240 public static let rightHip: CreateMLComponents.JointKey
2241 public static let rightKnee: CreateMLComponents.JointKey
2242 public static let rightAnkle: CreateMLComponents.JointKey
2243 public static let thumbTip: CreateMLComponents.JointKey
2244 public static let thumbIP: CreateMLComponents.JointKey
2245 public static let thumbMP: CreateMLComponents.JointKey
2246 public static let thumbCMC: CreateMLComponents.JointKey
2247 public static let indexTip: CreateMLComponents.JointKey
2248 public static let indexDIP: CreateMLComponents.JointKey
2249 public static let indexPIP: CreateMLComponents.JointKey
2250 public static let indexMCP: CreateMLComponents.JointKey
2251 public static let middleTip: CreateMLComponents.JointKey
2252 public static let middleDIP: CreateMLComponents.JointKey
2253 public static let middlePIP: CreateMLComponents.JointKey
2254 public static let middleMCP: CreateMLComponents.JointKey
2255 public static let ringTip: CreateMLComponents.JointKey
2256 public static let ringDIP: CreateMLComponents.JointKey
2257 public static let ringPIP: CreateMLComponents.JointKey
2258 public static let ringMCP: CreateMLComponents.JointKey
2259 public static let littleTip: CreateMLComponents.JointKey
2260 public static let littleDIP: CreateMLComponents.JointKey
2261 public static let littlePIP: CreateMLComponents.JointKey
2262 public static let littleMCP: CreateMLComponents.JointKey
2263 public static let wrist: CreateMLComponents.JointKey
2264 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2265 public typealias RawValue = Swift.String
2266}
2267@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2268extension CreateMLComponents.JointKey : Swift.CustomDebugStringConvertible {
2269 public var debugDescription: Swift.String {
2270 get
2271 }
2272}
2273@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2274public struct JointPoint : Swift.Sendable {
2275 public let key: CreateMLComponents.JointKey
2276 public var location: CoreFoundation.CGPoint
2277 public var confidence: Swift.Float
2278 public init(_ key: CreateMLComponents.JointKey, location: CoreFoundation.CGPoint, confidence: Swift.Float)
2279}
2280@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2281public struct Pose : Swift.Sendable {
2282 public init(_ observation: Vision.VNRecognizedPointsObservation) throws
2283 public init(from points: [CreateMLComponents.JointKey : CreateMLComponents.JointPoint])
2284 public var keypoints: [CreateMLComponents.JointKey : CreateMLComponents.JointPoint]
2285 public func boundingBoxArea(confidenceThreshold: Swift.Float = 0.2) -> Swift.Float
2286}
2287@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2288extension CreateMLComponents.JointPoint : Swift.Equatable {
2289 public static func == (a: CreateMLComponents.JointPoint, b: CreateMLComponents.JointPoint) -> Swift.Bool
2290}
2291@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2292extension CreateMLComponents.Pose : Swift.Equatable {
2293 public static func == (a: CreateMLComponents.Pose, b: CreateMLComponents.Pose) -> Swift.Bool
2294}
2295@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2296public struct MLModelImageFeatureExtractor : CreateMLComponents.ImageFeatureExtractor {
2297 public let model: CoreML.MLModel
2298 public let inputName: Swift.String
2299 public let outputName: Swift.String
2300 public init(model: CoreML.MLModel, inputName: Swift.String = "image", outputName: Swift.String, context: CoreImage.CIContext = CIContext()) throws
2301 public init(contentsOf url: Foundation.URL, configuration: CoreML.MLModelConfiguration, inputName: Swift.String = "image", outputName: Swift.String, context: CoreImage.CIContext = CIContext()) async throws
2302 public func applied(to input: CoreImage.CIImage, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CoreML.MLShapedArray<Swift.Float>
2303 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2304 public typealias Input = CoreImage.CIImage
2305 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2306 public typealias Output = CoreML.MLShapedArray<Swift.Float>
2307}
2308extension CreateMLComponents.MLModelImageFeatureExtractor {
2309 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2310 public enum Error : Swift.Error, Swift.Equatable, Swift.CustomDebugStringConvertible {
2311 case invalidInput(Swift.String)
2312 case invalidOutput(Swift.String)
2313 public var debugDescription: Swift.String {
2314 get
2315 }
2316 public static func == (a: CreateMLComponents.MLModelImageFeatureExtractor.Error, b: CreateMLComponents.MLModelImageFeatureExtractor.Error) -> Swift.Bool
2317 }
2318}
2319@available(*, unavailable)
2320extension CreateMLComponents.MLModelImageFeatureExtractor : Swift.Sendable {
2321}
2322@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2323extension CreateMLComponents.Pose : Swift.Encodable {
2324 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2325 public func encode(to encoder: any Swift.Encoder) throws
2326}
2327@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2328extension CreateMLComponents.Pose : Swift.Decodable {
2329 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2330 public init(from decoder: any Swift.Decoder) throws
2331}
2332@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2333public struct RandomImageNoiseGenerator : CreateMLComponents.Transformer, Swift.Sendable {
2334 public var intensity: Swift.Double
2335 public init(intensity: Swift.Double)
2336 public func applied(to image: CoreImage.CIImage, eventHandler: CreateMLComponents.EventHandler? = nil) -> CoreImage.CIImage
2337 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
2338 public typealias Input = CoreImage.CIImage
2339 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
2340 public typealias Output = CoreImage.CIImage
2341}
2342@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2343public struct AnnotatedFiles : Swift.Collection {
2344 public typealias Element = CreateMLComponents.AnnotatedFeature<Foundation.URL, Swift.String>
2345 public typealias Index = Swift.Array<CreateMLComponents.AnnotatedFiles.Element>.Index
2346 public var startIndex: CreateMLComponents.AnnotatedFiles.Index {
2347 get
2348 }
2349 public var endIndex: CreateMLComponents.AnnotatedFiles.Index {
2350 get
2351 }
2352 public subscript(index: CreateMLComponents.AnnotatedFiles.Index) -> Swift.IndexingIterator<CreateMLComponents.AnnotatedFiles>.Element {
2353 get
2354 }
2355 public func index(after i: CreateMLComponents.AnnotatedFiles.Index) -> CreateMLComponents.AnnotatedFiles.Index
2356 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2357 public typealias Indices = Swift.DefaultIndices<CreateMLComponents.AnnotatedFiles>
2358 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2359 public typealias Iterator = Swift.IndexingIterator<CreateMLComponents.AnnotatedFiles>
2360 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2361 public typealias SubSequence = Swift.Slice<CreateMLComponents.AnnotatedFiles>
2362}
2363@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2364extension CreateMLComponents.AnnotatedFiles {
2365 public init(labeledByNamesAt url: Foundation.URL, separator: Swift.Character = ".", index: Swift.Int = 0, type: UniformTypeIdentifiers.UTType, continueOnFailure: Swift.Bool = false) throws
2366 public init(labeledBySubdirectoryNamesAt url: Foundation.URL, type: UniformTypeIdentifiers.UTType, continueOnFailure: Swift.Bool = false) throws
2367}
2368@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2369extension CreateMLComponents.AnnotatedFiles : Swift.Encodable {
2370 public func encode(to encoder: any Swift.Encoder) throws
2371}
2372@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2373extension CreateMLComponents.AnnotatedFiles : Swift.Decodable {
2374 public init(from decoder: any Swift.Decoder) throws
2375}
2376@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2377extension CreateMLComponents.AnnotatedFiles : Swift.Equatable {
2378 public static func == (a: CreateMLComponents.AnnotatedFiles, b: CreateMLComponents.AnnotatedFiles) -> Swift.Bool
2379}
2380@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2381extension CreateMLComponents.AnnotatedFiles : Swift.Hashable {
2382 public func hash(into hasher: inout Swift.Hasher)
2383 public var hashValue: Swift.Int {
2384 get
2385 }
2386}
2387@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2388extension CreateMLComponents.AnnotatedFiles : Swift.Sendable {
2389}
2390@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2391public struct PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator> : CreateMLComponents.UpdatableTabularEstimator where Preprocessor : CreateMLComponents.TabularTransformer, Estimator : CreateMLComponents.UpdatableTabularEstimator {
2392 public typealias Transformer = CreateMLComponents.ComposedTabularTransformer<Preprocessor, Estimator.Transformer>
2393 public typealias Input = Preprocessor.Input
2394 public typealias Intermediate = Preprocessor.Output
2395 public typealias Output = Estimator.Transformer.Output
2396 public var preprocessor: Preprocessor
2397 public var estimator: Estimator
2398 public init(_ inner: Preprocessor, _ outer: Estimator)
2399 @inlinable public func makeTransformer() -> CreateMLComponents.PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer {
2400 ComposedTabularTransformer(preprocessor, estimator.makeTransformer())
2401 }
2402 @inlinable public func preprocessed(from input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> TabularData.DataFrame {
2403 try await preprocessor.applied(to: input, eventHandler: eventHandler)
2404 }
2405 @inlinable public func fitted(toPreprocessed preprocessed: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer {
2406 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
2407 return ComposedTabularTransformer(preprocessor, fittedTransformer)
2408 }
2409 @inlinable public func fitted(to input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer {
2410 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
2411 try Task.checkCancellation()
2412 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
2413 }
2414 @inlinable public func update(_ transformer: inout CreateMLComponents.PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer, withPreprocessed preprocessed: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws {
2415 try await estimator.update(&transformer.outer, with: preprocessed, eventHandler: eventHandler)
2416 }
2417 @inlinable public func update(_ transformer: inout CreateMLComponents.PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer, with input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws {
2418 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
2419 try Task.checkCancellation()
2420
2421 try await estimator.update(&transformer.outer, with: preprocessed, eventHandler: eventHandler)
2422 }
2423 public func encode(_ transformer: CreateMLComponents.PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
2424 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer
2425 public func encodeWithOptimizer(_ transformer: CreateMLComponents.PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
2426 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.Transformer
2427}
2428@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2429extension CreateMLComponents.PreprocessingUpdatableTabularEstimator : Swift.Sendable where Preprocessor : Swift.Sendable, Estimator : Swift.Sendable {
2430}
2431extension CreateMLComponents.TabularTransformer {
2432 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2433 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingUpdatableTabularEstimator<Self, Other> where Other : CreateMLComponents.UpdatableTabularEstimator
2434}
2435@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2436public typealias EventHandler = @Sendable (CreateMLComponents.Event) -> Swift.Void
2437@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2438public struct Event : Swift.Sendable {
2439 public var origin: Swift.String
2440 public var itemCount: Swift.Int
2441 public var totalItemCount: Swift.Int?
2442 public var metrics: [CreateMLComponents.MetricsKey : any Swift.Sendable]
2443 public init(origin: Swift.String, itemCount: Swift.Int, totalItemCount: Swift.Int? = nil, metrics: [CreateMLComponents.MetricsKey : any Swift.Sendable])
2444}
2445@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2446extension CreateMLComponents.Event : Swift.CustomDebugStringConvertible {
2447 public var debugDescription: Swift.String {
2448 get
2449 }
2450}
2451@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2452public struct MetricsKey : Swift.Hashable, Swift.RawRepresentable, Swift.Sendable {
2453 public var rawValue: Swift.String
2454 public init(rawValue: Swift.String)
2455 public static let source: CreateMLComponents.MetricsKey
2456 public static let trainingAccuracy: CreateMLComponents.MetricsKey
2457 public static let validationAccuracy: CreateMLComponents.MetricsKey
2458 public static let trainingLoss: CreateMLComponents.MetricsKey
2459 public static let validationLoss: CreateMLComponents.MetricsKey
2460 public static let trainingMaximumError: CreateMLComponents.MetricsKey
2461 public static let validationMaximumError: CreateMLComponents.MetricsKey
2462 public static let trainingError: CreateMLComponents.MetricsKey
2463 public static let validationError: CreateMLComponents.MetricsKey
2464 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2465 public static let trainingMeanAveragePrecision: CreateMLComponents.MetricsKey
2466 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2467 public static let validationMeanAveragePrecision: CreateMLComponents.MetricsKey
2468 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2469 public typealias RawValue = Swift.String
2470}
2471@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2472extension CreateMLComponents.MetricsKey : Swift.CustomDebugStringConvertible {
2473 public var debugDescription: Swift.String {
2474 get
2475 }
2476}
2477extension CreateMLComponents.MultivariateLinearRegressor {
2478 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
2479 public typealias Configuration = CreateMLComponents.MultivariateLinearRegressorConfiguration
2480}
2481@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
2482public struct MultivariateLinearRegressorConfiguration : Swift.Hashable, Swift.Codable, Swift.Sendable {
2483 public var batchSize: Swift.Int
2484 public var maximumIterationCount: Swift.Int
2485 public var earlyStoppingTolerance: Swift.Float
2486 public var earlyStoppingIterationCount: Swift.Int
2487 public var learningRate: Swift.Float
2488 public var randomSeed: Swift.Int?
2489 public init()
2490 public static func == (a: CreateMLComponents.MultivariateLinearRegressorConfiguration, b: CreateMLComponents.MultivariateLinearRegressorConfiguration) -> Swift.Bool
2491 public func encode(to encoder: any Swift.Encoder) throws
2492 public func hash(into hasher: inout Swift.Hasher)
2493 public var hashValue: Swift.Int {
2494 get
2495 }
2496 public init(from decoder: any Swift.Decoder) throws
2497}
2498@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2499public enum PoseSelectionStrategy : Swift.Sendable {
2500 case maximumBoundingBoxArea
2501 case highestJointLocation
2502 case lowestJointLocation
2503 case leftmostJointLocation
2504 case rightmostJointLocation
2505 public static func == (a: CreateMLComponents.PoseSelectionStrategy, b: CreateMLComponents.PoseSelectionStrategy) -> Swift.Bool
2506 public func hash(into hasher: inout Swift.Hasher)
2507 public var hashValue: Swift.Int {
2508 get
2509 }
2510}
2511@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2512public struct PoseSelector : CreateMLComponents.Transformer, Swift.Sendable {
2513 public var strategy: CreateMLComponents.PoseSelectionStrategy
2514 public var confidenceThreshold: Swift.Float
2515 public init(strategy: CreateMLComponents.PoseSelectionStrategy, confidenceThreshold: Swift.Float)
2516 public init(strategy: CreateMLComponents.PoseSelectionStrategy)
2517 public init()
2518 public func applied(to input: [CreateMLComponents.Pose], eventHandler: CreateMLComponents.EventHandler? = nil) -> CreateMLComponents.Pose
2519 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2520 public typealias Input = [CreateMLComponents.Pose]
2521 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2522 public typealias Output = CreateMLComponents.Pose
2523}
2524@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2525extension CreateMLComponents.PoseSelector : Swift.CustomDebugStringConvertible {
2526 public var debugDescription: Swift.String {
2527 get
2528 }
2529}
2530@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2531public struct AnnotatedFeatureProvider<Base, UnwrappedInput> : CreateMLComponents.SupervisedTabularEstimator where Base : CreateMLComponents.SupervisedEstimator, Base.Transformer.Input == UnwrappedInput? {
2532 public typealias Transformer = CreateMLComponents.ColumnSelectorTransformer<Base.Transformer, UnwrappedInput>
2533 public typealias Annotation = Base.Annotation
2534 public var base: Base
2535 public var annotationColumnID: TabularData.ColumnID<CreateMLComponents.AnnotatedFeatureProvider<Base, UnwrappedInput>.Annotation>
2536 public var featuresColumnName: Swift.String
2537 public var resultsColumnName: Swift.String
2538 public init(_ base: Base, annotationsColumnName: Swift.String = "targets", featuresColumnName: Swift.String = "features", resultsColumnName: Swift.String = "results")
2539 public func fitted(to input: TabularData.DataFrame, validateOn validation: TabularData.DataFrame? = nil, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.ColumnSelectorTransformer<Base.Transformer, UnwrappedInput>
2540 public func encode(_ transformer: CreateMLComponents.AnnotatedFeatureProvider<Base, UnwrappedInput>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
2541 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.AnnotatedFeatureProvider<Base, UnwrappedInput>.Transformer
2542}
2543@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2544extension CreateMLComponents.AnnotatedFeatureProvider : CreateMLComponents.UpdatableSupervisedTabularEstimator where Base : CreateMLComponents.UpdatableSupervisedEstimator {
2545 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2546 public func makeTransformer() -> CreateMLComponents.AnnotatedFeatureProvider<Base, UnwrappedInput>.Transformer
2547 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2548 public func update(_ transformer: inout CreateMLComponents.AnnotatedFeatureProvider<Base, UnwrappedInput>.Transformer, with input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws
2549 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2550 public func encodeWithOptimizer(_ transformer: CreateMLComponents.AnnotatedFeatureProvider<Base, UnwrappedInput>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
2551 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2552 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.AnnotatedFeatureProvider<Base, UnwrappedInput>.Transformer
2553}
2554@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2555extension CreateMLComponents.AnnotatedFeatureProvider : Swift.Sendable where Base : Swift.Sendable {
2556}
2557@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2558extension CreateMLComponents.FullyConnectedNetworkRegressor {
2559 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.FullyConnectedNetworkRegressorModel<Scalar>
2560 public func encodeWithOptimizer(_ transformer: CreateMLComponents.FullyConnectedNetworkRegressor<Scalar>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
2561 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.FullyConnectedNetworkRegressor<Scalar>.Transformer
2562}
2563@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2564public struct SlidingWindowTransformer<Input> : CreateMLComponents.TemporalTransformer, Swift.Codable, Swift.Sendable where Input : Swift.Sendable {
2565 public typealias Input = Input
2566 public typealias Output = [Input]
2567 public let stride: Swift.Int
2568 public let length: Swift.Int
2569 public init(stride: Swift.Int, length: Swift.Int)
2570 public func applied<S>(to input: S, eventHandler: CreateMLComponents.EventHandler?) throws -> CreateMLComponents.SlidingWindowTransformer<Input>.WindowSequence where Input == S.Feature, S : CreateMLComponents.TemporalSequence
2571 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2572 public typealias OutputSequence = CreateMLComponents.SlidingWindowTransformer<Input>.WindowSequence
2573 public func encode(to encoder: any Swift.Encoder) throws
2574 public init(from decoder: any Swift.Decoder) throws
2575}
2576@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2577extension CreateMLComponents.SlidingWindowTransformer {
2578 public struct WindowSequence : CreateMLComponents.TemporalSequence {
2579 public typealias Feature = [Input]
2580 public typealias AsyncIterator = CreateMLComponents.SlidingWindowTransformer<Input>.WindowSequence.Iterator
2581 public var count: Swift.Int? {
2582 get
2583 }
2584 public func makeAsyncIterator() -> CreateMLComponents.SlidingWindowTransformer<Input>.WindowSequence.Iterator
2585 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2586 public typealias Element = CreateMLComponents.TemporalFeature<CreateMLComponents.SlidingWindowTransformer<Input>.WindowSequence.Feature>
2587 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
2588 @_implements(_Concurrency.AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift.Error
2589 }
2590}
2591@available(*, unavailable)
2592extension CreateMLComponents.SlidingWindowTransformer.WindowSequence : Swift.Sendable {
2593}
2594@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2595extension CreateMLComponents.SlidingWindowTransformer.WindowSequence {
2596 public struct Iterator : _Concurrency.AsyncIteratorProtocol {
2597 public mutating func next() async throws -> CreateMLComponents.TemporalFeature<CreateMLComponents.SlidingWindowTransformer<Input>.Output>?
2598 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2599 public typealias Element = CreateMLComponents.TemporalFeature<CreateMLComponents.SlidingWindowTransformer<Input>.Output>
2600 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
2601 @_implements(_Concurrency.AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift.Error
2602 }
2603}
2604@available(*, unavailable)
2605extension CreateMLComponents.SlidingWindowTransformer.WindowSequence.Iterator : Swift.Sendable {
2606}
2607extension CreateMLComponents.Estimator {
2608 @available(macOS, introduced: 13.0, deprecated: 15.0)
2609 @available(iOS, introduced: 16.0, deprecated: 18.0)
2610 @available(tvOS, introduced: 16.0, deprecated: 18.0)
2611 @available(visionOS, introduced: 1.0, deprecated: 2.0)
2612 @available(watchOS, unavailable)
2613 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents.SupervisedTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
2614
2615}
2616extension CreateMLComponents.SupervisedEstimator {
2617 @available(macOS, introduced: 13.0, deprecated: 15.0)
2618 @available(iOS, introduced: 16.0, deprecated: 18.0)
2619 @available(tvOS, introduced: 16.0, deprecated: 18.0)
2620 @available(visionOS, introduced: 1.0, deprecated: 2.0)
2621 @available(watchOS, unavailable)
2622 @preconcurrency public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TransformerToTemporalAdaptor<Self.Transformer>, Other>, Self.Annotation> where Other : CreateMLComponents.TemporalTransformer, Self.Annotation : Swift.Sendable, Other.Input == Self.Transformer.Output
2623
2624 @available(macOS, introduced: 13.0, deprecated: 15.0)
2625 @available(iOS, introduced: 16.0, deprecated: 18.0)
2626 @available(tvOS, introduced: 16.0, deprecated: 18.0)
2627 @available(visionOS, introduced: 1.0, deprecated: 2.0)
2628 @available(watchOS, unavailable)
2629 @preconcurrency public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.TemporalEstimator, Self.Annotation : Swift.Sendable, Self.Transformer.Output == Other.Transformer.Input
2630
2631 @available(macOS, introduced: 13.0, deprecated: 15.0)
2632 @available(iOS, introduced: 16.0, deprecated: 18.0)
2633 @available(tvOS, introduced: 16.0, deprecated: 18.0)
2634 @available(visionOS, introduced: 1.0, deprecated: 2.0)
2635 @available(watchOS, unavailable)
2636 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.SupervisedTemporalEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
2637
2638}
2639@available(macOS, introduced: 13.0, deprecated: 15.0)
2640@available(iOS, introduced: 16.0, deprecated: 18.0)
2641@available(tvOS, introduced: 16.0, deprecated: 18.0)
2642@available(visionOS, introduced: 1.0, deprecated: 2.0)
2643@available(watchOS, unavailable)
2644extension CreateMLComponents.TemporalEstimator {
2645 @preconcurrency public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, CreateMLComponents.TransformerToTemporalAdaptor<Other.Transformer>>, Other.Annotation> where Other : CreateMLComponents.SupervisedEstimator, Other.Annotation : Swift.Sendable, Self.Transformer.Output == Other.Transformer.Input
2646
2647 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents.SupervisedTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
2648
2649}
2650@available(macOS, introduced: 13.0, deprecated: 15.0)
2651@available(iOS, introduced: 16.0, deprecated: 18.0)
2652@available(tvOS, introduced: 16.0, deprecated: 18.0)
2653@available(visionOS, introduced: 1.0, deprecated: 2.0)
2654@available(watchOS, unavailable)
2655extension CreateMLComponents.SupervisedTemporalEstimator {
2656 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, CreateMLComponents.TransformerToTemporalAdaptor<Other>>, Self.Annotation> where Other : CreateMLComponents.Transformer, Other.Input == Self.Transformer.Output
2657
2658 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, CreateMLComponents.TransformerToTemporalAdaptor<Other.Transformer>>, Self.Annotation> where Other : CreateMLComponents.Estimator, Self.Transformer.Output == Other.Transformer.Input
2659
2660 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, CreateMLComponents.TransformerToTemporalAdaptor<Other.Transformer>>, Self.Annotation> where Other : CreateMLComponents.SupervisedEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
2661
2662 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, Other>, Self.Annotation> where Other : CreateMLComponents.TemporalTransformer, Other.Input == Self.Transformer.Output
2663
2664 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.TemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
2665
2666 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.SupervisedTemporalEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
2667
2668}
2669@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2670public enum ConcatenationError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
2671 case nonUniformShapes(columnName: Swift.String)
2672 case mismatchedShapes
2673 public var errorDescription: Swift.String? {
2674 get
2675 }
2676 public static func == (a: CreateMLComponents.ConcatenationError, b: CreateMLComponents.ConcatenationError) -> Swift.Bool
2677}
2678@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2679extension CreateMLComponents.ConcatenationError : Swift.CustomDebugStringConvertible {
2680 public var debugDescription: Swift.String {
2681 get
2682 }
2683}
2684@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2685public enum SerializationError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
2686 case packageAlreadyExists(Foundation.URL)
2687 case packageNotFound(Foundation.URL)
2688 case notRepresentableAsCoreML(debugDescription: Swift.String)
2689 public var errorDescription: Swift.String? {
2690 get
2691 }
2692 public static func == (a: CreateMLComponents.SerializationError, b: CreateMLComponents.SerializationError) -> Swift.Bool
2693}
2694@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2695extension CreateMLComponents.SerializationError : Swift.CustomDebugStringConvertible {
2696 public var debugDescription: Swift.String {
2697 get
2698 }
2699}
2700@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2701public enum AudioReaderError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
2702 case microphoneAuthorizationDenied
2703 case microphoneAuthorizationRestricted
2704 case sourceDeviceNotAvailable
2705 public var errorDescription: Swift.String? {
2706 get
2707 }
2708 public static func == (a: CreateMLComponents.AudioReaderError, b: CreateMLComponents.AudioReaderError) -> Swift.Bool
2709 public func hash(into hasher: inout Swift.Hasher)
2710 public var hashValue: Swift.Int {
2711 get
2712 }
2713}
2714@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2715extension CreateMLComponents.AudioReaderError : Swift.CustomDebugStringConvertible {
2716 public var debugDescription: Swift.String {
2717 get
2718 }
2719}
2720@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2721extension CreateMLComponents.TabularEstimator {
2722 public func write(_ transformer: Self.Transformer, to url: Foundation.URL, overwrite: Swift.Bool = true) throws
2723 public func read(from url: Foundation.URL) throws -> Self.Transformer
2724}
2725@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2726extension CreateMLComponents.SupervisedTabularEstimator {
2727 public func write(_ transformer: Self.Transformer, to url: Foundation.URL, overwrite: Swift.Bool = true) throws
2728 public func read(from url: Foundation.URL) throws -> Self.Transformer
2729}
2730@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2731extension CreateMLComponents.UpdatableSupervisedTabularEstimator {
2732 public func writeWithOptimizer(_ transformer: Self.Transformer, to url: Foundation.URL, overwrite: Swift.Bool = true) throws
2733 public func readWithOptimizer(from url: Foundation.URL) throws -> Self.Transformer
2734}
2735@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2736public protocol TemporalSequence<Feature> : _Concurrency.AsyncSequence {
2737 associatedtype Feature where Self.Element == CreateMLComponents.TemporalFeature<Self.Feature>
2738 var count: Swift.Int? { get }
2739}
2740@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2741public struct TemporalFeature<Feature> : Swift.Identifiable {
2742 public var id: CreateMLComponents.TemporalSegmentIdentifier
2743 public var feature: Feature
2744 public init(id: CreateMLComponents.TemporalSegmentIdentifier, feature: Feature)
2745 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2746 public typealias ID = CreateMLComponents.TemporalSegmentIdentifier
2747}
2748@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2749extension CreateMLComponents.TemporalFeature : Swift.Equatable where Feature : Swift.Equatable {
2750 public static func == (a: CreateMLComponents.TemporalFeature<Feature>, b: CreateMLComponents.TemporalFeature<Feature>) -> Swift.Bool
2751}
2752@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2753extension CreateMLComponents.TemporalFeature : Swift.Hashable where Feature : Swift.Hashable {
2754 public func hash(into hasher: inout Swift.Hasher)
2755 public var hashValue: Swift.Int {
2756 get
2757 }
2758}
2759@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2760extension CreateMLComponents.TemporalFeature : Swift.Encodable where Feature : Swift.Encodable {
2761 public func encode(to encoder: any Swift.Encoder) throws
2762}
2763@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2764extension CreateMLComponents.TemporalFeature : Swift.Decodable where Feature : Swift.Decodable {
2765 public init(from decoder: any Swift.Decoder) throws
2766}
2767@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2768extension CreateMLComponents.TemporalFeature : Swift.Sendable where Feature : Swift.Sendable {
2769}
2770@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2771public struct LinearRegressorModel<Scalar> : CreateMLComponents.Regressor where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint {
2772 public typealias Input = CoreML.MLShapedArray<Scalar>
2773 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2774 public var featureCount: Swift.Int {
2775 get
2776 }
2777 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2253 }
2254 return preprocessed
2255 }
2256 @inlinable public func fitted(toPreprocessed preprocessed: [CreateMLComponents::PreprocessedFeatureSequence<Preprocessor.Output>], eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
2257 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
2258 return ComposedTemporalTransformer(preprocessor, fittedTransformer)
2259 }
2260 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, Preprocessor.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents::TemporalSequence {
2261 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
2262 try Task.checkCancellation()
2263 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
2264 }
2265 @inlinable public func makeTransformer() -> CreateMLComponents::PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
2266 ComposedTemporalTransformer(preprocessor, estimator.makeTransformer())
2267 }
2268 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents::PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, withPreprocessed preprocessed: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, InputSequence.Element : CreateMLComponents::TemporalSequence, Estimator.Transformer.Input == InputSequence.Element.Feature {
2269 try await estimator.update(&transformer.outer, with: preprocessed, eventHandler: eventHandler)
2270 }
2271 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents::PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, Preprocessor.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents::TemporalSequence {
2272 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
2273 try Task.checkCancellation()
2274
2275 try await estimator.update(&transformer.outer, with: preprocessed, eventHandler: eventHandler)
2276 }
2277 public func encode(_ transformer: CreateMLComponents::PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
2278 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
2279 public func encodeWithOptimizer(_ transformer: CreateMLComponents::PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
2280 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingUpdatableTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
2281}
2282@available(macOS, introduced: 13.0, deprecated: 15.0)
2283@available(iOS, introduced: 16.0, deprecated: 18.0)
2284@available(tvOS, introduced: 16.0, deprecated: 18.0)
2285@available(visionOS, introduced: 1.0, deprecated: 2.0)
2286@available(watchOS, unavailable)
2287extension CreateMLComponents::PreprocessingUpdatableTemporalEstimator : Swift::Sendable where Preprocessor : Swift::Sendable, Estimator : Swift::Sendable {
2288}
2289extension CreateMLComponents::Transformer {
2290 @available(macOS, introduced: 13.0, deprecated: 15.0)
2291 @available(iOS, introduced: 16.0, deprecated: 18.0)
2292 @available(tvOS, introduced: 16.0, deprecated: 18.0)
2293 @available(visionOS, introduced: 1.0, deprecated: 2.0)
2294 @available(watchOS, unavailable)
2295 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingUpdatableTemporalEstimator<CreateMLComponents::TransformerToTemporalAdaptor<Self>, Other> where Other : CreateMLComponents::UpdatableTemporalEstimator, Self.Output == Other.Transformer.Input
2296}
2297extension CreateMLComponents::TemporalTransformer {
2298 @available(macOS, introduced: 13.0, deprecated: 15.0)
2299 @available(iOS, introduced: 16.0, deprecated: 18.0)
2300 @available(tvOS, introduced: 16.0, deprecated: 18.0)
2301 @available(visionOS, introduced: 1.0, deprecated: 2.0)
2302 @available(watchOS, unavailable)
2303 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingUpdatableTemporalEstimator<Self, CreateMLComponents::UpdatableEstimatorToTemporalAdaptor<Other>> where Other : CreateMLComponents::UpdatableEstimator, Self.Output == Other.Transformer.Input
2304 @available(macOS, introduced: 13.0, deprecated: 15.0)
2305 @available(iOS, introduced: 16.0, deprecated: 18.0)
2306 @available(tvOS, introduced: 16.0, deprecated: 18.0)
2307 @available(visionOS, introduced: 1.0, deprecated: 2.0)
2308 @available(watchOS, unavailable)
2309 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingUpdatableTemporalEstimator<Self, Other> where Other : CreateMLComponents::UpdatableTemporalEstimator, Self.Output == Other.Transformer.Input
2310}
2311@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
2312extension CreateMLComponents::LinearTimeSeriesForecaster {
2313 public func encode(_ model: CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
2314 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Transformer
2315 public func encodeWithOptimizer(_ model: CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
2316 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Transformer
2317}
2318@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2319public struct UpsampledAugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation> : _Concurrency::AsyncSequence where Base : Swift::Collection, RandomTransformer : CreateMLComponents::RandomTransformer, RandomNumberGenerator : Swift::RandomNumberGenerator, Base.Element == CreateMLComponents::AnnotatedFeature<RandomTransformer.Input, Annotation>, RandomTransformer.Input == RandomTransformer.Output {
2320 public typealias Element = Base.Element
2321 public let transformer: RandomTransformer
2322 public func makeAsyncIterator() -> CreateMLComponents::UpsampledAugmentationSequence<Base, RandomTransformer, RandomNumberGenerator, Annotation>.CreateMLComponents::AsyncIterator
2323 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
2324 @_implements(_Concurrency::AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift::Error
2325}
2326@available(*, unavailable)
2327extension CreateMLComponents::UpsampledAugmentationSequence : Swift::Sendable {
2328}
2329extension CreateMLComponents::UpsampledAugmentationSequence {
2330 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2331 public struct AsyncIterator : _Concurrency::AsyncIteratorProtocol {
2332 public mutating func next() async throws -> Base.Element?
2333 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2334 public typealias Element = CreateMLComponents::AnnotatedFeature<RandomTransformer.Input, Annotation>
2335 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
2336 @_implements(_Concurrency::AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift::Error
2337 }
2338}
2339@available(*, unavailable)
2340extension CreateMLComponents::UpsampledAugmentationSequence.CreateMLComponents::AsyncIterator : Swift::Sendable {
2341}
2342@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2343public struct AnnotatedFiles : Swift::Collection {
2344 public typealias Element = CreateMLComponents::AnnotatedFeature<Foundation::URL, Swift::String>
2345 public typealias Index = Swift::Array<CreateMLComponents::AnnotatedFiles.CreateMLComponents::Element>.Swift::Index
2346 public var startIndex: CreateMLComponents::AnnotatedFiles.CreateMLComponents::Index {
2347 get
2348 }
2349 public var endIndex: CreateMLComponents::AnnotatedFiles.CreateMLComponents::Index {
2350 get
2351 }
2352 public subscript(index: CreateMLComponents::AnnotatedFiles.CreateMLComponents::Index) -> Swift::IndexingIterator<CreateMLComponents::AnnotatedFiles>.Swift::Element {
2353 get
2354 }
2355 public func index(after i: CreateMLComponents::AnnotatedFiles.CreateMLComponents::Index) -> CreateMLComponents::AnnotatedFiles.CreateMLComponents::Index
2356 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2357 public typealias Indices = Swift::DefaultIndices<CreateMLComponents::AnnotatedFiles>
2358 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2359 public typealias Iterator = Swift::IndexingIterator<CreateMLComponents::AnnotatedFiles>
2360 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2361 public typealias SubSequence = Swift::Slice<CreateMLComponents::AnnotatedFiles>
2362}
2363@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2364extension CreateMLComponents::AnnotatedFiles {
2365 public init(labeledByNamesAt url: Foundation::URL, separator: Swift::Character = ".", index: Swift::Int = 0, type: UniformTypeIdentifiers::UTType, continueOnFailure: Swift::Bool = false) throws
2366 public init(labeledBySubdirectoryNamesAt url: Foundation::URL, type: UniformTypeIdentifiers::UTType, continueOnFailure: Swift::Bool = false) throws
2367}
2368@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2369extension CreateMLComponents::AnnotatedFiles : Swift::Encodable {
2370 public func encode(to encoder: any Swift::Encoder) throws
2371}
2372@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2373extension CreateMLComponents::AnnotatedFiles : Swift::Decodable {
2374 public init(from decoder: any Swift::Decoder) throws
2375}
2376@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2377extension CreateMLComponents::AnnotatedFiles : Swift::Equatable {
2378 public static func == (a: CreateMLComponents::AnnotatedFiles, b: CreateMLComponents::AnnotatedFiles) -> Swift::Bool
2379}
2380@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2381extension CreateMLComponents::AnnotatedFiles : Swift::Hashable {
2382 public func hash(into hasher: inout Swift::Hasher)
2383 public var hashValue: Swift::Int {
2384 get
2385 }
2386}
2387@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2388extension CreateMLComponents::AnnotatedFiles : Swift::Sendable {
2389}
2390@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2391public struct PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator> : CreateMLComponents::UpdatableTabularEstimator where Preprocessor : CreateMLComponents::TabularTransformer, Estimator : CreateMLComponents::UpdatableTabularEstimator {
2392 public typealias Transformer = CreateMLComponents::ComposedTabularTransformer<Preprocessor, Estimator.Transformer>
2393 public typealias Input = Preprocessor.Input
2394 public typealias Intermediate = Preprocessor.Output
2395 public typealias Output = Estimator.Transformer.Output
2396 public var preprocessor: Preprocessor
2397 public var estimator: Estimator
2398 public init(_ inner: Preprocessor, _ outer: Estimator)
2399 @inlinable public func makeTransformer() -> CreateMLComponents::PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
2400 ComposedTabularTransformer(preprocessor, estimator.makeTransformer())
2401 }
2402 @inlinable public func preprocessed(from input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> TabularData::DataFrame {
2403 try await preprocessor.applied(to: input, eventHandler: eventHandler)
2404 }
2405 @inlinable public func fitted(toPreprocessed preprocessed: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
2406 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
2407 return ComposedTabularTransformer(preprocessor, fittedTransformer)
2408 }
2409 @inlinable public func fitted(to input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
2410 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
2411 try Task.checkCancellation()
2412 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
2413 }
2414 @inlinable public func update(_ transformer: inout CreateMLComponents::PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, withPreprocessed preprocessed: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws {
2415 try await estimator.update(&transformer.outer, with: preprocessed, eventHandler: eventHandler)
2416 }
2417 @inlinable public func update(_ transformer: inout CreateMLComponents::PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, with input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws {
2418 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
2419 try Task.checkCancellation()
2420
2421 try await estimator.update(&transformer.outer, with: preprocessed, eventHandler: eventHandler)
2422 }
2423 public func encode(_ transformer: CreateMLComponents::PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
2424 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
2425 public func encodeWithOptimizer(_ transformer: CreateMLComponents::PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
2426 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingUpdatableTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
2427}
2428@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2429extension CreateMLComponents::PreprocessingUpdatableTabularEstimator : Swift::Sendable where Preprocessor : Swift::Sendable, Estimator : Swift::Sendable {
2430}
2431extension CreateMLComponents::TabularTransformer {
2432 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2433 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingUpdatableTabularEstimator<Self, Other> where Other : CreateMLComponents::UpdatableTabularEstimator
2434}
2435@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2436public typealias EventHandler = @Sendable (CreateMLComponents::Event) -> Swift::Void
2437@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2438public struct Event : Swift::Sendable {
2439 public var origin: Swift::String
2440 public var itemCount: Swift::Int
2441 public var totalItemCount: Swift::Int?
2442 public var metrics: [CreateMLComponents::MetricsKey : any Swift::Sendable]
2443 public init(origin: Swift::String, itemCount: Swift::Int, totalItemCount: Swift::Int? = nil, metrics: [CreateMLComponents::MetricsKey : any Swift::Sendable])
2444}
2445@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2446extension CreateMLComponents::Event : Swift::CustomDebugStringConvertible {
2447 public var debugDescription: Swift::String {
2448 get
2449 }
2450}
2451@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2452public struct MetricsKey : Swift::Hashable, Swift::RawRepresentable, Swift::Sendable {
2453 public var rawValue: Swift::String
2454 public init(rawValue: Swift::String)
2455 public static let source: CreateMLComponents::MetricsKey
2456 public static let trainingAccuracy: CreateMLComponents::MetricsKey
2457 public static let validationAccuracy: CreateMLComponents::MetricsKey
2458 public static let trainingLoss: CreateMLComponents::MetricsKey
2459 public static let validationLoss: CreateMLComponents::MetricsKey
2460 public static let trainingMaximumError: CreateMLComponents::MetricsKey
2461 public static let validationMaximumError: CreateMLComponents::MetricsKey
2462 public static let trainingError: CreateMLComponents::MetricsKey
2463 public static let validationError: CreateMLComponents::MetricsKey
2464 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2465 public static let trainingMeanAveragePrecision: CreateMLComponents::MetricsKey
2466 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2467 public static let validationMeanAveragePrecision: CreateMLComponents::MetricsKey
2468 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2469 public typealias RawValue = Swift::String
2470}
2471@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2472extension CreateMLComponents::MetricsKey : Swift::CustomDebugStringConvertible {
2473 public var debugDescription: Swift::String {
2474 get
2475 }
2476}
2477extension CreateMLComponents::MultivariateLinearRegressor {
2478 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
2479 public typealias Configuration = CreateMLComponents::MultivariateLinearRegressorConfiguration
2480}
2481@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
2482public struct MultivariateLinearRegressorConfiguration : Swift::Hashable, Swift::Codable, Swift::Sendable {
2483 public var batchSize: Swift::Int
2484 public var maximumIterationCount: Swift::Int
2485 public var earlyStoppingTolerance: Swift::Float
2486 public var earlyStoppingIterationCount: Swift::Int
2487 public var learningRate: Swift::Float
2488 public var randomSeed: Swift::Int?
2489 public init()
2490 public static func == (a: CreateMLComponents::MultivariateLinearRegressorConfiguration, b: CreateMLComponents::MultivariateLinearRegressorConfiguration) -> Swift::Bool
2491 public func encode(to encoder: any Swift::Encoder) throws
2492 public func hash(into hasher: inout Swift::Hasher)
2493 public var hashValue: Swift::Int {
2494 get
2495 }
2496 public init(from decoder: any Swift::Decoder) throws
2497}
2498@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2499public enum PoseSelectionStrategy : Swift::Sendable {
2500 case maximumBoundingBoxArea
2501 case highestJointLocation
2502 case lowestJointLocation
2503 case leftmostJointLocation
2504 case rightmostJointLocation
2505 public static func == (a: CreateMLComponents::PoseSelectionStrategy, b: CreateMLComponents::PoseSelectionStrategy) -> Swift::Bool
2506 public func hash(into hasher: inout Swift::Hasher)
2507 public var hashValue: Swift::Int {
2508 get
2509 }
2510}
2511@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2512public struct PoseSelector : CreateMLComponents::Transformer, Swift::Sendable {
2513 public var strategy: CreateMLComponents::PoseSelectionStrategy
2514 public var confidenceThreshold: Swift::Float
2515 public init(strategy: CreateMLComponents::PoseSelectionStrategy, confidenceThreshold: Swift::Float)
2516 public init(strategy: CreateMLComponents::PoseSelectionStrategy)
2517 public init()
2518 public func applied(to input: [CreateMLComponents::Pose], eventHandler: CreateMLComponents::EventHandler? = nil) -> CreateMLComponents::Pose
2519 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2520 public typealias Input = [CreateMLComponents::Pose]
2521 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2522 public typealias Output = CreateMLComponents::Pose
2523}
2524@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2525extension CreateMLComponents::PoseSelector : Swift::CustomDebugStringConvertible {
2526 public var debugDescription: Swift::String {
2527 get
2528 }
2529}
2530@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2531public struct AnnotatedFeatureProvider<Base, UnwrappedInput> : CreateMLComponents::SupervisedTabularEstimator where Base : CreateMLComponents::SupervisedEstimator, Base.Transformer.Input == UnwrappedInput? {
2532 public typealias Transformer = CreateMLComponents::ColumnSelectorTransformer<Base.Transformer, UnwrappedInput>
2533 public typealias Annotation = Base.Annotation
2534 public var base: Base
2535 public var annotationColumnID: TabularData::ColumnID<CreateMLComponents::AnnotatedFeatureProvider<Base, UnwrappedInput>.CreateMLComponents::Annotation>
2536 public var featuresColumnName: Swift::String
2537 public var resultsColumnName: Swift::String
2538 public init(_ base: Base, annotationsColumnName: Swift::String = "targets", featuresColumnName: Swift::String = "features", resultsColumnName: Swift::String = "results")
2539 public func fitted(to input: TabularData::DataFrame, validateOn validation: TabularData::DataFrame? = nil, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::ColumnSelectorTransformer<Base.Transformer, UnwrappedInput>
2540 public func encode(_ transformer: CreateMLComponents::AnnotatedFeatureProvider<Base, UnwrappedInput>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
2541 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::AnnotatedFeatureProvider<Base, UnwrappedInput>.CreateMLComponents::Transformer
2542}
2543@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2544extension CreateMLComponents::AnnotatedFeatureProvider : CreateMLComponents::UpdatableSupervisedTabularEstimator where Base : CreateMLComponents::UpdatableSupervisedEstimator {
2545 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2546 public func makeTransformer() -> CreateMLComponents::AnnotatedFeatureProvider<Base, UnwrappedInput>.CreateMLComponents::Transformer
2547 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2548 public func update(_ transformer: inout CreateMLComponents::AnnotatedFeatureProvider<Base, UnwrappedInput>.CreateMLComponents::Transformer, with input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws
2549 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2550 public func encodeWithOptimizer(_ transformer: CreateMLComponents::AnnotatedFeatureProvider<Base, UnwrappedInput>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
2551 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2552 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::AnnotatedFeatureProvider<Base, UnwrappedInput>.CreateMLComponents::Transformer
2553}
2554@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2555extension CreateMLComponents::AnnotatedFeatureProvider : Swift::Sendable where Base : Swift::Sendable {
2556}
2557@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2558extension CreateMLComponents::FullyConnectedNetworkRegressor {
2559 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::FullyConnectedNetworkRegressorModel<Scalar>
2560 public func encodeWithOptimizer(_ transformer: CreateMLComponents::FullyConnectedNetworkRegressor<Scalar>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
2561 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::FullyConnectedNetworkRegressor<Scalar>.CreateMLComponents::Transformer
2562}
2563@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2564public struct SlidingWindowTransformer<Input> : CreateMLComponents::TemporalTransformer, Swift::Codable, Swift::Sendable where Input : Swift::Sendable {
2565 public typealias Input = Input
2566 public typealias Output = [Input]
2567 public let stride: Swift::Int
2568 public let length: Swift::Int
2569 public init(stride: Swift::Int, length: Swift::Int)
2570 public func applied<S>(to input: S, eventHandler: CreateMLComponents::EventHandler?) throws -> CreateMLComponents::SlidingWindowTransformer<Input>.CreateMLComponents::WindowSequence where Input == S.Feature, S : CreateMLComponents::TemporalSequence
2571 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2572 public typealias OutputSequence = CreateMLComponents::SlidingWindowTransformer<Input>.CreateMLComponents::WindowSequence
2573 public func encode(to encoder: any Swift::Encoder) throws
2574 public init(from decoder: any Swift::Decoder) throws
2575}
2576@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2577extension CreateMLComponents::SlidingWindowTransformer {
2578 public struct WindowSequence : CreateMLComponents::TemporalSequence {
2579 public typealias Feature = [Input]
2580 public typealias AsyncIterator = CreateMLComponents::SlidingWindowTransformer<Input>.CreateMLComponents::WindowSequence.CreateMLComponents::Iterator
2581 public var count: Swift::Int? {
2582 get
2583 }
2584 public func makeAsyncIterator() -> CreateMLComponents::SlidingWindowTransformer<Input>.CreateMLComponents::WindowSequence.CreateMLComponents::Iterator
2585 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2586 public typealias Element = CreateMLComponents::TemporalFeature<CreateMLComponents::SlidingWindowTransformer<Input>.CreateMLComponents::WindowSequence.CreateMLComponents::Feature>
2587 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
2588 @_implements(_Concurrency::AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift::Error
2589 }
2590}
2591@available(*, unavailable)
2592extension CreateMLComponents::SlidingWindowTransformer.CreateMLComponents::WindowSequence : Swift::Sendable {
2593}
2594@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2595extension CreateMLComponents::SlidingWindowTransformer.CreateMLComponents::WindowSequence {
2596 public struct Iterator : _Concurrency::AsyncIteratorProtocol {
2597 public mutating func next() async throws -> CreateMLComponents::TemporalFeature<CreateMLComponents::SlidingWindowTransformer<Input>.CreateMLComponents::Output>?
2598 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2599 public typealias Element = CreateMLComponents::TemporalFeature<CreateMLComponents::SlidingWindowTransformer<Input>.CreateMLComponents::Output>
2600 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
2601 @_implements(_Concurrency::AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift::Error
2602 }
2603}
2604@available(*, unavailable)
2605extension CreateMLComponents::SlidingWindowTransformer.CreateMLComponents::WindowSequence.CreateMLComponents::Iterator : Swift::Sendable {
2606}
2607extension CreateMLComponents::Estimator {
2608 @available(macOS, introduced: 13.0, deprecated: 15.0)
2609 @available(iOS, introduced: 16.0, deprecated: 18.0)
2610 @available(tvOS, introduced: 16.0, deprecated: 18.0)
2611 @available(visionOS, introduced: 1.0, deprecated: 2.0)
2612 @available(watchOS, unavailable)
2613 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents::SupervisedTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
2614
2615}
2616extension CreateMLComponents::SupervisedEstimator {
2617 @available(macOS, introduced: 13.0, deprecated: 15.0)
2618 @available(iOS, introduced: 16.0, deprecated: 18.0)
2619 @available(tvOS, introduced: 16.0, deprecated: 18.0)
2620 @available(visionOS, introduced: 1.0, deprecated: 2.0)
2621 @available(watchOS, unavailable)
2622 @preconcurrency public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TransformerToTemporalAdaptor<Self.Transformer>, Other>, Self.Annotation> where Other : CreateMLComponents::TemporalTransformer, Self.Annotation : Swift::Sendable, Other.Input == Self.Transformer.Output
2623
2624 @available(macOS, introduced: 13.0, deprecated: 15.0)
2625 @available(iOS, introduced: 16.0, deprecated: 18.0)
2626 @available(tvOS, introduced: 16.0, deprecated: 18.0)
2627 @available(visionOS, introduced: 1.0, deprecated: 2.0)
2628 @available(watchOS, unavailable)
2629 @preconcurrency public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::TemporalEstimator, Self.Annotation : Swift::Sendable, Self.Transformer.Output == Other.Transformer.Input
2630
2631 @available(macOS, introduced: 13.0, deprecated: 15.0)
2632 @available(iOS, introduced: 16.0, deprecated: 18.0)
2633 @available(tvOS, introduced: 16.0, deprecated: 18.0)
2634 @available(visionOS, introduced: 1.0, deprecated: 2.0)
2635 @available(watchOS, unavailable)
2636 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::SupervisedTemporalEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
2637
2638}
2639@available(macOS, introduced: 13.0, deprecated: 15.0)
2640@available(iOS, introduced: 16.0, deprecated: 18.0)
2641@available(tvOS, introduced: 16.0, deprecated: 18.0)
2642@available(visionOS, introduced: 1.0, deprecated: 2.0)
2643@available(watchOS, unavailable)
2644extension CreateMLComponents::TemporalEstimator {
2645 @preconcurrency public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, CreateMLComponents::TransformerToTemporalAdaptor<Other.Transformer>>, Other.Annotation> where Other : CreateMLComponents::SupervisedEstimator, Other.Annotation : Swift::Sendable, Self.Transformer.Output == Other.Transformer.Input
2646
2647 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents::SupervisedTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
2648
2649}
2650@available(macOS, introduced: 13.0, deprecated: 15.0)
2651@available(iOS, introduced: 16.0, deprecated: 18.0)
2652@available(tvOS, introduced: 16.0, deprecated: 18.0)
2653@available(visionOS, introduced: 1.0, deprecated: 2.0)
2654@available(watchOS, unavailable)
2655extension CreateMLComponents::SupervisedTemporalEstimator {
2656 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, CreateMLComponents::TransformerToTemporalAdaptor<Other>>, Self.Annotation> where Other : CreateMLComponents::Transformer, Other.Input == Self.Transformer.Output
2657
2658 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, CreateMLComponents::TransformerToTemporalAdaptor<Other.Transformer>>, Self.Annotation> where Other : CreateMLComponents::Estimator, Self.Transformer.Output == Other.Transformer.Input
2659
2660 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, CreateMLComponents::TransformerToTemporalAdaptor<Other.Transformer>>, Self.Annotation> where Other : CreateMLComponents::SupervisedEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
2661
2662 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, Other>, Self.Annotation> where Other : CreateMLComponents::TemporalTransformer, Other.Input == Self.Transformer.Output
2663
2664 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::TemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
2665
2666 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::SupervisedTemporalEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
2667
2668}
2669@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2670public enum ConcatenationError : Foundation::LocalizedError, Swift::Equatable, Swift::Sendable {
2671 case nonUniformShapes(columnName: Swift::String)
2672 case mismatchedShapes
2673 public var errorDescription: Swift::String? {
2674 get
2675 }
2676 public static func == (a: CreateMLComponents::ConcatenationError, b: CreateMLComponents::ConcatenationError) -> Swift::Bool
2677}
2678@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2679extension CreateMLComponents::ConcatenationError : Swift::CustomDebugStringConvertible {
2680 public var debugDescription: Swift::String {
2681 get
2682 }
2683}
2684@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2685public enum SerializationError : Foundation::LocalizedError, Swift::Equatable, Swift::Sendable {
2686 case packageAlreadyExists(Foundation::URL)
2687 case packageNotFound(Foundation::URL)
2688 case notRepresentableAsCoreML(debugDescription: Swift::String)
2689 public var errorDescription: Swift::String? {
2690 get
2691 }
2692 public static func == (a: CreateMLComponents::SerializationError, b: CreateMLComponents::SerializationError) -> Swift::Bool
2693}
2694@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2695extension CreateMLComponents::SerializationError : Swift::CustomDebugStringConvertible {
2696 public var debugDescription: Swift::String {
2697 get
2698 }
2699}
2700@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2701public enum AudioReaderError : Foundation::LocalizedError, Swift::Equatable, Swift::Sendable {
2702 case microphoneAuthorizationDenied
2703 case microphoneAuthorizationRestricted
2704 case sourceDeviceNotAvailable
2705 public var errorDescription: Swift::String? {
2706 get
2707 }
2708 public static func == (a: CreateMLComponents::AudioReaderError, b: CreateMLComponents::AudioReaderError) -> Swift::Bool
2709 public func hash(into hasher: inout Swift::Hasher)
2710 public var hashValue: Swift::Int {
2711 get
2712 }
2713}
2714@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2715extension CreateMLComponents::AudioReaderError : Swift::CustomDebugStringConvertible {
2716 public var debugDescription: Swift::String {
2717 get
2718 }
2719}
2720@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2721extension CreateMLComponents::TabularEstimator {
2722 public func write(_ transformer: Self.Transformer, to url: Foundation::URL, overwrite: Swift::Bool = true) throws
2723 public func read(from url: Foundation::URL) throws -> Self.Transformer
2724}
2725@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2726extension CreateMLComponents::SupervisedTabularEstimator {
2727 public func write(_ transformer: Self.Transformer, to url: Foundation::URL, overwrite: Swift::Bool = true) throws
2728 public func read(from url: Foundation::URL) throws -> Self.Transformer
2729}
2730@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2731extension CreateMLComponents::UpdatableSupervisedTabularEstimator {
2732 public func writeWithOptimizer(_ transformer: Self.Transformer, to url: Foundation::URL, overwrite: Swift::Bool = true) throws
2733 public func readWithOptimizer(from url: Foundation::URL) throws -> Self.Transformer
2734}
2735@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2736public protocol TemporalSequence<Feature> : _Concurrency::AsyncSequence {
2737 associatedtype Feature where Self.Element == CreateMLComponents::TemporalFeature<Self.Feature>
2738 var count: Swift::Int? { get }
2739}
2740@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2741public struct TemporalFeature<Feature> : Swift::Identifiable {
2742 public var id: CreateMLComponents::TemporalSegmentIdentifier
2743 public var feature: Feature
2744 public init(id: CreateMLComponents::TemporalSegmentIdentifier, feature: Feature)
2745 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2746 public typealias ID = CreateMLComponents::TemporalSegmentIdentifier
2747}
2748@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2749extension CreateMLComponents::TemporalFeature : Swift::Equatable where Feature : Swift::Equatable {
2750 public static func == (a: CreateMLComponents::TemporalFeature<Feature>, b: CreateMLComponents::TemporalFeature<Feature>) -> Swift::Bool
2751}
2752@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2753extension CreateMLComponents::TemporalFeature : Swift::Hashable where Feature : Swift::Hashable {
2754 public func hash(into hasher: inout Swift::Hasher)
2755 public var hashValue: Swift::Int {
2756 get
2757 }
2758}
2759@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2760extension CreateMLComponents::TemporalFeature : Swift::Encodable where Feature : Swift::Encodable {
2761 public func encode(to encoder: any Swift::Encoder) throws
2762}
2763@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2764extension CreateMLComponents::TemporalFeature : Swift::Decodable where Feature : Swift::Decodable {
2765 public init(from decoder: any Swift::Decoder) throws
2766}
2767@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2768extension CreateMLComponents::TemporalFeature : Swift::Sendable where Feature : Swift::Sendable {
2769}
2770@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2771public struct LinearRegressorModel<Scalar> : CreateMLComponents::Regressor where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint {
2772 public typealias Input = CoreML::MLShapedArray<Scalar>
2773 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2774 public var featureCount: Swift::Int {
2775 get
2776 }
2777 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
… 2 unchanged lines …
2780 }
2781 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2782 public init(coefficients: some Sequence<Scalar>)
2783 public func applied(to input: CoreML.MLShapedArray<Scalar>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Scalar
2784 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2785 public typealias Output = Scalar
2786}
2787@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2788extension CreateMLComponents.LinearRegressorModel : Swift.Sendable where Scalar : Swift.Sendable {
2789}
2790extension CreateMLComponents.Transformer {
2791 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2792 public func adaptedAsAnnotatedPredictionTransformer<Annotation>(annotationType: Annotation.Type = Annotation.self) -> some CreateMLComponents.Transformer<CreateMLComponents.AnnotatedPrediction<Self.Input, Annotation>, CreateMLComponents.AnnotatedPrediction<Self.Output, Annotation>>
2793
2794}
2795extension CreateMLComponents.MultiLabelClassificationMetrics {
2796 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2797 public enum ThresholdSelectionStrategy : Swift.Hashable, Swift.Equatable {
2798 case balancedPrecisionAndRecall
2799 case precision(Swift.Float, minimumRecall: Swift.Float)
2800 case recall(Swift.Float, minimumPrecision: Swift.Float)
2801 case fixed([Label : Swift.Float])
2802 public static func == (a: CreateMLComponents.MultiLabelClassificationMetrics<Label>.ThresholdSelectionStrategy, b: CreateMLComponents.MultiLabelClassificationMetrics<Label>.ThresholdSelectionStrategy) -> Swift.Bool
2803 public func hash(into hasher: inout Swift.Hasher)
2804 public var hashValue: Swift.Int {
2805 get
2806 }
2807 }
2808}
2809@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2810extension CreateMLComponents.MultiLabelClassificationMetrics.ThresholdSelectionStrategy : Swift.Encodable where Label : Swift.Encodable {
2811 public func encode(to encoder: any Swift.Encoder) throws
2812}
2813@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2814extension CreateMLComponents.MultiLabelClassificationMetrics.ThresholdSelectionStrategy : Swift.Decodable where Label : Swift.Decodable {
2815 public init(from decoder: any Swift.Decoder) throws
2816}
2817@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2818extension CreateMLComponents.MultiLabelClassificationMetrics.ThresholdSelectionStrategy : Swift.Sendable where Label : Swift.Sendable {
2819}
2820@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2821public struct ClassificationDistribution<Label> : Swift.Collection where Label : Swift.Hashable {
2822 public var mostLikelyLabel: Label? {
2823 get
2824 }
2825 public var labelsSortedByProbability: [Label] {
2826 get
2827 }
2828 public var startIndex: Swift.Int {
2829 get
2830 }
2831 public var endIndex: Swift.Int {
2832 get
2833 }
2834 public init<C>(_ classifications: C) where C : Swift.Collection, C.Element == CreateMLComponents.Classification<Label>
2835 public func topLabels(_ amount: Swift.Int) -> [Label]
2836 public subscript(index: Swift.Int) -> CreateMLComponents.Classification<Label> {
2837 get
2838 }
2839 public subscript(label: Label) -> Swift.Float? {
2840 get
2841 }
2842 public subscript(bounds: Swift.Range<Swift.Int>) -> Swift.Slice<CreateMLComponents.ClassificationDistribution<Label>> {
2843 get
2844 }
2845 public func index(after i: Swift.Int) -> Swift.Int
2846 public func index(before i: Swift.Int) -> Swift.Int
2847 public func map<T>(_ transform: (CreateMLComponents.Classification<Label>) throws -> CreateMLComponents.Classification<T>) rethrows -> CreateMLComponents.ClassificationDistribution<T> where T : Swift.Hashable
2848 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2849 public typealias Element = CreateMLComponents.Classification<Label>
2850 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2851 public typealias Index = Swift.Int
2852 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2853 public typealias Indices = Swift.DefaultIndices<CreateMLComponents.ClassificationDistribution<Label>>
2854 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2855 public typealias Iterator = Swift.IndexingIterator<CreateMLComponents.ClassificationDistribution<Label>>
2856 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
2857 public typealias SubSequence = Swift.Slice<CreateMLComponents.ClassificationDistribution<Label>>
2858}
2859@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2860extension CreateMLComponents.ClassificationDistribution : Swift.Equatable {
2861 public static func == (a: CreateMLComponents.ClassificationDistribution<Label>, b: CreateMLComponents.ClassificationDistribution<Label>) -> Swift.Bool
2862}
2863@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2864extension CreateMLComponents.ClassificationDistribution : Swift.Hashable {
2865 public func hash(into hasher: inout Swift.Hasher)
2866 public var hashValue: Swift.Int {
2867 get
2868 }
2869}
2870@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2871extension CreateMLComponents.ClassificationDistribution : Swift.Codable where Label : Swift.Decodable, Label : Swift.Encodable {
2872 public func encode(to encoder: any Swift.Encoder) throws
2873 public init(from decoder: any Swift.Decoder) throws
2874}
2875@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2876extension CreateMLComponents.ClassificationDistribution : Swift.Sendable where Label : Swift.Sendable {
2877}
2878extension Swift.Sequence {
2879 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2880 @inlinable public func mapFeatures<Input, Output, Annotation>(_ transform: (Input) throws -> Output) rethrows -> [CreateMLComponents.AnnotatedFeature<Output, Annotation>] where Self.Element == CreateMLComponents.AnnotatedFeature<Input, Annotation> {
2881 try map {
2882 try AnnotatedFeature(feature: transform($0.feature), annotation: $0.annotation)
2883 }
2884 }
2885 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2886 @inlinable public func mapFeatures<Input, Output, Annotation>(_ transform: (Input) async throws -> Output) async rethrows -> [CreateMLComponents.AnnotatedFeature<Output, Annotation>] where Self.Element == CreateMLComponents.AnnotatedFeature<Input, Annotation> {
2887 var result = [AnnotatedFeature<Output, Annotation>]()
2888 for value in self {
2889 let transformed = try await transform(value.feature)
2780 }
2781 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2782 public init(coefficients: some Sequence<Scalar>)
2783 public func applied(to input: CoreML::MLShapedArray<Scalar>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Scalar
2784 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2785 public typealias Output = Scalar
2786}
2787@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2788extension CreateMLComponents::LinearRegressorModel : Swift::Sendable where Scalar : Swift::Sendable {
2789}
2790extension CreateMLComponents::Transformer {
2791 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2792 public func adaptedAsAnnotatedPredictionTransformer<Annotation>(annotationType: Annotation.Type = Annotation.self) -> some CreateMLComponents::Transformer<CreateMLComponents::AnnotatedPrediction<Self.Input, Annotation>, CreateMLComponents::AnnotatedPrediction<Self.Output, Annotation>>
2793
2794}
2795extension CreateMLComponents::MultiLabelClassificationMetrics {
2796 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2797 public enum ThresholdSelectionStrategy : Swift::Hashable, Swift::Equatable {
2798 case balancedPrecisionAndRecall
2799 case precision(Swift::Float, minimumRecall: Swift::Float)
2800 case recall(Swift::Float, minimumPrecision: Swift::Float)
2801 case fixed([Label : Swift::Float])
2802 public static func == (a: CreateMLComponents::MultiLabelClassificationMetrics<Label>.CreateMLComponents::ThresholdSelectionStrategy, b: CreateMLComponents::MultiLabelClassificationMetrics<Label>.CreateMLComponents::ThresholdSelectionStrategy) -> Swift::Bool
2803 public func hash(into hasher: inout Swift::Hasher)
2804 public var hashValue: Swift::Int {
2805 get
2806 }
2807 }
2808}
2809@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2810extension CreateMLComponents::MultiLabelClassificationMetrics.CreateMLComponents::ThresholdSelectionStrategy : Swift::Encodable where Label : Swift::Encodable {
2811 public func encode(to encoder: any Swift::Encoder) throws
2812}
2813@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2814extension CreateMLComponents::MultiLabelClassificationMetrics.CreateMLComponents::ThresholdSelectionStrategy : Swift::Decodable where Label : Swift::Decodable {
2815 public init(from decoder: any Swift::Decoder) throws
2816}
2817@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2818extension CreateMLComponents::MultiLabelClassificationMetrics.CreateMLComponents::ThresholdSelectionStrategy : Swift::Sendable where Label : Swift::Sendable {
2819}
2820@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2821public struct ClassificationDistribution<Label> : Swift::Collection where Label : Swift::Hashable {
2822 public var mostLikelyLabel: Label? {
2823 get
2824 }
2825 public var labelsSortedByProbability: [Label] {
2826 get
2827 }
2828 public var startIndex: Swift::Int {
2829 get
2830 }
2831 public var endIndex: Swift::Int {
2832 get
2833 }
2834 public init<C>(_ classifications: C) where C : Swift::Collection, C.Element == CreateMLComponents::Classification<Label>
2835 public func topLabels(_ amount: Swift::Int) -> [Label]
2836 public subscript(index: Swift::Int) -> CreateMLComponents::Classification<Label> {
2837 get
2838 }
2839 public subscript(label: Label) -> Swift::Float? {
2840 get
2841 }
2842 public subscript(bounds: Swift::Range<Swift::Int>) -> Swift::Slice<CreateMLComponents::ClassificationDistribution<Label>> {
2843 get
2844 }
2845 public func index(after i: Swift::Int) -> Swift::Int
2846 public func index(before i: Swift::Int) -> Swift::Int
2847 public func map<T>(_ transform: (CreateMLComponents::Classification<Label>) throws -> CreateMLComponents::Classification<T>) rethrows -> CreateMLComponents::ClassificationDistribution<T> where T : Swift::Hashable
2848 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2849 public typealias Element = CreateMLComponents::Classification<Label>
2850 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2851 public typealias Index = Swift::Int
2852 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2853 public typealias Indices = Swift::DefaultIndices<CreateMLComponents::ClassificationDistribution<Label>>
2854 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2855 public typealias Iterator = Swift::IndexingIterator<CreateMLComponents::ClassificationDistribution<Label>>
2856 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2857 public typealias SubSequence = Swift::Slice<CreateMLComponents::ClassificationDistribution<Label>>
2858}
2859@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2860extension CreateMLComponents::ClassificationDistribution : Swift::Equatable {
2861 public static func == (a: CreateMLComponents::ClassificationDistribution<Label>, b: CreateMLComponents::ClassificationDistribution<Label>) -> Swift::Bool
2862}
2863@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2864extension CreateMLComponents::ClassificationDistribution : Swift::Hashable {
2865 public func hash(into hasher: inout Swift::Hasher)
2866 public var hashValue: Swift::Int {
2867 get
2868 }
2869}
2870@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2871extension CreateMLComponents::ClassificationDistribution : Swift::Codable where Label : Swift::Decodable, Label : Swift::Encodable {
2872 public func encode(to encoder: any Swift::Encoder) throws
2873 public init(from decoder: any Swift::Decoder) throws
2874}
2875@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2876extension CreateMLComponents::ClassificationDistribution : Swift::Sendable where Label : Swift::Sendable {
2877}
2878extension Swift::Sequence {
2879 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2880 @inlinable public func mapFeatures<Input, Output, Annotation>(_ transform: (Input) throws -> Output) rethrows -> [CreateMLComponents::AnnotatedFeature<Output, Annotation>] where Self.Element == CreateMLComponents::AnnotatedFeature<Input, Annotation> {
2881 try map {
2882 try AnnotatedFeature(feature: transform($0.feature), annotation: $0.annotation)
2883 }
2884 }
2885 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2886 @inlinable public func mapFeatures<Input, Output, Annotation>(_ transform: (Input) async throws -> Output) async rethrows -> [CreateMLComponents::AnnotatedFeature<Output, Annotation>] where Self.Element == CreateMLComponents::AnnotatedFeature<Input, Annotation> {
2887 var result = [AnnotatedFeature<Output, Annotation>]()
2888 for value in self {
2889 let transformed = try await transform(value.feature)
… 2 unchanged lines …
2892 return result
2893 }
2894 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2895 @inlinable public func mapAnnotations<Feature, Input, Output>(_ transform: (Input) throws -> Output) rethrows -> [CreateMLComponents.AnnotatedFeature<Feature, Output>] where Self.Element == CreateMLComponents.AnnotatedFeature<Feature, Input> {
2896 try map {
2897 try AnnotatedFeature(feature: $0.feature, annotation: transform($0.annotation))
2898 }
2899 }
2900 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2901 @inlinable public func mapAnnotations<Feature, Input, Output>(_ transform: (Input) async throws -> Output) async rethrows -> [CreateMLComponents.AnnotatedFeature<Feature, Output>] where Self.Element == CreateMLComponents.AnnotatedFeature<Feature, Input> {
2902 var result = [AnnotatedFeature<Feature, Output>]()
2903 for value in self {
2904 let transformed = try await transform(value.annotation)
2892 return result
2893 }
2894 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2895 @inlinable public func mapAnnotations<Feature, Input, Output>(_ transform: (Input) throws -> Output) rethrows -> [CreateMLComponents::AnnotatedFeature<Feature, Output>] where Self.Element == CreateMLComponents::AnnotatedFeature<Feature, Input> {
2896 try map {
2897 try AnnotatedFeature(feature: $0.feature, annotation: transform($0.annotation))
2898 }
2899 }
2900 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2901 @inlinable public func mapAnnotations<Feature, Input, Output>(_ transform: (Input) async throws -> Output) async rethrows -> [CreateMLComponents::AnnotatedFeature<Feature, Output>] where Self.Element == CreateMLComponents::AnnotatedFeature<Feature, Input> {
2902 var result = [AnnotatedFeature<Feature, Output>]()
2903 for value in self {
2904 let transformed = try await transform(value.annotation)
… 2 unchanged lines …
2907 return result
2908 }
2909}
2910extension Swift.LazySequence {
2911 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2912 @inlinable public func mapFeatures<Input, Output, Annotation>(_ transform: @escaping (Input) -> Output) -> Swift.LazyMapSequence<Base, CreateMLComponents.AnnotatedFeature<Output, Annotation>> where Base.Element == CreateMLComponents.AnnotatedFeature<Input, Annotation> {
2913 map {
2914 AnnotatedFeature(feature: transform($0.feature), annotation: $0.annotation)
2915 }
2916 }
2917 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2918 @inlinable public func mapAnnotations<Feature, Input, Output>(_ transform: @escaping (Input) -> Output) -> Swift.LazyMapSequence<Base, CreateMLComponents.AnnotatedFeature<Feature, Output>> where Base.Element == CreateMLComponents.AnnotatedFeature<Feature, Input> {
2919 map {
2920 AnnotatedFeature(feature: $0.feature, annotation: transform($0.annotation))
2921 }
2922 }
2923}
2924extension CreateMLComponents.TabularTransformer {
2925 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2926 public func export(to url: Foundation.URL) throws
2927 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2928 public func export(to url: Foundation.URL, metadata: CreateMLComponents.ModelMetadata) throws
2929}
2930@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2931public struct Augmenter<RandomTransformer, RandomNumberGenerator> where RandomTransformer : CreateMLComponents.RandomTransformer, RandomNumberGenerator : Swift.RandomNumberGenerator, RandomTransformer.Input == RandomTransformer.Output {
2932 public init<Input>(generator: RandomNumberGenerator = SystemRandomNumberGenerator(), @CreateMLComponents.AugmentationBuilder<Input> _ builder: @escaping () -> RandomTransformer) where Input == RandomTransformer.Input
2933 public func applied<S, Annotation>(to base: S) -> CreateMLComponents.AugmentationSequence<S, RandomTransformer, RandomNumberGenerator, Annotation> where S : Swift.Sequence, Annotation : Swift.Equatable, S.Element == CreateMLComponents.AnnotatedFeature<RandomTransformer.Input, Annotation>
2934 public func applied<C, Annotation>(to elements: C, upsampledBy count: Swift.Int) -> CreateMLComponents.UpsampledAugmentationSequence<C, RandomTransformer, RandomNumberGenerator, Annotation> where C : Swift.Collection, Annotation : Swift.Equatable, C.Element == CreateMLComponents.AnnotatedFeature<RandomTransformer.Input, Annotation>
2935}
2936@available(*, unavailable)
2937extension CreateMLComponents.Augmenter : Swift.Sendable {
2938}
2939@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2940extension CreateMLComponents.HumanBodyActionCounter {
2941 public struct CumulativeSumSequence : CreateMLComponents.TemporalSequence {
2942 public typealias AsyncIterator = CreateMLComponents.HumanBodyActionCounter.CumulativeSumSequence.Iterator
2943 public typealias Feature = Swift.Float
2944 public var count: Swift.Int? {
2945 get
2946 }
2947 public func makeAsyncIterator() -> CreateMLComponents.HumanBodyActionCounter.CumulativeSumSequence.Iterator
2948 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2949 public typealias Element = CreateMLComponents.TemporalFeature<CreateMLComponents.HumanBodyActionCounter.CumulativeSumSequence.Feature>
2950 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
2951 @_implements(_Concurrency.AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift.Error
2952 }
2953}
2954@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2955extension CreateMLComponents.HumanBodyActionCounter.CumulativeSumSequence {
2956 public struct Iterator : _Concurrency.AsyncIteratorProtocol {
2957 public mutating func next() async throws -> CreateMLComponents.TemporalFeature<Swift.Float>?
2958 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
2959 public typealias Element = CreateMLComponents.TemporalFeature<Swift.Float>
2960 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
2961 @_implements(_Concurrency.AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift.Error
2962 }
2963}
2964@available(*, unavailable)
2965extension CreateMLComponents.HumanBodyActionCounter.CumulativeSumSequence : Swift.Sendable {
2966}
2967@available(*, unavailable)
2968extension CreateMLComponents.HumanBodyActionCounter.CumulativeSumSequence.Iterator : Swift.Sendable {
2969}
2970@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2971public struct FullyConnectedNetworkMultiLabelClassifier<Scalar, Label> : CreateMLComponents.SupervisedEstimator where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint, Scalar : Swift.Decodable, Scalar : Swift.Encodable, Label : Swift.Comparable, Label : Swift.Decodable, Label : Swift.Encodable, Label : Swift.Hashable {
2972 public typealias Transformer = CreateMLComponents.FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label>
2973 public typealias Annotation = Swift.Set<Label>
2974 public var configuration: CreateMLComponents.FullyConnectedNetworkConfiguration
2975 @available(macOS, unavailable)
2976 @available(iOS, unavailable)
2977 @available(tvOS, unavailable)
2978 public var networkConfiguration: CreateMLComponents.FullyConnectedNetworkConfiguration {
2979 get
2980 set
2981 }
2982 public var labels: Swift.Set<Label>
2983 public static var defaultConfiguration: CreateMLComponents.FullyConnectedNetworkConfiguration {
2984 get
2985 }
2986 @available(macOS, unavailable)
2987 @available(iOS, unavailable)
2988 @available(tvOS, unavailable)
2989 public init(labels: Swift.Set<Label>, networkConfiguration: CreateMLComponents.FullyConnectedNetworkConfiguration)
2990 public init(labels: Swift.Set<Label>, configuration: CreateMLComponents.FullyConnectedNetworkConfiguration = defaultConfiguration)
2991 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label> where Input : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Swift.Set<Label>>
2992 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label> where Input : Swift.Sequence, Validation : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Swift.Set<Label>>, Validation.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Swift.Set<Label>>
2993}
2994@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2995extension CreateMLComponents.FullyConnectedNetworkMultiLabelClassifier : Swift.Sendable where Scalar : Swift.Sendable, Label : Swift.Sendable {
2996}
2997@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2998public struct JointsSelector : CreateMLComponents.Transformer, Swift.Sendable {
2999 public var ignoredJoints: [CreateMLComponents.JointKey]?
3000 public var selectedJoints: [CreateMLComponents.JointKey]?
3001 public init(ignoredJoints: [CreateMLComponents.JointKey])
3002 public init(selectedJoints: [CreateMLComponents.JointKey])
3003 public func applied(to input: CreateMLComponents.Pose, eventHandler: CreateMLComponents.EventHandler? = nil) -> CreateMLComponents.Pose
3004 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
3005 public typealias Input = CreateMLComponents.Pose
3006 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
3007 public typealias Output = CreateMLComponents.Pose
3008}
3009@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3010extension CreateMLComponents.JointsSelector : Swift.CustomDebugStringConvertible {
3011 public var debugDescription: Swift.String {
3012 get
3013 }
3014}
3015extension CreateMLComponents.LinearTimeSeriesForecaster {
3016 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3017 public typealias Configuration = CreateMLComponents.LinearTimeSeriesForecasterConfiguration
3018}
3019@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3020public struct LinearTimeSeriesForecasterConfiguration : Swift.Hashable, Swift.Codable, Swift.Sendable {
3021 public var inputWindowSize: Swift.Int
3022 public var forecastWindowSize: Swift.Int
3023 public var batchSize: Swift.Int
3024 public var maximumIterationCount: Swift.Int
3025 public var earlyStoppingTolerance: Swift.Float
3026 public var earlyStoppingIterationCount: Swift.Int
3027 public var learningRate: Swift.Float
3028 public var randomSeed: Swift.Int?
3029 public init(inputWindowSize: Swift.Int, forecastWindowSize: Swift.Int)
3030 public static func == (a: CreateMLComponents.LinearTimeSeriesForecasterConfiguration, b: CreateMLComponents.LinearTimeSeriesForecasterConfiguration) -> Swift.Bool
3031 public func encode(to encoder: any Swift.Encoder) throws
3032 public func hash(into hasher: inout Swift.Hasher)
3033 public var hashValue: Swift.Int {
3034 get
3035 }
3036 public init(from decoder: any Swift.Decoder) throws
3037}
3038@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3039public struct TemporalFileSegment {
3040 public var url: Foundation.URL
3041 public var range: Swift.Range<Foundation.TimeInterval>
3042 public init(url: Foundation.URL, range: Swift.Range<Foundation.TimeInterval>)
3043}
3044@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3045extension CreateMLComponents.TemporalFileSegment : Swift.Sendable {
3046}
3047@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3048extension CreateMLComponents.TemporalFileSegment : Swift.Equatable {
3049 public static func == (a: CreateMLComponents.TemporalFileSegment, b: CreateMLComponents.TemporalFileSegment) -> Swift.Bool
3050}
3051@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3052extension CreateMLComponents.TemporalFileSegment : Swift.Hashable {
3053 public func hash(into hasher: inout Swift.Hasher)
3054 public var hashValue: Swift.Int {
3055 get
3056 }
3057}
3058@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3059extension CreateMLComponents.TemporalFileSegment : Swift.Encodable {
3060 public func encode(to encoder: any Swift.Encoder) throws
3061}
3062@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3063extension CreateMLComponents.TemporalFileSegment : Swift.Decodable {
3064 public init(from decoder: any Swift.Decoder) throws
3065}
3066@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3067public struct ObjectDetectionMetrics<Label> where Label : Swift.Comparable, Label : Swift.Decodable, Label : Swift.Encodable, Label : Swift.Hashable {
3068 public var labels: Swift.Set<Label>
3069 public var defaultConfidenceThreshold: Swift.Float
3070 public init()
3071 public static func extractLabels(from annotations: [CreateMLComponents.ObjectDetectionAnnotation<Label>]) -> Swift.Set<Label>
3072 public func averagePrecision<Scalar>(predictions: [[CreateMLComponents.DetectedObject<Label>]], annotations: [CreateMLComponents.ObjectDetectionAnnotation<Label>], confidenceThresholds: [Label : Swift.Float] = [:], overlapThreshold: Swift.Double = 0.5) -> [Label : Scalar] where Scalar : Swift.BinaryFloatingPoint
3073 public func meanAveragePrecision<Scalar>(predictions: [[CreateMLComponents.DetectedObject<Label>]], annotations: [CreateMLComponents.ObjectDetectionAnnotation<Label>], confidenceThresholds: [Label : Swift.Float] = [:], overlapThreshold: Swift.Double = 0.5) -> Scalar where Scalar : Swift.BinaryFloatingPoint
3074 public func averageOfAveragePrecisionAtVariedThresholds<Scalar>(predictions: [[CreateMLComponents.DetectedObject<Label>]], annotations: [CreateMLComponents.ObjectDetectionAnnotation<Label>], confidenceThresholds: [Label : Swift.Float] = [:]) -> [Label : Scalar] where Scalar : Swift.BinaryFloatingPoint
3075 public func averageOfMeanAveragePrecisionAtVariedThresholds<Scalar>(predictions: [[CreateMLComponents.DetectedObject<Label>]], annotations: [CreateMLComponents.ObjectDetectionAnnotation<Label>], confidenceThresholds: [Label : Swift.Float] = [:]) -> Scalar where Scalar : Swift.BinaryFloatingPoint
3076}
3077@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3078extension CreateMLComponents.ObjectDetectionMetrics : Swift.Sendable where Label : Swift.Sendable {
3079}
3080@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3081public enum TabularPipelineDataError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
3082 case missingColumn(operation: Swift.String, columnName: Swift.String)
3083 case incorrectType(operation: Swift.String, columnName: Swift.String, actual: Swift.String, expected: Swift.String)
3084 case missingValues(operation: Swift.String, columnName: Swift.String)
3085 public var errorDescription: Swift.String? {
3086 get
3087 }
3088 public static func == (a: CreateMLComponents.TabularPipelineDataError, b: CreateMLComponents.TabularPipelineDataError) -> Swift.Bool
3089}
3090@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3091extension CreateMLComponents.TabularPipelineDataError : Swift.CustomDebugStringConvertible {
3092 public var debugDescription: Swift.String {
3093 get
3094 }
3095}
3096@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3097extension CreateMLComponents.FullyConnectedNetworkMultiLabelClassifier : CreateMLComponents.UpdatableSupervisedEstimator {
3098 public func makeTransformer() -> CreateMLComponents.FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label>
3099 public func update<InputSequence>(_ transformer: inout CreateMLComponents.FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label>, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Swift.Set<Label>>
3100}
3101@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3102public enum PipelineDataError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
3103 case missingValue(operation: Swift.String)
3104 case missingAnnotation(operation: Swift.String)
3105 case emptyInput(operation: Swift.String)
3106 case unrecognizedCategory(operation: Swift.String, category: Swift.String)
3107 case incompatibleDataFormat(operation: Swift.String, debugDescription: Swift.String)
3108 case incompatibleConfiguration(operation: Swift.String, debugDescription: Swift.String)
3109 case incompatibleShape([Swift.Int], debugDescription: Swift.String)
3110 public var errorDescription: Swift.String? {
3111 get
3112 }
3113 public static func == (a: CreateMLComponents.PipelineDataError, b: CreateMLComponents.PipelineDataError) -> Swift.Bool
3114}
3115@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3116extension CreateMLComponents.PipelineDataError : Swift.CustomDebugStringConvertible {
3117 public var debugDescription: Swift.String {
3118 get
3119 }
3120}
3121extension CreateMLComponents.Estimator {
3122 @available(macOS, introduced: 13.0, deprecated: 15.0)
3123 @available(iOS, introduced: 16.0, deprecated: 18.0)
3124 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3125 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3126 @available(watchOS, unavailable)
3127 public func appending<Other>(_ other: Other) -> some CreateMLComponents.TemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TransformerToTemporalAdaptor<Self.Transformer>, Other>> where Other : CreateMLComponents.TemporalTransformer, Other.Input == Self.Transformer.Output
3128
3129 @available(macOS, introduced: 13.0, deprecated: 15.0)
3130 @available(iOS, introduced: 16.0, deprecated: 18.0)
3131 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3132 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3133 @available(watchOS, unavailable)
3134 public func appending<Other>(_ other: Other) -> some CreateMLComponents.TemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>> where Other : CreateMLComponents.TemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
3135
3136}
3137@available(macOS, introduced: 13.0, deprecated: 15.0)
3138@available(iOS, introduced: 16.0, deprecated: 18.0)
3139@available(tvOS, introduced: 16.0, deprecated: 18.0)
3140@available(visionOS, introduced: 1.0, deprecated: 2.0)
3141@available(watchOS, unavailable)
3142extension CreateMLComponents.TemporalEstimator {
3143 public func appending<Other>(_ other: Other) -> some CreateMLComponents.TemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, CreateMLComponents.TransformerToTemporalAdaptor<Other>>> where Other : CreateMLComponents.Transformer, Other.Input == Self.Transformer.Output
3144
3145 public func appending<Other>(_ other: Other) -> some CreateMLComponents.TemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, CreateMLComponents.TransformerToTemporalAdaptor<Other.Transformer>>> where Other : CreateMLComponents.Estimator, Self.Transformer.Output == Other.Transformer.Input
3146
3147 public func appending<Other>(_ other: Other) -> some CreateMLComponents.TemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, Other>> where Other : CreateMLComponents.TemporalTransformer, Other.Input == Self.Transformer.Output
3148
3149 public func appending<Other>(_ other: Other) -> some CreateMLComponents.TemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, Other.Transformer>> where Other : CreateMLComponents.TemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
3150
3151}
3152@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3153@_functionBuilder public struct AugmentationBuilder<Element> : Swift.Sendable {
3154 public static func buildPartialBlock(first: some RandomTransformer<Element, Element>) -> some CreateMLComponents.RandomTransformer<Element, Element>
3155
3156 public static func buildPartialBlock(first: some Transformer<Element, Element>) -> some CreateMLComponents.RandomTransformer<Element, Element>
3157
3158 public static func buildPartialBlock(accumulated: some RandomTransformer<Element, Element>, next: some RandomTransformer<Element, Element>) -> some CreateMLComponents.RandomTransformer<Element, Element>
3159
3160 public static func buildPartialBlock(accumulated: some RandomTransformer<Element, Element>, next: some Transformer<Element, Element>) -> some CreateMLComponents.RandomTransformer<Element, Element>
3161
3162}
3163@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3164public struct Downsampler<Input> : CreateMLComponents.TemporalTransformer, Swift.Codable, Swift.Sendable where Input : Swift.Sendable {
3165 public typealias Input = Input
3166 public typealias Output = Input
3167 public let factor: Swift.Int
3168 public init(factor: Swift.Int)
3169 public func applied<S>(to input: S, eventHandler: CreateMLComponents.EventHandler?) throws -> CreateMLComponents.Downsampler<Input>.DownStreamSequence where Input == S.Feature, S : CreateMLComponents.TemporalSequence
3170 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
3171 public typealias OutputSequence = CreateMLComponents.Downsampler<Input>.DownStreamSequence
3172 public func encode(to encoder: any Swift.Encoder) throws
3173 public init(from decoder: any Swift.Decoder) throws
3174}
3175@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3176extension CreateMLComponents.Downsampler {
3177 public struct DownStreamSequence : CreateMLComponents.TemporalSequence {
3178 public typealias Feature = Input
3179 public typealias AsyncIterator = CreateMLComponents.Downsampler<Input>.DownStreamSequence.Iterator
3180 public var count: Swift.Int? {
3181 get
3182 }
3183 public func makeAsyncIterator() -> CreateMLComponents.Downsampler<Input>.DownStreamSequence.Iterator
3184 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
3185 public typealias Element = CreateMLComponents.TemporalFeature<CreateMLComponents.Downsampler<Input>.DownStreamSequence.Feature>
3186 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
3187 @_implements(_Concurrency.AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift.Error
3188 }
3189}
3190@available(*, unavailable)
3191extension CreateMLComponents.Downsampler.DownStreamSequence : Swift.Sendable {
3192}
3193@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3194extension CreateMLComponents.Downsampler.DownStreamSequence {
3195 public struct Iterator : _Concurrency.AsyncIteratorProtocol {
3196 public mutating func next() async throws -> CreateMLComponents.TemporalFeature<CreateMLComponents.Downsampler<Input>.Output>?
3197 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
3198 public typealias Element = CreateMLComponents.TemporalFeature<CreateMLComponents.Downsampler<Input>.Output>
3199 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
3200 @_implements(_Concurrency.AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift.Error
3201 }
3202}
3203@available(*, unavailable)
3204extension CreateMLComponents.Downsampler.DownStreamSequence.Iterator : Swift.Sendable {
3205}
3206@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3207@inlinable internal func absoluteError<T>(_ annotatedPrediction: CreateMLComponents.AnnotatedPrediction<T, T>) -> T where T : Swift.FloatingPoint {
3208 abs(annotatedPrediction.prediction - annotatedPrediction.annotation)
3209}
3210@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3211@backDeployed(before: macOS 14.0, iOS 17.0, tvOS 17.0)
3212@inlinable public func maximumAbsoluteError<T>(_ predicted: some Collection<T>, _ groundTruth: some Collection<T>) -> T where T : Swift.FloatingPoint {
3213 assert(
3214 predicted.count == groundTruth.count,
3215 "The collection of predicted values must have the same number of elements as the collection of ground truth values."
2907 return result
2908 }
2909}
2910extension Swift::LazySequence {
2911 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2912 @inlinable public func mapFeatures<Input, Output, Annotation>(_ transform: @escaping (Input) -> Output) -> Swift::LazyMapSequence<Base, CreateMLComponents::AnnotatedFeature<Output, Annotation>> where Base.Element == CreateMLComponents::AnnotatedFeature<Input, Annotation> {
2913 map {
2914 AnnotatedFeature(feature: transform($0.feature), annotation: $0.annotation)
2915 }
2916 }
2917 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
2918 @inlinable public func mapAnnotations<Feature, Input, Output>(_ transform: @escaping (Input) -> Output) -> Swift::LazyMapSequence<Base, CreateMLComponents::AnnotatedFeature<Feature, Output>> where Base.Element == CreateMLComponents::AnnotatedFeature<Feature, Input> {
2919 map {
2920 AnnotatedFeature(feature: $0.feature, annotation: transform($0.annotation))
2921 }
2922 }
2923}
2924extension CreateMLComponents::TabularTransformer {
2925 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2926 public func export(to url: Foundation::URL) throws
2927 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2928 public func export(to url: Foundation::URL, metadata: CreateMLComponents::ModelMetadata) throws
2929}
2930@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
2931public struct Augmenter<RandomTransformer, RandomNumberGenerator> where RandomTransformer : CreateMLComponents::RandomTransformer, RandomNumberGenerator : Swift::RandomNumberGenerator, RandomTransformer.Input == RandomTransformer.Output {
2932 public init<Input>(generator: RandomNumberGenerator = SystemRandomNumberGenerator(), @CreateMLComponents::AugmentationBuilder<Input> _ builder: @escaping () -> RandomTransformer) where Input == RandomTransformer.Input
2933 public func applied<S, Annotation>(to base: S) -> CreateMLComponents::AugmentationSequence<S, RandomTransformer, RandomNumberGenerator, Annotation> where S : Swift::Sequence, Annotation : Swift::Equatable, S.Element == CreateMLComponents::AnnotatedFeature<RandomTransformer.Input, Annotation>
2934 public func applied<C, Annotation>(to elements: C, upsampledBy count: Swift::Int) -> CreateMLComponents::UpsampledAugmentationSequence<C, RandomTransformer, RandomNumberGenerator, Annotation> where C : Swift::Collection, Annotation : Swift::Equatable, C.Element == CreateMLComponents::AnnotatedFeature<RandomTransformer.Input, Annotation>
2935}
2936@available(*, unavailable)
2937extension CreateMLComponents::Augmenter : Swift::Sendable {
2938}
2939@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2940extension CreateMLComponents::HumanBodyActionCounter {
2941 public struct CumulativeSumSequence : CreateMLComponents::TemporalSequence {
2942 public typealias AsyncIterator = CreateMLComponents::HumanBodyActionCounter.CreateMLComponents::CumulativeSumSequence.CreateMLComponents::Iterator
2943 public typealias Feature = Swift::Float
2944 public var count: Swift::Int? {
2945 get
2946 }
2947 public func makeAsyncIterator() -> CreateMLComponents::HumanBodyActionCounter.CreateMLComponents::CumulativeSumSequence.CreateMLComponents::Iterator
2948 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2949 public typealias Element = CreateMLComponents::TemporalFeature<CreateMLComponents::HumanBodyActionCounter.CreateMLComponents::CumulativeSumSequence.CreateMLComponents::Feature>
2950 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
2951 @_implements(_Concurrency::AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift::Error
2952 }
2953}
2954@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2955extension CreateMLComponents::HumanBodyActionCounter.CreateMLComponents::CumulativeSumSequence {
2956 public struct Iterator : _Concurrency::AsyncIteratorProtocol {
2957 public mutating func next() async throws -> CreateMLComponents::TemporalFeature<Swift::Float>?
2958 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2959 public typealias Element = CreateMLComponents::TemporalFeature<Swift::Float>
2960 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
2961 @_implements(_Concurrency::AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift::Error
2962 }
2963}
2964@available(*, unavailable)
2965extension CreateMLComponents::HumanBodyActionCounter.CreateMLComponents::CumulativeSumSequence : Swift::Sendable {
2966}
2967@available(*, unavailable)
2968extension CreateMLComponents::HumanBodyActionCounter.CreateMLComponents::CumulativeSumSequence.CreateMLComponents::Iterator : Swift::Sendable {
2969}
2970@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2971public struct FullyConnectedNetworkMultiLabelClassifier<Scalar, Label> : CreateMLComponents::SupervisedEstimator where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint, Scalar : Swift::Decodable, Scalar : Swift::Encodable, Label : Swift::Comparable, Label : Swift::Decodable, Label : Swift::Encodable, Label : Swift::Hashable {
2972 public typealias Transformer = CreateMLComponents::FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label>
2973 public typealias Annotation = Swift::Set<Label>
2974 public var configuration: CreateMLComponents::FullyConnectedNetworkConfiguration
2975 @available(macOS, unavailable)
2976 @available(iOS, unavailable)
2977 @available(tvOS, unavailable)
2978 public var networkConfiguration: CreateMLComponents::FullyConnectedNetworkConfiguration {
2979 get
2980 set
2981 }
2982 public var labels: Swift::Set<Label>
2983 public static var defaultConfiguration: CreateMLComponents::FullyConnectedNetworkConfiguration {
2984 get
2985 }
2986 @available(macOS, unavailable)
2987 @available(iOS, unavailable)
2988 @available(tvOS, unavailable)
2989 public init(labels: Swift::Set<Label>, networkConfiguration: CreateMLComponents::FullyConnectedNetworkConfiguration)
2990 public init(labels: Swift::Set<Label>, configuration: CreateMLComponents::FullyConnectedNetworkConfiguration = defaultConfiguration)
2991 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label> where Input : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Swift::Set<Label>>
2992 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label> where Input : Swift::Sequence, Validation : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Swift::Set<Label>>, Validation.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Swift::Set<Label>>
2993}
2994@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
2995extension CreateMLComponents::FullyConnectedNetworkMultiLabelClassifier : Swift::Sendable where Scalar : Swift::Sendable, Label : Swift::Sendable {
2996}
2997@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
2998public struct JointsSelector : CreateMLComponents::Transformer, Swift::Sendable {
2999 public var ignoredJoints: [CreateMLComponents::JointKey]?
3000 public var selectedJoints: [CreateMLComponents::JointKey]?
3001 public init(ignoredJoints: [CreateMLComponents::JointKey])
3002 public init(selectedJoints: [CreateMLComponents::JointKey])
3003 public func applied(to input: CreateMLComponents::Pose, eventHandler: CreateMLComponents::EventHandler? = nil) -> CreateMLComponents::Pose
3004 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3005 public typealias Input = CreateMLComponents::Pose
3006 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3007 public typealias Output = CreateMLComponents::Pose
3008}
3009@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3010extension CreateMLComponents::JointsSelector : Swift::CustomDebugStringConvertible {
3011 public var debugDescription: Swift::String {
3012 get
3013 }
3014}
3015extension CreateMLComponents::LinearTimeSeriesForecaster {
3016 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3017 public typealias Configuration = CreateMLComponents::LinearTimeSeriesForecasterConfiguration
3018}
3019@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3020public struct LinearTimeSeriesForecasterConfiguration : Swift::Hashable, Swift::Codable, Swift::Sendable {
3021 public var inputWindowSize: Swift::Int
3022 public var forecastWindowSize: Swift::Int
3023 public var batchSize: Swift::Int
3024 public var maximumIterationCount: Swift::Int
3025 public var earlyStoppingTolerance: Swift::Float
3026 public var earlyStoppingIterationCount: Swift::Int
3027 public var learningRate: Swift::Float
3028 public var randomSeed: Swift::Int?
3029 public init(inputWindowSize: Swift::Int, forecastWindowSize: Swift::Int)
3030 public static func == (a: CreateMLComponents::LinearTimeSeriesForecasterConfiguration, b: CreateMLComponents::LinearTimeSeriesForecasterConfiguration) -> Swift::Bool
3031 public func encode(to encoder: any Swift::Encoder) throws
3032 public func hash(into hasher: inout Swift::Hasher)
3033 public var hashValue: Swift::Int {
3034 get
3035 }
3036 public init(from decoder: any Swift::Decoder) throws
3037}
3038@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3039public struct TemporalFileSegment {
3040 public var url: Foundation::URL
3041 public var range: Swift::Range<Foundation::TimeInterval>
3042 public init(url: Foundation::URL, range: Swift::Range<Foundation::TimeInterval>)
3043}
3044@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3045extension CreateMLComponents::TemporalFileSegment : Swift::Sendable {
3046}
3047@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3048extension CreateMLComponents::TemporalFileSegment : Swift::Equatable {
3049 public static func == (a: CreateMLComponents::TemporalFileSegment, b: CreateMLComponents::TemporalFileSegment) -> Swift::Bool
3050}
3051@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3052extension CreateMLComponents::TemporalFileSegment : Swift::Hashable {
3053 public func hash(into hasher: inout Swift::Hasher)
3054 public var hashValue: Swift::Int {
3055 get
3056 }
3057}
3058@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3059extension CreateMLComponents::TemporalFileSegment : Swift::Encodable {
3060 public func encode(to encoder: any Swift::Encoder) throws
3061}
3062@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3063extension CreateMLComponents::TemporalFileSegment : Swift::Decodable {
3064 public init(from decoder: any Swift::Decoder) throws
3065}
3066@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3067public struct ObjectDetectionMetrics<Label> where Label : Swift::Comparable, Label : Swift::Decodable, Label : Swift::Encodable, Label : Swift::Hashable {
3068 public var labels: Swift::Set<Label>
3069 public var defaultConfidenceThreshold: Swift::Float
3070 public init()
3071 public static func extractLabels(from annotations: [CreateMLComponents::ObjectDetectionAnnotation<Label>]) -> Swift::Set<Label>
3072 public func averagePrecision<Scalar>(predictions: [[CreateMLComponents::DetectedObject<Label>]], annotations: [CreateMLComponents::ObjectDetectionAnnotation<Label>], confidenceThresholds: [Label : Swift::Float] = [:], overlapThreshold: Swift::Double = 0.5) -> [Label : Scalar] where Scalar : Swift::BinaryFloatingPoint
3073 public func meanAveragePrecision<Scalar>(predictions: [[CreateMLComponents::DetectedObject<Label>]], annotations: [CreateMLComponents::ObjectDetectionAnnotation<Label>], confidenceThresholds: [Label : Swift::Float] = [:], overlapThreshold: Swift::Double = 0.5) -> Scalar where Scalar : Swift::BinaryFloatingPoint
3074 public func averageOfAveragePrecisionAtVariedThresholds<Scalar>(predictions: [[CreateMLComponents::DetectedObject<Label>]], annotations: [CreateMLComponents::ObjectDetectionAnnotation<Label>], confidenceThresholds: [Label : Swift::Float] = [:]) -> [Label : Scalar] where Scalar : Swift::BinaryFloatingPoint
3075 public func averageOfMeanAveragePrecisionAtVariedThresholds<Scalar>(predictions: [[CreateMLComponents::DetectedObject<Label>]], annotations: [CreateMLComponents::ObjectDetectionAnnotation<Label>], confidenceThresholds: [Label : Swift::Float] = [:]) -> Scalar where Scalar : Swift::BinaryFloatingPoint
3076}
3077@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3078extension CreateMLComponents::ObjectDetectionMetrics : Swift::Sendable where Label : Swift::Sendable {
3079}
3080@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3081public enum TabularPipelineDataError : Foundation::LocalizedError, Swift::Equatable, Swift::Sendable {
3082 case missingColumn(operation: Swift::String, columnName: Swift::String)
3083 case incorrectType(operation: Swift::String, columnName: Swift::String, actual: Swift::String, expected: Swift::String)
3084 case missingValues(operation: Swift::String, columnName: Swift::String)
3085 public var errorDescription: Swift::String? {
3086 get
3087 }
3088 public static func == (a: CreateMLComponents::TabularPipelineDataError, b: CreateMLComponents::TabularPipelineDataError) -> Swift::Bool
3089}
3090@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3091extension CreateMLComponents::TabularPipelineDataError : Swift::CustomDebugStringConvertible {
3092 public var debugDescription: Swift::String {
3093 get
3094 }
3095}
3096@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3097extension CreateMLComponents::FullyConnectedNetworkMultiLabelClassifier : CreateMLComponents::UpdatableSupervisedEstimator {
3098 public func makeTransformer() -> CreateMLComponents::FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label>
3099 public func update<InputSequence>(_ transformer: inout CreateMLComponents::FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label>, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Swift::Set<Label>>
3100}
3101@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3102public enum PipelineDataError : Foundation::LocalizedError, Swift::Equatable, Swift::Sendable {
3103 case missingValue(operation: Swift::String)
3104 case missingAnnotation(operation: Swift::String)
3105 case emptyInput(operation: Swift::String)
3106 case unrecognizedCategory(operation: Swift::String, category: Swift::String)
3107 case incompatibleDataFormat(operation: Swift::String, debugDescription: Swift::String)
3108 case incompatibleConfiguration(operation: Swift::String, debugDescription: Swift::String)
3109 case incompatibleShape([Swift::Int], debugDescription: Swift::String)
3110 public var errorDescription: Swift::String? {
3111 get
3112 }
3113 public static func == (a: CreateMLComponents::PipelineDataError, b: CreateMLComponents::PipelineDataError) -> Swift::Bool
3114}
3115@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3116extension CreateMLComponents::PipelineDataError : Swift::CustomDebugStringConvertible {
3117 public var debugDescription: Swift::String {
3118 get
3119 }
3120}
3121extension CreateMLComponents::Estimator {
3122 @available(macOS, introduced: 13.0, deprecated: 15.0)
3123 @available(iOS, introduced: 16.0, deprecated: 18.0)
3124 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3125 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3126 @available(watchOS, unavailable)
3127 public func appending<Other>(_ other: Other) -> some CreateMLComponents::TemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TransformerToTemporalAdaptor<Self.Transformer>, Other>> where Other : CreateMLComponents::TemporalTransformer, Other.Input == Self.Transformer.Output
3128
3129 @available(macOS, introduced: 13.0, deprecated: 15.0)
3130 @available(iOS, introduced: 16.0, deprecated: 18.0)
3131 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3132 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3133 @available(watchOS, unavailable)
3134 public func appending<Other>(_ other: Other) -> some CreateMLComponents::TemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>> where Other : CreateMLComponents::TemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
3135
3136}
3137@available(macOS, introduced: 13.0, deprecated: 15.0)
3138@available(iOS, introduced: 16.0, deprecated: 18.0)
3139@available(tvOS, introduced: 16.0, deprecated: 18.0)
3140@available(visionOS, introduced: 1.0, deprecated: 2.0)
3141@available(watchOS, unavailable)
3142extension CreateMLComponents::TemporalEstimator {
3143 public func appending<Other>(_ other: Other) -> some CreateMLComponents::TemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, CreateMLComponents::TransformerToTemporalAdaptor<Other>>> where Other : CreateMLComponents::Transformer, Other.Input == Self.Transformer.Output
3144
3145 public func appending<Other>(_ other: Other) -> some CreateMLComponents::TemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, CreateMLComponents::TransformerToTemporalAdaptor<Other.Transformer>>> where Other : CreateMLComponents::Estimator, Self.Transformer.Output == Other.Transformer.Input
3146
3147 public func appending<Other>(_ other: Other) -> some CreateMLComponents::TemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, Other>> where Other : CreateMLComponents::TemporalTransformer, Other.Input == Self.Transformer.Output
3148
3149 public func appending<Other>(_ other: Other) -> some CreateMLComponents::TemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, Other.Transformer>> where Other : CreateMLComponents::TemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
3150
3151}
3152@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3153@_functionBuilder public struct AugmentationBuilder<Element> : Swift::Sendable {
3154 public static func buildPartialBlock(first: some RandomTransformer<Element, Element>) -> some CreateMLComponents::RandomTransformer<Element, Element>
3155
3156 public static func buildPartialBlock(first: some Transformer<Element, Element>) -> some CreateMLComponents::RandomTransformer<Element, Element>
3157
3158 public static func buildPartialBlock(accumulated: some RandomTransformer<Element, Element>, next: some RandomTransformer<Element, Element>) -> some CreateMLComponents::RandomTransformer<Element, Element>
3159
3160 public static func buildPartialBlock(accumulated: some RandomTransformer<Element, Element>, next: some Transformer<Element, Element>) -> some CreateMLComponents::RandomTransformer<Element, Element>
3161
3162}
3163@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3164public struct Downsampler<Input> : CreateMLComponents::TemporalTransformer, Swift::Codable, Swift::Sendable where Input : Swift::Sendable {
3165 public typealias Input = Input
3166 public typealias Output = Input
3167 public let factor: Swift::Int
3168 public init(factor: Swift::Int)
3169 public func applied<S>(to input: S, eventHandler: CreateMLComponents::EventHandler?) throws -> CreateMLComponents::Downsampler<Input>.CreateMLComponents::DownStreamSequence where Input == S.Feature, S : CreateMLComponents::TemporalSequence
3170 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3171 public typealias OutputSequence = CreateMLComponents::Downsampler<Input>.CreateMLComponents::DownStreamSequence
3172 public func encode(to encoder: any Swift::Encoder) throws
3173 public init(from decoder: any Swift::Decoder) throws
3174}
3175@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3176extension CreateMLComponents::Downsampler {
3177 public struct DownStreamSequence : CreateMLComponents::TemporalSequence {
3178 public typealias Feature = Input
3179 public typealias AsyncIterator = CreateMLComponents::Downsampler<Input>.CreateMLComponents::DownStreamSequence.CreateMLComponents::Iterator
3180 public var count: Swift::Int? {
3181 get
3182 }
3183 public func makeAsyncIterator() -> CreateMLComponents::Downsampler<Input>.CreateMLComponents::DownStreamSequence.CreateMLComponents::Iterator
3184 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3185 public typealias Element = CreateMLComponents::TemporalFeature<CreateMLComponents::Downsampler<Input>.CreateMLComponents::DownStreamSequence.CreateMLComponents::Feature>
3186 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
3187 @_implements(_Concurrency::AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift::Error
3188 }
3189}
3190@available(*, unavailable)
3191extension CreateMLComponents::Downsampler.CreateMLComponents::DownStreamSequence : Swift::Sendable {
3192}
3193@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3194extension CreateMLComponents::Downsampler.CreateMLComponents::DownStreamSequence {
3195 public struct Iterator : _Concurrency::AsyncIteratorProtocol {
3196 public mutating func next() async throws -> CreateMLComponents::TemporalFeature<CreateMLComponents::Downsampler<Input>.CreateMLComponents::Output>?
3197 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3198 public typealias Element = CreateMLComponents::TemporalFeature<CreateMLComponents::Downsampler<Input>.CreateMLComponents::Output>
3199 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
3200 @_implements(_Concurrency::AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift::Error
3201 }
3202}
3203@available(*, unavailable)
3204extension CreateMLComponents::Downsampler.CreateMLComponents::DownStreamSequence.CreateMLComponents::Iterator : Swift::Sendable {
3205}
3206@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3207@inlinable internal func absoluteError<T>(_ annotatedPrediction: CreateMLComponents::AnnotatedPrediction<T, T>) -> T where T : Swift::FloatingPoint {
3208 abs(annotatedPrediction.prediction - annotatedPrediction.annotation)
3209}
3210@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3211@backDeployed(before: macOS 14.0, iOS 17.0, tvOS 17.0)
3212@inlinable public func maximumAbsoluteError<T>(_ predicted: some Collection<T>, _ groundTruth: some Collection<T>) -> T where T : Swift::FloatingPoint {
3213 assert(
3214 predicted.count == groundTruth.count,
3215 "The collection of predicted values must have the same number of elements as the collection of ground truth values."
… 4 unchanged lines …
3220 return zip(predicted, groundTruth).map({ abs($0 - $1) }).max() ?? .nan
3221}
3222@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3223@inlinable public func maximumAbsoluteError<T>(_ annotatedPredictions: [CreateMLComponents.AnnotatedPrediction<T, T>]) -> T where T : Swift.FloatingPoint {
3224 if let maximumAbsoluteError = annotatedPredictions.map({ absoluteError($0) }).max() {
3225 return maximumAbsoluteError
3226 }
3227 return .nan
3228}
3229@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3230@backDeployed(before: macOS 14.0, iOS 17.0, tvOS 17.0)
3231@inlinable public func meanAbsoluteError<T>(_ predicted: some Collection<T>, _ groundTruth: some Collection<T>) -> T where T : Swift.FloatingPoint {
3232 assert(
3233 predicted.count == groundTruth.count,
3234 "The collection of predicted values must have the same number of elements as the collection of ground truth values."
3220 return zip(predicted, groundTruth).map({ abs($0 - $1) }).max() ?? .nan
3221}
3222@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3223@inlinable public func maximumAbsoluteError<T>(_ annotatedPredictions: [CreateMLComponents::AnnotatedPrediction<T, T>]) -> T where T : Swift::FloatingPoint {
3224 if let maximumAbsoluteError = annotatedPredictions.map({ absoluteError($0) }).max() {
3225 return maximumAbsoluteError
3226 }
3227 return .nan
3228}
3229@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3230@backDeployed(before: macOS 14.0, iOS 17.0, tvOS 17.0)
3231@inlinable public func meanAbsoluteError<T>(_ predicted: some Collection<T>, _ groundTruth: some Collection<T>) -> T where T : Swift::FloatingPoint {
3232 assert(
3233 predicted.count == groundTruth.count,
3234 "The collection of predicted values must have the same number of elements as the collection of ground truth values."
… 4 unchanged lines …
3239 return zip(predicted, groundTruth).map({ abs($0 - $1) }).mean() ?? .nan
3240}
3241@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3242@inlinable public func meanAbsoluteError<T>(_ annotatedPredictions: [CreateMLComponents.AnnotatedPrediction<T, T>]) -> T where T : Swift.FloatingPoint {
3243 if annotatedPredictions.isEmpty {
3244 return .nan
3245 }
3246 return annotatedPredictions.map({ absoluteError($0) }).mean()
3247}
3248@available(macOS 13.0, iOS 16.0, tvOS 16.0, visionOS 1.0, watchOS 11.0, *)
3249@backDeployed(before: macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0)
3250@inlinable public func meanSquaredError<T>(_ predicted: some Collection<T>, _ groundTruth: some Collection<T>) -> T where T : Swift.FloatingPoint {
3251 assert(
3252 predicted.count == groundTruth.count,
3253 "The collection of predicted values must have the same number of elements as the collection of ground truth values."
3239 return zip(predicted, groundTruth).map({ abs($0 - $1) }).mean() ?? .nan
3240}
3241@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3242@inlinable public func meanAbsoluteError<T>(_ annotatedPredictions: [CreateMLComponents::AnnotatedPrediction<T, T>]) -> T where T : Swift::FloatingPoint {
3243 if annotatedPredictions.isEmpty {
3244 return .nan
3245 }
3246 return annotatedPredictions.map({ absoluteError($0) }).mean()
3247}
3248@available(macOS 13.0, iOS 16.0, tvOS 16.0, visionOS 1.0, watchOS 11.0, *)
3249@backDeployed(before: macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0)
3250@inlinable public func meanSquaredError<T>(_ predicted: some Collection<T>, _ groundTruth: some Collection<T>) -> T where T : Swift::FloatingPoint {
3251 assert(
3252 predicted.count == groundTruth.count,
3253 "The collection of predicted values must have the same number of elements as the collection of ground truth values."
… 5 unchanged lines …
3259}
3260@available(macOS 14.0, iOS 17.0, tvOS 17.0, visionOS 1.0, watchOS 11.0, *)
3261@backDeployed(before: macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0)
3262@inlinable public func meanSquaredError<T>(_ annotatedPredictions: [CreateMLComponents.AnnotatedPrediction<T, T>]) -> T where T : Swift.FloatingPoint {
3263 guard !annotatedPredictions.isEmpty else {
3264 return .nan
3265 }
3266 return annotatedPredictions.map({ ($0.prediction - $0.annotation) * ($0.prediction - $0.annotation) }).mean()
3267}
3268@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3269@backDeployed(before: macOS 14.0, iOS 17.0, tvOS 17.0)
3270@inlinable public func rootMeanSquaredError<T>(_ predicted: some Collection<T>, _ groundTruth: some Collection<T>) -> T where T : Swift.FloatingPoint {
3271 meanSquaredError(predicted, groundTruth).squareRoot()
3272}
3273@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3274@inlinable public func rootMeanSquaredError<T>(_ annotatedPredictions: [CreateMLComponents.AnnotatedPrediction<T, T>]) -> T where T : Swift.FloatingPoint {
3275 meanSquaredError(annotatedPredictions).squareRoot()
3276}
3277@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3278@inlinable public func meanAbsolutePercentageError<T>(_ annotatedPredictions: [CreateMLComponents.AnnotatedPrediction<T, T>]) -> T where T : Swift.FloatingPoint {
3279 if annotatedPredictions.isEmpty {
3280 return .nan
3281 }
3282 return annotatedPredictions.map({ abs(($0.annotation - $0.prediction) / $0.annotation) }).mean()
3283}
3284@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3285extension CreateMLComponents.AudioReader {
3286 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3287 public struct AsyncBuffers : CreateMLComponents.TemporalSequence {
3288 public typealias AsyncIterator = CreateMLComponents.AudioReader.AsyncBuffers.Iterator
3289 public typealias Feature = AVFAudio.AVAudioPCMBuffer
3290 public let url: Foundation.URL
3291 public let count: Swift.Int?
3292 public func makeAsyncIterator() -> CreateMLComponents.AudioReader.AsyncBuffers.Iterator
3293 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
3294 public typealias Element = CreateMLComponents.TemporalFeature<CreateMLComponents.AudioReader.AsyncBuffers.Feature>
3295 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
3296 @_implements(_Concurrency.AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift.Error
3297 }
3298}
3299@available(*, unavailable)
3300extension CreateMLComponents.AudioReader.AsyncBuffers : Swift.Sendable {
3301}
3302extension CreateMLComponents.AudioReader.AsyncBuffers {
3303 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3304 public struct Iterator : _Concurrency.AsyncIteratorProtocol {
3305 public mutating func next() async throws -> CreateMLComponents.TemporalFeature<AVFAudio.AVAudioPCMBuffer>?
3306 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
3307 public typealias Element = CreateMLComponents.TemporalFeature<AVFAudio.AVAudioPCMBuffer>
3308 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
3309 @_implements(_Concurrency.AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift.Error
3310 }
3311}
3312@available(*, unavailable)
3313extension CreateMLComponents.AudioReader.AsyncBuffers.Iterator : Swift.Sendable {
3314}
3315@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3316public protocol RandomTransformer<Input, Output> {
3317 associatedtype Input
3318 associatedtype Output
3319 func applied(to input: Self.Input, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents.EventHandler?) async throws -> Self.Output
3320}
3321extension Swift.Sequence {
3322 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3323 public func randomSplit<Feature, Annotation>(by proportion: Swift.Double, seed: Swift.Int? = nil) -> ([CreateMLComponents.AnnotatedFeature<Feature, Annotation>], [CreateMLComponents.AnnotatedFeature<Feature, Annotation>]) where Annotation : Swift.Hashable, Self.Element == CreateMLComponents.AnnotatedFeature<Feature, Annotation>
3324 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3325 public func randomSplit<T>(by proportion: Swift.Double, seed: Swift.Int? = nil) -> (Swift.ArraySlice<T>, Swift.ArraySlice<T>) where T == Self.Element
3326 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3327 public func randomSplit<Feature, Annotation, Generator>(by proportion: Swift.Double, using generator: inout Generator) -> ([CreateMLComponents.AnnotatedFeature<Feature, Annotation>], [CreateMLComponents.AnnotatedFeature<Feature, Annotation>]) where Annotation : Swift.Hashable, Generator : Swift.RandomNumberGenerator, Self.Element == CreateMLComponents.AnnotatedFeature<Feature, Annotation>
3328 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3329 public func randomSplit<T, Generator>(by proportion: Swift.Double, using generator: inout Generator) -> (Swift.ArraySlice<T>, Swift.ArraySlice<T>) where T == Self.Element, Generator : Swift.RandomNumberGenerator
3330}
3331@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3332public struct PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator> : CreateMLComponents.UpdatableSupervisedTabularEstimator where Preprocessor : CreateMLComponents.TabularTransformer, Estimator : CreateMLComponents.UpdatableSupervisedTabularEstimator {
3333 public typealias Transformer = CreateMLComponents.ComposedTabularTransformer<Preprocessor, Estimator.Transformer>
3334 public typealias Input = Preprocessor.Input
3335 public typealias Intermediate = Preprocessor.Output
3336 public typealias Output = Estimator.Transformer.Output
3337 public typealias Annotation = Estimator.Annotation
3338 public var preprocessor: Preprocessor
3339 public var estimator: Estimator
3340 public var annotationColumnID: TabularData.ColumnID<Estimator.Annotation> {
3341 get
3342 set
3343 }
3344 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
3345 @inlinable public func makeTransformer() -> CreateMLComponents.PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer {
3346 ComposedTabularTransformer(preprocessor, estimator.makeTransformer())
3347 }
3348 @inlinable public func preprocessed(from input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> TabularData.DataFrame {
3349 try await preprocessor.applied(to: input, eventHandler: eventHandler)
3350 }
3351 @inlinable public func fitted(toPreprocessed preprocessedInput: TabularData.DataFrame, validateOn preprocessedValidation: TabularData.DataFrame?, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer {
3352 let fittedTransformer = try await estimator.fitted(
3353 to: preprocessedInput,
3354 validateOn: preprocessedValidation,
3355 eventHandler: eventHandler
3356 )
3357 return ComposedTabularTransformer(preprocessor, fittedTransformer)
3358 }
3359 @inlinable public func fitted(to input: TabularData.DataFrame, validateOn validation: TabularData.DataFrame?, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer {
3360 let preprocessedInput = try await preprocessed(from: input, eventHandler: eventHandler)
3361 try Task.checkCancellation()
3362
3259}
3260@available(macOS 14.0, iOS 17.0, tvOS 17.0, visionOS 1.0, watchOS 11.0, *)
3261@backDeployed(before: macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0)
3262@inlinable public func meanSquaredError<T>(_ annotatedPredictions: [CreateMLComponents::AnnotatedPrediction<T, T>]) -> T where T : Swift::FloatingPoint {
3263 guard !annotatedPredictions.isEmpty else {
3264 return .nan
3265 }
3266 return annotatedPredictions.map({ ($0.prediction - $0.annotation) * ($0.prediction - $0.annotation) }).mean()
3267}
3268@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3269@backDeployed(before: macOS 14.0, iOS 17.0, tvOS 17.0)
3270@inlinable public func rootMeanSquaredError<T>(_ predicted: some Collection<T>, _ groundTruth: some Collection<T>) -> T where T : Swift::FloatingPoint {
3271 meanSquaredError(predicted, groundTruth).squareRoot()
3272}
3273@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3274@inlinable public func rootMeanSquaredError<T>(_ annotatedPredictions: [CreateMLComponents::AnnotatedPrediction<T, T>]) -> T where T : Swift::FloatingPoint {
3275 meanSquaredError(annotatedPredictions).squareRoot()
3276}
3277@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3278@inlinable public func meanAbsolutePercentageError<T>(_ annotatedPredictions: [CreateMLComponents::AnnotatedPrediction<T, T>]) -> T where T : Swift::FloatingPoint {
3279 if annotatedPredictions.isEmpty {
3280 return .nan
3281 }
3282 return annotatedPredictions.map({ abs(($0.annotation - $0.prediction) / $0.annotation) }).mean()
3283}
3284@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3285extension CreateMLComponents::AudioReader {
3286 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3287 public struct AsyncBuffers : CreateMLComponents::TemporalSequence {
3288 public typealias AsyncIterator = CreateMLComponents::AudioReader.CreateMLComponents::AsyncBuffers.CreateMLComponents::Iterator
3289 public typealias Feature = AVFAudio::AVAudioPCMBuffer
3290 public let url: Foundation::URL
3291 public let count: Swift::Int?
3292 public func makeAsyncIterator() -> CreateMLComponents::AudioReader.CreateMLComponents::AsyncBuffers.CreateMLComponents::Iterator
3293 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3294 public typealias Element = CreateMLComponents::TemporalFeature<CreateMLComponents::AudioReader.CreateMLComponents::AsyncBuffers.CreateMLComponents::Feature>
3295 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
3296 @_implements(_Concurrency::AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift::Error
3297 }
3298}
3299@available(*, unavailable)
3300extension CreateMLComponents::AudioReader.CreateMLComponents::AsyncBuffers : Swift::Sendable {
3301}
3302extension CreateMLComponents::AudioReader.CreateMLComponents::AsyncBuffers {
3303 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3304 public struct Iterator : _Concurrency::AsyncIteratorProtocol {
3305 public mutating func next() async throws -> CreateMLComponents::TemporalFeature<AVFAudio::AVAudioPCMBuffer>?
3306 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3307 public typealias Element = CreateMLComponents::TemporalFeature<AVFAudio::AVAudioPCMBuffer>
3308 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
3309 @_implements(_Concurrency::AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift::Error
3310 }
3311}
3312@available(*, unavailable)
3313extension CreateMLComponents::AudioReader.CreateMLComponents::AsyncBuffers.CreateMLComponents::Iterator : Swift::Sendable {
3314}
3315@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3316public protocol RandomTransformer<Input, Output> {
3317 associatedtype Input
3318 associatedtype Output
3319 func applied(to input: Self.Input, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents::EventHandler?) async throws -> Self.Output
3320}
3321extension Swift::Sequence {
3322 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3323 public func randomSplit<Feature, Annotation>(by proportion: Swift::Double, seed: Swift::Int? = nil) -> ([CreateMLComponents::AnnotatedFeature<Feature, Annotation>], [CreateMLComponents::AnnotatedFeature<Feature, Annotation>]) where Annotation : Swift::Hashable, Self.Element == CreateMLComponents::AnnotatedFeature<Feature, Annotation>
3324 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3325 public func randomSplit<T>(by proportion: Swift::Double, seed: Swift::Int? = nil) -> (Swift::ArraySlice<T>, Swift::ArraySlice<T>) where T == Self.Element
3326 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3327 public func randomSplit<Feature, Annotation, Generator>(by proportion: Swift::Double, using generator: inout Generator) -> ([CreateMLComponents::AnnotatedFeature<Feature, Annotation>], [CreateMLComponents::AnnotatedFeature<Feature, Annotation>]) where Annotation : Swift::Hashable, Generator : Swift::RandomNumberGenerator, Self.Element == CreateMLComponents::AnnotatedFeature<Feature, Annotation>
3328 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3329 public func randomSplit<T, Generator>(by proportion: Swift::Double, using generator: inout Generator) -> (Swift::ArraySlice<T>, Swift::ArraySlice<T>) where T == Self.Element, Generator : Swift::RandomNumberGenerator
3330}
3331@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3332public struct PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator> : CreateMLComponents::UpdatableSupervisedTabularEstimator where Preprocessor : CreateMLComponents::TabularTransformer, Estimator : CreateMLComponents::UpdatableSupervisedTabularEstimator {
3333 public typealias Transformer = CreateMLComponents::ComposedTabularTransformer<Preprocessor, Estimator.Transformer>
3334 public typealias Input = Preprocessor.Input
3335 public typealias Intermediate = Preprocessor.Output
3336 public typealias Output = Estimator.Transformer.Output
3337 public typealias Annotation = Estimator.Annotation
3338 public var preprocessor: Preprocessor
3339 public var estimator: Estimator
3340 public var annotationColumnID: TabularData::ColumnID<Estimator.Annotation> {
3341 get
3342 set
3343 }
3344 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
3345 @inlinable public func makeTransformer() -> CreateMLComponents::PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
3346 ComposedTabularTransformer(preprocessor, estimator.makeTransformer())
3347 }
3348 @inlinable public func preprocessed(from input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> TabularData::DataFrame {
3349 try await preprocessor.applied(to: input, eventHandler: eventHandler)
3350 }
3351 @inlinable public func fitted(toPreprocessed preprocessedInput: TabularData::DataFrame, validateOn preprocessedValidation: TabularData::DataFrame?, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
3352 let fittedTransformer = try await estimator.fitted(
3353 to: preprocessedInput,
3354 validateOn: preprocessedValidation,
3355 eventHandler: eventHandler
3356 )
3357 return ComposedTabularTransformer(preprocessor, fittedTransformer)
3358 }
3359 @inlinable public func fitted(to input: TabularData::DataFrame, validateOn validation: TabularData::DataFrame?, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
3360 let preprocessedInput = try await preprocessed(from: input, eventHandler: eventHandler)
3361 try Task.checkCancellation()
3362
… 11 unchanged lines …
3374 eventHandler: eventHandler
3375 )
3376 }
3377 @inlinable public func update(_ transformer: inout CreateMLComponents.PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer, withPreprocessed preprocessed: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws {
3378 try await estimator.update(
3379 &transformer.outer,
3380 with: preprocessed,
3381 eventHandler: eventHandler
3382 )
3383 }
3384 @inlinable public func update(_ transformer: inout CreateMLComponents.PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer, with input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws {
3385 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
3386 try Task.checkCancellation()
3387
3374 eventHandler: eventHandler
3375 )
3376 }
3377 @inlinable public func update(_ transformer: inout CreateMLComponents::PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, withPreprocessed preprocessed: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws {
3378 try await estimator.update(
3379 &transformer.outer,
3380 with: preprocessed,
3381 eventHandler: eventHandler
3382 )
3383 }
3384 @inlinable public func update(_ transformer: inout CreateMLComponents::PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, with input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws {
3385 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
3386 try Task.checkCancellation()
3387
… 3 unchanged lines …
3391 eventHandler: eventHandler
3392 )
3393 }
3394 public func encode(_ transformer: CreateMLComponents.PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
3395 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer
3396 public func encodeWithOptimizer(_ transformer: CreateMLComponents.PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
3397 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer
3398}
3399@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3400extension CreateMLComponents.PreprocessingUpdatableSupervisedTabularEstimator : Swift.Sendable where Preprocessor : Swift.Sendable, Estimator : Swift.Sendable {
3401}
3402extension CreateMLComponents.TabularTransformer {
3403 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3404 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingUpdatableSupervisedTabularEstimator<Self, Other> where Other : CreateMLComponents.UpdatableSupervisedTabularEstimator
3405}
3406@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3407public struct FullyConnectedNetworkConfiguration : Swift.Hashable, Swift.Codable, Swift.Sendable {
3408 public var hiddenUnitCounts: [Swift.Int]
3409 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3410 public var learningRate: Swift.Float
3411 public var maximumIterations: Swift.Int
3412 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3413 public var dropoutProbability: Swift.Float
3414 public var batchSize: Swift.Int
3415 public var earlyStoppingTolerance: Swift.Double
3416 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3417 public var earlyStopIterationCount: Swift.Int
3418 public var randomSeed: Swift.Int
3419 public init()
3420 public static func == (a: CreateMLComponents.FullyConnectedNetworkConfiguration, b: CreateMLComponents.FullyConnectedNetworkConfiguration) -> Swift.Bool
3421 public func encode(to encoder: any Swift.Encoder) throws
3422 public func hash(into hasher: inout Swift.Hasher)
3423 public var hashValue: Swift.Int {
3424 get
3425 }
3426 public init(from decoder: any Swift.Decoder) throws
3427}
3428@available(macOS, introduced: 13.0, deprecated: 15.0)
3429@available(iOS, introduced: 16.0, deprecated: 18.0)
3430@available(tvOS, introduced: 16.0, deprecated: 18.0)
3431@available(visionOS, introduced: 1.0, deprecated: 2.0)
3432@available(watchOS, unavailable)
3433public struct PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator> : CreateMLComponents.SupervisedTemporalEstimator where Preprocessor : CreateMLComponents.TemporalTransformer, Estimator : CreateMLComponents.SupervisedTemporalEstimator, Preprocessor.Output == Estimator.Transformer.Input {
3434 public typealias Transformer = CreateMLComponents.ComposedTemporalTransformer<Preprocessor, Estimator.Transformer>
3435 public typealias Input = Preprocessor.Input
3436 public typealias Intermediate = Preprocessor.Output
3437 public typealias Output = Estimator.Transformer.Output
3438 public typealias Annotation = Estimator.Annotation
3439 public var preprocessor: Preprocessor
3440 public var estimator: Estimator
3441 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
3442 @inlinable public func preprocessed<InputSequence, FeatureSequence>(from input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [CreateMLComponents.AnnotatedFeature<CreateMLComponents.PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents.PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>] where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
3443 var preprocessed = [AnnotatedFeature<PreprocessedFeatureSequence<Preprocessor.Output>, Annotation>]()
3444 for item in input {
3445 let transformed = try await preprocessor.applied(to: item.feature, eventHandler: eventHandler)
3391 eventHandler: eventHandler
3392 )
3393 }
3394 public func encode(_ transformer: CreateMLComponents::PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
3395 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
3396 public func encodeWithOptimizer(_ transformer: CreateMLComponents::PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
3397 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingUpdatableSupervisedTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
3398}
3399@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3400extension CreateMLComponents::PreprocessingUpdatableSupervisedTabularEstimator : Swift::Sendable where Preprocessor : Swift::Sendable, Estimator : Swift::Sendable {
3401}
3402extension CreateMLComponents::TabularTransformer {
3403 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3404 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingUpdatableSupervisedTabularEstimator<Self, Other> where Other : CreateMLComponents::UpdatableSupervisedTabularEstimator
3405}
3406@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3407public struct FullyConnectedNetworkConfiguration : Swift::Hashable, Swift::Codable, Swift::Sendable {
3408 public var hiddenUnitCounts: [Swift::Int]
3409 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3410 public var learningRate: Swift::Float
3411 public var maximumIterations: Swift::Int
3412 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3413 public var dropoutProbability: Swift::Float
3414 public var batchSize: Swift::Int
3415 public var earlyStoppingTolerance: Swift::Double
3416 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3417 public var earlyStopIterationCount: Swift::Int
3418 public var randomSeed: Swift::Int
3419 public init()
3420 public static func == (a: CreateMLComponents::FullyConnectedNetworkConfiguration, b: CreateMLComponents::FullyConnectedNetworkConfiguration) -> Swift::Bool
3421 public func encode(to encoder: any Swift::Encoder) throws
3422 public func hash(into hasher: inout Swift::Hasher)
3423 public var hashValue: Swift::Int {
3424 get
3425 }
3426 public init(from decoder: any Swift::Decoder) throws
3427}
3428@available(macOS, introduced: 13.0, deprecated: 15.0)
3429@available(iOS, introduced: 16.0, deprecated: 18.0)
3430@available(tvOS, introduced: 16.0, deprecated: 18.0)
3431@available(visionOS, introduced: 1.0, deprecated: 2.0)
3432@available(watchOS, unavailable)
3433public struct PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator> : CreateMLComponents::SupervisedTemporalEstimator where Preprocessor : CreateMLComponents::TemporalTransformer, Estimator : CreateMLComponents::SupervisedTemporalEstimator, Preprocessor.Output == Estimator.Transformer.Input {
3434 public typealias Transformer = CreateMLComponents::ComposedTemporalTransformer<Preprocessor, Estimator.Transformer>
3435 public typealias Input = Preprocessor.Input
3436 public typealias Intermediate = Preprocessor.Output
3437 public typealias Output = Estimator.Transformer.Output
3438 public typealias Annotation = Estimator.Annotation
3439 public var preprocessor: Preprocessor
3440 public var estimator: Estimator
3441 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
3442 @inlinable public func preprocessed<InputSequence, FeatureSequence>(from input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [CreateMLComponents::AnnotatedFeature<CreateMLComponents::PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents::PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>] where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
3443 var preprocessed = [AnnotatedFeature<PreprocessedFeatureSequence<Preprocessor.Output>, Annotation>]()
3444 for item in input {
3445 let transformed = try await preprocessor.applied(to: item.feature, eventHandler: eventHandler)
… 2 unchanged lines …
3448 }
3449 return preprocessed
3450 }
3451 @inlinable public func fitted(toPreprocessed preprocessed: [CreateMLComponents.AnnotatedFeature<CreateMLComponents.PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents.PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer {
3452 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
3453 return ComposedTemporalTransformer(preprocessor, fittedTransformer)
3454 }
3455 @inlinable public func fitted(toPreprocessed preprocessedInput: [CreateMLComponents.AnnotatedFeature<CreateMLComponents.PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents.PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], validateOn preprocessedValidation: [CreateMLComponents.AnnotatedFeature<CreateMLComponents.PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents.PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer {
3456 let fittedTransformer = try await estimator.fitted(
3457 to: preprocessedInput,
3458 validateOn: preprocessedValidation,
3459 eventHandler: eventHandler
3460 )
3461 return ComposedTemporalTransformer(preprocessor, fittedTransformer)
3462 }
3463 @inlinable public func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
3464 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
3465 try Task.checkCancellation()
3466 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
3467 }
3468 @inlinable public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer where InputSequence : Swift.Sequence, Validation : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Estimator.Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
3469 let preprocessedInput = try await preprocessed(from: input, eventHandler: eventHandler)
3470 let preprocessedValidation = try await preprocessed(from: validation, eventHandler: eventHandler)
3471 try Task.checkCancellation()
3448 }
3449 return preprocessed
3450 }
3451 @inlinable public func fitted(toPreprocessed preprocessed: [CreateMLComponents::AnnotatedFeature<CreateMLComponents::PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents::PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
3452 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
3453 return ComposedTemporalTransformer(preprocessor, fittedTransformer)
3454 }
3455 @inlinable public func fitted(toPreprocessed preprocessedInput: [CreateMLComponents::AnnotatedFeature<CreateMLComponents::PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents::PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], validateOn preprocessedValidation: [CreateMLComponents::AnnotatedFeature<CreateMLComponents::PreprocessedFeatureSequence<Preprocessor.Output>, CreateMLComponents::PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Annotation>], eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
3456 let fittedTransformer = try await estimator.fitted(
3457 to: preprocessedInput,
3458 validateOn: preprocessedValidation,
3459 eventHandler: eventHandler
3460 )
3461 return ComposedTemporalTransformer(preprocessor, fittedTransformer)
3462 }
3463 @inlinable public func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
3464 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
3465 try Task.checkCancellation()
3466 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
3467 }
3468 @inlinable public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, Validation : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, Preprocessor.Input == FeatureSequence.Feature, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Estimator.Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Estimator.Annotation> {
3469 let preprocessedInput = try await preprocessed(from: input, eventHandler: eventHandler)
3470 let preprocessedValidation = try await preprocessed(from: validation, eventHandler: eventHandler)
3471 try Task.checkCancellation()
… 3 unchanged lines …
3475 eventHandler: eventHandler
3476 )
3477 }
3478 public func encode(_ transformer: CreateMLComponents.PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
3479 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.Transformer
3480}
3481@available(macOS, introduced: 13.0, deprecated: 15.0)
3482@available(iOS, introduced: 16.0, deprecated: 18.0)
3483@available(tvOS, introduced: 16.0, deprecated: 18.0)
3484@available(visionOS, introduced: 1.0, deprecated: 2.0)
3485@available(watchOS, unavailable)
3486extension CreateMLComponents.PreprocessingSupervisedTemporalEstimator : Swift.Sendable where Preprocessor : Swift.Sendable, Estimator : Swift.Sendable {
3487}
3488extension CreateMLComponents.Transformer {
3489 @available(macOS, introduced: 13.0, deprecated: 15.0)
3490 @available(iOS, introduced: 16.0, deprecated: 18.0)
3491 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3492 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3493 @available(watchOS, unavailable)
3494 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingSupervisedTemporalEstimator<CreateMLComponents.TransformerToTemporalAdaptor<Self>, Other> where Other : CreateMLComponents.SupervisedTemporalEstimator, Self.Output == Other.Transformer.Input
3495}
3496extension CreateMLComponents.TemporalTransformer {
3497 @available(macOS, introduced: 13.0, deprecated: 15.0)
3498 @available(iOS, introduced: 16.0, deprecated: 18.0)
3499 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3500 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3501 @available(watchOS, unavailable)
3502 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingSupervisedTemporalEstimator<Self, CreateMLComponents.SupervisedEstimatorToTemporalAdaptor<Other>> where Other : CreateMLComponents.SupervisedEstimator, Self.Output == Other.Transformer.Input, Other.Annotation : Swift.Sendable
3503 @available(macOS, introduced: 13.0, deprecated: 15.0)
3504 @available(iOS, introduced: 16.0, deprecated: 18.0)
3505 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3506 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3507 @available(watchOS, unavailable)
3508 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingSupervisedTemporalEstimator<Self, Other> where Other : CreateMLComponents.SupervisedTemporalEstimator, Self.Output == Other.Transformer.Input
3509}
3510@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3511public enum OptimizationStrategy : Swift.Hashable, Swift.Codable, Swift.Sendable {
3512 case automatic
3513 case nonSmooth
3514 case lowMemory
3515 case fast
3516 public static func == (a: CreateMLComponents.OptimizationStrategy, b: CreateMLComponents.OptimizationStrategy) -> Swift.Bool
3517 public func encode(to encoder: any Swift.Encoder) throws
3518 public func hash(into hasher: inout Swift.Hasher)
3519 public var hashValue: Swift.Int {
3520 get
3521 }
3522 public init(from decoder: any Swift.Decoder) throws
3523}
3524extension CreateMLComponents.VideoReader {
3525 @available(macOS 13.0, iOS 16.0, *)
3526 @available(tvOS, unavailable)
3527 public struct CameraAsyncBuffers : CreateMLComponents.TemporalSequence {
3528 public typealias AsyncIterator = CreateMLComponents.VideoReader.CameraAsyncBuffers.Iterator
3529 public typealias Feature = CoreImage.CIImage
3530 public var count: Swift.Int? {
3531 get
3532 }
3533 @available(macOS 15.0, iOS 18.0, *)
3534 @available(tvOS, unavailable)
3535 public var captureSession: AVFoundation.AVCaptureSession {
3536 get
3537 }
3538 public consuming func makeAsyncIterator() -> CreateMLComponents.VideoReader.CameraAsyncBuffers.Iterator
3539 @available(iOS 16.0, macOS 13.0, *)
3540 @available(tvOS, unavailable, introduced: 16.0)
3541 public typealias Element = CreateMLComponents.TemporalFeature<CreateMLComponents.VideoReader.CameraAsyncBuffers.Feature>
3542 @available(iOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
3543 @available(tvOS, unavailable, introduced: 18.0)
3544 @_implements(_Concurrency.AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift.Error
3545 }
3546}
3547@available(macOS 15.0, iOS 18.0, *)
3548@available(tvOS, unavailable)
3549extension CreateMLComponents.VideoReader.CameraAsyncBuffers : Swift.Sendable {
3550}
3551@available(macOS 13.0, iOS 16.0, *)
3552@available(tvOS, unavailable)
3553extension CreateMLComponents.VideoReader.CameraAsyncBuffers {
3554 @_hasMissingDesignatedInitializers @available(macOS 13.0, iOS 16.0, *)
3555 @available(tvOS, unavailable)
3556 final public class Iterator : _Concurrency.AsyncIteratorProtocol {
3557 @objc deinit
3558 final public func next() async throws -> CreateMLComponents.TemporalFeature<CoreImage.CIImage>?
3559 @available(iOS 16.0, macOS 13.0, *)
3560 @available(tvOS, unavailable, introduced: 16.0)
3561 public typealias Element = CreateMLComponents.TemporalFeature<CoreImage.CIImage>
3562 @available(iOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
3563 @available(tvOS, unavailable, introduced: 18.0)
3564 @_implements(_Concurrency.AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift.Error
3565 }
3566}
3567@available(*, unavailable)
3568@available(tvOS, unavailable)
3569extension CreateMLComponents.VideoReader.CameraAsyncBuffers.Iterator : Swift.Sendable {
3570}
3571@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3572public struct TimeSeriesForecasterBatches<Scalar> : Swift.Sequence, @unchecked Swift.Sendable where Scalar : CoreML.MLShapedArrayScalar {
3573 public typealias Element = CreateMLComponents.AnnotatedBatch<Scalar>
3574 public let features: CoreML.MLShapedArray<Scalar>
3575 public let annotations: CoreML.MLShapedArray<Scalar>
3576 public let batchSize: Swift.Int
3577 public let inputWindowSize: Swift.Int
3578 public let forecastWindowSize: Swift.Int
3579 public var shufflesBatches: Swift.Bool
3580 public init(features: CoreML.MLShapedArray<Scalar>, annotations: CoreML.MLShapedArray<Scalar>, batchSize: Swift.Int, inputWindowSize: Swift.Int, forecastWindowSize: Swift.Int, shufflesBatches: Swift.Bool = true) throws
3581 public var underestimatedCount: Swift.Int {
3582 get
3583 }
3584 public func makeIterator() -> CreateMLComponents.TimeSeriesForecasterBatches<Scalar>.Iterator
3585}
3586extension CreateMLComponents.TimeSeriesForecasterBatches {
3587 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3588 public struct Iterator : Swift.IteratorProtocol, @unchecked Swift.Sendable {
3589 public mutating func next() -> CreateMLComponents.AnnotatedBatch<Scalar>?
3590 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
3591 public typealias Element = CreateMLComponents.AnnotatedBatch<Scalar>
3592 }
3593}
3594extension CreateMLComponents.TemporalTransformer {
3595 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3596 public func export(to url: Foundation.URL) throws
3597 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3598 public func export(to url: Foundation.URL, metadata: CreateMLComponents.ModelMetadata) throws
3599}
3600extension CreateMLComponents.LinearTimeSeriesForecaster {
3601 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3602 public struct Model : CreateMLComponents.Transformer, Swift.Sendable {
3603 public typealias Input = CoreML.MLShapedArray<Scalar>
3604 public typealias Output = CoreML.MLShapedArray<Scalar>
3605 public var featureSize: Swift.Int {
3606 get
3607 }
3608 public var annotationSize: Swift.Int {
3609 get
3610 }
3611 public var inputWindowSize: Swift.Int {
3612 get
3613 }
3614 public var forecastWindowSize: Swift.Int {
3615 get
3616 }
3617 public var stride: Swift.Int
3618 public var weight: CoreML.MLShapedArray<Scalar> {
3619 get
3620 }
3621 public var bias: CoreML.MLShapedArray<Scalar>? {
3622 get
3623 }
3624 public func applied(to input: some Sequence<MLShapedArray<Scalar>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [CoreML.MLShapedArray<Scalar>]
3625 public func applied(to input: CoreML.MLShapedArray<Scalar>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CoreML.MLShapedArray<Scalar>
3626 public func applied(toWindow input: CoreML.MLShapedArray<Scalar>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CoreML.MLShapedArray<Scalar>
3627 }
3628}
3629@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3630public struct LogisticRegressionClassifierModel<Scalar, Label> : CreateMLComponents.Classifier where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint, Label : Swift.Comparable, Label : Swift.Decodable, Label : Swift.Encodable, Label : Swift.Hashable {
3631 public typealias Input = CoreML.MLShapedArray<Scalar>
3632 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3633 public var featureCount: Swift.Int {
3634 get
3635 }
3636 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3637 public var coefficients: [Scalar] {
3638 get
3639 }
3640 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3641 public init(coefficients: some Sequence<Scalar>, labels: Swift.Set<Label>)
3642 public func applied(to input: CoreML.MLShapedArray<Scalar>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.ClassificationDistribution<Label>
3643 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
3644 public typealias Output = CreateMLComponents.ClassificationDistribution<Label>
3645}
3646@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3647extension CreateMLComponents.LogisticRegressionClassifierModel : Swift.Sendable where Scalar : Swift.Sendable, Label : Swift.Sendable {
3648}
3649extension CreateMLComponents.Estimator {
3650 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3651 public func appending<Other>(_ other: Other) -> some CreateMLComponents.Estimator<CreateMLComponents.ComposedTransformer<Self.Transformer, Other>> where Other : CreateMLComponents.Transformer, Other.Input == Self.Transformer.Output
3652
3653 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3654 public func appending<Other>(_ other: Other) -> some CreateMLComponents.Estimator<CreateMLComponents.ComposedTransformer<Self.Transformer, Other.Transformer>> where Other : CreateMLComponents.Estimator, Self.Transformer.Output == Other.Transformer.Input
3655
3656}
3657@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
3658@available(watchOS, unavailable)
3659extension CreateMLComponents.TimeSeriesClassifier.Model : CreateMLComponents.TemporalTransformer {
3660 public typealias OutputSequence = CreateMLComponents.AnyTemporalSequence<CreateMLComponents.ClassificationDistribution<Label>>
3661 public func applied(to input: some TemporalSequence<MLShapedArray<Scalar>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.AnyTemporalSequence<CreateMLComponents.ClassificationDistribution<Label>>
3662}
3663@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3664public struct TemporalAdaptor<Base> : CreateMLComponents.TemporalTransformer, Swift.Sendable where Base : CreateMLComponents.Transformer, Base : Swift.Sendable {
3665 public typealias Input = Base.Input
3666 public typealias Output = Base.Output
3667 public typealias OutputSequence = CreateMLComponents.AnyTemporalSequence<CreateMLComponents.TemporalAdaptor<Base>.Output>
3668 @usableFromInline
3669 internal var base: Base
3670 public init(_ transformer: Base)
3671 public func applied(to input: some TemporalSequence<Input>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.AnyTemporalSequence<CreateMLComponents.TemporalAdaptor<Base>.Output>
3672}
3673extension CreateMLComponents.Transformer {
3674 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3675 @inlinable @preconcurrency public func adaptedAsTemporal() -> CreateMLComponents.TemporalAdaptor<Self> where Self : Swift.Sendable {
3676 TemporalAdaptor(self)
3677 }
3678}
3679@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3680public struct ColumnSelectorTransformer<Base, UnwrappedInput> : CreateMLComponents.TabularTransformer where Base : CreateMLComponents.Transformer, Base.Input == UnwrappedInput? {
3681 public var transformers: [Swift.String : Base]
3682 public var columnMapping: [Swift.String : Swift.String]
3683 public init(transformers: [Swift.String : Base], columnMapping: [Swift.String : Swift.String] = [:])
3684 public func applied(to input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> TabularData.DataFrame
3685 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
3686 public typealias Input = TabularData.DataFrame
3687 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
3688 public typealias Output = TabularData.DataFrame
3689}
3690@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3691extension CreateMLComponents.ColumnSelectorTransformer : Swift.CustomDebugStringConvertible {
3692 public var debugDescription: Swift.String {
3693 get
3694 }
3695}
3696@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3697extension CreateMLComponents.ColumnSelectorTransformer : Swift.Sendable where Base : Swift.Sendable, UnwrappedInput : Swift.Sendable {
3698}
3699@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3700extension CreateMLComponents.ColumnSelectorTransformer : Swift.Codable where Base : Swift.Decodable, Base : Swift.Encodable {
3701 public func encode(to encoder: any Swift.Encoder) throws
3702 public init(from decoder: any Swift.Decoder) throws
3703}
3704@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3705public struct LogisticRegressionClassifier<Scalar, Label> : CreateMLComponents.SupervisedEstimator where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint, Label : Swift.Comparable, Label : Swift.Decodable, Label : Swift.Encodable, Label : Swift.Hashable {
3706 public typealias Transformer = CreateMLComponents.LogisticRegressionClassifierModel<Scalar, Label>
3707 public typealias Annotation = Label
3708 public var configuration: CreateMLComponents.LogisticRegressionClassifier<Scalar, Label>.Configuration {
3709 get
3710 set
3711 }
3712 public var labels: Swift.Set<Label>
3713 public init(labels: Swift.Set<Label>, configuration: CreateMLComponents.LogisticRegressionClassifier<Scalar, Label>.Configuration = Configuration())
3714 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.LogisticRegressionClassifier<Scalar, Label>.Transformer where Input : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Label>
3715 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.LogisticRegressionClassifierModel<Scalar, Label> where Input : Swift.Sequence, Validation : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Label>, Validation.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Label>
3716 public func encode(_ transformer: CreateMLComponents.LogisticRegressionClassifierModel<Scalar, Label>, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
3717 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.LogisticRegressionClassifierModel<Scalar, Label>
3718}
3719@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3720extension CreateMLComponents.LogisticRegressionClassifier : CreateMLComponents.UpdatableSupervisedEstimator {
3721 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3722 public func makeTransformer() -> CreateMLComponents.LogisticRegressionClassifier<Scalar, Label>.Transformer
3723 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3724 public func update<InputSequence>(_ transformer: inout CreateMLComponents.LogisticRegressionClassifier<Scalar, Label>.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler?) async throws where InputSequence : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Label>
3725 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3726 public func encodeWithOptimizer(_ transformer: CreateMLComponents.LogisticRegressionClassifier<Scalar, Label>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
3727 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3728 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.LogisticRegressionClassifier<Scalar, Label>.Transformer
3729}
3730@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3731extension CreateMLComponents.LogisticRegressionClassifier : Swift.Sendable where Scalar : Swift.Sendable, Label : Swift.Sendable {
3732}
3733extension CreateMLComponents.LogisticRegressionClassifier {
3734 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3735 public struct Configuration : Swift.Hashable, Swift.Codable, Swift.Sendable {
3736 public var l2Penalty: Swift.Double
3737 public var l1Penalty: Swift.Double
3738 public var maximumIterations: Swift.Int
3739 public var stepSize: Swift.Double
3740 public var convergenceThreshold: Swift.Double
3741 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3742 public var earlyStopIterationCount: Swift.Int
3743 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3744 public var scaleFeatures: Swift.Bool
3745 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3746 public var optimizationStrategy: CreateMLComponents.OptimizationStrategy {
3747 get
3748 set
3749 }
3750 public init()
3751 public static func == (a: CreateMLComponents.LogisticRegressionClassifier<Scalar, Label>.Configuration, b: CreateMLComponents.LogisticRegressionClassifier<Scalar, Label>.Configuration) -> Swift.Bool
3752 public func encode(to encoder: any Swift.Encoder) throws
3753 public func hash(into hasher: inout Swift.Hasher)
3754 public var hashValue: Swift.Int {
3755 get
3756 }
3757 public init(from decoder: any Swift.Decoder) throws
3758 }
3759}
3760@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3761public protocol TemporalTransformer<Input, Output> {
3762 associatedtype Input
3763 associatedtype Output where Self.Output == Self.OutputSequence.Feature
3764 associatedtype OutputSequence : CreateMLComponents.TemporalSequence
3765 func applied<S>(to input: S, eventHandler: CreateMLComponents.EventHandler?) async throws -> Self.OutputSequence where S : CreateMLComponents.TemporalSequence, Self.Input == S.Feature
3766}
3767@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3768extension CreateMLComponents.TemporalTransformer {
3769 @inlinable public func applied<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [Self.OutputSequence] where S : Swift.Sequence, Self.Input == S.Element.Feature, S.Element : CreateMLComponents.TemporalSequence {
3770 var result = [OutputSequence]()
3771 result.reserveCapacity(input.underestimatedCount)
3772 for example in input {
3475 eventHandler: eventHandler
3476 )
3477 }
3478 public func encode(_ transformer: CreateMLComponents::PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
3479 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingSupervisedTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
3480}
3481@available(macOS, introduced: 13.0, deprecated: 15.0)
3482@available(iOS, introduced: 16.0, deprecated: 18.0)
3483@available(tvOS, introduced: 16.0, deprecated: 18.0)
3484@available(visionOS, introduced: 1.0, deprecated: 2.0)
3485@available(watchOS, unavailable)
3486extension CreateMLComponents::PreprocessingSupervisedTemporalEstimator : Swift::Sendable where Preprocessor : Swift::Sendable, Estimator : Swift::Sendable {
3487}
3488extension CreateMLComponents::Transformer {
3489 @available(macOS, introduced: 13.0, deprecated: 15.0)
3490 @available(iOS, introduced: 16.0, deprecated: 18.0)
3491 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3492 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3493 @available(watchOS, unavailable)
3494 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingSupervisedTemporalEstimator<CreateMLComponents::TransformerToTemporalAdaptor<Self>, Other> where Other : CreateMLComponents::SupervisedTemporalEstimator, Self.Output == Other.Transformer.Input
3495}
3496extension CreateMLComponents::TemporalTransformer {
3497 @available(macOS, introduced: 13.0, deprecated: 15.0)
3498 @available(iOS, introduced: 16.0, deprecated: 18.0)
3499 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3500 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3501 @available(watchOS, unavailable)
3502 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingSupervisedTemporalEstimator<Self, CreateMLComponents::SupervisedEstimatorToTemporalAdaptor<Other>> where Other : CreateMLComponents::SupervisedEstimator, Self.Output == Other.Transformer.Input, Other.Annotation : Swift::Sendable
3503 @available(macOS, introduced: 13.0, deprecated: 15.0)
3504 @available(iOS, introduced: 16.0, deprecated: 18.0)
3505 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3506 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3507 @available(watchOS, unavailable)
3508 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingSupervisedTemporalEstimator<Self, Other> where Other : CreateMLComponents::SupervisedTemporalEstimator, Self.Output == Other.Transformer.Input
3509}
3510@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3511public enum OptimizationStrategy : Swift::Hashable, Swift::Codable, Swift::Sendable {
3512 case automatic
3513 case nonSmooth
3514 case lowMemory
3515 case fast
3516 public static func == (a: CreateMLComponents::OptimizationStrategy, b: CreateMLComponents::OptimizationStrategy) -> Swift::Bool
3517 public func encode(to encoder: any Swift::Encoder) throws
3518 public func hash(into hasher: inout Swift::Hasher)
3519 public var hashValue: Swift::Int {
3520 get
3521 }
3522 public init(from decoder: any Swift::Decoder) throws
3523}
3524extension CreateMLComponents::VideoReader {
3525 @available(macOS 13.0, iOS 16.0, *)
3526 @available(tvOS, unavailable)
3527 public struct CameraAsyncBuffers : CreateMLComponents::TemporalSequence {
3528 public typealias AsyncIterator = CreateMLComponents::VideoReader.CreateMLComponents::CameraAsyncBuffers.CreateMLComponents::Iterator
3529 public typealias Feature = CoreImage::CIImage
3530 public var count: Swift::Int? {
3531 get
3532 }
3533 @available(macOS 15.0, iOS 18.0, *)
3534 @available(tvOS, unavailable)
3535 public var captureSession: AVFoundation::AVCaptureSession {
3536 get
3537 }
3538 public consuming func makeAsyncIterator() -> CreateMLComponents::VideoReader.CreateMLComponents::CameraAsyncBuffers.CreateMLComponents::Iterator
3539 @available(macOS 13.0, iOS 16.0, *)
3540 @available(tvOS, unavailable, introduced: 16.0)
3541 public typealias Element = CreateMLComponents::TemporalFeature<CreateMLComponents::VideoReader.CreateMLComponents::CameraAsyncBuffers.CreateMLComponents::Feature>
3542 @available(macOS 15.0, iOS 18.0, watchOS 11.0, visionOS 2.0, *)
3543 @available(tvOS, unavailable, introduced: 18.0)
3544 @_implements(_Concurrency::AsyncSequence, Failure) public typealias __AsyncSequence_Failure = any Swift::Error
3545 }
3546}
3547@available(macOS 15.0, iOS 18.0, *)
3548@available(tvOS, unavailable)
3549extension CreateMLComponents::VideoReader.CreateMLComponents::CameraAsyncBuffers : Swift::Sendable {
3550}
3551@available(macOS 13.0, iOS 16.0, *)
3552@available(tvOS, unavailable)
3553extension CreateMLComponents::VideoReader.CreateMLComponents::CameraAsyncBuffers {
3554 @_hasMissingDesignatedInitializers @available(macOS 13.0, iOS 16.0, *)
3555 @available(tvOS, unavailable)
3556 final public class Iterator : _Concurrency::AsyncIteratorProtocol {
3557 @objc deinit
3558 final public func next() async throws -> CreateMLComponents::TemporalFeature<CoreImage::CIImage>?
3559 @available(macOS 13.0, iOS 16.0, *)
3560 @available(tvOS, unavailable, introduced: 16.0)
3561 public typealias Element = CreateMLComponents::TemporalFeature<CoreImage::CIImage>
3562 @available(macOS 15.0, iOS 18.0, watchOS 11.0, visionOS 2.0, *)
3563 @available(tvOS, unavailable, introduced: 18.0)
3564 @_implements(_Concurrency::AsyncIteratorProtocol, Failure) public typealias __AsyncIteratorProtocol_Failure = any Swift::Error
3565 }
3566}
3567@available(*, unavailable)
3568@available(tvOS, unavailable)
3569extension CreateMLComponents::VideoReader.CreateMLComponents::CameraAsyncBuffers.CreateMLComponents::Iterator : Swift::Sendable {
3570}
3571@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3572public struct TimeSeriesForecasterBatches<Scalar> : Swift::Sequence, @unchecked Swift::Sendable where Scalar : CoreML::MLShapedArrayScalar {
3573 public typealias Element = CreateMLComponents::AnnotatedBatch<Scalar>
3574 public let features: CoreML::MLShapedArray<Scalar>
3575 public let annotations: CoreML::MLShapedArray<Scalar>
3576 public let batchSize: Swift::Int
3577 public let inputWindowSize: Swift::Int
3578 public let forecastWindowSize: Swift::Int
3579 public var shufflesBatches: Swift::Bool
3580 public init(features: CoreML::MLShapedArray<Scalar>, annotations: CoreML::MLShapedArray<Scalar>, batchSize: Swift::Int, inputWindowSize: Swift::Int, forecastWindowSize: Swift::Int, shufflesBatches: Swift::Bool = true) throws
3581 public var underestimatedCount: Swift::Int {
3582 get
3583 }
3584 public func makeIterator() -> CreateMLComponents::TimeSeriesForecasterBatches<Scalar>.CreateMLComponents::Iterator
3585}
3586extension CreateMLComponents::TimeSeriesForecasterBatches {
3587 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3588 public struct Iterator : Swift::IteratorProtocol, @unchecked Swift::Sendable {
3589 public mutating func next() -> CreateMLComponents::AnnotatedBatch<Scalar>?
3590 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
3591 public typealias Element = CreateMLComponents::AnnotatedBatch<Scalar>
3592 }
3593}
3594extension CreateMLComponents::TemporalTransformer {
3595 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3596 public func export(to url: Foundation::URL) throws
3597 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
3598 public func export(to url: Foundation::URL, metadata: CreateMLComponents::ModelMetadata) throws
3599}
3600extension CreateMLComponents::LinearTimeSeriesForecaster {
3601 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3602 public struct Model : CreateMLComponents::Transformer, Swift::Sendable {
3603 public typealias Input = CoreML::MLShapedArray<Scalar>
3604 public typealias Output = CoreML::MLShapedArray<Scalar>
3605 public var featureSize: Swift::Int {
3606 get
3607 }
3608 public var annotationSize: Swift::Int {
3609 get
3610 }
3611 public var inputWindowSize: Swift::Int {
3612 get
3613 }
3614 public var forecastWindowSize: Swift::Int {
3615 get
3616 }
3617 public var stride: Swift::Int
3618 public var weight: CoreML::MLShapedArray<Scalar> {
3619 get
3620 }
3621 public var bias: CoreML::MLShapedArray<Scalar>? {
3622 get
3623 }
3624 public func applied(to input: some Sequence<MLShapedArray<Scalar>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [CoreML::MLShapedArray<Scalar>]
3625 public func applied(to input: CoreML::MLShapedArray<Scalar>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CoreML::MLShapedArray<Scalar>
3626 public func applied(toWindow input: CoreML::MLShapedArray<Scalar>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CoreML::MLShapedArray<Scalar>
3627 }
3628}
3629@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3630public struct LogisticRegressionClassifierModel<Scalar, Label> : CreateMLComponents::Classifier where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint, Label : Swift::Comparable, Label : Swift::Decodable, Label : Swift::Encodable, Label : Swift::Hashable {
3631 public typealias Input = CoreML::MLShapedArray<Scalar>
3632 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3633 public var featureCount: Swift::Int {
3634 get
3635 }
3636 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3637 public var coefficients: [Scalar] {
3638 get
3639 }
3640 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3641 public init(coefficients: some Sequence<Scalar>, labels: Swift::Set<Label>)
3642 public func applied(to input: CoreML::MLShapedArray<Scalar>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::ClassificationDistribution<Label>
3643 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3644 public typealias Output = CreateMLComponents::ClassificationDistribution<Label>
3645}
3646@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3647extension CreateMLComponents::LogisticRegressionClassifierModel : Swift::Sendable where Scalar : Swift::Sendable, Label : Swift::Sendable {
3648}
3649extension CreateMLComponents::Estimator {
3650 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3651 public func appending<Other>(_ other: Other) -> some CreateMLComponents::Estimator<CreateMLComponents::ComposedTransformer<Self.Transformer, Other>> where Other : CreateMLComponents::Transformer, Other.Input == Self.Transformer.Output
3652
3653 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3654 public func appending<Other>(_ other: Other) -> some CreateMLComponents::Estimator<CreateMLComponents::ComposedTransformer<Self.Transformer, Other.Transformer>> where Other : CreateMLComponents::Estimator, Self.Transformer.Output == Other.Transformer.Input
3655
3656}
3657@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
3658@available(watchOS, unavailable)
3659extension CreateMLComponents::TimeSeriesClassifier.CreateMLComponents::Model : CreateMLComponents::TemporalTransformer {
3660 public typealias OutputSequence = CreateMLComponents::AnyTemporalSequence<CreateMLComponents::ClassificationDistribution<Label>>
3661 public func applied(to input: some TemporalSequence<MLShapedArray<Scalar>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::AnyTemporalSequence<CreateMLComponents::ClassificationDistribution<Label>>
3662}
3663@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3664public struct TemporalAdaptor<Base> : CreateMLComponents::TemporalTransformer, Swift::Sendable where Base : CreateMLComponents::Transformer, Base : Swift::Sendable {
3665 public typealias Input = Base.Input
3666 public typealias Output = Base.Output
3667 public typealias OutputSequence = CreateMLComponents::AnyTemporalSequence<CreateMLComponents::TemporalAdaptor<Base>.Output>
3668 @usableFromInline
3669 internal var base: Base
3670 public init(_ transformer: Base)
3671 public func applied(to input: some TemporalSequence<Input>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::AnyTemporalSequence<CreateMLComponents::TemporalAdaptor<Base>.Output>
3672}
3673extension CreateMLComponents::Transformer {
3674 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3675 @inlinable @preconcurrency public func adaptedAsTemporal() -> CreateMLComponents::TemporalAdaptor<Self> where Self : Swift::Sendable {
3676 TemporalAdaptor(self)
3677 }
3678}
3679@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3680public struct ColumnSelectorTransformer<Base, UnwrappedInput> : CreateMLComponents::TabularTransformer where Base : CreateMLComponents::Transformer, Base.Input == UnwrappedInput? {
3681 public var transformers: [Swift::String : Base]
3682 public var columnMapping: [Swift::String : Swift::String]
3683 public init(transformers: [Swift::String : Base], columnMapping: [Swift::String : Swift::String] = [:])
3684 public func applied(to input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> TabularData::DataFrame
3685 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3686 public typealias Input = TabularData::DataFrame
3687 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3688 public typealias Output = TabularData::DataFrame
3689}
3690@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3691extension CreateMLComponents::ColumnSelectorTransformer : Swift::CustomDebugStringConvertible {
3692 public var debugDescription: Swift::String {
3693 get
3694 }
3695}
3696@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3697extension CreateMLComponents::ColumnSelectorTransformer : Swift::Sendable where Base : Swift::Sendable, UnwrappedInput : Swift::Sendable {
3698}
3699@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3700extension CreateMLComponents::ColumnSelectorTransformer : Swift::Codable where Base : Swift::Decodable, Base : Swift::Encodable {
3701 public func encode(to encoder: any Swift::Encoder) throws
3702 public init(from decoder: any Swift::Decoder) throws
3703}
3704@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3705public struct LogisticRegressionClassifier<Scalar, Label> : CreateMLComponents::SupervisedEstimator where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint, Label : Swift::Comparable, Label : Swift::Decodable, Label : Swift::Encodable, Label : Swift::Hashable {
3706 public typealias Transformer = CreateMLComponents::LogisticRegressionClassifierModel<Scalar, Label>
3707 public typealias Annotation = Label
3708 public var configuration: CreateMLComponents::LogisticRegressionClassifier<Scalar, Label>.CreateMLComponents::Configuration {
3709 get
3710 set
3711 }
3712 public var labels: Swift::Set<Label>
3713 public init(labels: Swift::Set<Label>, configuration: CreateMLComponents::LogisticRegressionClassifier<Scalar, Label>.CreateMLComponents::Configuration = Configuration())
3714 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::LogisticRegressionClassifier<Scalar, Label>.CreateMLComponents::Transformer where Input : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Label>
3715 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::LogisticRegressionClassifierModel<Scalar, Label> where Input : Swift::Sequence, Validation : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Label>, Validation.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Label>
3716 public func encode(_ transformer: CreateMLComponents::LogisticRegressionClassifierModel<Scalar, Label>, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
3717 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::LogisticRegressionClassifierModel<Scalar, Label>
3718}
3719@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3720extension CreateMLComponents::LogisticRegressionClassifier : CreateMLComponents::UpdatableSupervisedEstimator {
3721 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3722 public func makeTransformer() -> CreateMLComponents::LogisticRegressionClassifier<Scalar, Label>.CreateMLComponents::Transformer
3723 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3724 public func update<InputSequence>(_ transformer: inout CreateMLComponents::LogisticRegressionClassifier<Scalar, Label>.CreateMLComponents::Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler?) async throws where InputSequence : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Label>
3725 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3726 public func encodeWithOptimizer(_ transformer: CreateMLComponents::LogisticRegressionClassifier<Scalar, Label>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
3727 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3728 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::LogisticRegressionClassifier<Scalar, Label>.CreateMLComponents::Transformer
3729}
3730@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3731extension CreateMLComponents::LogisticRegressionClassifier : Swift::Sendable where Scalar : Swift::Sendable, Label : Swift::Sendable {
3732}
3733extension CreateMLComponents::LogisticRegressionClassifier {
3734 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3735 public struct Configuration : Swift::Hashable, Swift::Codable, Swift::Sendable {
3736 public var l2Penalty: Swift::Double
3737 public var l1Penalty: Swift::Double
3738 public var maximumIterations: Swift::Int
3739 public var stepSize: Swift::Double
3740 public var convergenceThreshold: Swift::Double
3741 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3742 public var earlyStopIterationCount: Swift::Int
3743 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3744 public var scaleFeatures: Swift::Bool
3745 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3746 public var optimizationStrategy: CreateMLComponents::OptimizationStrategy {
3747 get
3748 set
3749 }
3750 public init()
3751 public static func == (a: CreateMLComponents::LogisticRegressionClassifier<Scalar, Label>.CreateMLComponents::Configuration, b: CreateMLComponents::LogisticRegressionClassifier<Scalar, Label>.CreateMLComponents::Configuration) -> Swift::Bool
3752 public func encode(to encoder: any Swift::Encoder) throws
3753 public func hash(into hasher: inout Swift::Hasher)
3754 public var hashValue: Swift::Int {
3755 get
3756 }
3757 public init(from decoder: any Swift::Decoder) throws
3758 }
3759}
3760@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3761public protocol TemporalTransformer<Input, Output> {
3762 associatedtype Input
3763 associatedtype Output where Self.Output == Self.OutputSequence.Feature
3764 associatedtype OutputSequence : CreateMLComponents::TemporalSequence
3765 func applied<S>(to input: S, eventHandler: CreateMLComponents::EventHandler?) async throws -> Self.OutputSequence where S : CreateMLComponents::TemporalSequence, Self.Input == S.Feature
3766}
3767@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3768extension CreateMLComponents::TemporalTransformer {
3769 @inlinable public func applied<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [Self.OutputSequence] where S : Swift::Sequence, Self.Input == S.Element.Feature, S.Element : CreateMLComponents::TemporalSequence {
3770 var result = [OutputSequence]()
3771 result.reserveCapacity(input.underestimatedCount)
3772 for example in input {
… 11 unchanged lines …
3784 }
3785 return result
3786 }
3787 @inlinable public func applied<S, TS, Annotation>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [CreateMLComponents.AnnotatedFeature<Self.OutputSequence, Annotation>] where S : Swift.Sequence, TS : CreateMLComponents.TemporalSequence, Self.Input == TS.Feature, S.Element == CreateMLComponents.AnnotatedFeature<TS, Annotation> {
3788 var result = [AnnotatedFeature<OutputSequence, Annotation>]()
3789 result.reserveCapacity(input.underestimatedCount)
3790 for example in input {
3784 }
3785 return result
3786 }
3787 @inlinable public func applied<S, TS, Annotation>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [CreateMLComponents::AnnotatedFeature<Self.OutputSequence, Annotation>] where S : Swift::Sequence, TS : CreateMLComponents::TemporalSequence, Self.Input == TS.Feature, S.Element == CreateMLComponents::AnnotatedFeature<TS, Annotation> {
3788 var result = [AnnotatedFeature<OutputSequence, Annotation>]()
3789 result.reserveCapacity(input.underestimatedCount)
3790 for example in input {
… 14 unchanged lines …
3805 }
3806}
3807@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3808extension CreateMLComponents.TemporalTransformer {
3809 @inlinable public func callAsFunction<S>(_ input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Self.OutputSequence where S : CreateMLComponents.TemporalSequence, Self.Input == S.Feature {
3810 try await applied(to: input, eventHandler: eventHandler)
3811 }
3812 @inlinable public func callAsFunction<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [Self.OutputSequence] where S : Swift.Sequence, Self.Input == S.Element.Feature, S.Element : CreateMLComponents.TemporalSequence {
3813 try await applied(to: input, eventHandler: eventHandler)
3814 }
3815}
3816@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3817public struct ComposedTabularTransformer<Inner, Outer> : CreateMLComponents.TabularTransformer where Inner : CreateMLComponents.TabularTransformer, Outer : CreateMLComponents.TabularTransformer {
3818 public var inner: Inner
3819 public var outer: Outer
3820 public init(_ inner: Inner, _ outer: Outer)
3821 @inlinable public func applied(to input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> TabularData.DataFrame {
3822 let innerOutput = try await inner.applied(to: input, eventHandler: eventHandler)
3823 try Task.checkCancellation()
3824 let outerOutput = try await outer.applied(to: innerOutput, eventHandler: eventHandler)
3825 return outerOutput
3826 }
3827 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
3828 public typealias Input = TabularData.DataFrame
3829 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
3830 public typealias Output = TabularData.DataFrame
3831}
3832@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3833extension CreateMLComponents.ComposedTabularTransformer : Swift.CustomDebugStringConvertible {
3834 public var debugDescription: Swift.String {
3835 get
3836 }
3837}
3838@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3839extension CreateMLComponents.ComposedTabularTransformer : Swift.Sendable where Inner : Swift.Sendable, Outer : Swift.Sendable {
3840}
3841@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3842extension CreateMLComponents.ComposedTabularTransformer : Swift.Equatable where Inner : Swift.Equatable, Outer : Swift.Equatable {
3843 public static func == (a: CreateMLComponents.ComposedTabularTransformer<Inner, Outer>, b: CreateMLComponents.ComposedTabularTransformer<Inner, Outer>) -> Swift.Bool
3844}
3845@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3846extension CreateMLComponents.ComposedTabularTransformer : Swift.Encodable where Inner : Swift.Encodable, Outer : Swift.Encodable {
3847 public func encode(to encoder: any Swift.Encoder) throws
3848}
3849@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3850extension CreateMLComponents.ComposedTabularTransformer : Swift.Decodable where Inner : Swift.Decodable, Outer : Swift.Decodable {
3851 public init(from decoder: any Swift.Decoder) throws
3852}
3853extension CreateMLComponents.TabularTransformer {
3854 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3855 public func appending<Other>(_ other: Other) -> CreateMLComponents.ComposedTabularTransformer<Self, Other> where Other : CreateMLComponents.TabularTransformer
3856}
3857@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3858public struct FullyConnectedNetworkClassifierModel<Scalar, Label> : CreateMLComponents.Classifier where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint, Label : Swift.Comparable, Label : Swift.Decodable, Label : Swift.Encodable, Label : Swift.Hashable {
3859 public func applied(to input: CoreML.MLShapedArray<Scalar>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.ClassificationDistribution<Label>
3860 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
3861 public typealias Input = CoreML.MLShapedArray<Scalar>
3862 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
3863 public typealias Output = CreateMLComponents.ClassificationDistribution<Label>
3864}
3865@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3866extension CreateMLComponents.FullyConnectedNetworkClassifierModel : Swift.Codable {
3867 public func encode(to encoder: any Swift.Encoder) throws
3868 public init(from decoder: any Swift.Decoder) throws
3869}
3870@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3871extension CreateMLComponents.FullyConnectedNetworkClassifierModel : Swift.CustomDebugStringConvertible {
3872 public var debugDescription: Swift.String {
3873 get
3874 }
3875}
3876@available(*, unavailable)
3877extension CreateMLComponents.FullyConnectedNetworkClassifierModel : Swift.Sendable {
3878}
3879extension CreateMLComponents.Transformer {
3880 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3881 public func adaptedAsAnnotatedFeatureTransformer<Annotation>(annotationType: Annotation.Type = Annotation.self) -> some CreateMLComponents.Transformer<CreateMLComponents.AnnotatedFeature<Self.Input, Annotation>, CreateMLComponents.AnnotatedFeature<Self.Output, Annotation>>
3882
3883}
3884@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3885public struct HumanBodyActionCounter : CreateMLComponents.TemporalTransformer, Swift.Sendable {
3886 public typealias Input = [CreateMLComponents.Pose]
3887 public typealias Output = Swift.Float
3888 public typealias OutputSequence = CreateMLComponents.HumanBodyActionCounter.CumulativeSumSequence
3889 public init()
3890 public func applied<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.HumanBodyActionCounter.OutputSequence where S : CreateMLComponents.TemporalSequence, S.Feature == [CreateMLComponents.Pose]
3891}
3892@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3893public struct PreprocessingSupervisedEstimator<Preprocessor, Estimator> : CreateMLComponents.SupervisedEstimator where Preprocessor : CreateMLComponents.Transformer, Estimator : CreateMLComponents.SupervisedEstimator, Preprocessor.Output == Estimator.Transformer.Input {
3894 public typealias Transformer = CreateMLComponents.ComposedTransformer<Preprocessor, Estimator.Transformer>
3895 public typealias Input = Preprocessor.Input
3896 public typealias Intermediate = Preprocessor.Output
3897 public typealias Output = Estimator.Transformer.Output
3898 public typealias Annotation = Estimator.Annotation
3899 public var preprocessor: Preprocessor
3900 public var estimator: Estimator
3901 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
3902 @inlinable public func preprocessed<S>(from input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Swift.AnySequence<CreateMLComponents.AnnotatedFeature<Preprocessor.Output, CreateMLComponents.PreprocessingSupervisedEstimator<Preprocessor, Estimator>.Annotation>> where S : Swift.Sequence, S.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
3903 let inputFeatures = input.lazy.map(\.feature)
3904 let preprocessedFeatures = try await preprocessor.applied(to: inputFeatures, eventHandler: eventHandler)
3905 return AnySequence(zip(preprocessedFeatures, input.lazy.map(\.annotation)).lazy.map(AnnotatedFeature.init))
3906 }
3907 @inlinable public func fitted<S>(toPreprocessed preprocessed: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingSupervisedEstimator<Preprocessor, Estimator>.Transformer where S : Swift.Sequence, S.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Output, Estimator.Annotation> {
3908 let fittedTransformer = try await estimator.fitted(
3909 to: preprocessed,
3910 eventHandler: eventHandler
3911 )
3912 return ComposedTransformer(preprocessor, fittedTransformer)
3913 }
3914 @inlinable public func fitted<Input, Validation>(toPreprocessed preprocessedInput: Input, validateOn preprocessedValidation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingSupervisedEstimator<Preprocessor, Estimator>.Transformer where Input : Swift.Sequence, Validation : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Output, Estimator.Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Output, Estimator.Annotation> {
3915 let fittedTransformer = try await estimator.fitted(
3916 to: preprocessedInput,
3917 validateOn: preprocessedValidation,
3918 eventHandler: eventHandler
3919 )
3920 return ComposedTransformer(preprocessor, fittedTransformer)
3921 }
3922 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingSupervisedEstimator<Preprocessor, Estimator>.Transformer where InputSequence : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
3923 let inputFeatures = input.lazy.map(\.feature)
3924 let inputAnnotations = input.lazy.map(\.annotation)
3925
3805 }
3806}
3807@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3808extension CreateMLComponents::TemporalTransformer {
3809 @inlinable public func callAsFunction<S>(_ input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Self.OutputSequence where S : CreateMLComponents::TemporalSequence, Self.Input == S.Feature {
3810 try await applied(to: input, eventHandler: eventHandler)
3811 }
3812 @inlinable public func callAsFunction<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [Self.OutputSequence] where S : Swift::Sequence, Self.Input == S.Element.Feature, S.Element : CreateMLComponents::TemporalSequence {
3813 try await applied(to: input, eventHandler: eventHandler)
3814 }
3815}
3816@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3817public struct ComposedTabularTransformer<Inner, Outer> : CreateMLComponents::TabularTransformer where Inner : CreateMLComponents::TabularTransformer, Outer : CreateMLComponents::TabularTransformer {
3818 public var inner: Inner
3819 public var outer: Outer
3820 public init(_ inner: Inner, _ outer: Outer)
3821 @inlinable public func applied(to input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> TabularData::DataFrame {
3822 let innerOutput = try await inner.applied(to: input, eventHandler: eventHandler)
3823 try Task.checkCancellation()
3824 let outerOutput = try await outer.applied(to: innerOutput, eventHandler: eventHandler)
3825 return outerOutput
3826 }
3827 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3828 public typealias Input = TabularData::DataFrame
3829 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3830 public typealias Output = TabularData::DataFrame
3831}
3832@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3833extension CreateMLComponents::ComposedTabularTransformer : Swift::CustomDebugStringConvertible {
3834 public var debugDescription: Swift::String {
3835 get
3836 }
3837}
3838@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3839extension CreateMLComponents::ComposedTabularTransformer : Swift::Sendable where Inner : Swift::Sendable, Outer : Swift::Sendable {
3840}
3841@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3842extension CreateMLComponents::ComposedTabularTransformer : Swift::Equatable where Inner : Swift::Equatable, Outer : Swift::Equatable {
3843 public static func == (a: CreateMLComponents::ComposedTabularTransformer<Inner, Outer>, b: CreateMLComponents::ComposedTabularTransformer<Inner, Outer>) -> Swift::Bool
3844}
3845@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3846extension CreateMLComponents::ComposedTabularTransformer : Swift::Encodable where Inner : Swift::Encodable, Outer : Swift::Encodable {
3847 public func encode(to encoder: any Swift::Encoder) throws
3848}
3849@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3850extension CreateMLComponents::ComposedTabularTransformer : Swift::Decodable where Inner : Swift::Decodable, Outer : Swift::Decodable {
3851 public init(from decoder: any Swift::Decoder) throws
3852}
3853extension CreateMLComponents::TabularTransformer {
3854 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3855 public func appending<Other>(_ other: Other) -> CreateMLComponents::ComposedTabularTransformer<Self, Other> where Other : CreateMLComponents::TabularTransformer
3856}
3857@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3858public struct FullyConnectedNetworkClassifierModel<Scalar, Label> : CreateMLComponents::Classifier where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint, Label : Swift::Comparable, Label : Swift::Decodable, Label : Swift::Encodable, Label : Swift::Hashable {
3859 public func applied(to input: CoreML::MLShapedArray<Scalar>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::ClassificationDistribution<Label>
3860 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3861 public typealias Input = CoreML::MLShapedArray<Scalar>
3862 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3863 public typealias Output = CreateMLComponents::ClassificationDistribution<Label>
3864}
3865@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3866extension CreateMLComponents::FullyConnectedNetworkClassifierModel : Swift::Codable {
3867 public func encode(to encoder: any Swift::Encoder) throws
3868 public init(from decoder: any Swift::Decoder) throws
3869}
3870@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3871extension CreateMLComponents::FullyConnectedNetworkClassifierModel : Swift::CustomDebugStringConvertible {
3872 public var debugDescription: Swift::String {
3873 get
3874 }
3875}
3876@available(*, unavailable)
3877extension CreateMLComponents::FullyConnectedNetworkClassifierModel : Swift::Sendable {
3878}
3879extension CreateMLComponents::Transformer {
3880 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
3881 public func adaptedAsAnnotatedFeatureTransformer<Annotation>(annotationType: Annotation.Type = Annotation.self) -> some CreateMLComponents::Transformer<CreateMLComponents::AnnotatedFeature<Self.Input, Annotation>, CreateMLComponents::AnnotatedFeature<Self.Output, Annotation>>
3882
3883}
3884@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
3885public struct HumanBodyActionCounter : CreateMLComponents::TemporalTransformer, Swift::Sendable {
3886 public typealias Input = [CreateMLComponents::Pose]
3887 public typealias Output = Swift::Float
3888 public typealias OutputSequence = CreateMLComponents::HumanBodyActionCounter.CreateMLComponents::CumulativeSumSequence
3889 public init()
3890 public func applied<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::HumanBodyActionCounter.CreateMLComponents::OutputSequence where S : CreateMLComponents::TemporalSequence, S.Feature == [CreateMLComponents::Pose]
3891}
3892@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3893public struct PreprocessingSupervisedEstimator<Preprocessor, Estimator> : CreateMLComponents::SupervisedEstimator where Preprocessor : CreateMLComponents::Transformer, Estimator : CreateMLComponents::SupervisedEstimator, Preprocessor.Output == Estimator.Transformer.Input {
3894 public typealias Transformer = CreateMLComponents::ComposedTransformer<Preprocessor, Estimator.Transformer>
3895 public typealias Input = Preprocessor.Input
3896 public typealias Intermediate = Preprocessor.Output
3897 public typealias Output = Estimator.Transformer.Output
3898 public typealias Annotation = Estimator.Annotation
3899 public var preprocessor: Preprocessor
3900 public var estimator: Estimator
3901 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
3902 @inlinable public func preprocessed<S>(from input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Swift::AnySequence<CreateMLComponents::AnnotatedFeature<Preprocessor.Output, CreateMLComponents::PreprocessingSupervisedEstimator<Preprocessor, Estimator>.Annotation>> where S : Swift::Sequence, S.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
3903 let inputFeatures = input.lazy.map(\.feature)
3904 let preprocessedFeatures = try await preprocessor.applied(to: inputFeatures, eventHandler: eventHandler)
3905 return AnySequence(zip(preprocessedFeatures, input.lazy.map(\.annotation)).lazy.map(AnnotatedFeature.init))
3906 }
3907 @inlinable public func fitted<S>(toPreprocessed preprocessed: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where S : Swift::Sequence, S.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Output, Estimator.Annotation> {
3908 let fittedTransformer = try await estimator.fitted(
3909 to: preprocessed,
3910 eventHandler: eventHandler
3911 )
3912 return ComposedTransformer(preprocessor, fittedTransformer)
3913 }
3914 @inlinable public func fitted<Input, Validation>(toPreprocessed preprocessedInput: Input, validateOn preprocessedValidation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where Input : Swift::Sequence, Validation : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Output, Estimator.Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Output, Estimator.Annotation> {
3915 let fittedTransformer = try await estimator.fitted(
3916 to: preprocessedInput,
3917 validateOn: preprocessedValidation,
3918 eventHandler: eventHandler
3919 )
3920 return ComposedTransformer(preprocessor, fittedTransformer)
3921 }
3922 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
3923 let inputFeatures = input.lazy.map(\.feature)
3924 let inputAnnotations = input.lazy.map(\.annotation)
3925
… 6 unchanged lines …
3932 )
3933 return ComposedTransformer(preprocessor, fittedTransformer)
3934 }
3935 @inlinable public func fitted<InputSequence, Validation>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingSupervisedEstimator<Preprocessor, Estimator>.Transformer where InputSequence : Swift.Sequence, Validation : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Input, Estimator.Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
3936 let inputFeatures = input.lazy.map(\.feature)
3937 let inputAnnotations = input.lazy.map(\.annotation)
3938
3932 )
3933 return ComposedTransformer(preprocessor, fittedTransformer)
3934 }
3935 @inlinable public func fitted<InputSequence, Validation>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, Validation : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Input, Estimator.Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
3936 let inputFeatures = input.lazy.map(\.feature)
3937 let inputAnnotations = input.lazy.map(\.annotation)
3938
… 13 unchanged lines …
3952 )
3953 return ComposedTransformer(preprocessor, fittedTransformer)
3954 }
3955 public func encode(_ transformer: CreateMLComponents.PreprocessingSupervisedEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
3956 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingSupervisedEstimator<Preprocessor, Estimator>.Transformer
3957}
3958@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3959extension CreateMLComponents.PreprocessingSupervisedEstimator : Swift.Sendable where Preprocessor : Swift.Sendable, Estimator : Swift.Sendable {
3960}
3961extension CreateMLComponents.Transformer {
3962 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3963 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingSupervisedEstimator<Self, Other> where Other : CreateMLComponents.SupervisedEstimator, Self.Output == Other.Transformer.Input
3964}
3965@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3966extension CreateMLComponents.LinearTimeSeriesForecaster.Model : CreateMLComponents.TemporalTransformer {
3967 public typealias OutputSequence = CreateMLComponents.AnyTemporalSequence<CoreML.MLShapedArray<Scalar>>
3968 public func applied(to input: some TemporalSequence<MLShapedArray<Scalar>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.AnyTemporalSequence<CoreML.MLShapedArray<Scalar>>
3969}
3970extension CreateMLComponents.UpdatableEstimator {
3971 @available(macOS, introduced: 13.0, deprecated: 15.0)
3972 @available(iOS, introduced: 16.0, deprecated: 18.0)
3973 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3974 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3975 @available(watchOS, unavailable)
3976 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents.UpdatableSupervisedTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
3977
3978}
3979extension CreateMLComponents.UpdatableSupervisedEstimator {
3980 @available(macOS, introduced: 13.0, deprecated: 15.0)
3981 @available(iOS, introduced: 16.0, deprecated: 18.0)
3982 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3983 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3984 @available(watchOS, unavailable)
3985 @preconcurrency public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TransformerToTemporalAdaptor<Self.Transformer>, Other>, Self.Annotation> where Other : CreateMLComponents.TemporalTransformer, Self.Annotation : Swift.Sendable, Other.Input == Self.Transformer.Output
3986
3987 @available(macOS, introduced: 13.0, deprecated: 15.0)
3988 @available(iOS, introduced: 16.0, deprecated: 18.0)
3989 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3990 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3991 @available(watchOS, unavailable)
3992 @preconcurrency public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.UpdatableTemporalEstimator, Self.Annotation : Swift.Sendable, Self.Transformer.Output == Other.Transformer.Input
3993
3994 @available(macOS, introduced: 13.0, deprecated: 15.0)
3995 @available(iOS, introduced: 16.0, deprecated: 18.0)
3996 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3997 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3998 @available(watchOS, unavailable)
3999 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<CreateMLComponents.TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.UpdatableSupervisedTemporalEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
4000
4001}
4002@available(macOS, introduced: 13.0, deprecated: 15.0)
4003@available(iOS, introduced: 16.0, deprecated: 18.0)
4004@available(tvOS, introduced: 16.0, deprecated: 18.0)
4005@available(visionOS, introduced: 1.0, deprecated: 2.0)
4006@available(watchOS, unavailable)
4007extension CreateMLComponents.UpdatableTemporalEstimator {
4008 @preconcurrency public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, CreateMLComponents.TransformerToTemporalAdaptor<Other.Transformer>>, Other.Annotation> where Other : CreateMLComponents.UpdatableSupervisedEstimator, Other.Annotation : Swift.Sendable, Self.Transformer.Output == Other.Transformer.Input
4009
4010 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents.UpdatableSupervisedTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
4011
4012}
4013@available(macOS, introduced: 13.0, deprecated: 15.0)
4014@available(iOS, introduced: 16.0, deprecated: 18.0)
4015@available(tvOS, introduced: 16.0, deprecated: 18.0)
4016@available(visionOS, introduced: 1.0, deprecated: 2.0)
4017@available(watchOS, unavailable)
4018extension CreateMLComponents.UpdatableSupervisedTemporalEstimator {
4019 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, CreateMLComponents.TransformerToTemporalAdaptor<Other>>, Self.Annotation> where Other : CreateMLComponents.Transformer, Other.Input == Self.Transformer.Output
4020
4021 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, CreateMLComponents.TransformerToTemporalAdaptor<Other.Transformer>>, Self.Annotation> where Other : CreateMLComponents.UpdatableEstimator, Self.Transformer.Output == Other.Transformer.Input
4022
4023 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, CreateMLComponents.TransformerToTemporalAdaptor<Other.Transformer>>, Self.Annotation> where Other : CreateMLComponents.UpdatableSupervisedEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
4024
4025 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, Other>, Self.Annotation> where Other : CreateMLComponents.TemporalTransformer, Other.Input == Self.Transformer.Output
4026
4027 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.UpdatableTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
4028
4029 public func appending<Other>(_ other: Other) -> some CreateMLComponents.UpdatableSupervisedTemporalEstimator<CreateMLComponents.ComposedTemporalTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.UpdatableSupervisedTemporalEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
4030
4031}
4032extension CreateMLComponents.MultiLabelClassificationMetrics {
4033 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4034 public func count(of label: Label) -> Swift.Int
4035 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4036 public func truePositiveCount(of label: Label) -> Swift.Int
4037 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4038 public func trueNegativeCount(of label: Label) -> Swift.Int
4039 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4040 public func falsePositiveCount(of label: Label) -> Swift.Int
4041 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4042 public func falseNegativeCount(of label: Label) -> Swift.Int
4043 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4044 public func f1Score(for label: Label) -> Swift.Float
4045}
4046@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4047public struct ShuffleRandomly<Element> : CreateMLComponents.RandomTransformer {
4048 public init<RandomTransformer>(@CreateMLComponents.AugmentationBuilder<Element> _ augmentation: () -> RandomTransformer) where Element == RandomTransformer.Input, RandomTransformer : CreateMLComponents.RandomTransformer, RandomTransformer.Input == RandomTransformer.Output
4049 public func applied(to input: Element, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Element
4050 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
4051 public typealias Input = Element
4052 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
4053 public typealias Output = Element
4054}
4055@available(*, unavailable)
4056extension CreateMLComponents.ShuffleRandomly : Swift.Sendable {
4057}
4058@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4059public struct CategoricalImputer<Element> : CreateMLComponents.Estimator where Element : Swift.Decodable, Element : Swift.Encodable, Element : Swift.Hashable {
4060 public typealias Transformer = CreateMLComponents.ImputeTransformer<Element>
4061 public enum Strategy {
4062 case mode
4063 case constant(Element)
4064 }
4065 public var strategy: CreateMLComponents.CategoricalImputer<Element>.Strategy
4066 public init(_ strategy: CreateMLComponents.CategoricalImputer<Element>.Strategy)
4067 public init(constant: Element)
4068 public func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) -> CreateMLComponents.CategoricalImputer<Element>.Transformer where S : Swift.Sequence, S.Element == Element?
4069}
4070@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4071extension CreateMLComponents.CategoricalImputer : Swift.CustomDebugStringConvertible {
4072 public var debugDescription: Swift.String {
4073 get
4074 }
4075}
4076@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4077extension CreateMLComponents.CategoricalImputer : Swift.Sendable where Element : Swift.Sendable {
4078}
4079@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4080extension CreateMLComponents.CategoricalImputer.Strategy : Swift.Sendable where Element : Swift.Sendable {
4081}
4082@available(macOS, introduced: 13.0, deprecated: 15.0, renamed: "TemporalAdaptor")
4083@available(iOS, introduced: 16.0, deprecated: 18.0, renamed: "TemporalAdaptor")
4084@available(tvOS, introduced: 16.0, deprecated: 18.0, renamed: "TemporalAdaptor")
4085@available(visionOS, introduced: 1.0, deprecated: 2.0, renamed: "TemporalAdaptor")
4086@available(watchOS, unavailable)
4087public struct TransformerToTemporalAdaptor<Base> : CreateMLComponents.TemporalTransformer where Base : CreateMLComponents.Transformer {
4088 public typealias Input = Base.Input
4089 public typealias Output = Base.Output
4090 public typealias OutputSequence = CreateMLComponents.AnyTemporalSequence<CreateMLComponents.TransformerToTemporalAdaptor<Base>.Output>
4091 @usableFromInline
4092 internal var base: Base
4093 public init(_ transformer: Base)
4094 @inlinable public func applied<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.AnyTemporalSequence<CreateMLComponents.TransformerToTemporalAdaptor<Base>.Output> where S : CreateMLComponents.TemporalSequence, Base.Input == S.Feature {
4095 nonisolated(unsafe) let base = self.base
4096 let sequence = input.map {
4097 try await TemporalFeature(id: $0.id, feature: base.applied(to: $0.feature, eventHandler: eventHandler))
3952 )
3953 return ComposedTransformer(preprocessor, fittedTransformer)
3954 }
3955 public func encode(_ transformer: CreateMLComponents::PreprocessingSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
3956 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
3957}
3958@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3959extension CreateMLComponents::PreprocessingSupervisedEstimator : Swift::Sendable where Preprocessor : Swift::Sendable, Estimator : Swift::Sendable {
3960}
3961extension CreateMLComponents::Transformer {
3962 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
3963 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingSupervisedEstimator<Self, Other> where Other : CreateMLComponents::SupervisedEstimator, Self.Output == Other.Transformer.Input
3964}
3965@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
3966extension CreateMLComponents::LinearTimeSeriesForecaster.CreateMLComponents::Model : CreateMLComponents::TemporalTransformer {
3967 public typealias OutputSequence = CreateMLComponents::AnyTemporalSequence<CoreML::MLShapedArray<Scalar>>
3968 public func applied(to input: some TemporalSequence<MLShapedArray<Scalar>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::AnyTemporalSequence<CoreML::MLShapedArray<Scalar>>
3969}
3970extension CreateMLComponents::UpdatableEstimator {
3971 @available(macOS, introduced: 13.0, deprecated: 15.0)
3972 @available(iOS, introduced: 16.0, deprecated: 18.0)
3973 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3974 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3975 @available(watchOS, unavailable)
3976 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents::UpdatableSupervisedTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
3977
3978}
3979extension CreateMLComponents::UpdatableSupervisedEstimator {
3980 @available(macOS, introduced: 13.0, deprecated: 15.0)
3981 @available(iOS, introduced: 16.0, deprecated: 18.0)
3982 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3983 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3984 @available(watchOS, unavailable)
3985 @preconcurrency public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TransformerToTemporalAdaptor<Self.Transformer>, Other>, Self.Annotation> where Other : CreateMLComponents::TemporalTransformer, Self.Annotation : Swift::Sendable, Other.Input == Self.Transformer.Output
3986
3987 @available(macOS, introduced: 13.0, deprecated: 15.0)
3988 @available(iOS, introduced: 16.0, deprecated: 18.0)
3989 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3990 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3991 @available(watchOS, unavailable)
3992 @preconcurrency public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::UpdatableTemporalEstimator, Self.Annotation : Swift::Sendable, Self.Transformer.Output == Other.Transformer.Input
3993
3994 @available(macOS, introduced: 13.0, deprecated: 15.0)
3995 @available(iOS, introduced: 16.0, deprecated: 18.0)
3996 @available(tvOS, introduced: 16.0, deprecated: 18.0)
3997 @available(visionOS, introduced: 1.0, deprecated: 2.0)
3998 @available(watchOS, unavailable)
3999 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<CreateMLComponents::TransformerToTemporalAdaptor<Self.Transformer>, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::UpdatableSupervisedTemporalEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
4000
4001}
4002@available(macOS, introduced: 13.0, deprecated: 15.0)
4003@available(iOS, introduced: 16.0, deprecated: 18.0)
4004@available(tvOS, introduced: 16.0, deprecated: 18.0)
4005@available(visionOS, introduced: 1.0, deprecated: 2.0)
4006@available(watchOS, unavailable)
4007extension CreateMLComponents::UpdatableTemporalEstimator {
4008 @preconcurrency public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, CreateMLComponents::TransformerToTemporalAdaptor<Other.Transformer>>, Other.Annotation> where Other : CreateMLComponents::UpdatableSupervisedEstimator, Other.Annotation : Swift::Sendable, Self.Transformer.Output == Other.Transformer.Input
4009
4010 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents::UpdatableSupervisedTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
4011
4012}
4013@available(macOS, introduced: 13.0, deprecated: 15.0)
4014@available(iOS, introduced: 16.0, deprecated: 18.0)
4015@available(tvOS, introduced: 16.0, deprecated: 18.0)
4016@available(visionOS, introduced: 1.0, deprecated: 2.0)
4017@available(watchOS, unavailable)
4018extension CreateMLComponents::UpdatableSupervisedTemporalEstimator {
4019 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, CreateMLComponents::TransformerToTemporalAdaptor<Other>>, Self.Annotation> where Other : CreateMLComponents::Transformer, Other.Input == Self.Transformer.Output
4020
4021 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, CreateMLComponents::TransformerToTemporalAdaptor<Other.Transformer>>, Self.Annotation> where Other : CreateMLComponents::UpdatableEstimator, Self.Transformer.Output == Other.Transformer.Input
4022
4023 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, CreateMLComponents::TransformerToTemporalAdaptor<Other.Transformer>>, Self.Annotation> where Other : CreateMLComponents::UpdatableSupervisedEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
4024
4025 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, Other>, Self.Annotation> where Other : CreateMLComponents::TemporalTransformer, Other.Input == Self.Transformer.Output
4026
4027 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::UpdatableTemporalEstimator, Self.Transformer.Output == Other.Transformer.Input
4028
4029 public func appending<Other>(_ other: Other) -> some CreateMLComponents::UpdatableSupervisedTemporalEstimator<CreateMLComponents::ComposedTemporalTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::UpdatableSupervisedTemporalEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
4030
4031}
4032extension CreateMLComponents::MultiLabelClassificationMetrics {
4033 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4034 public func count(of label: Label) -> Swift::Int
4035 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4036 public func truePositiveCount(of label: Label) -> Swift::Int
4037 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4038 public func trueNegativeCount(of label: Label) -> Swift::Int
4039 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4040 public func falsePositiveCount(of label: Label) -> Swift::Int
4041 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4042 public func falseNegativeCount(of label: Label) -> Swift::Int
4043 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4044 public func f1Score(for label: Label) -> Swift::Float
4045}
4046@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4047public struct ShuffleRandomly<Element> : CreateMLComponents::RandomTransformer {
4048 public init<RandomTransformer>(@CreateMLComponents::AugmentationBuilder<Element> _ augmentation: () -> RandomTransformer) where Element == RandomTransformer.Input, RandomTransformer : CreateMLComponents::RandomTransformer, RandomTransformer.Input == RandomTransformer.Output
4049 public func applied(to input: Element, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Element
4050 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4051 public typealias Input = Element
4052 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4053 public typealias Output = Element
4054}
4055@available(*, unavailable)
4056extension CreateMLComponents::ShuffleRandomly : Swift::Sendable {
4057}
4058@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4059public struct CategoricalImputer<Element> : CreateMLComponents::Estimator where Element : Swift::Decodable, Element : Swift::Encodable, Element : Swift::Hashable {
4060 public typealias Transformer = CreateMLComponents::ImputeTransformer<Element>
4061 public enum Strategy {
4062 case mode
4063 case constant(Element)
4064 }
4065 public var strategy: CreateMLComponents::CategoricalImputer<Element>.CreateMLComponents::Strategy
4066 public init(_ strategy: CreateMLComponents::CategoricalImputer<Element>.CreateMLComponents::Strategy)
4067 public init(constant: Element)
4068 public func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) -> CreateMLComponents::CategoricalImputer<Element>.CreateMLComponents::Transformer where S : Swift::Sequence, S.Element == Element?
4069}
4070@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4071extension CreateMLComponents::CategoricalImputer : Swift::CustomDebugStringConvertible {
4072 public var debugDescription: Swift::String {
4073 get
4074 }
4075}
4076@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4077extension CreateMLComponents::CategoricalImputer : Swift::Sendable where Element : Swift::Sendable {
4078}
4079@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4080extension CreateMLComponents::CategoricalImputer.CreateMLComponents::Strategy : Swift::Sendable where Element : Swift::Sendable {
4081}
4082@available(macOS, introduced: 13.0, deprecated: 15.0, renamed: "TemporalAdaptor")
4083@available(iOS, introduced: 16.0, deprecated: 18.0, renamed: "TemporalAdaptor")
4084@available(tvOS, introduced: 16.0, deprecated: 18.0, renamed: "TemporalAdaptor")
4085@available(visionOS, introduced: 1.0, deprecated: 2.0, renamed: "TemporalAdaptor")
4086@available(watchOS, unavailable)
4087public struct TransformerToTemporalAdaptor<Base> : CreateMLComponents::TemporalTransformer where Base : CreateMLComponents::Transformer {
4088 public typealias Input = Base.Input
4089 public typealias Output = Base.Output
4090 public typealias OutputSequence = CreateMLComponents::AnyTemporalSequence<CreateMLComponents::TransformerToTemporalAdaptor<Base>.Output>
4091 @usableFromInline
4092 internal var base: Base
4093 public init(_ transformer: Base)
4094 @inlinable public func applied<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::AnyTemporalSequence<CreateMLComponents::TransformerToTemporalAdaptor<Base>.Output> where S : CreateMLComponents::TemporalSequence, Base.Input == S.Feature {
4095 nonisolated(unsafe) let base = self.base
4096 let sequence = input.map {
4097 try await TemporalFeature(id: $0.id, feature: base.applied(to: $0.feature, eventHandler: eventHandler))
… 6 unchanged lines …
4104@available(tvOS, introduced: 16.0, deprecated: 18.0)
4105@available(visionOS, introduced: 1.0, deprecated: 2.0)
4106@available(watchOS, unavailable)
4107extension CreateMLComponents.TransformerToTemporalAdaptor : Swift.Sendable where Base : Swift.Sendable {
4108}
4109extension CreateMLComponents.Transformer {
4110 @available(macOS, introduced: 13.0, deprecated: 15.0)
4111 @available(iOS, introduced: 16.0, deprecated: 18.0)
4112 @available(tvOS, introduced: 16.0, deprecated: 18.0)
4113 @available(visionOS, introduced: 1.0, deprecated: 2.0)
4114 @available(watchOS, unavailable)
4115 @_disfavoredOverload @inlinable public func adaptedAsTemporal() -> CreateMLComponents.TransformerToTemporalAdaptor<Self> {
4116 TransformerToTemporalAdaptor(self)
4117 }
4118}
4104@available(tvOS, introduced: 16.0, deprecated: 18.0)
4105@available(visionOS, introduced: 1.0, deprecated: 2.0)
4106@available(watchOS, unavailable)
4107extension CreateMLComponents::TransformerToTemporalAdaptor : Swift::Sendable where Base : Swift::Sendable {
4108}
4109extension CreateMLComponents::Transformer {
4110 @available(macOS, introduced: 13.0, deprecated: 15.0)
4111 @available(iOS, introduced: 16.0, deprecated: 18.0)
4112 @available(tvOS, introduced: 16.0, deprecated: 18.0)
4113 @available(visionOS, introduced: 1.0, deprecated: 2.0)
4114 @available(watchOS, unavailable)
4115 @_disfavoredOverload @inlinable public func adaptedAsTemporal() -> CreateMLComponents::TransformerToTemporalAdaptor<Self> {
4116 TransformerToTemporalAdaptor(self)
4117 }
4118}
… 2 unchanged lines …
4121@available(tvOS, introduced: 16.0, deprecated: 18.0)
4122@available(visionOS, introduced: 1.0, deprecated: 2.0)
4123@available(watchOS, unavailable)
4124public struct EstimatorToTemporalAdaptor<Base> : CreateMLComponents.TemporalEstimator where Base : CreateMLComponents.Estimator {
4125 public typealias Transformer = CreateMLComponents.TransformerToTemporalAdaptor<Base.Transformer>
4126 public typealias Input = Base.Transformer.Input
4127 public typealias Output = Base.Transformer.Output
4128 @usableFromInline
4129 internal var base: Base
4130 public init(_ base: Base)
4131 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.EstimatorToTemporalAdaptor<Base>.Transformer where InputSequence : Swift.Sequence, InputSequence.Element : CreateMLComponents.TemporalSequence, Base.Transformer.Input == InputSequence.Element.Feature {
4132 var collected = [Input]()
4133 for sequence in input {
4134 for try await item in sequence {
4121@available(tvOS, introduced: 16.0, deprecated: 18.0)
4122@available(visionOS, introduced: 1.0, deprecated: 2.0)
4123@available(watchOS, unavailable)
4124public struct EstimatorToTemporalAdaptor<Base> : CreateMLComponents::TemporalEstimator where Base : CreateMLComponents::Estimator {
4125 public typealias Transformer = CreateMLComponents::TransformerToTemporalAdaptor<Base.Transformer>
4126 public typealias Input = Base.Transformer.Input
4127 public typealias Output = Base.Transformer.Output
4128 @usableFromInline
4129 internal var base: Base
4130 public init(_ base: Base)
4131 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::EstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, InputSequence.Element : CreateMLComponents::TemporalSequence, Base.Transformer.Input == InputSequence.Element.Feature {
4132 var collected = [Input]()
4133 for sequence in input {
4134 for try await item in sequence {
… 2 unchanged lines …
4137 }
4138 return try await Transformer(base.fitted(to: collected, eventHandler: eventHandler))
4139 }
4140 @inlinable public func encode(_ transformer: CreateMLComponents.EstimatorToTemporalAdaptor<Base>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
4141 try base.encode(transformer.base, to: &encoder)
4142 }
4143 @inlinable public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.EstimatorToTemporalAdaptor<Base>.Transformer {
4144 try Transformer(base.decode(from: &decoder))
4145 }
4146}
4137 }
4138 return try await Transformer(base.fitted(to: collected, eventHandler: eventHandler))
4139 }
4140 @inlinable public func encode(_ transformer: CreateMLComponents::EstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
4141 try base.encode(transformer.base, to: &encoder)
4142 }
4143 @inlinable public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::EstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer {
4144 try Transformer(base.decode(from: &decoder))
4145 }
4146}
… 2 unchanged lines …
4149@available(tvOS, introduced: 16.0, deprecated: 18.0)
4150@available(visionOS, introduced: 1.0, deprecated: 2.0)
4151@available(watchOS, unavailable)
4152extension CreateMLComponents.EstimatorToTemporalAdaptor : Swift.Sendable where Base : Swift.Sendable {
4153}
4154extension CreateMLComponents.Estimator {
4155 @available(macOS, introduced: 13.0, deprecated: 15.0)
4156 @available(iOS, introduced: 16.0, deprecated: 18.0)
4157 @available(tvOS, introduced: 16.0, deprecated: 18.0)
4158 @available(visionOS, introduced: 1.0, deprecated: 2.0)
4159 @available(watchOS, unavailable)
4160 @inlinable public func adaptedAsTemporal() -> CreateMLComponents.EstimatorToTemporalAdaptor<Self> {
4161 EstimatorToTemporalAdaptor(self)
4162 }
4163}
4149@available(tvOS, introduced: 16.0, deprecated: 18.0)
4150@available(visionOS, introduced: 1.0, deprecated: 2.0)
4151@available(watchOS, unavailable)
4152extension CreateMLComponents::EstimatorToTemporalAdaptor : Swift::Sendable where Base : Swift::Sendable {
4153}
4154extension CreateMLComponents::Estimator {
4155 @available(macOS, introduced: 13.0, deprecated: 15.0)
4156 @available(iOS, introduced: 16.0, deprecated: 18.0)
4157 @available(tvOS, introduced: 16.0, deprecated: 18.0)
4158 @available(visionOS, introduced: 1.0, deprecated: 2.0)
4159 @available(watchOS, unavailable)
4160 @inlinable public func adaptedAsTemporal() -> CreateMLComponents::EstimatorToTemporalAdaptor<Self> {
4161 EstimatorToTemporalAdaptor(self)
4162 }
4163}
… 2 unchanged lines …
4166@available(tvOS, introduced: 16.0, deprecated: 18.0)
4167@available(visionOS, introduced: 1.0, deprecated: 2.0)
4168@available(watchOS, unavailable)
4169public struct UpdatableEstimatorToTemporalAdaptor<Base> : CreateMLComponents.UpdatableTemporalEstimator where Base : CreateMLComponents.UpdatableEstimator {
4170 public typealias Transformer = CreateMLComponents.TransformerToTemporalAdaptor<Base.Transformer>
4171 public typealias Input = Base.Transformer.Input
4172 public typealias Output = Base.Transformer.Output
4173 @usableFromInline
4174 internal var base: Base
4175 public init(_ base: Base)
4176 @inlinable public func makeTransformer() -> CreateMLComponents.UpdatableEstimatorToTemporalAdaptor<Base>.Transformer {
4177 TransformerToTemporalAdaptor(base.makeTransformer())
4178 }
4179 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.UpdatableEstimatorToTemporalAdaptor<Base>.Transformer where InputSequence : Swift.Sequence, InputSequence.Element : CreateMLComponents.TemporalSequence, Base.Transformer.Input == InputSequence.Element.Feature {
4180 var collected = [Input]()
4181 for sequence in input {
4182 for try await item in sequence {
4166@available(tvOS, introduced: 16.0, deprecated: 18.0)
4167@available(visionOS, introduced: 1.0, deprecated: 2.0)
4168@available(watchOS, unavailable)
4169public struct UpdatableEstimatorToTemporalAdaptor<Base> : CreateMLComponents::UpdatableTemporalEstimator where Base : CreateMLComponents::UpdatableEstimator {
4170 public typealias Transformer = CreateMLComponents::TransformerToTemporalAdaptor<Base.Transformer>
4171 public typealias Input = Base.Transformer.Input
4172 public typealias Output = Base.Transformer.Output
4173 @usableFromInline
4174 internal var base: Base
4175 public init(_ base: Base)
4176 @inlinable public func makeTransformer() -> CreateMLComponents::UpdatableEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer {
4177 TransformerToTemporalAdaptor(base.makeTransformer())
4178 }
4179 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::UpdatableEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, InputSequence.Element : CreateMLComponents::TemporalSequence, Base.Transformer.Input == InputSequence.Element.Feature {
4180 var collected = [Input]()
4181 for sequence in input {
4182 for try await item in sequence {
… 2 unchanged lines …
4185 }
4186 return try await Transformer(base.fitted(to: collected, eventHandler: eventHandler))
4187 }
4188 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents.UpdatableEstimatorToTemporalAdaptor<Base>.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, InputSequence.Element : CreateMLComponents.TemporalSequence, Base.Transformer.Input == InputSequence.Element.Feature {
4189 var collected = [Input]()
4190 for sequence in input {
4191 for try await item in sequence {
4185 }
4186 return try await Transformer(base.fitted(to: collected, eventHandler: eventHandler))
4187 }
4188 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents::UpdatableEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, InputSequence.Element : CreateMLComponents::TemporalSequence, Base.Transformer.Input == InputSequence.Element.Feature {
4189 var collected = [Input]()
4190 for sequence in input {
4191 for try await item in sequence {
… 2 unchanged lines …
4194 }
4195 return try await base.update(&transformer.base, with: collected, eventHandler: eventHandler)
4196 }
4197 @inlinable public func encode(_ transformer: CreateMLComponents.UpdatableEstimatorToTemporalAdaptor<Base>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
4198 try base.encode(transformer.base, to: &encoder)
4199 }
4200 @inlinable public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.UpdatableEstimatorToTemporalAdaptor<Base>.Transformer {
4201 try Transformer(base.decode(from: &decoder))
4202 }
4203 @inlinable public func encodeWithOptimizer(_ transformer: CreateMLComponents.UpdatableEstimatorToTemporalAdaptor<Base>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
4204 try base.encodeWithOptimizer(transformer.base, to: &encoder)
4205 }
4206 @inlinable public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.UpdatableEstimatorToTemporalAdaptor<Base>.Transformer {
4207 try Transformer(base.decodeWithOptimizer(from: &decoder))
4208 }
4209}
4194 }
4195 return try await base.update(&transformer.base, with: collected, eventHandler: eventHandler)
4196 }
4197 @inlinable public func encode(_ transformer: CreateMLComponents::UpdatableEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
4198 try base.encode(transformer.base, to: &encoder)
4199 }
4200 @inlinable public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::UpdatableEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer {
4201 try Transformer(base.decode(from: &decoder))
4202 }
4203 @inlinable public func encodeWithOptimizer(_ transformer: CreateMLComponents::UpdatableEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
4204 try base.encodeWithOptimizer(transformer.base, to: &encoder)
4205 }
4206 @inlinable public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::UpdatableEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer {
4207 try Transformer(base.decodeWithOptimizer(from: &decoder))
4208 }
4209}
… 2 unchanged lines …
4212@available(tvOS, introduced: 16.0, deprecated: 18.0)
4213@available(visionOS, introduced: 1.0, deprecated: 2.0)
4214@available(watchOS, unavailable)
4215extension CreateMLComponents.UpdatableEstimatorToTemporalAdaptor : Swift.Sendable where Base : Swift.Sendable {
4216}
4217extension CreateMLComponents.UpdatableEstimator {
4218 @available(macOS, introduced: 13.0, deprecated: 15.0)
4219 @available(iOS, introduced: 16.0, deprecated: 18.0)
4220 @available(tvOS, introduced: 16.0, deprecated: 18.0)
4221 @available(visionOS, introduced: 1.0, deprecated: 2.0)
4222 @available(watchOS, unavailable)
4223 @inlinable public func adaptedAsTemporal() -> CreateMLComponents.UpdatableEstimatorToTemporalAdaptor<Self> {
4224 UpdatableEstimatorToTemporalAdaptor(self)
4225 }
4226}
4212@available(tvOS, introduced: 16.0, deprecated: 18.0)
4213@available(visionOS, introduced: 1.0, deprecated: 2.0)
4214@available(watchOS, unavailable)
4215extension CreateMLComponents::UpdatableEstimatorToTemporalAdaptor : Swift::Sendable where Base : Swift::Sendable {
4216}
4217extension CreateMLComponents::UpdatableEstimator {
4218 @available(macOS, introduced: 13.0, deprecated: 15.0)
4219 @available(iOS, introduced: 16.0, deprecated: 18.0)
4220 @available(tvOS, introduced: 16.0, deprecated: 18.0)
4221 @available(visionOS, introduced: 1.0, deprecated: 2.0)
4222 @available(watchOS, unavailable)
4223 @inlinable public func adaptedAsTemporal() -> CreateMLComponents::UpdatableEstimatorToTemporalAdaptor<Self> {
4224 UpdatableEstimatorToTemporalAdaptor(self)
4225 }
4226}
… 2 unchanged lines …
4229@available(tvOS, introduced: 16.0, deprecated: 18.0)
4230@available(visionOS, introduced: 1.0, deprecated: 2.0)
4231@available(watchOS, unavailable)
4232public struct SupervisedEstimatorToTemporalAdaptor<Base> : CreateMLComponents.SupervisedTemporalEstimator where Base : CreateMLComponents.SupervisedEstimator, Base.Annotation : Swift.Sendable {
4233 public typealias Transformer = CreateMLComponents.TransformerToTemporalAdaptor<Base.Transformer>
4234 public typealias Input = Base.Transformer.Input
4235 public typealias Output = Base.Transformer.Output
4236 public typealias Annotation = Base.Annotation
4237 @usableFromInline
4238 internal var base: Base
4239 public init(_ base: Base)
4240 @inlinable public func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.SupervisedEstimatorToTemporalAdaptor<Base>.Transformer where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Base.Annotation>, FeatureSequence.Feature == Base.Transformer.Input {
4241 var collected = [AnnotatedFeature<Input, Annotation>]()
4242 for sequence in input {
4243 for try await item in sequence.feature {
4229@available(tvOS, introduced: 16.0, deprecated: 18.0)
4230@available(visionOS, introduced: 1.0, deprecated: 2.0)
4231@available(watchOS, unavailable)
4232public struct SupervisedEstimatorToTemporalAdaptor<Base> : CreateMLComponents::SupervisedTemporalEstimator where Base : CreateMLComponents::SupervisedEstimator, Base.Annotation : Swift::Sendable {
4233 public typealias Transformer = CreateMLComponents::TransformerToTemporalAdaptor<Base.Transformer>
4234 public typealias Input = Base.Transformer.Input
4235 public typealias Output = Base.Transformer.Output
4236 public typealias Annotation = Base.Annotation
4237 @usableFromInline
4238 internal var base: Base
4239 public init(_ base: Base)
4240 @inlinable public func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::SupervisedEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Base.Annotation>, FeatureSequence.Feature == Base.Transformer.Input {
4241 var collected = [AnnotatedFeature<Input, Annotation>]()
4242 for sequence in input {
4243 for try await item in sequence.feature {
… 7 unchanged lines …
4251 )
4252 return TransformerToTemporalAdaptor(transformer)
4253 }
4254 @inlinable public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.SupervisedEstimatorToTemporalAdaptor<Base>.Transformer where InputSequence : Swift.Sequence, Validation : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Base.Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Base.Annotation>, FeatureSequence.Feature == Base.Transformer.Input {
4255 var collectedInput = [AnnotatedFeature<Input, Annotation>]()
4256 for sequence in input {
4257 for try await item in sequence.feature {
4251 )
4252 return TransformerToTemporalAdaptor(transformer)
4253 }
4254 @inlinable public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::SupervisedEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, Validation : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Base.Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Base.Annotation>, FeatureSequence.Feature == Base.Transformer.Input {
4255 var collectedInput = [AnnotatedFeature<Input, Annotation>]()
4256 for sequence in input {
4257 for try await item in sequence.feature {
… 15 unchanged lines …
4273 )
4274 return TransformerToTemporalAdaptor(transformer)
4275 }
4276 @inlinable public func encode(_ transformer: CreateMLComponents.SupervisedEstimatorToTemporalAdaptor<Base>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
4277 try base.encode(transformer.base, to: &encoder)
4278 }
4279 @inlinable public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.SupervisedEstimatorToTemporalAdaptor<Base>.Transformer {
4280 try Transformer(base.decode(from: &decoder))
4281 }
4282}
4273 )
4274 return TransformerToTemporalAdaptor(transformer)
4275 }
4276 @inlinable public func encode(_ transformer: CreateMLComponents::SupervisedEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
4277 try base.encode(transformer.base, to: &encoder)
4278 }
4279 @inlinable public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::SupervisedEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer {
4280 try Transformer(base.decode(from: &decoder))
4281 }
4282}
… 2 unchanged lines …
4285@available(tvOS, introduced: 16.0, deprecated: 18.0)
4286@available(visionOS, introduced: 1.0, deprecated: 2.0)
4287@available(watchOS, unavailable)
4288extension CreateMLComponents.SupervisedEstimatorToTemporalAdaptor : Swift.Sendable where Base : Swift.Sendable {
4289}
4290extension CreateMLComponents.SupervisedEstimator where Self.Annotation : Swift.Sendable {
4291 @available(macOS, introduced: 13.0, deprecated: 15.0)
4292 @available(iOS, introduced: 16.0, deprecated: 18.0)
4293 @available(tvOS, introduced: 16.0, deprecated: 18.0)
4294 @available(visionOS, introduced: 1.0, deprecated: 2.0)
4295 @available(watchOS, unavailable)
4296 @inlinable public func adaptedAsTemporal() -> CreateMLComponents.SupervisedEstimatorToTemporalAdaptor<Self> {
4297 SupervisedEstimatorToTemporalAdaptor(self)
4298 }
4299}
4285@available(tvOS, introduced: 16.0, deprecated: 18.0)
4286@available(visionOS, introduced: 1.0, deprecated: 2.0)
4287@available(watchOS, unavailable)
4288extension CreateMLComponents::SupervisedEstimatorToTemporalAdaptor : Swift::Sendable where Base : Swift::Sendable {
4289}
4290extension CreateMLComponents::SupervisedEstimator where Self.Annotation : Swift::Sendable {
4291 @available(macOS, introduced: 13.0, deprecated: 15.0)
4292 @available(iOS, introduced: 16.0, deprecated: 18.0)
4293 @available(tvOS, introduced: 16.0, deprecated: 18.0)
4294 @available(visionOS, introduced: 1.0, deprecated: 2.0)
4295 @available(watchOS, unavailable)
4296 @inlinable public func adaptedAsTemporal() -> CreateMLComponents::SupervisedEstimatorToTemporalAdaptor<Self> {
4297 SupervisedEstimatorToTemporalAdaptor(self)
4298 }
4299}
… 2 unchanged lines …
4302@available(tvOS, introduced: 16.0, deprecated: 18.0)
4303@available(visionOS, introduced: 1.0, deprecated: 2.0)
4304@available(watchOS, unavailable)
4305public struct UpdatableSupervisedEstimatorToTemporalAdaptor<Base> : CreateMLComponents.UpdatableSupervisedTemporalEstimator where Base : CreateMLComponents.UpdatableSupervisedEstimator, Base.Annotation : Swift.Sendable {
4306 public typealias Transformer = CreateMLComponents.TransformerToTemporalAdaptor<Base.Transformer>
4307 public typealias Input = Base.Transformer.Input
4308 public typealias Output = Base.Transformer.Output
4309 public typealias Annotation = Base.Annotation
4310 @usableFromInline
4311 internal var base: Base
4312 public init(_ base: Base)
4313 @inlinable public func makeTransformer() -> CreateMLComponents.UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.Transformer {
4314 TransformerToTemporalAdaptor(base.makeTransformer())
4315 }
4316 @inlinable public func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.Transformer where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Base.Annotation>, FeatureSequence.Feature == Base.Transformer.Input {
4317 var collected = [AnnotatedFeature<Input, Annotation>]()
4318 for sequence in input {
4319 for try await item in sequence.feature {
4302@available(tvOS, introduced: 16.0, deprecated: 18.0)
4303@available(visionOS, introduced: 1.0, deprecated: 2.0)
4304@available(watchOS, unavailable)
4305public struct UpdatableSupervisedEstimatorToTemporalAdaptor<Base> : CreateMLComponents::UpdatableSupervisedTemporalEstimator where Base : CreateMLComponents::UpdatableSupervisedEstimator, Base.Annotation : Swift::Sendable {
4306 public typealias Transformer = CreateMLComponents::TransformerToTemporalAdaptor<Base.Transformer>
4307 public typealias Input = Base.Transformer.Input
4308 public typealias Output = Base.Transformer.Output
4309 public typealias Annotation = Base.Annotation
4310 @usableFromInline
4311 internal var base: Base
4312 public init(_ base: Base)
4313 @inlinable public func makeTransformer() -> CreateMLComponents::UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer {
4314 TransformerToTemporalAdaptor(base.makeTransformer())
4315 }
4316 @inlinable public func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Base.Annotation>, FeatureSequence.Feature == Base.Transformer.Input {
4317 var collected = [AnnotatedFeature<Input, Annotation>]()
4318 for sequence in input {
4319 for try await item in sequence.feature {
… 7 unchanged lines …
4327 )
4328 return TransformerToTemporalAdaptor(transformer)
4329 }
4330 @inlinable public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.Transformer where InputSequence : Swift.Sequence, Validation : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Base.Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Base.Annotation>, FeatureSequence.Feature == Base.Transformer.Input {
4331 var collectedInput = [AnnotatedFeature<Input, Annotation>]()
4332 for sequence in input {
4333 for try await item in sequence.feature {
4327 )
4328 return TransformerToTemporalAdaptor(transformer)
4329 }
4330 @inlinable public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, Validation : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Base.Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Base.Annotation>, FeatureSequence.Feature == Base.Transformer.Input {
4331 var collectedInput = [AnnotatedFeature<Input, Annotation>]()
4332 for sequence in input {
4333 for try await item in sequence.feature {
… 15 unchanged lines …
4349 )
4350 return TransformerToTemporalAdaptor(transformer)
4351 }
4352 @inlinable public func update<InputSequence, FeatureSequence>(_ transformer: inout CreateMLComponents.UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Base.Annotation>, FeatureSequence.Feature == Base.Transformer.Input {
4353 var collected = [AnnotatedFeature<Input, Annotation>]()
4354 for sequence in input {
4355 for try await item in sequence.feature {
4349 )
4350 return TransformerToTemporalAdaptor(transformer)
4351 }
4352 @inlinable public func update<InputSequence, FeatureSequence>(_ transformer: inout CreateMLComponents::UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Base.Annotation>, FeatureSequence.Feature == Base.Transformer.Input {
4353 var collected = [AnnotatedFeature<Input, Annotation>]()
4354 for sequence in input {
4355 for try await item in sequence.feature {
… 7 unchanged lines …
4363 eventHandler: eventHandler
4364 )
4365 }
4366 @inlinable public func encode(_ transformer: CreateMLComponents.UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
4367 try base.encode(transformer.base, to: &encoder)
4368 }
4369 @inlinable public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.Transformer {
4370 try Transformer(base.decode(from: &decoder))
4371 }
4372 public func encodeWithOptimizer(_ transformer: CreateMLComponents.UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
4373 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.Transformer
4374}
4375@available(macOS, introduced: 13.0, deprecated: 15.0)
4376@available(iOS, introduced: 16.0, deprecated: 18.0)
4377@available(tvOS, introduced: 16.0, deprecated: 18.0)
4378@available(visionOS, introduced: 1.0, deprecated: 2.0)
4379@available(watchOS, unavailable)
4380extension CreateMLComponents.UpdatableSupervisedEstimatorToTemporalAdaptor : Swift.Sendable where Base : Swift.Sendable {
4381}
4382extension CreateMLComponents.UpdatableSupervisedEstimator where Self.Annotation : Swift.Sendable {
4383 @available(macOS, introduced: 13.0, deprecated: 15.0)
4384 @available(iOS, introduced: 16.0, deprecated: 18.0)
4385 @available(tvOS, introduced: 16.0, deprecated: 18.0)
4386 @available(visionOS, introduced: 1.0, deprecated: 2.0)
4387 @available(watchOS, unavailable)
4388 @inlinable public func adaptedAsTemporal() -> CreateMLComponents.UpdatableSupervisedEstimatorToTemporalAdaptor<Self> {
4389 UpdatableSupervisedEstimatorToTemporalAdaptor(self)
4390 }
4391}
4392@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4393public enum AudioPreprocessingError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
4394 case incompatibleTargetFormatForConversion(inputFormat: AVFAudio.AVAudioFormat, targetFormat: AVFAudio.AVAudioFormat)
4395 public var errorDescription: Swift.String? {
4396 get
4397 }
4398 public static func == (a: CreateMLComponents.AudioPreprocessingError, b: CreateMLComponents.AudioPreprocessingError) -> Swift.Bool
4399}
4400@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4401extension CreateMLComponents.AudioPreprocessingError : Swift.CustomDebugStringConvertible {
4402 public var debugDescription: Swift.String {
4403 get
4404 }
4405}
4406@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4407public struct Classification<Label> : Swift.Hashable where Label : Swift.Hashable {
4408 public var label: Label
4409 public var probability: Swift.Float
4410 public init(label: Label, probability: Swift.Float)
4411 public static func == (a: CreateMLComponents.Classification<Label>, b: CreateMLComponents.Classification<Label>) -> Swift.Bool
4412 public func hash(into hasher: inout Swift.Hasher)
4413 public var hashValue: Swift.Int {
4414 get
4415 }
4416}
4417@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4418extension CreateMLComponents.Classification : Swift.Codable where Label : Swift.Decodable, Label : Swift.Encodable {
4419 public func encode(to encoder: any Swift.Encoder) throws
4420 public init(from decoder: any Swift.Decoder) throws
4421}
4422@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4423extension CreateMLComponents.Classification : Swift.Sendable where Label : Swift.Sendable {
4424}
4425extension CreateMLComponents.Estimator {
4426 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4427 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedEstimator<CreateMLComponents.ComposedTransformer<Self.Transformer, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents.SupervisedEstimator, Self.Transformer.Output == Other.Transformer.Input
4428
4429}
4430extension CreateMLComponents.SupervisedEstimator {
4431 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4432 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedEstimator<CreateMLComponents.ComposedTransformer<Self.Transformer, Other>, Self.Annotation> where Other : CreateMLComponents.Transformer, Other.Input == Self.Transformer.Output
4433
4434 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4435 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedEstimator<CreateMLComponents.ComposedTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.Estimator, Self.Transformer.Output == Other.Transformer.Input
4436
4437 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4438 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedEstimator<CreateMLComponents.ComposedTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.SupervisedEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
4439
4440}
4441@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4442public struct ColumnConcatenator<Scalar> : CreateMLComponents.TabularTransformer where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint {
4443 public var columnSelection: CreateMLComponents.ColumnSelection
4444 public var concatenatedColumnName: Swift.String
4445 public init(columnSelection: CreateMLComponents.ColumnSelection = .all, concatenatedColumnName: Swift.String = "features")
4446 public func applied(to input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> TabularData.DataFrame
4447 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4448 public typealias Input = TabularData.DataFrame
4449 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4450 public typealias Output = TabularData.DataFrame
4451}
4452@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4453extension CreateMLComponents.ColumnConcatenator : Swift.CustomDebugStringConvertible {
4454 public var debugDescription: Swift.String {
4455 get
4456 }
4457}
4458@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4459extension CreateMLComponents.ColumnConcatenator : Swift.Sendable where Scalar : Swift.Sendable {
4460}
4461@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4462public struct ColumnSelector<Estimator, UnwrappedInput> : CreateMLComponents.TabularEstimator where Estimator : CreateMLComponents.Estimator, Estimator.Transformer.Input == UnwrappedInput? {
4463 public var columnSelection: CreateMLComponents.ColumnSelection
4464 public var estimator: Estimator
4465 public typealias Transformer = CreateMLComponents.ColumnSelectorTransformer<Estimator.Transformer, UnwrappedInput>
4466 public typealias Input = Estimator.Transformer.Input
4467 public typealias Output = Estimator.Transformer.Output
4468 public init(_ columnSelection: CreateMLComponents.ColumnSelection, estimator: Estimator)
4469 public init<T>(_ columnSelection: CreateMLComponents.ColumnSelection, transformer: T) where Estimator == CreateMLComponents.TransformerToEstimatorAdaptor<T>, T : CreateMLComponents.Transformer, T.Input == UnwrappedInput?
4470 public init(columns: [Swift.String], estimator: Estimator)
4471 public func fitted(to input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.ColumnSelector<Estimator, UnwrappedInput>.Transformer
4472 public func encode(_ transformer: CreateMLComponents.ColumnSelector<Estimator, UnwrappedInput>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
4473 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.ColumnSelector<Estimator, UnwrappedInput>.Transformer
4474}
4475@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4476extension CreateMLComponents.ColumnSelector : CreateMLComponents.UpdatableTabularEstimator where Estimator : CreateMLComponents.UpdatableEstimator {
4477 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4478 public func makeTransformer() -> CreateMLComponents.ColumnSelectorTransformer<Estimator.Transformer, UnwrappedInput>
4479 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4480 public func update(_ transformer: inout CreateMLComponents.ColumnSelector<Estimator, UnwrappedInput>.Transformer, with input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws
4481 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4482 public func encodeWithOptimizer(_ transformer: CreateMLComponents.ColumnSelector<Estimator, UnwrappedInput>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
4483 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4484 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.ColumnSelector<Estimator, UnwrappedInput>.Transformer
4485}
4486@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4487extension CreateMLComponents.ColumnSelector : Swift.Sendable where Estimator : Swift.Sendable, UnwrappedInput : Swift.Sendable {
4488}
4489@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4490extension CreateMLComponents.AudioReader {
4491 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4492 public struct Configuration : Swift.Sendable {
4493 public var frameCount: Swift.Int
4494 public init()
4495 public init(frameCount: Swift.Int)
4496 }
4497}
4498extension CreateMLComponents.LinearTimeSeriesForecaster.Model {
4499 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
4500 @available(watchOS, unavailable)
4501 public func export(to url: Foundation.URL) throws
4502 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
4503 @available(watchOS, unavailable)
4504 public func export(to url: Foundation.URL, metadata: CreateMLComponents.ModelMetadata) throws
4505}
4506@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4507public struct AnnotatedPrediction<Prediction, Annotation> {
4363 eventHandler: eventHandler
4364 )
4365 }
4366 @inlinable public func encode(_ transformer: CreateMLComponents::UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
4367 try base.encode(transformer.base, to: &encoder)
4368 }
4369 @inlinable public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer {
4370 try Transformer(base.decode(from: &decoder))
4371 }
4372 public func encodeWithOptimizer(_ transformer: CreateMLComponents::UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
4373 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::UpdatableSupervisedEstimatorToTemporalAdaptor<Base>.CreateMLComponents::Transformer
4374}
4375@available(macOS, introduced: 13.0, deprecated: 15.0)
4376@available(iOS, introduced: 16.0, deprecated: 18.0)
4377@available(tvOS, introduced: 16.0, deprecated: 18.0)
4378@available(visionOS, introduced: 1.0, deprecated: 2.0)
4379@available(watchOS, unavailable)
4380extension CreateMLComponents::UpdatableSupervisedEstimatorToTemporalAdaptor : Swift::Sendable where Base : Swift::Sendable {
4381}
4382extension CreateMLComponents::UpdatableSupervisedEstimator where Self.Annotation : Swift::Sendable {
4383 @available(macOS, introduced: 13.0, deprecated: 15.0)
4384 @available(iOS, introduced: 16.0, deprecated: 18.0)
4385 @available(tvOS, introduced: 16.0, deprecated: 18.0)
4386 @available(visionOS, introduced: 1.0, deprecated: 2.0)
4387 @available(watchOS, unavailable)
4388 @inlinable public func adaptedAsTemporal() -> CreateMLComponents::UpdatableSupervisedEstimatorToTemporalAdaptor<Self> {
4389 UpdatableSupervisedEstimatorToTemporalAdaptor(self)
4390 }
4391}
4392@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4393public enum AudioPreprocessingError : Foundation::LocalizedError, Swift::Equatable, Swift::Sendable {
4394 case incompatibleTargetFormatForConversion(inputFormat: AVFAudio::AVAudioFormat, targetFormat: AVFAudio::AVAudioFormat)
4395 public var errorDescription: Swift::String? {
4396 get
4397 }
4398 public static func == (a: CreateMLComponents::AudioPreprocessingError, b: CreateMLComponents::AudioPreprocessingError) -> Swift::Bool
4399}
4400@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4401extension CreateMLComponents::AudioPreprocessingError : Swift::CustomDebugStringConvertible {
4402 public var debugDescription: Swift::String {
4403 get
4404 }
4405}
4406@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4407public struct Classification<Label> : Swift::Hashable where Label : Swift::Hashable {
4408 public var label: Label
4409 public var probability: Swift::Float
4410 public init(label: Label, probability: Swift::Float)
4411 public static func == (a: CreateMLComponents::Classification<Label>, b: CreateMLComponents::Classification<Label>) -> Swift::Bool
4412 public func hash(into hasher: inout Swift::Hasher)
4413 public var hashValue: Swift::Int {
4414 get
4415 }
4416}
4417@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4418extension CreateMLComponents::Classification : Swift::Codable where Label : Swift::Decodable, Label : Swift::Encodable {
4419 public func encode(to encoder: any Swift::Encoder) throws
4420 public init(from decoder: any Swift::Decoder) throws
4421}
4422@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4423extension CreateMLComponents::Classification : Swift::Sendable where Label : Swift::Sendable {
4424}
4425extension CreateMLComponents::Estimator {
4426 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4427 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedEstimator<CreateMLComponents::ComposedTransformer<Self.Transformer, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents::SupervisedEstimator, Self.Transformer.Output == Other.Transformer.Input
4428
4429}
4430extension CreateMLComponents::SupervisedEstimator {
4431 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4432 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedEstimator<CreateMLComponents::ComposedTransformer<Self.Transformer, Other>, Self.Annotation> where Other : CreateMLComponents::Transformer, Other.Input == Self.Transformer.Output
4433
4434 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4435 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedEstimator<CreateMLComponents::ComposedTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::Estimator, Self.Transformer.Output == Other.Transformer.Input
4436
4437 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4438 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedEstimator<CreateMLComponents::ComposedTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::SupervisedEstimator, Self.Annotation == Other.Annotation, Self.Transformer.Output == Other.Transformer.Input
4439
4440}
4441@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4442public struct ColumnConcatenator<Scalar> : CreateMLComponents::TabularTransformer where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint {
4443 public var columnSelection: CreateMLComponents::ColumnSelection
4444 public var concatenatedColumnName: Swift::String
4445 public init(columnSelection: CreateMLComponents::ColumnSelection = .all, concatenatedColumnName: Swift::String = "features")
4446 public func applied(to input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> TabularData::DataFrame
4447 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4448 public typealias Input = TabularData::DataFrame
4449 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4450 public typealias Output = TabularData::DataFrame
4451}
4452@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4453extension CreateMLComponents::ColumnConcatenator : Swift::CustomDebugStringConvertible {
4454 public var debugDescription: Swift::String {
4455 get
4456 }
4457}
4458@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4459extension CreateMLComponents::ColumnConcatenator : Swift::Sendable where Scalar : Swift::Sendable {
4460}
4461@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4462public struct ColumnSelector<Estimator, UnwrappedInput> : CreateMLComponents::TabularEstimator where Estimator : CreateMLComponents::Estimator, Estimator.Transformer.Input == UnwrappedInput? {
4463 public var columnSelection: CreateMLComponents::ColumnSelection
4464 public var estimator: Estimator
4465 public typealias Transformer = CreateMLComponents::ColumnSelectorTransformer<Estimator.Transformer, UnwrappedInput>
4466 public typealias Input = Estimator.Transformer.Input
4467 public typealias Output = Estimator.Transformer.Output
4468 public init(_ columnSelection: CreateMLComponents::ColumnSelection, estimator: Estimator)
4469 public init<T>(_ columnSelection: CreateMLComponents::ColumnSelection, transformer: T) where Estimator == CreateMLComponents::TransformerToEstimatorAdaptor<T>, T : CreateMLComponents::Transformer, T.Input == UnwrappedInput?
4470 public init(columns: [Swift::String], estimator: Estimator)
4471 public func fitted(to input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::ColumnSelector<Estimator, UnwrappedInput>.CreateMLComponents::Transformer
4472 public func encode(_ transformer: CreateMLComponents::ColumnSelector<Estimator, UnwrappedInput>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
4473 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::ColumnSelector<Estimator, UnwrappedInput>.CreateMLComponents::Transformer
4474}
4475@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4476extension CreateMLComponents::ColumnSelector : CreateMLComponents::UpdatableTabularEstimator where Estimator : CreateMLComponents::UpdatableEstimator {
4477 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4478 public func makeTransformer() -> CreateMLComponents::ColumnSelectorTransformer<Estimator.Transformer, UnwrappedInput>
4479 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4480 public func update(_ transformer: inout CreateMLComponents::ColumnSelector<Estimator, UnwrappedInput>.CreateMLComponents::Transformer, with input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws
4481 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4482 public func encodeWithOptimizer(_ transformer: CreateMLComponents::ColumnSelector<Estimator, UnwrappedInput>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
4483 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4484 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::ColumnSelector<Estimator, UnwrappedInput>.CreateMLComponents::Transformer
4485}
4486@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4487extension CreateMLComponents::ColumnSelector : Swift::Sendable where Estimator : Swift::Sendable, UnwrappedInput : Swift::Sendable {
4488}
4489@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4490extension CreateMLComponents::AudioReader {
4491 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4492 public struct Configuration : Swift::Sendable {
4493 public var frameCount: Swift::Int
4494 public init()
4495 public init(frameCount: Swift::Int)
4496 }
4497}
4498extension CreateMLComponents::LinearTimeSeriesForecaster.CreateMLComponents::Model {
4499 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
4500 @available(watchOS, unavailable)
4501 public func export(to url: Foundation::URL) throws
4502 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
4503 @available(watchOS, unavailable)
4504 public func export(to url: Foundation::URL, metadata: CreateMLComponents::ModelMetadata) throws
4505}
4506@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4507public struct AnnotatedPrediction<Prediction, Annotation> {
… 2 unchanged lines …
4510 public init(prediction: Prediction, annotation: Annotation)
4511}
4512@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4513extension CreateMLComponents.AnnotatedPrediction : Swift.Encodable where Prediction : Swift.Encodable, Annotation : Swift.Encodable {
4514 public func encode(to encoder: any Swift.Encoder) throws
4515}
4516@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4517extension CreateMLComponents.AnnotatedPrediction : Swift.Decodable where Prediction : Swift.Decodable, Annotation : Swift.Decodable {
4518 public init(from decoder: any Swift.Decoder) throws
4519}
4520@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4521extension CreateMLComponents.AnnotatedPrediction : Swift.Equatable where Prediction : Swift.Equatable, Annotation : Swift.Equatable {
4522 public static func == (a: CreateMLComponents.AnnotatedPrediction<Prediction, Annotation>, b: CreateMLComponents.AnnotatedPrediction<Prediction, Annotation>) -> Swift.Bool
4523}
4524@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4525extension CreateMLComponents.AnnotatedPrediction : Swift.Hashable where Prediction : Swift.Hashable, Annotation : Swift.Hashable {
4526 public func hash(into hasher: inout Swift.Hasher)
4527 public var hashValue: Swift.Int {
4528 get
4529 }
4530}
4531@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4532extension CreateMLComponents.AnnotatedPrediction : Swift.Sendable where Prediction : Swift.Sendable, Annotation : Swift.Sendable {
4533}
4534@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4535public struct PreprocessingUpdatableEstimator<Preprocessor, Estimator> : CreateMLComponents.UpdatableEstimator where Preprocessor : CreateMLComponents.Transformer, Estimator : CreateMLComponents.UpdatableEstimator, Preprocessor.Output == Estimator.Transformer.Input {
4536 public typealias Transformer = CreateMLComponents.ComposedTransformer<Preprocessor, Estimator.Transformer>
4537 public typealias Input = Preprocessor.Input
4538 public typealias Intermediate = Preprocessor.Output
4539 public typealias Output = Estimator.Transformer.Output
4540 public var preprocessor: Preprocessor
4541 public var estimator: Estimator
4542 public init(_ inner: Preprocessor, _ outer: Estimator)
4543 @inlinable public func makeTransformer() -> CreateMLComponents.PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer {
4544 ComposedTransformer(preprocessor, estimator.makeTransformer())
4545 }
4546 @inlinable public func preprocessed<S>(from input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [Preprocessor.Output] where S : Swift.Sequence, Preprocessor.Input == S.Element {
4547 try await preprocessor.applied(to: input, eventHandler: eventHandler)
4548 }
4549 @inlinable public func fitted<S>(toPreprocessed preprocessed: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer where S : Swift.Sequence, Preprocessor.Output == S.Element, S.Element == Estimator.Transformer.Input {
4550 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
4551 return ComposedTransformer(preprocessor, fittedTransformer)
4552 }
4553 @inlinable public func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer where S : Swift.Sequence, Preprocessor.Input == S.Element {
4554 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
4555 try Task.checkCancellation()
4556 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
4557 }
4558 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents.PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer, withPreprocessed preprocessed: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, Preprocessor.Output == InputSequence.Element, InputSequence.Element == Estimator.Transformer.Input {
4559 try await estimator.update(&transformer.outer, with: preprocessed, eventHandler: eventHandler)
4560 }
4561 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents.PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, Preprocessor.Input == InputSequence.Element {
4562 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
4563 try Task.checkCancellation()
4564
4565 try await estimator.update(&transformer.outer, with: preprocessed, eventHandler: eventHandler)
4566 }
4567 public func encode(_ transformer: CreateMLComponents.PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
4568 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer
4569 public func encodeWithOptimizer(_ transformer: CreateMLComponents.PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
4570 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingUpdatableEstimator<Preprocessor, Estimator>.Transformer
4571}
4572@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4573extension CreateMLComponents.PreprocessingUpdatableEstimator : Swift.Sendable where Preprocessor : Swift.Sendable, Estimator : Swift.Sendable {
4574}
4575extension CreateMLComponents.Transformer {
4576 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4577 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingUpdatableEstimator<Self, Other> where Other : CreateMLComponents.UpdatableEstimator, Self.Output == Other.Transformer.Input
4578}
4579@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4580public struct ClassificationMetrics<Label> where Label : Swift.Hashable {
4581 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4582 public var exampleCount: Swift.Int {
4583 get
4584 }
4585 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4586 public var labels: Swift.Set<Label>
4587 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4588 public var restrictToKnownLabels: Swift.Bool
4589 public var accuracy: Swift.Double {
4590 get
4591 @available(macOS, introduced: 13.0, deprecated: 14.0)
4592 @available(iOS, introduced: 16.0, deprecated: 17.0)
4510 public init(prediction: Prediction, annotation: Annotation)
4511}
4512@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4513extension CreateMLComponents::AnnotatedPrediction : Swift::Encodable where Prediction : Swift::Encodable, Annotation : Swift::Encodable {
4514 public func encode(to encoder: any Swift::Encoder) throws
4515}
4516@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4517extension CreateMLComponents::AnnotatedPrediction : Swift::Decodable where Prediction : Swift::Decodable, Annotation : Swift::Decodable {
4518 public init(from decoder: any Swift::Decoder) throws
4519}
4520@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4521extension CreateMLComponents::AnnotatedPrediction : Swift::Equatable where Prediction : Swift::Equatable, Annotation : Swift::Equatable {
4522 public static func == (a: CreateMLComponents::AnnotatedPrediction<Prediction, Annotation>, b: CreateMLComponents::AnnotatedPrediction<Prediction, Annotation>) -> Swift::Bool
4523}
4524@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4525extension CreateMLComponents::AnnotatedPrediction : Swift::Hashable where Prediction : Swift::Hashable, Annotation : Swift::Hashable {
4526 public func hash(into hasher: inout Swift::Hasher)
4527 public var hashValue: Swift::Int {
4528 get
4529 }
4530}
4531@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4532extension CreateMLComponents::AnnotatedPrediction : Swift::Sendable where Prediction : Swift::Sendable, Annotation : Swift::Sendable {
4533}
4534@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4535public struct PreprocessingUpdatableEstimator<Preprocessor, Estimator> : CreateMLComponents::UpdatableEstimator where Preprocessor : CreateMLComponents::Transformer, Estimator : CreateMLComponents::UpdatableEstimator, Preprocessor.Output == Estimator.Transformer.Input {
4536 public typealias Transformer = CreateMLComponents::ComposedTransformer<Preprocessor, Estimator.Transformer>
4537 public typealias Input = Preprocessor.Input
4538 public typealias Intermediate = Preprocessor.Output
4539 public typealias Output = Estimator.Transformer.Output
4540 public var preprocessor: Preprocessor
4541 public var estimator: Estimator
4542 public init(_ inner: Preprocessor, _ outer: Estimator)
4543 @inlinable public func makeTransformer() -> CreateMLComponents::PreprocessingUpdatableEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
4544 ComposedTransformer(preprocessor, estimator.makeTransformer())
4545 }
4546 @inlinable public func preprocessed<S>(from input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [Preprocessor.Output] where S : Swift::Sequence, Preprocessor.Input == S.Element {
4547 try await preprocessor.applied(to: input, eventHandler: eventHandler)
4548 }
4549 @inlinable public func fitted<S>(toPreprocessed preprocessed: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where S : Swift::Sequence, Preprocessor.Output == S.Element, S.Element == Estimator.Transformer.Input {
4550 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
4551 return ComposedTransformer(preprocessor, fittedTransformer)
4552 }
4553 @inlinable public func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where S : Swift::Sequence, Preprocessor.Input == S.Element {
4554 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
4555 try Task.checkCancellation()
4556 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
4557 }
4558 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents::PreprocessingUpdatableEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, withPreprocessed preprocessed: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, Preprocessor.Output == InputSequence.Element, InputSequence.Element == Estimator.Transformer.Input {
4559 try await estimator.update(&transformer.outer, with: preprocessed, eventHandler: eventHandler)
4560 }
4561 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents::PreprocessingUpdatableEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, Preprocessor.Input == InputSequence.Element {
4562 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
4563 try Task.checkCancellation()
4564
4565 try await estimator.update(&transformer.outer, with: preprocessed, eventHandler: eventHandler)
4566 }
4567 public func encode(_ transformer: CreateMLComponents::PreprocessingUpdatableEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
4568 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingUpdatableEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
4569 public func encodeWithOptimizer(_ transformer: CreateMLComponents::PreprocessingUpdatableEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
4570 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingUpdatableEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
4571}
4572@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4573extension CreateMLComponents::PreprocessingUpdatableEstimator : Swift::Sendable where Preprocessor : Swift::Sendable, Estimator : Swift::Sendable {
4574}
4575extension CreateMLComponents::Transformer {
4576 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4577 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingUpdatableEstimator<Self, Other> where Other : CreateMLComponents::UpdatableEstimator, Self.Output == Other.Transformer.Input
4578}
4579@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4580public struct ClassificationMetrics<Label> where Label : Swift::Hashable {
4581 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4582 public var exampleCount: Swift::Int {
4583 get
4584 }
4585 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4586 public var labels: Swift::Set<Label>
4587 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4588 public var restrictToKnownLabels: Swift::Bool
4589 public var accuracy: Swift::Double {
4590 get
4591 @available(macOS, introduced: 13.0, deprecated: 14.0)
4592 @available(iOS, introduced: 16.0, deprecated: 17.0)
… 3 unchanged lines …
4596 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4597 public init()
4598 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4599 public init<Predicted, Correct>(predicted: Predicted, groundTruth: Correct, labels: Swift.Set<Label>) where Label == Predicted.Element, Predicted : Swift.Sequence, Correct : Swift.Sequence, Predicted.Element == Correct.Element
4600 public init<Predicted, Correct>(_ predicted: Predicted, _ groundTruth: Correct) where Label == Predicted.Element, Predicted : Swift.Collection, Correct : Swift.Collection, Predicted.Element == Correct.Element
4601 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4602 public init(_ pairs: some Sequence<(predicted: Label, label: Label)>, labels: Swift.Set<Label>)
4603 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4604 public init(_ pairs: some Sequence<(predicted: Label, label: Label)>)
4605 public init<S, Inner>(_ predicted: S) async throws where S : Swift.Sequence, Inner : CreateMLComponents.TemporalSequence, S.Element == CreateMLComponents.AnnotatedFeature<Inner, Label>, Inner.Feature == CreateMLComponents.ClassificationDistribution<Label>
4606 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4607 public mutating func add(predicted: some Sequence<Label>, groundTruth: some Sequence<Label>)
4608 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4609 public mutating func add(_ pairs: some Sequence<(predicted: Label, label: Label)>)
4610 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4611 public func count(label: Label) -> Swift.Int
4612 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4613 public func count(predicted: Label) -> Swift.Int
4614 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4615 public func count(predicted: Label, label: Label) -> Swift.Int
4616 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4617 public func truePositiveCount(of label: Label) -> Swift.Int
4618 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4619 public func falsePositiveCount(of label: Label) -> Swift.Int
4620 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4621 public func trueNegativeCount(of label: Label) -> Swift.Int
4622 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4623 public func falseNegativeCount(of label: Label) -> Swift.Int
4624 public func makeConfusionMatrix() -> CoreML.MLShapedArray<Swift.Float> where Label : Swift.Comparable, Label : Swift.Decodable, Label : Swift.Encodable
4625 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4626 public func mapLabels<T>(_ transform: (Label) throws -> T) rethrows -> CreateMLComponents.ClassificationMetrics<T> where T : Swift.Hashable
4627}
4628@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4629extension CreateMLComponents.ClassificationMetrics {
4630 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4631 public func precisionScore(label: Label) -> Swift.Double
4632 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4633 public func recallScore(label: Label) -> Swift.Double
4634 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4635 public func f1Score(label: Label) -> Swift.Double
4636}
4637@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4638extension CreateMLComponents.ClassificationMetrics : Swift.Sendable where Label : Swift.Sendable {
4639}
4640@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
4641public struct FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label> : CreateMLComponents.Transformer where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint, Label : Swift.Comparable, Label : Swift.Decodable, Label : Swift.Encodable, Label : Swift.Hashable {
4642 public mutating func updatePrecisionRecallCurves(_ input: some Collection<AnnotatedFeature<MLShapedArray<Scalar>, Set<Label>>>) async throws
4643 public func prediction(from input: CreateMLComponents.FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label>.Input, confidenceThresholds: [Label : Scalar]) throws -> CreateMLComponents.ClassificationDistribution<Label>
4644 public func prediction<S>(from input: S, confidenceThresholds: [Label : Scalar]) throws -> [CreateMLComponents.ClassificationDistribution<Label>] where S : Swift.Sequence, S.Element == CoreML.MLShapedArray<Scalar>
4645 public func applied(to input: CoreML.MLShapedArray<Scalar>, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CreateMLComponents.ClassificationDistribution<Label>
4646 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
4647 public typealias Input = CoreML.MLShapedArray<Scalar>
4648 @available(iOS 17.0, tvOS 17.0, macOS 14.0, *)
4649 public typealias Output = CreateMLComponents.ClassificationDistribution<Label>
4650}
4651@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
4652extension CreateMLComponents.FullyConnectedNetworkMultiLabelClassifierModel : Swift.Codable {
4653 public func encode(to encoder: any Swift.Encoder) throws
4654 public init(from decoder: any Swift.Decoder) throws
4655}
4656@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
4657extension CreateMLComponents.FullyConnectedNetworkMultiLabelClassifierModel : Swift.Sendable where Scalar : Swift.Sendable, Label : Swift.Sendable {
4658}
4659@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
4660extension CreateMLComponents.FullyConnectedNetworkMultiLabelClassifierModel : Swift.CustomDebugStringConvertible {
4661 public var debugDescription: Swift.String {
4662 get
4663 }
4664}
4665@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
4666extension CreateMLComponents.FullyConnectedNetworkMultiLabelClassifierModel {
4667 public func evaluation(on input: some Collection<AnnotatedFeature<Input, Set<Label>>>, confidenceThresholds: [Label : Swift.Float]) throws -> CreateMLComponents.MultiLabelClassificationMetrics<Label>
4668}
4669@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4670extension CreateMLComponents.Estimator where Self.Transformer : Swift.Encodable {
4671 public func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
4672}
4673@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4674extension CreateMLComponents.Estimator where Self.Transformer : Swift.Decodable {
4675 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
4676}
4677@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4678extension CreateMLComponents.SupervisedEstimator where Self.Transformer : Swift.Encodable {
4679 public func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
4680}
4681@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4682extension CreateMLComponents.SupervisedEstimator where Self.Transformer : Swift.Decodable {
4683 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
4684}
4685@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4686extension CreateMLComponents.Estimator {
4687 public func write(_ transformer: Self.Transformer, to url: Foundation.URL, overwrite: Swift.Bool = true) throws
4688 public func read(from url: Foundation.URL) throws -> Self.Transformer
4689}
4690@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4691extension CreateMLComponents.SupervisedEstimator {
4692 public func write(_ transformer: Self.Transformer, to url: Foundation.URL, overwrite: Swift.Bool = true) throws
4693 public func read(from url: Foundation.URL) throws -> Self.Transformer
4694}
4695@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4696extension CreateMLComponents.UpdatableSupervisedEstimator {
4697 public func writeWithOptimizer(_ transformer: Self.Transformer, to url: Foundation.URL, overwrite: Swift.Bool = true) throws
4698 public func readWithOptimizer(from url: Foundation.URL) throws -> Self.Transformer
4699}
4700@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4701public enum ModelCompatibilityError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
4702 case missingLabel
4703 case missingLabelProbabilities
4704 case missingPredictedFeature
4705 case incompatibleLabelType
4706 case incompatibleInputDataFormat(expected: CoreML.MLFeatureType, actual: CoreML.MLFeatureType)
4707 case incompatibleInputMultiArrayDataType(CoreML.MLMultiArrayDataType)
4708 case incompatibleOutputDataFormat(expected: CoreML.MLFeatureType, actual: CoreML.MLFeatureType)
4709 case incompatibleInputCount(expected: Swift.Int, actual: Swift.Int)
4710 case incompatibleOutputCount(expected: Swift.Int, actual: Swift.Int)
4711 case missingInput(name: Swift.String)
4712 case missingOutput(name: Swift.String)
4713 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4714 case incompatibleMetadataKey(name: Swift.String)
4715 public var errorDescription: Swift.String? {
4716 get
4717 }
4718 public static func == (a: CreateMLComponents.ModelCompatibilityError, b: CreateMLComponents.ModelCompatibilityError) -> Swift.Bool
4719}
4720@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4721extension CreateMLComponents.ModelCompatibilityError : Swift.CustomDebugStringConvertible {
4722 public var debugDescription: Swift.String {
4723 get
4724 }
4725}
4726@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
4727@available(watchOS, unavailable)
4728extension CreateMLComponents.TimeSeriesClassifier {
4729 public typealias Configuration = CreateMLComponents.TimeSeriesClassifierConfiguration
4730}
4731@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
4732@available(watchOS, unavailable)
4733public struct TimeSeriesClassifierConfiguration : Swift.Hashable, Swift.Codable, Swift.Sendable {
4734 public var minimumSequenceLength: Swift.Int
4735 public var maximumSequenceLength: Swift.Int
4736 public var batchSize: Swift.Int
4737 public var maximumIterationCount: Swift.Int
4738 public var earlyStoppingTolerance: Swift.Float
4739 public var earlyStoppingIterationCount: Swift.Int
4740 public var learningRate: Swift.Float
4741 public var randomSeed: Swift.Int?
4742 public init()
4743 public static func == (a: CreateMLComponents.TimeSeriesClassifierConfiguration, b: CreateMLComponents.TimeSeriesClassifierConfiguration) -> Swift.Bool
4744 public func encode(to encoder: any Swift.Encoder) throws
4745 public func hash(into hasher: inout Swift.Hasher)
4746 public var hashValue: Swift.Int {
4747 get
4748 }
4749 public init(from decoder: any Swift.Decoder) throws
4750}
4751@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4752public struct MultiLabelClassificationMetrics<Label> where Label : Swift.Hashable {
4753 public var exampleCount: Swift.Int {
4754 get
4755 }
4756 public var labels: Swift.Set<Label> {
4757 get
4758 }
4759 public var confidenceThresholds: [Label : Swift.Float] {
4760 get
4761 }
4762 public var meanAveragePrecision: Swift.Float {
4763 get
4764 }
4765 public init(classifications: some Sequence<ClassificationDistribution<Label>>, groundTruth: some Sequence<Set<Label>>, strategy: CreateMLComponents.MultiLabelClassificationMetrics<Label>.ThresholdSelectionStrategy, labels: Swift.Set<Label>) throws
4766 public init(classifications: some Sequence<ClassificationDistribution<Label>>, groundTruth: some Sequence<Set<Label>>, strategy: CreateMLComponents.MultiLabelClassificationMetrics<Label>.ThresholdSelectionStrategy) throws
4767 public init(_ pairs: some Sequence<(classification: ClassificationDistribution<Label>, labels: Set<Label>)>, strategy: CreateMLComponents.MultiLabelClassificationMetrics<Label>.ThresholdSelectionStrategy, labels: Swift.Set<Label>) throws
4768 public init(_ pairs: some Sequence<(classification: ClassificationDistribution<Label>, labels: Set<Label>)>, strategy: CreateMLComponents.MultiLabelClassificationMetrics<Label>.ThresholdSelectionStrategy) throws
4769}
4770extension CreateMLComponents.MultiLabelClassificationMetrics {
4771 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4772 public init(confidenceThresholds: [Label : Swift.Float])
4773 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4774 public mutating func add(classifications: some Sequence<ClassificationDistribution<Label>>, groundTruth: some Sequence<Set<Label>>)
4775 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4776 public mutating func add(_ pairs: some Sequence<(classification: ClassificationDistribution<Label>, labels: Set<Label>)>)
4777}
4778@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4779extension CreateMLComponents.MultiLabelClassificationMetrics : Swift.Sendable where Label : Swift.Sendable {
4780}
4781@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4782public struct NumericImputer<Element> : CreateMLComponents.Estimator where Element : Swift.BinaryFloatingPoint, Element : Swift.Decodable, Element : Swift.Encodable {
4783 public typealias Transformer = CreateMLComponents.ImputeTransformer<Element>
4784 public enum Strategy {
4785 case median
4786 case mean
4787 case constant(Element)
4788 }
4789 public var strategy: CreateMLComponents.NumericImputer<Element>.Strategy
4790 public init(_ strategy: CreateMLComponents.NumericImputer<Element>.Strategy)
4791 public init(constant: Element)
4792 public func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) -> CreateMLComponents.NumericImputer<Element>.Transformer where S : Swift.Sequence, S.Element == Element?
4793}
4794@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4795extension CreateMLComponents.NumericImputer : CreateMLComponents.UpdatableEstimator {
4796 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4797 public func makeTransformer() -> CreateMLComponents.NumericImputer<Element>.Transformer
4798 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4799 public func update(_ transformer: inout CreateMLComponents.ImputeTransformer<Element>, with input: some Sequence<Element?>, eventHandler: CreateMLComponents.EventHandler? = nil) throws
4800 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4801 public func encodeWithOptimizer(_ transformer: CreateMLComponents.NumericImputer<Element>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
4802 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4803 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.NumericImputer<Element>.Transformer
4804}
4805@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4806extension CreateMLComponents.NumericImputer : Swift.Sendable where Element : Swift.Sendable {
4807}
4808@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4809extension CreateMLComponents.NumericImputer.Strategy : Swift.Sendable where Element : Swift.Sendable {
4810}
4811@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4812public struct VideoReader : CreateMLComponents.Transformer, Swift.Sendable {
4813 public init()
4814 public func applied(to url: Foundation.URL, eventHandler: CreateMLComponents.EventHandler?) async throws -> CreateMLComponents.VideoReader.AsyncFrames
4815 public static func read(contentsOf url: Foundation.URL) async throws -> CreateMLComponents.VideoReader.AsyncFrames
4816 public static func read<S>(_ files: S) async throws -> [CreateMLComponents.VideoReader.AsyncFrames] where S : Swift.Sequence, S.Element == Foundation.URL
4817 public static func read<S, Annotation>(_ annotatedFiles: S) async throws -> [CreateMLComponents.AnnotatedFeature<CreateMLComponents.VideoReader.AsyncFrames, Annotation>] where S : Swift.Sequence, Annotation : Swift.Equatable, Annotation : Swift.Sendable, S.Element == CreateMLComponents.AnnotatedFeature<Foundation.URL, Annotation>
4818 @available(macOS 13.0, iOS 16.0, *)
4819 @available(tvOS, unavailable)
4820 public static func readCamera(configuration: CreateMLComponents.VideoReader.CameraConfiguration) async throws -> CreateMLComponents.VideoReader.CameraAsyncBuffers
4821 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
4822 public typealias Input = Foundation.URL
4823 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
4824 public typealias Output = CreateMLComponents.VideoReader.AsyncFrames
4825}
4826@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4827public protocol Classifier : CreateMLComponents.Transformer {
4828 associatedtype Label : Swift.Hashable where Self.Output == CreateMLComponents.ClassificationDistribution<Self.Label>
4829}
4830@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4831extension CreateMLComponents.Transformer {
4832 public func prediction<Label>(from input: Self.Input) async throws -> CreateMLComponents.ClassificationDistribution<Label> where Label : Swift.Hashable, Self.Output == CreateMLComponents.ClassificationDistribution<Label>
4833 public func prediction<S, Label>(from input: S) async throws -> [CreateMLComponents.ClassificationDistribution<Label>] where S : Swift.Sequence, Label : Swift.Hashable, Self.Input == S.Element, Self.Output == CreateMLComponents.ClassificationDistribution<Label>
4834}
4835@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4836extension CreateMLComponents.TemporalTransformer {
4837 public func prediction<S, Label>(from input: S) async throws -> Self.OutputSequence where S : CreateMLComponents.TemporalSequence, Label : Swift.Hashable, Self.Input == S.Feature, Self.Output == CreateMLComponents.ClassificationDistribution<Label>
4838}
4839@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4840public struct AudioConvertingTransformer : CreateMLComponents.Transformer, Swift.Sendable {
4841 public let targetFormat: AVFAudio.AVAudioFormat
4842 public init(targetFormat: AVFAudio.AVAudioFormat)
4843 public func applied(to input: AVFAudio.AVAudioPCMBuffer, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> AVFAudio.AVAudioPCMBuffer
4844 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
4845 public typealias Input = AVFAudio.AVAudioPCMBuffer
4846 @available(iOS 16.0, tvOS 16.0, macOS 13.0, *)
4847 public typealias Output = AVFAudio.AVAudioPCMBuffer
4848}
4849@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4850extension CreateMLComponents.AudioConvertingTransformer : Swift.CustomDebugStringConvertible {
4851 public var debugDescription: Swift.String {
4852 get
4853 }
4854}
4855@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4856public struct FullyConnectedNetworkRegressorModel<Scalar> : CreateMLComponents.Regressor where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint {
4857 public typealias Target = Swift.Float
4858 public func applied(to input: CoreML.MLShapedArray<Scalar>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.FullyConnectedNetworkRegressorModel<Scalar>.Target
4859 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4860 public typealias Input = CoreML.MLShapedArray<Scalar>
4861 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4862 public typealias Output = CreateMLComponents.FullyConnectedNetworkRegressorModel<Scalar>.Target
4863}
4864@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4865extension CreateMLComponents.FullyConnectedNetworkRegressorModel : Swift.Codable {
4866 public func encode(to encoder: any Swift.Encoder) throws
4867 public init(from decoder: any Swift.Decoder) throws
4868}
4869@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4870extension CreateMLComponents.FullyConnectedNetworkRegressorModel : Swift.CustomDebugStringConvertible {
4871 public var debugDescription: Swift.String {
4872 get
4873 }
4874}
4875@available(*, unavailable)
4876extension CreateMLComponents.FullyConnectedNetworkRegressorModel : Swift.Sendable {
4877}
4878@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4879public struct TreeRegressorModel : CreateMLComponents.TabularTransformer, Swift.Sendable {
4880 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4881 public var featureColumnNames: [Swift.String] {
4882 get
4883 }
4884 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4885 public var predictionColumnName: Swift.String
4886 public func applied(to input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> TabularData.DataFrame
4887 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4888 public typealias Input = TabularData.DataFrame
4889 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4890 public typealias Output = TabularData.DataFrame
4891}
4892@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4893extension CreateMLComponents.TreeRegressorModel : Swift.CustomDebugStringConvertible {
4894 public var debugDescription: Swift.String {
4895 get
4896 }
4897}
4898@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4899public struct MLModelClassifierAdaptor<Scalar> : CreateMLComponents.Classifier where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint {
4900 public enum Label : Swift.Hashable, Swift.Sendable {
4901 case string(Swift.String)
4902 case int(Swift.Int)
4903 public static func == (a: CreateMLComponents.MLModelClassifierAdaptor<Scalar>.Label, b: CreateMLComponents.MLModelClassifierAdaptor<Scalar>.Label) -> Swift.Bool
4904 public func hash(into hasher: inout Swift.Hasher)
4905 public var hashValue: Swift.Int {
4906 get
4907 }
4908 }
4909 public let model: CoreML.MLModel
4910 public init(contentsOf url: Foundation.URL, configuration: CoreML.MLModelConfiguration) throws
4911 public init(model: CoreML.MLModel) throws
4912 public func applied(to input: CoreML.MLShapedArray<Scalar>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.ClassificationDistribution<CreateMLComponents.MLModelClassifierAdaptor<Scalar>.Label>
4913 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4914 public typealias Input = CoreML.MLShapedArray<Scalar>
4915 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4916 public typealias Output = CreateMLComponents.ClassificationDistribution<CreateMLComponents.MLModelClassifierAdaptor<Scalar>.Label>
4917}
4918@available(*, unavailable)
4919extension CreateMLComponents.MLModelClassifierAdaptor : Swift.Sendable {
4920}
4921@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4922extension CreateMLComponents.MLModelClassifierAdaptor.Label : Swift.CustomDebugStringConvertible {
4923 public var debugDescription: Swift.String {
4924 get
4925 }
4926}
4927@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4928extension CreateMLComponents.MLModelClassifierAdaptor.Label : Swift.ExpressibleByStringLiteral {
4929 public init(stringLiteral value: Swift.String)
4930 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4931 public typealias ExtendedGraphemeClusterLiteralType = Swift.String
4932 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4933 public typealias StringLiteralType = Swift.String
4934 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4935 public typealias UnicodeScalarLiteralType = Swift.String
4936}
4937@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4938extension CreateMLComponents.MLModelClassifierAdaptor.Label : Swift.ExpressibleByIntegerLiteral {
4939 public init(integerLiteral value: Swift.Int)
4940 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4941 public typealias IntegerLiteralType = Swift.Int
4942}
4943@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4944public struct TreeClassifierModel<Label> : CreateMLComponents.TabularTransformer, Swift.Sendable where Label : Swift.Hashable {
4945 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4946 public var featureColumnNames: [Swift.String] {
4947 get
4948 }
4949 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4950 public var predictionColumnName: Swift.String
4951 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4952 public var classCount: Swift.Int {
4953 get
4954 }
4955 public func applied(to input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> TabularData.DataFrame
4956 public func buildDataFrame(_ distributions: [CreateMLComponents.ClassificationDistribution<Label>]) -> TabularData.DataFrame
4957 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4958 public typealias Input = TabularData.DataFrame
4959 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
4960 public typealias Output = TabularData.DataFrame
4961}
4962@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4963extension CreateMLComponents.TreeClassifierModel : Swift.CustomDebugStringConvertible {
4964 public var debugDescription: Swift.String {
4965 get
4966 }
4967}
4968@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
4969extension CreateMLComponents.LinearTimeSeriesForecaster : CreateMLComponents.UpdatableSupervisedEstimator {
4970 public func makeTransformer() -> CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Model
4971 public func update(_ model: inout CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Model, with input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws
4972 public func update(_ model: inout CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Model, withWindows windows: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws
4973 public func update(_ model: inout CreateMLComponents.LinearTimeSeriesForecaster<Scalar>.Transformer, with input: CreateMLComponents.AnnotatedBatch<Scalar>) async throws -> Scalar
4974}
4975@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4976public enum OptimizationError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
4977 case numericUnderflow
4978 case numericOverflow
4979 case unsupportedPlatform
4980 public var errorDescription: Swift.String? {
4981 get
4982 }
4983 public static func == (a: CreateMLComponents.OptimizationError, b: CreateMLComponents.OptimizationError) -> Swift.Bool
4984 public func hash(into hasher: inout Swift.Hasher)
4985 public var hashValue: Swift.Int {
4986 get
4987 }
4988}
4989@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4990extension CreateMLComponents.OptimizationError : Swift.CustomDebugStringConvertible {
4991 public var debugDescription: Swift.String {
4992 get
4993 }
4994}
4995extension CreateMLComponents.TabularTransformer {
4996 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4997 public func appending<Other>(_ other: Other) -> some CreateMLComponents.TabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self, Other.Transformer>> where Other : CreateMLComponents.TabularEstimator
4998
4999}
5000extension CreateMLComponents.TabularEstimator {
5001 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5002 public func appending<Other>(_ other: Other) -> some CreateMLComponents.TabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self.Transformer, Other>> where Other : CreateMLComponents.TabularTransformer
5003
5004 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5005 public func appending<Other>(_ other: Other) -> some CreateMLComponents.TabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self.Transformer, Other.Transformer>> where Other : CreateMLComponents.TabularEstimator
5006
5007}
5008@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5009public struct OneHotEncoder<Category> : CreateMLComponents.Estimator where Category : Swift.Comparable, Category : Swift.Decodable, Category : Swift.Encodable, Category : Swift.Hashable {
5010 public init()
5011 public func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CreateMLComponents.OneHotEncoder<Category>.Transformer where S : Swift.Sequence, S.Element == Category?
5012}
5013@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5014extension CreateMLComponents.OneHotEncoder : CreateMLComponents.UpdatableEstimator {
5015 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5016 public func makeTransformer() -> CreateMLComponents.OneHotEncoder<Category>.Transformer
5017 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5018 public func update(_ transformer: inout CreateMLComponents.OneHotEncoder<Category>.Transformer, with input: some Sequence<Category?>, eventHandler: CreateMLComponents.EventHandler? = nil) throws
5019 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5020 public func encodeWithOptimizer(_ transformer: CreateMLComponents.OneHotEncoder<Category>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5021 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5022 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.OneHotEncoder<Category>.Transformer
5023}
5024@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5025extension CreateMLComponents.OneHotEncoder : Swift.Sendable where Category : Swift.Sendable {
5026}
5027extension CreateMLComponents.OneHotEncoder {
5028 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5029 public struct Transformer : CreateMLComponents.Transformer {
5030 public var categories: Swift.Set<Category?>
5031 public init(categories: Swift.Set<Category?>)
5032 public func applied(to input: Category?, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> [Swift.Int]
5033 public func applied<S>(_ input: S, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> [[Swift.Int]] where S : Swift.Sequence, S.Element == Category?
5034 public func category(at index: Swift.Int) -> Category?
5035 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
5036 public typealias Input = Category?
5037 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
5038 public typealias Output = [Swift.Int]
5039 }
5040}
5041@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5042extension CreateMLComponents.OneHotEncoder.Transformer : Swift.CustomDebugStringConvertible {
5043 public var debugDescription: Swift.String {
5044 get
5045 }
5046}
5047@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5048extension CreateMLComponents.OneHotEncoder.Transformer : Swift.Sendable where Category : Swift.Sendable {
5049}
5050@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5051extension CreateMLComponents.OneHotEncoder.Transformer : Swift.Encodable {
5052 public func encode(to encoder: any Swift.Encoder) throws
5053}
5054@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5055extension CreateMLComponents.OneHotEncoder.Transformer : Swift.Decodable {
5056 public init(from decoder: any Swift.Decoder) throws
5057}
5058@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5059public struct OptionalUnwrapper<Element> : CreateMLComponents.Transformer {
5060 public init()
5061 @inlinable public func applied(to input: Element?, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> Element {
5062 guard let unwrapped = input else {
5063 throw PipelineDataError.missingValue(operation: "OptionalUnwrapper")
5064 }
5065 return unwrapped
5066 }
5067 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
5068 public typealias Input = Element?
5069 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
5070 public typealias Output = Element
5071}
5072@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5073extension CreateMLComponents.OptionalUnwrapper : Swift.Sendable where Element : Swift.Sendable {
5074}
5075@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5076public enum CompatibilityError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
5077 case unsupportedRevision(Swift.Int)
5078 public var errorDescription: Swift.String? {
5079 get
5080 }
5081 public static func == (a: CreateMLComponents.CompatibilityError, b: CreateMLComponents.CompatibilityError) -> Swift.Bool
5082}
5083@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5084extension CreateMLComponents.CompatibilityError : Swift.CustomDebugStringConvertible {
5085 public var debugDescription: Swift.String {
5086 get
5087 }
5088}
5089@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5090public struct UniformRandomFloatingPointParameter<RandomTransformer, Parameter> : CreateMLComponents.RandomTransformer where RandomTransformer : CreateMLComponents.RandomTransformer, Parameter : Swift.BinaryFloatingPoint, RandomTransformer.Input == RandomTransformer.Output, Parameter.RawSignificand : Swift.FixedWidthInteger {
5091 public var range: Swift.ClosedRange<Parameter>
5092 public init<Input>(range: Swift.ClosedRange<Parameter>, @CreateMLComponents.AugmentationBuilder<Input> _ augmentation: @escaping (Parameter) -> RandomTransformer) where Input == RandomTransformer.Input
5093 public func applied(to input: RandomTransformer.Input, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> RandomTransformer.Output
5094 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
5095 public typealias Input = RandomTransformer.Input
5096 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
5097 public typealias Output = RandomTransformer.Input
5098}
5099@available(*, unavailable)
5100extension CreateMLComponents.UniformRandomFloatingPointParameter : Swift.Sendable {
5101}
5102@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5103public struct PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator> : CreateMLComponents.SupervisedTabularEstimator where Preprocessor : CreateMLComponents.TabularTransformer, Estimator : CreateMLComponents.SupervisedTabularEstimator {
5104 public typealias Transformer = CreateMLComponents.ComposedTabularTransformer<Preprocessor, Estimator.Transformer>
5105 public typealias Input = Preprocessor.Input
5106 public typealias Intermediate = Preprocessor.Output
5107 public typealias Output = Estimator.Transformer.Output
5108 public typealias Annotation = Estimator.Annotation
5109 public var preprocessor: Preprocessor
5110 public var estimator: Estimator
5111 public var annotationColumnID: TabularData.ColumnID<Estimator.Annotation> {
5112 get
5113 set
5114 }
5115 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
5116 @inlinable public func preprocessed(from input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> TabularData.DataFrame {
5117 try await preprocessor.applied(to: input, eventHandler: eventHandler)
5118 }
5119 @inlinable public func fitted(toPreprocessed preprocessedInput: TabularData.DataFrame, validateOn preprocessedValidation: TabularData.DataFrame?, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer {
5120 let fittedTransformer = try await estimator.fitted(
5121 to: preprocessedInput,
5122 validateOn: preprocessedValidation,
5123 eventHandler: eventHandler
5124 )
5125 return ComposedTabularTransformer(preprocessor, fittedTransformer)
5126 }
5127 @inlinable public func fitted(to input: TabularData.DataFrame, validateOn validation: TabularData.DataFrame?, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer {
5128 let preprocessedInput = try await preprocessed(from: input, eventHandler: eventHandler)
5129 let preprocessedValidation: DataFrame?
5130 if let validation {
4596 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4597 public init()
4598 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4599 public init<Predicted, Correct>(predicted: Predicted, groundTruth: Correct, labels: Swift::Set<Label>) where Label == Predicted.Element, Predicted : Swift::Sequence, Correct : Swift::Sequence, Predicted.Element == Correct.Element
4600 public init<Predicted, Correct>(_ predicted: Predicted, _ groundTruth: Correct) where Label == Predicted.Element, Predicted : Swift::Collection, Correct : Swift::Collection, Predicted.Element == Correct.Element
4601 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4602 public init(_ pairs: some Sequence<(predicted: Label, label: Label)>, labels: Swift::Set<Label>)
4603 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4604 public init(_ pairs: some Sequence<(predicted: Label, label: Label)>)
4605 public init<S, Inner>(_ predicted: S) async throws where S : Swift::Sequence, Inner : CreateMLComponents::TemporalSequence, S.Element == CreateMLComponents::AnnotatedFeature<Inner, Label>, Inner.Feature == CreateMLComponents::ClassificationDistribution<Label>
4606 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4607 public mutating func add(predicted: some Sequence<Label>, groundTruth: some Sequence<Label>)
4608 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4609 public mutating func add(_ pairs: some Sequence<(predicted: Label, label: Label)>)
4610 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4611 public func count(label: Label) -> Swift::Int
4612 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4613 public func count(predicted: Label) -> Swift::Int
4614 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4615 public func count(predicted: Label, label: Label) -> Swift::Int
4616 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4617 public func truePositiveCount(of label: Label) -> Swift::Int
4618 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4619 public func falsePositiveCount(of label: Label) -> Swift::Int
4620 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4621 public func trueNegativeCount(of label: Label) -> Swift::Int
4622 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4623 public func falseNegativeCount(of label: Label) -> Swift::Int
4624 public func makeConfusionMatrix() -> CoreML::MLShapedArray<Swift::Float> where Label : Swift::Comparable, Label : Swift::Decodable, Label : Swift::Encodable
4625 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4626 public func mapLabels<T>(_ transform: (Label) throws -> T) rethrows -> CreateMLComponents::ClassificationMetrics<T> where T : Swift::Hashable
4627}
4628@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4629extension CreateMLComponents::ClassificationMetrics {
4630 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4631 public func precisionScore(label: Label) -> Swift::Double
4632 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4633 public func recallScore(label: Label) -> Swift::Double
4634 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4635 public func f1Score(label: Label) -> Swift::Double
4636}
4637@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4638extension CreateMLComponents::ClassificationMetrics : Swift::Sendable where Label : Swift::Sendable {
4639}
4640@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
4641public struct FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label> : CreateMLComponents::Transformer where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint, Label : Swift::Comparable, Label : Swift::Decodable, Label : Swift::Encodable, Label : Swift::Hashable {
4642 public mutating func updatePrecisionRecallCurves(_ input: some Collection<AnnotatedFeature<MLShapedArray<Scalar>, Set<Label>>>) async throws
4643 public func prediction(from input: CreateMLComponents::FullyConnectedNetworkMultiLabelClassifierModel<Scalar, Label>.CreateMLComponents::Input, confidenceThresholds: [Label : Scalar]) throws -> CreateMLComponents::ClassificationDistribution<Label>
4644 public func prediction<S>(from input: S, confidenceThresholds: [Label : Scalar]) throws -> [CreateMLComponents::ClassificationDistribution<Label>] where S : Swift::Sequence, S.Element == CoreML::MLShapedArray<Scalar>
4645 public func applied(to input: CoreML::MLShapedArray<Scalar>, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CreateMLComponents::ClassificationDistribution<Label>
4646 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
4647 public typealias Input = CoreML::MLShapedArray<Scalar>
4648 @available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
4649 public typealias Output = CreateMLComponents::ClassificationDistribution<Label>
4650}
4651@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
4652extension CreateMLComponents::FullyConnectedNetworkMultiLabelClassifierModel : Swift::Codable {
4653 public func encode(to encoder: any Swift::Encoder) throws
4654 public init(from decoder: any Swift::Decoder) throws
4655}
4656@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
4657extension CreateMLComponents::FullyConnectedNetworkMultiLabelClassifierModel : Swift::Sendable where Scalar : Swift::Sendable, Label : Swift::Sendable {
4658}
4659@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
4660extension CreateMLComponents::FullyConnectedNetworkMultiLabelClassifierModel : Swift::CustomDebugStringConvertible {
4661 public var debugDescription: Swift::String {
4662 get
4663 }
4664}
4665@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
4666extension CreateMLComponents::FullyConnectedNetworkMultiLabelClassifierModel {
4667 public func evaluation(on input: some Collection<AnnotatedFeature<Input, Set<Label>>>, confidenceThresholds: [Label : Swift::Float]) throws -> CreateMLComponents::MultiLabelClassificationMetrics<Label>
4668}
4669@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4670extension CreateMLComponents::Estimator where Self.Transformer : Swift::Encodable {
4671 public func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
4672}
4673@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4674extension CreateMLComponents::Estimator where Self.Transformer : Swift::Decodable {
4675 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
4676}
4677@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4678extension CreateMLComponents::SupervisedEstimator where Self.Transformer : Swift::Encodable {
4679 public func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
4680}
4681@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4682extension CreateMLComponents::SupervisedEstimator where Self.Transformer : Swift::Decodable {
4683 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
4684}
4685@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4686extension CreateMLComponents::Estimator {
4687 public func write(_ transformer: Self.Transformer, to url: Foundation::URL, overwrite: Swift::Bool = true) throws
4688 public func read(from url: Foundation::URL) throws -> Self.Transformer
4689}
4690@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4691extension CreateMLComponents::SupervisedEstimator {
4692 public func write(_ transformer: Self.Transformer, to url: Foundation::URL, overwrite: Swift::Bool = true) throws
4693 public func read(from url: Foundation::URL) throws -> Self.Transformer
4694}
4695@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4696extension CreateMLComponents::UpdatableSupervisedEstimator {
4697 public func writeWithOptimizer(_ transformer: Self.Transformer, to url: Foundation::URL, overwrite: Swift::Bool = true) throws
4698 public func readWithOptimizer(from url: Foundation::URL) throws -> Self.Transformer
4699}
4700@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4701public enum ModelCompatibilityError : Foundation::LocalizedError, Swift::Equatable, Swift::Sendable {
4702 case missingLabel
4703 case missingLabelProbabilities
4704 case missingPredictedFeature
4705 case incompatibleLabelType
4706 case incompatibleInputDataFormat(expected: CoreML::MLFeatureType, actual: CoreML::MLFeatureType)
4707 case incompatibleInputMultiArrayDataType(CoreML::MLMultiArrayDataType)
4708 case incompatibleOutputDataFormat(expected: CoreML::MLFeatureType, actual: CoreML::MLFeatureType)
4709 case incompatibleInputCount(expected: Swift::Int, actual: Swift::Int)
4710 case incompatibleOutputCount(expected: Swift::Int, actual: Swift::Int)
4711 case missingInput(name: Swift::String)
4712 case missingOutput(name: Swift::String)
4713 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4714 case incompatibleMetadataKey(name: Swift::String)
4715 public var errorDescription: Swift::String? {
4716 get
4717 }
4718 public static func == (a: CreateMLComponents::ModelCompatibilityError, b: CreateMLComponents::ModelCompatibilityError) -> Swift::Bool
4719}
4720@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4721extension CreateMLComponents::ModelCompatibilityError : Swift::CustomDebugStringConvertible {
4722 public var debugDescription: Swift::String {
4723 get
4724 }
4725}
4726@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
4727@available(watchOS, unavailable)
4728extension CreateMLComponents::TimeSeriesClassifier {
4729 public typealias Configuration = CreateMLComponents::TimeSeriesClassifierConfiguration
4730}
4731@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
4732@available(watchOS, unavailable)
4733public struct TimeSeriesClassifierConfiguration : Swift::Hashable, Swift::Codable, Swift::Sendable {
4734 public var minimumSequenceLength: Swift::Int
4735 public var maximumSequenceLength: Swift::Int
4736 public var batchSize: Swift::Int
4737 public var maximumIterationCount: Swift::Int
4738 public var earlyStoppingTolerance: Swift::Float
4739 public var earlyStoppingIterationCount: Swift::Int
4740 public var learningRate: Swift::Float
4741 public var randomSeed: Swift::Int?
4742 public init()
4743 public static func == (a: CreateMLComponents::TimeSeriesClassifierConfiguration, b: CreateMLComponents::TimeSeriesClassifierConfiguration) -> Swift::Bool
4744 public func encode(to encoder: any Swift::Encoder) throws
4745 public func hash(into hasher: inout Swift::Hasher)
4746 public var hashValue: Swift::Int {
4747 get
4748 }
4749 public init(from decoder: any Swift::Decoder) throws
4750}
4751@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4752public struct MultiLabelClassificationMetrics<Label> where Label : Swift::Hashable {
4753 public var exampleCount: Swift::Int {
4754 get
4755 }
4756 public var labels: Swift::Set<Label> {
4757 get
4758 }
4759 public var confidenceThresholds: [Label : Swift::Float] {
4760 get
4761 }
4762 public var meanAveragePrecision: Swift::Float {
4763 get
4764 }
4765 public init(classifications: some Sequence<ClassificationDistribution<Label>>, groundTruth: some Sequence<Set<Label>>, strategy: CreateMLComponents::MultiLabelClassificationMetrics<Label>.CreateMLComponents::ThresholdSelectionStrategy, labels: Swift::Set<Label>) throws
4766 public init(classifications: some Sequence<ClassificationDistribution<Label>>, groundTruth: some Sequence<Set<Label>>, strategy: CreateMLComponents::MultiLabelClassificationMetrics<Label>.CreateMLComponents::ThresholdSelectionStrategy) throws
4767 public init(_ pairs: some Sequence<(classification: ClassificationDistribution<Label>, labels: Set<Label>)>, strategy: CreateMLComponents::MultiLabelClassificationMetrics<Label>.CreateMLComponents::ThresholdSelectionStrategy, labels: Swift::Set<Label>) throws
4768 public init(_ pairs: some Sequence<(classification: ClassificationDistribution<Label>, labels: Set<Label>)>, strategy: CreateMLComponents::MultiLabelClassificationMetrics<Label>.CreateMLComponents::ThresholdSelectionStrategy) throws
4769}
4770extension CreateMLComponents::MultiLabelClassificationMetrics {
4771 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4772 public init(confidenceThresholds: [Label : Swift::Float])
4773 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4774 public mutating func add(classifications: some Sequence<ClassificationDistribution<Label>>, groundTruth: some Sequence<Set<Label>>)
4775 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4776 public mutating func add(_ pairs: some Sequence<(classification: ClassificationDistribution<Label>, labels: Set<Label>)>)
4777}
4778@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4779extension CreateMLComponents::MultiLabelClassificationMetrics : Swift::Sendable where Label : Swift::Sendable {
4780}
4781@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4782public struct NumericImputer<Element> : CreateMLComponents::Estimator where Element : Swift::BinaryFloatingPoint, Element : Swift::Decodable, Element : Swift::Encodable {
4783 public typealias Transformer = CreateMLComponents::ImputeTransformer<Element>
4784 public enum Strategy {
4785 case median
4786 case mean
4787 case constant(Element)
4788 }
4789 public var strategy: CreateMLComponents::NumericImputer<Element>.CreateMLComponents::Strategy
4790 public init(_ strategy: CreateMLComponents::NumericImputer<Element>.CreateMLComponents::Strategy)
4791 public init(constant: Element)
4792 public func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) -> CreateMLComponents::NumericImputer<Element>.CreateMLComponents::Transformer where S : Swift::Sequence, S.Element == Element?
4793}
4794@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4795extension CreateMLComponents::NumericImputer : CreateMLComponents::UpdatableEstimator {
4796 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4797 public func makeTransformer() -> CreateMLComponents::NumericImputer<Element>.CreateMLComponents::Transformer
4798 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4799 public func update(_ transformer: inout CreateMLComponents::ImputeTransformer<Element>, with input: some Sequence<Element?>, eventHandler: CreateMLComponents::EventHandler? = nil) throws
4800 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4801 public func encodeWithOptimizer(_ transformer: CreateMLComponents::NumericImputer<Element>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
4802 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4803 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::NumericImputer<Element>.CreateMLComponents::Transformer
4804}
4805@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4806extension CreateMLComponents::NumericImputer : Swift::Sendable where Element : Swift::Sendable {
4807}
4808@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4809extension CreateMLComponents::NumericImputer.CreateMLComponents::Strategy : Swift::Sendable where Element : Swift::Sendable {
4810}
4811@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4812public struct VideoReader : CreateMLComponents::Transformer, Swift::Sendable {
4813 public init()
4814 public func applied(to url: Foundation::URL, eventHandler: CreateMLComponents::EventHandler?) async throws -> CreateMLComponents::VideoReader.CreateMLComponents::AsyncFrames
4815 public static func read(contentsOf url: Foundation::URL) async throws -> CreateMLComponents::VideoReader.CreateMLComponents::AsyncFrames
4816 public static func read<S>(_ files: S) async throws -> [CreateMLComponents::VideoReader.CreateMLComponents::AsyncFrames] where S : Swift::Sequence, S.Element == Foundation::URL
4817 public static func read<S, Annotation>(_ annotatedFiles: S) async throws -> [CreateMLComponents::AnnotatedFeature<CreateMLComponents::VideoReader.CreateMLComponents::AsyncFrames, Annotation>] where S : Swift::Sequence, Annotation : Swift::Equatable, Annotation : Swift::Sendable, S.Element == CreateMLComponents::AnnotatedFeature<Foundation::URL, Annotation>
4818 @available(macOS 13.0, iOS 16.0, *)
4819 @available(tvOS, unavailable)
4820 public static func readCamera(configuration: CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration) async throws -> CreateMLComponents::VideoReader.CreateMLComponents::CameraAsyncBuffers
4821 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4822 public typealias Input = Foundation::URL
4823 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4824 public typealias Output = CreateMLComponents::VideoReader.CreateMLComponents::AsyncFrames
4825}
4826@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4827public protocol Classifier : CreateMLComponents::Transformer {
4828 associatedtype Label : Swift::Hashable where Self.Output == CreateMLComponents::ClassificationDistribution<Self.Label>
4829}
4830@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4831extension CreateMLComponents::Transformer {
4832 public func prediction<Label>(from input: Self.Input) async throws -> CreateMLComponents::ClassificationDistribution<Label> where Label : Swift::Hashable, Self.Output == CreateMLComponents::ClassificationDistribution<Label>
4833 public func prediction<S, Label>(from input: S) async throws -> [CreateMLComponents::ClassificationDistribution<Label>] where S : Swift::Sequence, Label : Swift::Hashable, Self.Input == S.Element, Self.Output == CreateMLComponents::ClassificationDistribution<Label>
4834}
4835@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4836extension CreateMLComponents::TemporalTransformer {
4837 public func prediction<S, Label>(from input: S) async throws -> Self.OutputSequence where S : CreateMLComponents::TemporalSequence, Label : Swift::Hashable, Self.Input == S.Feature, Self.Output == CreateMLComponents::ClassificationDistribution<Label>
4838}
4839@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4840public struct AudioConvertingTransformer : CreateMLComponents::Transformer, Swift::Sendable {
4841 public let targetFormat: AVFAudio::AVAudioFormat
4842 public init(targetFormat: AVFAudio::AVAudioFormat)
4843 public func applied(to input: AVFAudio::AVAudioPCMBuffer, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> AVFAudio::AVAudioPCMBuffer
4844 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4845 public typealias Input = AVFAudio::AVAudioPCMBuffer
4846 @available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4847 public typealias Output = AVFAudio::AVAudioPCMBuffer
4848}
4849@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
4850extension CreateMLComponents::AudioConvertingTransformer : Swift::CustomDebugStringConvertible {
4851 public var debugDescription: Swift::String {
4852 get
4853 }
4854}
4855@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4856public struct FullyConnectedNetworkRegressorModel<Scalar> : CreateMLComponents::Regressor where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint {
4857 public typealias Target = Swift::Float
4858 public func applied(to input: CoreML::MLShapedArray<Scalar>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::FullyConnectedNetworkRegressorModel<Scalar>.CreateMLComponents::Target
4859 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4860 public typealias Input = CoreML::MLShapedArray<Scalar>
4861 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4862 public typealias Output = CreateMLComponents::FullyConnectedNetworkRegressorModel<Scalar>.CreateMLComponents::Target
4863}
4864@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4865extension CreateMLComponents::FullyConnectedNetworkRegressorModel : Swift::Codable {
4866 public func encode(to encoder: any Swift::Encoder) throws
4867 public init(from decoder: any Swift::Decoder) throws
4868}
4869@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4870extension CreateMLComponents::FullyConnectedNetworkRegressorModel : Swift::CustomDebugStringConvertible {
4871 public var debugDescription: Swift::String {
4872 get
4873 }
4874}
4875@available(*, unavailable)
4876extension CreateMLComponents::FullyConnectedNetworkRegressorModel : Swift::Sendable {
4877}
4878@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4879public struct TreeRegressorModel : CreateMLComponents::TabularTransformer, Swift::Sendable {
4880 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4881 public var featureColumnNames: [Swift::String] {
4882 get
4883 }
4884 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4885 public var predictionColumnName: Swift::String
4886 public func applied(to input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> TabularData::DataFrame
4887 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4888 public typealias Input = TabularData::DataFrame
4889 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4890 public typealias Output = TabularData::DataFrame
4891}
4892@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4893extension CreateMLComponents::TreeRegressorModel : Swift::CustomDebugStringConvertible {
4894 public var debugDescription: Swift::String {
4895 get
4896 }
4897}
4898@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4899public struct MLModelClassifierAdaptor<Scalar> : CreateMLComponents::Classifier where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint {
4900 public enum Label : Swift::Hashable, Swift::Sendable {
4901 case string(Swift::String)
4902 case int(Swift::Int)
4903 public static func == (a: CreateMLComponents::MLModelClassifierAdaptor<Scalar>.CreateMLComponents::Label, b: CreateMLComponents::MLModelClassifierAdaptor<Scalar>.CreateMLComponents::Label) -> Swift::Bool
4904 public func hash(into hasher: inout Swift::Hasher)
4905 public var hashValue: Swift::Int {
4906 get
4907 }
4908 }
4909 public let model: CoreML::MLModel
4910 public init(contentsOf url: Foundation::URL, configuration: CoreML::MLModelConfiguration) throws
4911 public init(model: CoreML::MLModel) throws
4912 public func applied(to input: CoreML::MLShapedArray<Scalar>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::ClassificationDistribution<CreateMLComponents::MLModelClassifierAdaptor<Scalar>.CreateMLComponents::Label>
4913 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4914 public typealias Input = CoreML::MLShapedArray<Scalar>
4915 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4916 public typealias Output = CreateMLComponents::ClassificationDistribution<CreateMLComponents::MLModelClassifierAdaptor<Scalar>.CreateMLComponents::Label>
4917}
4918@available(*, unavailable)
4919extension CreateMLComponents::MLModelClassifierAdaptor : Swift::Sendable {
4920}
4921@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4922extension CreateMLComponents::MLModelClassifierAdaptor.CreateMLComponents::Label : Swift::CustomDebugStringConvertible {
4923 public var debugDescription: Swift::String {
4924 get
4925 }
4926}
4927@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4928extension CreateMLComponents::MLModelClassifierAdaptor.CreateMLComponents::Label : Swift::ExpressibleByStringLiteral {
4929 public init(stringLiteral value: Swift::String)
4930 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4931 public typealias ExtendedGraphemeClusterLiteralType = Swift::String
4932 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4933 public typealias StringLiteralType = Swift::String
4934 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4935 public typealias UnicodeScalarLiteralType = Swift::String
4936}
4937@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4938extension CreateMLComponents::MLModelClassifierAdaptor.CreateMLComponents::Label : Swift::ExpressibleByIntegerLiteral {
4939 public init(integerLiteral value: Swift::Int)
4940 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4941 public typealias IntegerLiteralType = Swift::Int
4942}
4943@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4944public struct TreeClassifierModel<Label> : CreateMLComponents::TabularTransformer, Swift::Sendable where Label : Swift::Hashable {
4945 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4946 public var featureColumnNames: [Swift::String] {
4947 get
4948 }
4949 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4950 public var predictionColumnName: Swift::String
4951 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4952 public var classCount: Swift::Int {
4953 get
4954 }
4955 public func applied(to input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> TabularData::DataFrame
4956 public func buildDataFrame(_ distributions: [CreateMLComponents::ClassificationDistribution<Label>]) -> TabularData::DataFrame
4957 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4958 public typealias Input = TabularData::DataFrame
4959 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4960 public typealias Output = TabularData::DataFrame
4961}
4962@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4963extension CreateMLComponents::TreeClassifierModel : Swift::CustomDebugStringConvertible {
4964 public var debugDescription: Swift::String {
4965 get
4966 }
4967}
4968@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
4969extension CreateMLComponents::LinearTimeSeriesForecaster : CreateMLComponents::UpdatableSupervisedEstimator {
4970 public func makeTransformer() -> CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Model
4971 public func update(_ model: inout CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Model, with input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws
4972 public func update(_ model: inout CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Model, withWindows windows: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws
4973 public func update(_ model: inout CreateMLComponents::LinearTimeSeriesForecaster<Scalar>.CreateMLComponents::Transformer, with input: CreateMLComponents::AnnotatedBatch<Scalar>) async throws -> Scalar
4974}
4975@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4976public enum OptimizationError : Foundation::LocalizedError, Swift::Equatable, Swift::Sendable {
4977 case numericUnderflow
4978 case numericOverflow
4979 case unsupportedPlatform
4980 public var errorDescription: Swift::String? {
4981 get
4982 }
4983 public static func == (a: CreateMLComponents::OptimizationError, b: CreateMLComponents::OptimizationError) -> Swift::Bool
4984 public func hash(into hasher: inout Swift::Hasher)
4985 public var hashValue: Swift::Int {
4986 get
4987 }
4988}
4989@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
4990extension CreateMLComponents::OptimizationError : Swift::CustomDebugStringConvertible {
4991 public var debugDescription: Swift::String {
4992 get
4993 }
4994}
4995extension CreateMLComponents::TabularTransformer {
4996 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
4997 public func appending<Other>(_ other: Other) -> some CreateMLComponents::TabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self, Other.Transformer>> where Other : CreateMLComponents::TabularEstimator
4998
4999}
5000extension CreateMLComponents::TabularEstimator {
5001 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5002 public func appending<Other>(_ other: Other) -> some CreateMLComponents::TabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self.Transformer, Other>> where Other : CreateMLComponents::TabularTransformer
5003
5004 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5005 public func appending<Other>(_ other: Other) -> some CreateMLComponents::TabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self.Transformer, Other.Transformer>> where Other : CreateMLComponents::TabularEstimator
5006
5007}
5008@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5009public struct OneHotEncoder<Category> : CreateMLComponents::Estimator where Category : Swift::Comparable, Category : Swift::Decodable, Category : Swift::Encodable, Category : Swift::Hashable {
5010 public init()
5011 public func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CreateMLComponents::OneHotEncoder<Category>.CreateMLComponents::Transformer where S : Swift::Sequence, S.Element == Category?
5012}
5013@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5014extension CreateMLComponents::OneHotEncoder : CreateMLComponents::UpdatableEstimator {
5015 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5016 public func makeTransformer() -> CreateMLComponents::OneHotEncoder<Category>.CreateMLComponents::Transformer
5017 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5018 public func update(_ transformer: inout CreateMLComponents::OneHotEncoder<Category>.CreateMLComponents::Transformer, with input: some Sequence<Category?>, eventHandler: CreateMLComponents::EventHandler? = nil) throws
5019 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5020 public func encodeWithOptimizer(_ transformer: CreateMLComponents::OneHotEncoder<Category>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5021 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5022 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::OneHotEncoder<Category>.CreateMLComponents::Transformer
5023}
5024@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5025extension CreateMLComponents::OneHotEncoder : Swift::Sendable where Category : Swift::Sendable {
5026}
5027extension CreateMLComponents::OneHotEncoder {
5028 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5029 public struct Transformer : CreateMLComponents::Transformer {
5030 public var categories: Swift::Set<Category?>
5031 public init(categories: Swift::Set<Category?>)
5032 public func applied(to input: Category?, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> [Swift::Int]
5033 public func applied<S>(_ input: S, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> [[Swift::Int]] where S : Swift::Sequence, S.Element == Category?
5034 public func category(at index: Swift::Int) -> Category?
5035 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5036 public typealias Input = Category?
5037 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5038 public typealias Output = [Swift::Int]
5039 }
5040}
5041@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5042extension CreateMLComponents::OneHotEncoder.CreateMLComponents::Transformer : Swift::CustomDebugStringConvertible {
5043 public var debugDescription: Swift::String {
5044 get
5045 }
5046}
5047@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5048extension CreateMLComponents::OneHotEncoder.CreateMLComponents::Transformer : Swift::Sendable where Category : Swift::Sendable {
5049}
5050@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5051extension CreateMLComponents::OneHotEncoder.CreateMLComponents::Transformer : Swift::Encodable {
5052 public func encode(to encoder: any Swift::Encoder) throws
5053}
5054@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5055extension CreateMLComponents::OneHotEncoder.CreateMLComponents::Transformer : Swift::Decodable {
5056 public init(from decoder: any Swift::Decoder) throws
5057}
5058@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5059public struct OptionalUnwrapper<Element> : CreateMLComponents::Transformer {
5060 public init()
5061 @inlinable public func applied(to input: Element?, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> Element {
5062 guard let unwrapped = input else {
5063 throw PipelineDataError.missingValue(operation: "OptionalUnwrapper")
5064 }
5065 return unwrapped
5066 }
5067 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5068 public typealias Input = Element?
5069 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5070 public typealias Output = Element
5071}
5072@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5073extension CreateMLComponents::OptionalUnwrapper : Swift::Sendable where Element : Swift::Sendable {
5074}
5075@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5076public enum CompatibilityError : Foundation::LocalizedError, Swift::Equatable, Swift::Sendable {
5077 case unsupportedRevision(Swift::Int)
5078 public var errorDescription: Swift::String? {
5079 get
5080 }
5081 public static func == (a: CreateMLComponents::CompatibilityError, b: CreateMLComponents::CompatibilityError) -> Swift::Bool
5082}
5083@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5084extension CreateMLComponents::CompatibilityError : Swift::CustomDebugStringConvertible {
5085 public var debugDescription: Swift::String {
5086 get
5087 }
5088}
5089@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5090public struct UniformRandomFloatingPointParameter<RandomTransformer, Parameter> : CreateMLComponents::RandomTransformer where RandomTransformer : CreateMLComponents::RandomTransformer, Parameter : Swift::BinaryFloatingPoint, RandomTransformer.Input == RandomTransformer.Output, Parameter.RawSignificand : Swift::FixedWidthInteger {
5091 public var range: Swift::ClosedRange<Parameter>
5092 public init<Input>(range: Swift::ClosedRange<Parameter>, @CreateMLComponents::AugmentationBuilder<Input> _ augmentation: @escaping (Parameter) -> RandomTransformer) where Input == RandomTransformer.Input
5093 public func applied(to input: RandomTransformer.Input, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> RandomTransformer.Output
5094 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5095 public typealias Input = RandomTransformer.Input
5096 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5097 public typealias Output = RandomTransformer.Input
5098}
5099@available(*, unavailable)
5100extension CreateMLComponents::UniformRandomFloatingPointParameter : Swift::Sendable {
5101}
5102@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5103public struct PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator> : CreateMLComponents::SupervisedTabularEstimator where Preprocessor : CreateMLComponents::TabularTransformer, Estimator : CreateMLComponents::SupervisedTabularEstimator {
5104 public typealias Transformer = CreateMLComponents::ComposedTabularTransformer<Preprocessor, Estimator.Transformer>
5105 public typealias Input = Preprocessor.Input
5106 public typealias Intermediate = Preprocessor.Output
5107 public typealias Output = Estimator.Transformer.Output
5108 public typealias Annotation = Estimator.Annotation
5109 public var preprocessor: Preprocessor
5110 public var estimator: Estimator
5111 public var annotationColumnID: TabularData::ColumnID<Estimator.Annotation> {
5112 get
5113 set
5114 }
5115 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
5116 @inlinable public func preprocessed(from input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> TabularData::DataFrame {
5117 try await preprocessor.applied(to: input, eventHandler: eventHandler)
5118 }
5119 @inlinable public func fitted(toPreprocessed preprocessedInput: TabularData::DataFrame, validateOn preprocessedValidation: TabularData::DataFrame?, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
5120 let fittedTransformer = try await estimator.fitted(
5121 to: preprocessedInput,
5122 validateOn: preprocessedValidation,
5123 eventHandler: eventHandler
5124 )
5125 return ComposedTabularTransformer(preprocessor, fittedTransformer)
5126 }
5127 @inlinable public func fitted(to input: TabularData::DataFrame, validateOn validation: TabularData::DataFrame?, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
5128 let preprocessedInput = try await preprocessed(from: input, eventHandler: eventHandler)
5129 let preprocessedValidation: DataFrame?
5130 if let validation {
… 8 unchanged lines …
5139 eventHandler: eventHandler
5140 )
5141 }
5142 public func encode(_ transformer: CreateMLComponents.PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5143 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator>.Transformer
5144}
5145@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5146extension CreateMLComponents.PreprocessingSupervisedTabularEstimator : Swift.Sendable where Preprocessor : Swift.Sendable, Estimator : Swift.Sendable {
5147}
5148extension CreateMLComponents.TabularTransformer {
5149 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5150 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingSupervisedTabularEstimator<Self, Other> where Other : CreateMLComponents.SupervisedTabularEstimator
5151}
5152@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5153public struct TransformerToEstimatorAdaptor<Transformer> : CreateMLComponents.Estimator where Transformer : CreateMLComponents.Transformer {
5154 public let transformer: Transformer
5155 public init(_ transformer: Transformer)
5156 @inlinable public func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Transformer where S : Swift.Sequence, Transformer.Input == S.Element {
5157 transformer
5158 }
5159 @inlinable public func encode(_ transformer: Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
5160
5161 }
5162 @inlinable public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Transformer {
5163 transformer
5164 }
5165}
5166@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5167extension CreateMLComponents.TransformerToEstimatorAdaptor : Swift.Sendable where Transformer : Swift.Sendable {
5168}
5169extension CreateMLComponents.Transformer {
5170 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5171 @inlinable public func adaptedAsEstimator() -> CreateMLComponents.TransformerToEstimatorAdaptor<Self> {
5172 TransformerToEstimatorAdaptor(self)
5173 }
5174}
5175@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5176public struct TransformerToUpdatableEstimatorAdaptor<Transformer> : CreateMLComponents.UpdatableEstimator where Transformer : CreateMLComponents.Transformer {
5177 public let transformer: Transformer
5178 public init(_ transformer: Transformer)
5179 @inlinable public func makeTransformer() -> Transformer {
5180 transformer
5181 }
5182 @inlinable public func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Transformer where S : Swift.Sequence, Transformer.Input == S.Element {
5183 transformer
5184 }
5185 @inlinable public func update<InputSequence>(_ transformer: inout Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, Transformer.Input == InputSequence.Element {
5186
5187 }
5188 @inlinable public func encode(_ transformer: Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
5189
5190 }
5191 @inlinable public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Transformer {
5192 transformer
5193 }
5194 @inlinable public func encodeWithOptimizer(_ transformer: Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
5195
5196 }
5197 @inlinable public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Transformer {
5198 transformer
5199 }
5200}
5201@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5202extension CreateMLComponents.TransformerToUpdatableEstimatorAdaptor : Swift.Sendable where Transformer : Swift.Sendable {
5203}
5204extension CreateMLComponents.Transformer {
5205 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5206 @inlinable public func adaptedAsUpdatableEstimator() -> CreateMLComponents.TransformerToUpdatableEstimatorAdaptor<Self> {
5207 TransformerToUpdatableEstimatorAdaptor(self)
5208 }
5209}
5139 eventHandler: eventHandler
5140 )
5141 }
5142 public func encode(_ transformer: CreateMLComponents::PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5143 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingSupervisedTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
5144}
5145@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5146extension CreateMLComponents::PreprocessingSupervisedTabularEstimator : Swift::Sendable where Preprocessor : Swift::Sendable, Estimator : Swift::Sendable {
5147}
5148extension CreateMLComponents::TabularTransformer {
5149 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5150 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingSupervisedTabularEstimator<Self, Other> where Other : CreateMLComponents::SupervisedTabularEstimator
5151}
5152@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5153public struct TransformerToEstimatorAdaptor<Transformer> : CreateMLComponents::Estimator where Transformer : CreateMLComponents::Transformer {
5154 public let transformer: Transformer
5155 public init(_ transformer: Transformer)
5156 @inlinable public func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Transformer where S : Swift::Sequence, Transformer.Input == S.Element {
5157 transformer
5158 }
5159 @inlinable public func encode(_ transformer: Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
5160
5161 }
5162 @inlinable public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Transformer {
5163 transformer
5164 }
5165}
5166@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5167extension CreateMLComponents::TransformerToEstimatorAdaptor : Swift::Sendable where Transformer : Swift::Sendable {
5168}
5169extension CreateMLComponents::Transformer {
5170 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5171 @inlinable public func adaptedAsEstimator() -> CreateMLComponents::TransformerToEstimatorAdaptor<Self> {
5172 TransformerToEstimatorAdaptor(self)
5173 }
5174}
5175@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5176public struct TransformerToUpdatableEstimatorAdaptor<Transformer> : CreateMLComponents::UpdatableEstimator where Transformer : CreateMLComponents::Transformer {
5177 public let transformer: Transformer
5178 public init(_ transformer: Transformer)
5179 @inlinable public func makeTransformer() -> Transformer {
5180 transformer
5181 }
5182 @inlinable public func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Transformer where S : Swift::Sequence, Transformer.Input == S.Element {
5183 transformer
5184 }
5185 @inlinable public func update<InputSequence>(_ transformer: inout Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, Transformer.Input == InputSequence.Element {
5186
5187 }
5188 @inlinable public func encode(_ transformer: Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
5189
5190 }
5191 @inlinable public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Transformer {
5192 transformer
5193 }
5194 @inlinable public func encodeWithOptimizer(_ transformer: Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
5195
5196 }
5197 @inlinable public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Transformer {
5198 transformer
5199 }
5200}
5201@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5202extension CreateMLComponents::TransformerToUpdatableEstimatorAdaptor : Swift::Sendable where Transformer : Swift::Sendable {
5203}
5204extension CreateMLComponents::Transformer {
5205 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5206 @inlinable public func adaptedAsUpdatableEstimator() -> CreateMLComponents::TransformerToUpdatableEstimatorAdaptor<Self> {
5207 TransformerToUpdatableEstimatorAdaptor(self)
5208 }
5209}
… 2 unchanged lines …
5212@available(tvOS, introduced: 16.0, deprecated: 18.0)
5213@available(visionOS, introduced: 1.0, deprecated: 2.0)
5214@available(watchOS, unavailable)
5215public struct TemporalTransformerToEstimatorAdaptor<Transformer> : CreateMLComponents.TemporalEstimator where Transformer : CreateMLComponents.TemporalTransformer {
5216 public let transformer: Transformer
5217 public init(_ transformer: Transformer)
5218 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Transformer where InputSequence : Swift.Sequence, Transformer.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents.TemporalSequence {
5219 transformer
5220 }
5221 @inlinable public func encode(_ transformer: Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
5222
5223 }
5224 @inlinable public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Transformer {
5225 transformer
5226 }
5227}
5212@available(tvOS, introduced: 16.0, deprecated: 18.0)
5213@available(visionOS, introduced: 1.0, deprecated: 2.0)
5214@available(watchOS, unavailable)
5215public struct TemporalTransformerToEstimatorAdaptor<Transformer> : CreateMLComponents::TemporalEstimator where Transformer : CreateMLComponents::TemporalTransformer {
5216 public let transformer: Transformer
5217 public init(_ transformer: Transformer)
5218 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Transformer where InputSequence : Swift::Sequence, Transformer.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents::TemporalSequence {
5219 transformer
5220 }
5221 @inlinable public func encode(_ transformer: Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
5222
5223 }
5224 @inlinable public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Transformer {
5225 transformer
5226 }
5227}
… 2 unchanged lines …
5230@available(tvOS, introduced: 16.0, deprecated: 18.0)
5231@available(visionOS, introduced: 1.0, deprecated: 2.0)
5232@available(watchOS, unavailable)
5233extension CreateMLComponents.TemporalTransformerToEstimatorAdaptor : Swift.Sendable where Transformer : Swift.Sendable {
5234}
5235extension CreateMLComponents.TemporalTransformer {
5236 @available(macOS, introduced: 13.0, deprecated: 15.0)
5237 @available(iOS, introduced: 16.0, deprecated: 18.0)
5238 @available(tvOS, introduced: 16.0, deprecated: 18.0)
5239 @available(visionOS, introduced: 1.0, deprecated: 2.0)
5240 @available(watchOS, unavailable)
5241 @inlinable public func adaptedAsEstimator() -> CreateMLComponents.TemporalTransformerToEstimatorAdaptor<Self> {
5242 TemporalTransformerToEstimatorAdaptor(self)
5243 }
5244}
5230@available(tvOS, introduced: 16.0, deprecated: 18.0)
5231@available(visionOS, introduced: 1.0, deprecated: 2.0)
5232@available(watchOS, unavailable)
5233extension CreateMLComponents::TemporalTransformerToEstimatorAdaptor : Swift::Sendable where Transformer : Swift::Sendable {
5234}
5235extension CreateMLComponents::TemporalTransformer {
5236 @available(macOS, introduced: 13.0, deprecated: 15.0)
5237 @available(iOS, introduced: 16.0, deprecated: 18.0)
5238 @available(tvOS, introduced: 16.0, deprecated: 18.0)
5239 @available(visionOS, introduced: 1.0, deprecated: 2.0)
5240 @available(watchOS, unavailable)
5241 @inlinable public func adaptedAsEstimator() -> CreateMLComponents::TemporalTransformerToEstimatorAdaptor<Self> {
5242 TemporalTransformerToEstimatorAdaptor(self)
5243 }
5244}
… 2 unchanged lines …
5247@available(tvOS, introduced: 16.0, deprecated: 18.0)
5248@available(visionOS, introduced: 1.0, deprecated: 2.0)
5249@available(watchOS, unavailable)
5250public struct TemporalTransformerToUpdatableEstimatorAdaptor<Transformer> : CreateMLComponents.UpdatableTemporalEstimator where Transformer : CreateMLComponents.TemporalTransformer {
5251 public let transformer: Transformer
5252 public init(_ transformer: Transformer)
5253 @inlinable public func makeTransformer() -> Transformer {
5254 transformer
5255 }
5256 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Transformer where InputSequence : Swift.Sequence, Transformer.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents.TemporalSequence {
5257 transformer
5258 }
5259 @inlinable public func update<InputSequence>(_ transformer: inout Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, Transformer.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents.TemporalSequence {
5260
5261 }
5262 @inlinable public func encode(_ transformer: Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
5263
5264 }
5265 @inlinable public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Transformer {
5266 transformer
5267 }
5268 @inlinable public func encodeWithOptimizer(_ transformer: Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
5269
5270 }
5271 @inlinable public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Transformer {
5272 transformer
5273 }
5274}
5247@available(tvOS, introduced: 16.0, deprecated: 18.0)
5248@available(visionOS, introduced: 1.0, deprecated: 2.0)
5249@available(watchOS, unavailable)
5250public struct TemporalTransformerToUpdatableEstimatorAdaptor<Transformer> : CreateMLComponents::UpdatableTemporalEstimator where Transformer : CreateMLComponents::TemporalTransformer {
5251 public let transformer: Transformer
5252 public init(_ transformer: Transformer)
5253 @inlinable public func makeTransformer() -> Transformer {
5254 transformer
5255 }
5256 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Transformer where InputSequence : Swift::Sequence, Transformer.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents::TemporalSequence {
5257 transformer
5258 }
5259 @inlinable public func update<InputSequence>(_ transformer: inout Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, Transformer.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents::TemporalSequence {
5260
5261 }
5262 @inlinable public func encode(_ transformer: Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
5263
5264 }
5265 @inlinable public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Transformer {
5266 transformer
5267 }
5268 @inlinable public func encodeWithOptimizer(_ transformer: Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
5269
5270 }
5271 @inlinable public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Transformer {
5272 transformer
5273 }
5274}
… 2 unchanged lines …
5277@available(tvOS, introduced: 16.0, deprecated: 18.0)
5278@available(visionOS, introduced: 1.0, deprecated: 2.0)
5279@available(watchOS, unavailable)
5280extension CreateMLComponents.TemporalTransformerToUpdatableEstimatorAdaptor : Swift.Sendable where Transformer : Swift.Sendable {
5281}
5282extension CreateMLComponents.TemporalTransformer {
5283 @available(macOS, introduced: 13.0, deprecated: 15.0)
5284 @available(iOS, introduced: 16.0, deprecated: 18.0)
5285 @available(tvOS, introduced: 16.0, deprecated: 18.0)
5286 @available(visionOS, introduced: 1.0, deprecated: 2.0)
5287 @available(watchOS, unavailable)
5288 @inlinable public func adaptedAsUpdatableEstimator() -> CreateMLComponents.TemporalTransformerToUpdatableEstimatorAdaptor<Self> {
5289 TemporalTransformerToUpdatableEstimatorAdaptor(self)
5290 }
5291}
5292@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5293public struct TabularTransformerToEstimatorAdaptor<Transformer> : CreateMLComponents.TabularEstimator where Transformer : CreateMLComponents.TabularTransformer {
5294 public let transformer: Transformer
5295 public init(_ transformer: Transformer)
5296 @inlinable public func fitted(to input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Transformer {
5297 transformer
5298 }
5299 @inlinable public func encode(_ transformer: Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
5300
5301 }
5302 @inlinable public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Transformer {
5303 transformer
5304 }
5305}
5306@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5307extension CreateMLComponents.TabularTransformerToEstimatorAdaptor : Swift.Sendable where Transformer : Swift.Sendable {
5308}
5309extension CreateMLComponents.TabularTransformer {
5310 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5311 @inlinable public func adaptedAsEstimator() -> CreateMLComponents.TabularTransformerToEstimatorAdaptor<Self> {
5312 TabularTransformerToEstimatorAdaptor(self)
5313 }
5314}
5315@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5316public struct TabularTransformerToUpdatableEstimatorAdaptor<Transformer> : CreateMLComponents.UpdatableTabularEstimator where Transformer : CreateMLComponents.TabularTransformer {
5317 public let transformer: Transformer
5318 public init(_ transformer: Transformer)
5319 @inlinable public func makeTransformer() -> Transformer {
5320 transformer
5321 }
5322 @inlinable public func fitted(to input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Transformer {
5323 transformer
5324 }
5325 @inlinable public func update(_ transformer: inout Transformer, with input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws {
5326
5327 }
5328 @inlinable public func encode(_ transformer: Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
5329
5330 }
5331 @inlinable public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Transformer {
5332 transformer
5333 }
5334 @inlinable public func encodeWithOptimizer(_ transformer: Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
5335
5336 }
5337 @inlinable public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Transformer {
5338 transformer
5339 }
5340}
5341@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5342extension CreateMLComponents.TabularTransformerToUpdatableEstimatorAdaptor : Swift.Sendable where Transformer : Swift.Sendable {
5343}
5344extension CreateMLComponents.TabularTransformer {
5345 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5346 @inlinable public func adaptedAsUpdatableEstimator() -> CreateMLComponents.TabularTransformerToUpdatableEstimatorAdaptor<Self> {
5347 TabularTransformerToUpdatableEstimatorAdaptor(self)
5348 }
5349}
5350extension CreateMLComponents.TabularTransformer {
5351 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5352 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents.SupervisedTabularEstimator
5353
5354}
5355extension CreateMLComponents.TabularEstimator {
5356 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5357 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self.Transformer, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents.SupervisedTabularEstimator
5358
5359}
5360extension CreateMLComponents.SupervisedTabularEstimator {
5361 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5362 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self.Transformer, Other>, Self.Annotation> where Other : CreateMLComponents.TabularTransformer
5363
5364 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5365 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.TabularEstimator
5366
5367 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5368 public func appending<Other>(_ other: Other) -> some CreateMLComponents.SupervisedTabularEstimator<CreateMLComponents.ComposedTabularTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents.SupervisedTabularEstimator, Self.Annotation == Other.Annotation
5369
5370}
5371@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5372public protocol TabularTransformer : CreateMLComponents.Transformer where Self.Input == TabularData.DataFrame, Self.Output == TabularData.DataFrame {
5373}
5374@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5375extension CreateMLComponents.TabularTransformer {
5376 @inlinable public func callAsFunction(_ input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> TabularData.DataFrame {
5377 try await applied(to: input, eventHandler: eventHandler)
5378 }
5379}
5380@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5381public struct BoostedTreeConfiguration : Swift.Hashable, Swift.Codable, Swift.Sendable {
5382 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5383 public var learningRate: Swift.Double {
5384 get
5385 set
5386 }
5387 public var maximumDepth: Swift.Int
5388 public var maximumIterations: Swift.Int
5389 public var minimumLossReduction: Swift.Double
5390 public var minimumChildWeight: Swift.Double
5391 public var randomSeed: Swift.Int
5392 @available(macOS, introduced: 13.0, deprecated: 14.0, renamed: "learningRate")
5393 @available(iOS, introduced: 16.0, deprecated: 17.0, renamed: "learningRate")
5394 @available(tvOS, introduced: 16.0, deprecated: 17.0, renamed: "learningRate")
5395 public var stepSize: Swift.Double {
5396 get
5397 set
5398 }
5399 public var earlyStoppingIterationCount: Swift.Int?
5400 public var rowSubsample: Swift.Double
5401 public var columnSubsample: Swift.Double
5402 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5403 public var parallelTreeCount: Swift.Int
5404 public init()
5405 public static func == (a: CreateMLComponents.BoostedTreeConfiguration, b: CreateMLComponents.BoostedTreeConfiguration) -> Swift.Bool
5406 public func encode(to encoder: any Swift.Encoder) throws
5407 public func hash(into hasher: inout Swift.Hasher)
5408 public var hashValue: Swift.Int {
5409 get
5410 }
5411 public init(from decoder: any Swift.Decoder) throws
5412}
5413@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5414public protocol SupervisedEstimator<Transformer, Annotation> {
5415 associatedtype Transformer : CreateMLComponents.Transformer
5416 associatedtype Annotation : Swift.Equatable
5417 func fitted<Input>(to input: Input, eventHandler: CreateMLComponents.EventHandler?) async throws -> Self.Transformer where Input : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<Self.Transformer.Input, Self.Annotation>
5418 func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler?) async throws -> Self.Transformer where Input : Swift.Sequence, Validation : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<Self.Transformer.Input, Self.Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<Self.Transformer.Input, Self.Annotation>
5419 func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5420 func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
5421}
5422extension CreateMLComponents.SupervisedEstimator {
5423 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5424 @inlinable public func fitted<Input>(to input: Input) async throws -> Self.Transformer where Input : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<Self.Transformer.Input, Self.Annotation> {
5425 try await fitted(to: input, eventHandler: nil)
5426 }
5427 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5428 @inlinable public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation) async throws -> Self.Transformer where Input : Swift.Sequence, Validation : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<Self.Transformer.Input, Self.Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<Self.Transformer.Input, Self.Annotation> {
5429 try await fitted(to: input, validateOn: validation, eventHandler: nil)
5430 }
5431}
5432@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5433public protocol UpdatableSupervisedEstimator<Transformer, Annotation> : CreateMLComponents.SupervisedEstimator {
5434 func makeTransformer() -> Self.Transformer
5435 func update<InputSequence>(_ transformer: inout Self.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler?) async throws where InputSequence : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<Self.Transformer.Input, Self.Annotation>
5436 func encodeWithOptimizer(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5437 func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
5438}
5439extension CreateMLComponents.UpdatableSupervisedEstimator {
5440 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5441 @inlinable public func update<InputSequence>(_ transformer: inout Self.Transformer, with input: InputSequence) async throws where InputSequence : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<Self.Transformer.Input, Self.Annotation> {
5442 try await update(&transformer, with: input, eventHandler: nil)
5443 }
5444}
5445extension CreateMLComponents.SupervisedEstimator {
5446 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5447 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents.EventHandler?) async throws -> Self.Transformer where Input : _Concurrency.AsyncSequence, Input.Element == CreateMLComponents.AnnotatedFeature<Self.Transformer.Input, Self.Annotation>
5448 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5449 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler?) async throws -> Self.Transformer where Input : _Concurrency.AsyncSequence, Validation : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<Self.Transformer.Input, Self.Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<Self.Transformer.Input, Self.Annotation>
5450}
5451extension CreateMLComponents.UpdatableSupervisedEstimator {
5452 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5453 public func update<Input>(_ transformer: inout Self.Transformer, with input: Input, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where Input : _Concurrency.AsyncSequence, Input.Element == CreateMLComponents.AnnotatedFeature<Self.Transformer.Input, Self.Annotation>
5454}
5455@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5456public struct ApplyRandomly<RandomTransformer> : CreateMLComponents.RandomTransformer where RandomTransformer : CreateMLComponents.RandomTransformer, RandomTransformer.Input == RandomTransformer.Output {
5457 public let probability: Swift.Double
5458 public init<Input>(probability: Swift.Double = 0.5, @CreateMLComponents.AugmentationBuilder<Input> _ augmentation: () -> RandomTransformer) where Input == RandomTransformer.Input
5459 public func applied(to input: RandomTransformer.Input, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> RandomTransformer.Output
5460 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
5461 public typealias Input = RandomTransformer.Input
5462 @available(iOS 17.0, tvOS 17.0, watchOS 11.0, macOS 14.0, *)
5463 public typealias Output = RandomTransformer.Input
5464}
5465@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5466extension CreateMLComponents.ApplyRandomly : Swift.Sendable where RandomTransformer : Swift.Sendable {
5467}
5468@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5469public struct NormalizationScaler<Element> : CreateMLComponents.Estimator where Element : Swift.BinaryFloatingPoint, Element : Swift.Decodable, Element : Swift.Encodable {
5470 public enum NormalizationStrategy : Swift.Sendable {
5471 case l1
5472 case l2
5473 public static func == (a: CreateMLComponents.NormalizationScaler<Element>.NormalizationStrategy, b: CreateMLComponents.NormalizationScaler<Element>.NormalizationStrategy) -> Swift.Bool
5474 public func hash(into hasher: inout Swift.Hasher)
5475 public var hashValue: Swift.Int {
5476 get
5477 }
5478 }
5479 public var norm: CreateMLComponents.NormalizationScaler<Element>.NormalizationStrategy
5480 public init(norm: CreateMLComponents.NormalizationScaler<Element>.NormalizationStrategy = .l2)
5481 public func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CreateMLComponents.NormalizationScaler<Element>.Transformer where Element == S.Element, S : Swift.Sequence
5482}
5483@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5484extension CreateMLComponents.NormalizationScaler : Swift.Sendable where Element : Swift.Sendable {
5485}
5486extension CreateMLComponents.NormalizationScaler {
5487 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5488 public struct Transformer : CreateMLComponents.Transformer, Swift.Hashable {
5489 public var scale: Element
5490 public init(scale: Element)
5491 @inlinable public func applied(to input: Element, eventHandler: CreateMLComponents.EventHandler? = nil) -> Element {
5492 input / scale
5493 }
5494 public static func == (a: CreateMLComponents.NormalizationScaler<Element>.Transformer, b: CreateMLComponents.NormalizationScaler<Element>.Transformer) -> Swift.Bool
5495 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
5496 public typealias Input = Element
5497 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
5498 public typealias Output = Element
5499 public func hash(into hasher: inout Swift.Hasher)
5500 public var hashValue: Swift.Int {
5501 get
5502 }
5503 }
5504}
5505@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5506extension CreateMLComponents.NormalizationScaler.Transformer : Swift.CustomDebugStringConvertible {
5507 public var debugDescription: Swift.String {
5508 get
5509 }
5510}
5511@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5512extension CreateMLComponents.NormalizationScaler.Transformer : Swift.Encodable {
5513 public func encode(to encoder: any Swift.Encoder) throws
5514}
5515@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5516extension CreateMLComponents.NormalizationScaler.Transformer : Swift.Decodable {
5517 public init(from decoder: any Swift.Decoder) throws
5518}
5519@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5520extension CreateMLComponents.NormalizationScaler.Transformer : Swift.Sendable where Element : Swift.Sendable {
5521}
5522@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5523public struct FullyConnectedNetworkRegressor<Scalar> : CreateMLComponents.SupervisedEstimator where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint {
5524 public typealias Transformer = CreateMLComponents.FullyConnectedNetworkRegressorModel<Scalar>
5525 public typealias Annotation = Swift.Float
5526 public var configuration: CreateMLComponents.FullyConnectedNetworkConfiguration
5527 public init(configuration: CreateMLComponents.FullyConnectedNetworkConfiguration = .init())
5528 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.FullyConnectedNetworkRegressor<Scalar>.Transformer where Input : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Swift.Float>
5529 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.FullyConnectedNetworkRegressorModel<Scalar> where Input : Swift.Sequence, Validation : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Swift.Float>, Validation.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Swift.Float>
5530}
5531@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5532extension CreateMLComponents.FullyConnectedNetworkRegressor : Swift.Sendable where Scalar : Swift.Sendable {
5533}
5534extension TabularData.DataFrame {
5535 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5536 public init<S, Feature, Annotation>(_ sequence: S, featuresColumnID: TabularData.ColumnID<Feature>, annotationsColumnID: TabularData.ColumnID<Annotation>) throws where S : Swift.Sequence, S.Element == CreateMLComponents.AnnotatedFeature<Feature, Annotation>
5537}
5538@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5539public struct PreprocessingTabularEstimator<Preprocessor, Estimator> : CreateMLComponents.TabularEstimator where Preprocessor : CreateMLComponents.TabularTransformer, Estimator : CreateMLComponents.TabularEstimator {
5540 public typealias Transformer = CreateMLComponents.ComposedTabularTransformer<Preprocessor, Estimator.Transformer>
5541 public typealias Input = Preprocessor.Input
5542 public typealias Intermediate = Preprocessor.Output
5543 public typealias Output = Estimator.Transformer.Output
5544 public var preprocessor: Preprocessor
5545 public var estimator: Estimator
5546 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
5547 @inlinable public func preprocessed(from input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> TabularData.DataFrame {
5548 try await preprocessor.applied(to: input, eventHandler: eventHandler)
5549 }
5550 @inlinable public func fitted(toPreprocessed preprocessed: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingTabularEstimator<Preprocessor, Estimator>.Transformer {
5551 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
5552 return ComposedTabularTransformer(preprocessor, fittedTransformer)
5553 }
5554 @inlinable public func fitted(to input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingTabularEstimator<Preprocessor, Estimator>.Transformer {
5555 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
5556 try Task.checkCancellation()
5557 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
5558 }
5559 public func encode(_ transformer: CreateMLComponents.PreprocessingTabularEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5560 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingTabularEstimator<Preprocessor, Estimator>.Transformer
5561}
5562@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5563extension CreateMLComponents.PreprocessingTabularEstimator : Swift.Sendable where Preprocessor : Swift.Sendable, Estimator : Swift.Sendable {
5564}
5565extension CreateMLComponents.TabularTransformer {
5566 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5567 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingTabularEstimator<Self, Other> where Other : CreateMLComponents.TabularEstimator
5568}
5569@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
5570public struct MultivariateLinearRegressor<Scalar> : CreateMLComponents.SupervisedEstimator, Swift.Sendable where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint {
5571 public typealias Transformer = CreateMLComponents.MultivariateLinearRegressor<Scalar>.Model
5572 public typealias Feature = CoreML.MLShapedArray<Scalar>
5573 public typealias Annotation = CoreML.MLShapedArray<Scalar>
5574 public var configuration: CreateMLComponents.MultivariateLinearRegressor<Scalar>.Configuration
5575 public init(configuration: CreateMLComponents.MultivariateLinearRegressor<Scalar>.Configuration = Configuration())
5576 public func fitted(to input: some Sequence<AnnotatedFeature<Feature, Annotation>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.MultivariateLinearRegressor<Scalar>.Model
5577 public func fitted(to input: some Sequence<AnnotatedFeature<Feature, Annotation>>, validateOn validation: some Sequence<AnnotatedFeature<Feature, Annotation>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.MultivariateLinearRegressor<Scalar>.Model
5578 public func fitted(to input: CreateMLComponents.AnnotatedBatch<Scalar>, validateOn validation: CreateMLComponents.AnnotatedBatch<Scalar>?, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.MultivariateLinearRegressor<Scalar>.Model
5579 public func encode(_ model: CreateMLComponents.MultivariateLinearRegressor<Scalar>.Model, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5580 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.MultivariateLinearRegressor<Scalar>.Model
5581}
5582@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
5583extension CreateMLComponents.MultivariateLinearRegressor : CreateMLComponents.UpdatableSupervisedEstimator {
5584 public func makeTransformer() -> CreateMLComponents.MultivariateLinearRegressor<Scalar>.Model
5585 public func update(_ model: inout CreateMLComponents.MultivariateLinearRegressor<Scalar>.Model, with input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws
5586 public func update(_ model: inout CreateMLComponents.MultivariateLinearRegressor<Scalar>.Model, with input: CreateMLComponents.AnnotatedBatch<Scalar>) async throws -> Scalar
5587 public func encodeWithOptimizer(_ model: CreateMLComponents.MultivariateLinearRegressor<Scalar>.Model, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5588 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.MultivariateLinearRegressor<Scalar>.Model
5589}
5590@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5591public struct FullyConnectedNetworkClassifier<Scalar, Label> : CreateMLComponents.SupervisedEstimator where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint, Label : Swift.Comparable, Label : Swift.Decodable, Label : Swift.Encodable, Label : Swift.Hashable {
5592 public typealias Transformer = CreateMLComponents.FullyConnectedNetworkClassifierModel<Scalar, Label>
5593 public typealias Annotation = Label
5594 public var configuration: CreateMLComponents.FullyConnectedNetworkConfiguration
5595 public var labels: Swift.Set<Label>
5596 public init(labels: Swift.Set<Label>, configuration: CreateMLComponents.FullyConnectedNetworkConfiguration = .init())
5597 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.FullyConnectedNetworkClassifierModel<Scalar, Label> where Input : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Label>
5598 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.FullyConnectedNetworkClassifierModel<Scalar, Label> where Input : Swift.Sequence, Validation : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Label>, Validation.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Label>
5599}
5600@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5601extension CreateMLComponents.FullyConnectedNetworkClassifier : Swift.Sendable where Scalar : Swift.Sendable, Label : Swift.Sendable {
5602}
5603@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5604public struct PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator> : CreateMLComponents.UpdatableSupervisedEstimator where Preprocessor : CreateMLComponents.Transformer, Estimator : CreateMLComponents.UpdatableSupervisedEstimator, Preprocessor.Output == Estimator.Transformer.Input {
5605 public typealias Transformer = CreateMLComponents.ComposedTransformer<Preprocessor, Estimator.Transformer>
5606 public typealias Input = Preprocessor.Input
5607 public typealias Intermediate = Preprocessor.Output
5608 public typealias Output = Estimator.Transformer.Output
5609 public typealias Annotation = Estimator.Annotation
5610 public var preprocessor: Preprocessor
5611 public var estimator: Estimator
5612 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
5613 @inlinable public func makeTransformer() -> CreateMLComponents.PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer {
5614 ComposedTransformer(preprocessor, estimator.makeTransformer())
5615 }
5616 @inlinable public func preprocessed<S>(from input: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Swift.AnySequence<CreateMLComponents.AnnotatedFeature<Preprocessor.Output, CreateMLComponents.PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Annotation>> where S : Swift.Sequence, S.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
5617 let inputFeatures = input.lazy.map(\.feature)
5618 let preprocessedFeatures = try await preprocessor.applied(to: inputFeatures, eventHandler: eventHandler)
5619 return AnySequence(zip(preprocessedFeatures, input.lazy.map(\.annotation)).lazy.map(AnnotatedFeature.init))
5620 }
5621 @inlinable public func fitted<S>(toPreprocessed preprocessed: S, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer where S : Swift.Sequence, S.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Output, Estimator.Annotation> {
5622 let fittedTransformer = try await estimator.fitted(
5623 to: preprocessed,
5624 eventHandler: eventHandler
5625 )
5626 return ComposedTransformer(preprocessor, fittedTransformer)
5627 }
5628 @inlinable public func fitted<InputSequence, Validation>(toPreprocessed preprocessedInput: InputSequence, validateOn preprocessedValidation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer where InputSequence : Swift.Sequence, Validation : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Output, Estimator.Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Output, Estimator.Annotation> {
5629 let fittedTransformer = try await estimator.fitted(
5630 to: preprocessedInput,
5631 validateOn: preprocessedValidation,
5632 eventHandler: eventHandler
5633 )
5634 return ComposedTransformer(preprocessor, fittedTransformer)
5635 }
5636 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer where InputSequence : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
5637 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
5638 try Task.checkCancellation()
5639 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
5640 }
5641 @inlinable public func fitted<InputSequence, Validation>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer where InputSequence : Swift.Sequence, Validation : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Input, Estimator.Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
5642 let preprocessedInput = try await preprocessed(from: input, eventHandler: eventHandler)
5643 try Task.checkCancellation()
5644
5277@available(tvOS, introduced: 16.0, deprecated: 18.0)
5278@available(visionOS, introduced: 1.0, deprecated: 2.0)
5279@available(watchOS, unavailable)
5280extension CreateMLComponents::TemporalTransformerToUpdatableEstimatorAdaptor : Swift::Sendable where Transformer : Swift::Sendable {
5281}
5282extension CreateMLComponents::TemporalTransformer {
5283 @available(macOS, introduced: 13.0, deprecated: 15.0)
5284 @available(iOS, introduced: 16.0, deprecated: 18.0)
5285 @available(tvOS, introduced: 16.0, deprecated: 18.0)
5286 @available(visionOS, introduced: 1.0, deprecated: 2.0)
5287 @available(watchOS, unavailable)
5288 @inlinable public func adaptedAsUpdatableEstimator() -> CreateMLComponents::TemporalTransformerToUpdatableEstimatorAdaptor<Self> {
5289 TemporalTransformerToUpdatableEstimatorAdaptor(self)
5290 }
5291}
5292@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5293public struct TabularTransformerToEstimatorAdaptor<Transformer> : CreateMLComponents::TabularEstimator where Transformer : CreateMLComponents::TabularTransformer {
5294 public let transformer: Transformer
5295 public init(_ transformer: Transformer)
5296 @inlinable public func fitted(to input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Transformer {
5297 transformer
5298 }
5299 @inlinable public func encode(_ transformer: Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
5300
5301 }
5302 @inlinable public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Transformer {
5303 transformer
5304 }
5305}
5306@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5307extension CreateMLComponents::TabularTransformerToEstimatorAdaptor : Swift::Sendable where Transformer : Swift::Sendable {
5308}
5309extension CreateMLComponents::TabularTransformer {
5310 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5311 @inlinable public func adaptedAsEstimator() -> CreateMLComponents::TabularTransformerToEstimatorAdaptor<Self> {
5312 TabularTransformerToEstimatorAdaptor(self)
5313 }
5314}
5315@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5316public struct TabularTransformerToUpdatableEstimatorAdaptor<Transformer> : CreateMLComponents::UpdatableTabularEstimator where Transformer : CreateMLComponents::TabularTransformer {
5317 public let transformer: Transformer
5318 public init(_ transformer: Transformer)
5319 @inlinable public func makeTransformer() -> Transformer {
5320 transformer
5321 }
5322 @inlinable public func fitted(to input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Transformer {
5323 transformer
5324 }
5325 @inlinable public func update(_ transformer: inout Transformer, with input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws {
5326
5327 }
5328 @inlinable public func encode(_ transformer: Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
5329
5330 }
5331 @inlinable public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Transformer {
5332 transformer
5333 }
5334 @inlinable public func encodeWithOptimizer(_ transformer: Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
5335
5336 }
5337 @inlinable public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Transformer {
5338 transformer
5339 }
5340}
5341@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5342extension CreateMLComponents::TabularTransformerToUpdatableEstimatorAdaptor : Swift::Sendable where Transformer : Swift::Sendable {
5343}
5344extension CreateMLComponents::TabularTransformer {
5345 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5346 @inlinable public func adaptedAsUpdatableEstimator() -> CreateMLComponents::TabularTransformerToUpdatableEstimatorAdaptor<Self> {
5347 TabularTransformerToUpdatableEstimatorAdaptor(self)
5348 }
5349}
5350extension CreateMLComponents::TabularTransformer {
5351 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5352 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents::SupervisedTabularEstimator
5353
5354}
5355extension CreateMLComponents::TabularEstimator {
5356 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5357 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self.Transformer, Other.Transformer>, Other.Annotation> where Other : CreateMLComponents::SupervisedTabularEstimator
5358
5359}
5360extension CreateMLComponents::SupervisedTabularEstimator {
5361 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5362 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self.Transformer, Other>, Self.Annotation> where Other : CreateMLComponents::TabularTransformer
5363
5364 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5365 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::TabularEstimator
5366
5367 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5368 public func appending<Other>(_ other: Other) -> some CreateMLComponents::SupervisedTabularEstimator<CreateMLComponents::ComposedTabularTransformer<Self.Transformer, Other.Transformer>, Self.Annotation> where Other : CreateMLComponents::SupervisedTabularEstimator, Self.Annotation == Other.Annotation
5369
5370}
5371@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5372public protocol TabularTransformer : CreateMLComponents::Transformer where Self.Input == TabularData::DataFrame, Self.Output == TabularData::DataFrame {
5373}
5374@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5375extension CreateMLComponents::TabularTransformer {
5376 @inlinable public func callAsFunction(_ input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> TabularData::DataFrame {
5377 try await applied(to: input, eventHandler: eventHandler)
5378 }
5379}
5380@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5381public struct BoostedTreeConfiguration : Swift::Hashable, Swift::Codable, Swift::Sendable {
5382 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5383 public var learningRate: Swift::Double {
5384 get
5385 set
5386 }
5387 public var maximumDepth: Swift::Int
5388 public var maximumIterations: Swift::Int
5389 public var minimumLossReduction: Swift::Double
5390 public var minimumChildWeight: Swift::Double
5391 public var randomSeed: Swift::Int
5392 @available(macOS, introduced: 13.0, deprecated: 14.0, renamed: "learningRate")
5393 @available(iOS, introduced: 16.0, deprecated: 17.0, renamed: "learningRate")
5394 @available(tvOS, introduced: 16.0, deprecated: 17.0, renamed: "learningRate")
5395 public var stepSize: Swift::Double {
5396 get
5397 set
5398 }
5399 public var earlyStoppingIterationCount: Swift::Int?
5400 public var rowSubsample: Swift::Double
5401 public var columnSubsample: Swift::Double
5402 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5403 public var parallelTreeCount: Swift::Int
5404 public init()
5405 public static func == (a: CreateMLComponents::BoostedTreeConfiguration, b: CreateMLComponents::BoostedTreeConfiguration) -> Swift::Bool
5406 public func encode(to encoder: any Swift::Encoder) throws
5407 public func hash(into hasher: inout Swift::Hasher)
5408 public var hashValue: Swift::Int {
5409 get
5410 }
5411 public init(from decoder: any Swift::Decoder) throws
5412}
5413@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5414public protocol SupervisedEstimator<Transformer, Annotation> {
5415 associatedtype Transformer : CreateMLComponents::Transformer
5416 associatedtype Annotation : Swift::Equatable
5417 func fitted<Input>(to input: Input, eventHandler: CreateMLComponents::EventHandler?) async throws -> Self.Transformer where Input : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<Self.Transformer.Input, Self.Annotation>
5418 func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler?) async throws -> Self.Transformer where Input : Swift::Sequence, Validation : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<Self.Transformer.Input, Self.Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<Self.Transformer.Input, Self.Annotation>
5419 func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5420 func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
5421}
5422extension CreateMLComponents::SupervisedEstimator {
5423 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5424 @inlinable public func fitted<Input>(to input: Input) async throws -> Self.Transformer where Input : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<Self.Transformer.Input, Self.Annotation> {
5425 try await fitted(to: input, eventHandler: nil)
5426 }
5427 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5428 @inlinable public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation) async throws -> Self.Transformer where Input : Swift::Sequence, Validation : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<Self.Transformer.Input, Self.Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<Self.Transformer.Input, Self.Annotation> {
5429 try await fitted(to: input, validateOn: validation, eventHandler: nil)
5430 }
5431}
5432@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5433public protocol UpdatableSupervisedEstimator<Transformer, Annotation> : CreateMLComponents::SupervisedEstimator {
5434 func makeTransformer() -> Self.Transformer
5435 func update<InputSequence>(_ transformer: inout Self.Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler?) async throws where InputSequence : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<Self.Transformer.Input, Self.Annotation>
5436 func encodeWithOptimizer(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5437 func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
5438}
5439extension CreateMLComponents::UpdatableSupervisedEstimator {
5440 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5441 @inlinable public func update<InputSequence>(_ transformer: inout Self.Transformer, with input: InputSequence) async throws where InputSequence : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<Self.Transformer.Input, Self.Annotation> {
5442 try await update(&transformer, with: input, eventHandler: nil)
5443 }
5444}
5445extension CreateMLComponents::SupervisedEstimator {
5446 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5447 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents::EventHandler?) async throws -> Self.Transformer where Input : _Concurrency::AsyncSequence, Input.Element == CreateMLComponents::AnnotatedFeature<Self.Transformer.Input, Self.Annotation>
5448 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5449 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler?) async throws -> Self.Transformer where Input : _Concurrency::AsyncSequence, Validation : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<Self.Transformer.Input, Self.Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<Self.Transformer.Input, Self.Annotation>
5450}
5451extension CreateMLComponents::UpdatableSupervisedEstimator {
5452 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5453 public func update<Input>(_ transformer: inout Self.Transformer, with input: Input, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where Input : _Concurrency::AsyncSequence, Input.Element == CreateMLComponents::AnnotatedFeature<Self.Transformer.Input, Self.Annotation>
5454}
5455@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5456public struct ApplyRandomly<RandomTransformer> : CreateMLComponents::RandomTransformer where RandomTransformer : CreateMLComponents::RandomTransformer, RandomTransformer.Input == RandomTransformer.Output {
5457 public let probability: Swift::Double
5458 public init<Input>(probability: Swift::Double = 0.5, @CreateMLComponents::AugmentationBuilder<Input> _ augmentation: () -> RandomTransformer) where Input == RandomTransformer.Input
5459 public func applied(to input: RandomTransformer.Input, generator: inout some RandomNumberGenerator, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> RandomTransformer.Output
5460 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5461 public typealias Input = RandomTransformer.Input
5462 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5463 public typealias Output = RandomTransformer.Input
5464}
5465@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5466extension CreateMLComponents::ApplyRandomly : Swift::Sendable where RandomTransformer : Swift::Sendable {
5467}
5468@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5469public struct NormalizationScaler<Element> : CreateMLComponents::Estimator where Element : Swift::BinaryFloatingPoint, Element : Swift::Decodable, Element : Swift::Encodable {
5470 public enum NormalizationStrategy : Swift::Sendable {
5471 case l1
5472 case l2
5473 public static func == (a: CreateMLComponents::NormalizationScaler<Element>.CreateMLComponents::NormalizationStrategy, b: CreateMLComponents::NormalizationScaler<Element>.CreateMLComponents::NormalizationStrategy) -> Swift::Bool
5474 public func hash(into hasher: inout Swift::Hasher)
5475 public var hashValue: Swift::Int {
5476 get
5477 }
5478 }
5479 public var norm: CreateMLComponents::NormalizationScaler<Element>.CreateMLComponents::NormalizationStrategy
5480 public init(norm: CreateMLComponents::NormalizationScaler<Element>.CreateMLComponents::NormalizationStrategy = .l2)
5481 public func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CreateMLComponents::NormalizationScaler<Element>.CreateMLComponents::Transformer where Element == S.Element, S : Swift::Sequence
5482}
5483@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5484extension CreateMLComponents::NormalizationScaler : Swift::Sendable where Element : Swift::Sendable {
5485}
5486extension CreateMLComponents::NormalizationScaler {
5487 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5488 public struct Transformer : CreateMLComponents::Transformer, Swift::Hashable {
5489 public var scale: Element
5490 public init(scale: Element)
5491 @inlinable public func applied(to input: Element, eventHandler: CreateMLComponents::EventHandler? = nil) -> Element {
5492 input / scale
5493 }
5494 public static func == (a: CreateMLComponents::NormalizationScaler<Element>.CreateMLComponents::Transformer, b: CreateMLComponents::NormalizationScaler<Element>.CreateMLComponents::Transformer) -> Swift::Bool
5495 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5496 public typealias Input = Element
5497 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5498 public typealias Output = Element
5499 public func hash(into hasher: inout Swift::Hasher)
5500 public var hashValue: Swift::Int {
5501 get
5502 }
5503 }
5504}
5505@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5506extension CreateMLComponents::NormalizationScaler.CreateMLComponents::Transformer : Swift::CustomDebugStringConvertible {
5507 public var debugDescription: Swift::String {
5508 get
5509 }
5510}
5511@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5512extension CreateMLComponents::NormalizationScaler.CreateMLComponents::Transformer : Swift::Encodable {
5513 public func encode(to encoder: any Swift::Encoder) throws
5514}
5515@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5516extension CreateMLComponents::NormalizationScaler.CreateMLComponents::Transformer : Swift::Decodable {
5517 public init(from decoder: any Swift::Decoder) throws
5518}
5519@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5520extension CreateMLComponents::NormalizationScaler.CreateMLComponents::Transformer : Swift::Sendable where Element : Swift::Sendable {
5521}
5522@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5523public struct FullyConnectedNetworkRegressor<Scalar> : CreateMLComponents::SupervisedEstimator where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint {
5524 public typealias Transformer = CreateMLComponents::FullyConnectedNetworkRegressorModel<Scalar>
5525 public typealias Annotation = Swift::Float
5526 public var configuration: CreateMLComponents::FullyConnectedNetworkConfiguration
5527 public init(configuration: CreateMLComponents::FullyConnectedNetworkConfiguration = .init())
5528 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::FullyConnectedNetworkRegressor<Scalar>.CreateMLComponents::Transformer where Input : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Swift::Float>
5529 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::FullyConnectedNetworkRegressorModel<Scalar> where Input : Swift::Sequence, Validation : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Swift::Float>, Validation.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Swift::Float>
5530}
5531@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5532extension CreateMLComponents::FullyConnectedNetworkRegressor : Swift::Sendable where Scalar : Swift::Sendable {
5533}
5534extension TabularData::DataFrame {
5535 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5536 public init<S, Feature, Annotation>(_ sequence: S, featuresColumnID: TabularData::ColumnID<Feature>, annotationsColumnID: TabularData::ColumnID<Annotation>) throws where S : Swift::Sequence, S.Element == CreateMLComponents::AnnotatedFeature<Feature, Annotation>
5537}
5538@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5539public struct PreprocessingTabularEstimator<Preprocessor, Estimator> : CreateMLComponents::TabularEstimator where Preprocessor : CreateMLComponents::TabularTransformer, Estimator : CreateMLComponents::TabularEstimator {
5540 public typealias Transformer = CreateMLComponents::ComposedTabularTransformer<Preprocessor, Estimator.Transformer>
5541 public typealias Input = Preprocessor.Input
5542 public typealias Intermediate = Preprocessor.Output
5543 public typealias Output = Estimator.Transformer.Output
5544 public var preprocessor: Preprocessor
5545 public var estimator: Estimator
5546 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
5547 @inlinable public func preprocessed(from input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> TabularData::DataFrame {
5548 try await preprocessor.applied(to: input, eventHandler: eventHandler)
5549 }
5550 @inlinable public func fitted(toPreprocessed preprocessed: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
5551 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
5552 return ComposedTabularTransformer(preprocessor, fittedTransformer)
5553 }
5554 @inlinable public func fitted(to input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
5555 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
5556 try Task.checkCancellation()
5557 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
5558 }
5559 public func encode(_ transformer: CreateMLComponents::PreprocessingTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5560 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingTabularEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
5561}
5562@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5563extension CreateMLComponents::PreprocessingTabularEstimator : Swift::Sendable where Preprocessor : Swift::Sendable, Estimator : Swift::Sendable {
5564}
5565extension CreateMLComponents::TabularTransformer {
5566 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5567 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingTabularEstimator<Self, Other> where Other : CreateMLComponents::TabularEstimator
5568}
5569@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
5570public struct MultivariateLinearRegressor<Scalar> : CreateMLComponents::SupervisedEstimator, Swift::Sendable where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint {
5571 public typealias Transformer = CreateMLComponents::MultivariateLinearRegressor<Scalar>.CreateMLComponents::Model
5572 public typealias Feature = CoreML::MLShapedArray<Scalar>
5573 public typealias Annotation = CoreML::MLShapedArray<Scalar>
5574 public var configuration: CreateMLComponents::MultivariateLinearRegressor<Scalar>.CreateMLComponents::Configuration
5575 public init(configuration: CreateMLComponents::MultivariateLinearRegressor<Scalar>.CreateMLComponents::Configuration = Configuration())
5576 public func fitted(to input: some Sequence<AnnotatedFeature<Feature, Annotation>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::MultivariateLinearRegressor<Scalar>.CreateMLComponents::Model
5577 public func fitted(to input: some Sequence<AnnotatedFeature<Feature, Annotation>>, validateOn validation: some Sequence<AnnotatedFeature<Feature, Annotation>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::MultivariateLinearRegressor<Scalar>.CreateMLComponents::Model
5578 public func fitted(to input: CreateMLComponents::AnnotatedBatch<Scalar>, validateOn validation: CreateMLComponents::AnnotatedBatch<Scalar>?, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::MultivariateLinearRegressor<Scalar>.CreateMLComponents::Model
5579 public func encode(_ model: CreateMLComponents::MultivariateLinearRegressor<Scalar>.CreateMLComponents::Model, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5580 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::MultivariateLinearRegressor<Scalar>.CreateMLComponents::Model
5581}
5582@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
5583extension CreateMLComponents::MultivariateLinearRegressor : CreateMLComponents::UpdatableSupervisedEstimator {
5584 public func makeTransformer() -> CreateMLComponents::MultivariateLinearRegressor<Scalar>.CreateMLComponents::Model
5585 public func update(_ model: inout CreateMLComponents::MultivariateLinearRegressor<Scalar>.CreateMLComponents::Model, with input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, MLShapedArray<Scalar>>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws
5586 public func update(_ model: inout CreateMLComponents::MultivariateLinearRegressor<Scalar>.CreateMLComponents::Model, with input: CreateMLComponents::AnnotatedBatch<Scalar>) async throws -> Scalar
5587 public func encodeWithOptimizer(_ model: CreateMLComponents::MultivariateLinearRegressor<Scalar>.CreateMLComponents::Model, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5588 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::MultivariateLinearRegressor<Scalar>.CreateMLComponents::Model
5589}
5590@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5591public struct FullyConnectedNetworkClassifier<Scalar, Label> : CreateMLComponents::SupervisedEstimator where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint, Label : Swift::Comparable, Label : Swift::Decodable, Label : Swift::Encodable, Label : Swift::Hashable {
5592 public typealias Transformer = CreateMLComponents::FullyConnectedNetworkClassifierModel<Scalar, Label>
5593 public typealias Annotation = Label
5594 public var configuration: CreateMLComponents::FullyConnectedNetworkConfiguration
5595 public var labels: Swift::Set<Label>
5596 public init(labels: Swift::Set<Label>, configuration: CreateMLComponents::FullyConnectedNetworkConfiguration = .init())
5597 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::FullyConnectedNetworkClassifierModel<Scalar, Label> where Input : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Label>
5598 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::FullyConnectedNetworkClassifierModel<Scalar, Label> where Input : Swift::Sequence, Validation : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Label>, Validation.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Label>
5599}
5600@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5601extension CreateMLComponents::FullyConnectedNetworkClassifier : Swift::Sendable where Scalar : Swift::Sendable, Label : Swift::Sendable {
5602}
5603@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5604public struct PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator> : CreateMLComponents::UpdatableSupervisedEstimator where Preprocessor : CreateMLComponents::Transformer, Estimator : CreateMLComponents::UpdatableSupervisedEstimator, Preprocessor.Output == Estimator.Transformer.Input {
5605 public typealias Transformer = CreateMLComponents::ComposedTransformer<Preprocessor, Estimator.Transformer>
5606 public typealias Input = Preprocessor.Input
5607 public typealias Intermediate = Preprocessor.Output
5608 public typealias Output = Estimator.Transformer.Output
5609 public typealias Annotation = Estimator.Annotation
5610 public var preprocessor: Preprocessor
5611 public var estimator: Estimator
5612 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
5613 @inlinable public func makeTransformer() -> CreateMLComponents::PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
5614 ComposedTransformer(preprocessor, estimator.makeTransformer())
5615 }
5616 @inlinable public func preprocessed<S>(from input: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Swift::AnySequence<CreateMLComponents::AnnotatedFeature<Preprocessor.Output, CreateMLComponents::PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Annotation>> where S : Swift::Sequence, S.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
5617 let inputFeatures = input.lazy.map(\.feature)
5618 let preprocessedFeatures = try await preprocessor.applied(to: inputFeatures, eventHandler: eventHandler)
5619 return AnySequence(zip(preprocessedFeatures, input.lazy.map(\.annotation)).lazy.map(AnnotatedFeature.init))
5620 }
5621 @inlinable public func fitted<S>(toPreprocessed preprocessed: S, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where S : Swift::Sequence, S.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Output, Estimator.Annotation> {
5622 let fittedTransformer = try await estimator.fitted(
5623 to: preprocessed,
5624 eventHandler: eventHandler
5625 )
5626 return ComposedTransformer(preprocessor, fittedTransformer)
5627 }
5628 @inlinable public func fitted<InputSequence, Validation>(toPreprocessed preprocessedInput: InputSequence, validateOn preprocessedValidation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, Validation : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Output, Estimator.Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Output, Estimator.Annotation> {
5629 let fittedTransformer = try await estimator.fitted(
5630 to: preprocessedInput,
5631 validateOn: preprocessedValidation,
5632 eventHandler: eventHandler
5633 )
5634 return ComposedTransformer(preprocessor, fittedTransformer)
5635 }
5636 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
5637 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
5638 try Task.checkCancellation()
5639 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
5640 }
5641 @inlinable public func fitted<InputSequence, Validation>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, Validation : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Input, Estimator.Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
5642 let preprocessedInput = try await preprocessed(from: input, eventHandler: eventHandler)
5643 try Task.checkCancellation()
5644
… 6 unchanged lines …
5651 eventHandler: eventHandler
5652 )
5653 }
5654 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents.PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer, withPreprocessed preprocessed: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Output, Estimator.Annotation> {
5655 try await estimator.update(
5656 &transformer.outer,
5657 with: preprocessed,
5658 eventHandler: eventHandler
5659 )
5660 }
5661 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents.PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
5662 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
5663 try Task.checkCancellation()
5664
5651 eventHandler: eventHandler
5652 )
5653 }
5654 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents::PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, withPreprocessed preprocessed: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Output, Estimator.Annotation> {
5655 try await estimator.update(
5656 &transformer.outer,
5657 with: preprocessed,
5658 eventHandler: eventHandler
5659 )
5660 }
5661 @inlinable public func update<InputSequence>(_ transformer: inout CreateMLComponents::PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<Preprocessor.Input, Estimator.Annotation> {
5662 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
5663 try Task.checkCancellation()
5664
… 3 unchanged lines …
5668 eventHandler: eventHandler
5669 )
5670 }
5671 public func encode(_ transformer: CreateMLComponents.PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5672 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer
5673 public func encodeWithOptimizer(_ transformer: CreateMLComponents.PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5674 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.Transformer
5675}
5676@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5677extension CreateMLComponents.PreprocessingUpdatableSupervisedEstimator : Swift.Sendable where Preprocessor : Swift.Sendable, Estimator : Swift.Sendable {
5678}
5679extension CreateMLComponents.Transformer {
5680 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5681 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingUpdatableSupervisedEstimator<Self, Other> where Other : CreateMLComponents.UpdatableSupervisedEstimator, Self.Output == Other.Transformer.Input
5682}
5683@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5684extension CreateMLComponents.FullyConnectedNetworkRegressor : CreateMLComponents.UpdatableSupervisedEstimator {
5685 public func makeTransformer() -> CreateMLComponents.FullyConnectedNetworkRegressorModel<Scalar>
5686 public func update<InputSequence>(_ transformer: inout CreateMLComponents.FullyConnectedNetworkRegressorModel<Scalar>, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws where InputSequence : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Swift.Float>
5687}
5688@available(macOS, introduced: 13.0, deprecated: 15.0)
5689@available(iOS, introduced: 16.0, deprecated: 18.0)
5690@available(tvOS, introduced: 16.0, deprecated: 18.0)
5691@available(visionOS, introduced: 1.0, deprecated: 2.0)
5692@available(watchOS, unavailable)
5693public protocol SupervisedTemporalEstimator<Transformer, Annotation> {
5694 associatedtype Transformer : CreateMLComponents.TemporalTransformer
5695 associatedtype Annotation : Swift.Equatable, Swift.Sendable
5696 func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler?) async throws -> Self.Transformer where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Self.Annotation>, FeatureSequence.Feature == Self.Transformer.Input
5697 func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler?) async throws -> Self.Transformer where InputSequence : Swift.Sequence, Validation : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Self.Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Self.Annotation>, FeatureSequence.Feature == Self.Transformer.Input
5698 func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5699 func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
5700}
5701@available(macOS, introduced: 13.0, deprecated: 15.0)
5702@available(iOS, introduced: 16.0, deprecated: 18.0)
5703@available(tvOS, introduced: 16.0, deprecated: 18.0)
5704@available(visionOS, introduced: 1.0, deprecated: 2.0)
5705@available(watchOS, unavailable)
5706extension CreateMLComponents.SupervisedTemporalEstimator {
5707 @inlinable public func fitted<InputSequence, FeatureSequence>(to input: InputSequence) async throws -> Self.Transformer where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Self.Annotation>, FeatureSequence.Feature == Self.Transformer.Input {
5708 try await fitted(to: input, eventHandler: nil)
5709 }
5710 @inlinable public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation) async throws -> Self.Transformer where InputSequence : Swift.Sequence, Validation : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Self.Annotation>, Validation.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Self.Annotation>, FeatureSequence.Feature == Self.Transformer.Input {
5711 try await fitted(to: input, validateOn: validation, eventHandler: nil)
5712 }
5713}
5668 eventHandler: eventHandler
5669 )
5670 }
5671 public func encode(_ transformer: CreateMLComponents::PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5672 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
5673 public func encodeWithOptimizer(_ transformer: CreateMLComponents::PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5674 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingUpdatableSupervisedEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
5675}
5676@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5677extension CreateMLComponents::PreprocessingUpdatableSupervisedEstimator : Swift::Sendable where Preprocessor : Swift::Sendable, Estimator : Swift::Sendable {
5678}
5679extension CreateMLComponents::Transformer {
5680 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5681 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingUpdatableSupervisedEstimator<Self, Other> where Other : CreateMLComponents::UpdatableSupervisedEstimator, Self.Output == Other.Transformer.Input
5682}
5683@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5684extension CreateMLComponents::FullyConnectedNetworkRegressor : CreateMLComponents::UpdatableSupervisedEstimator {
5685 public func makeTransformer() -> CreateMLComponents::FullyConnectedNetworkRegressorModel<Scalar>
5686 public func update<InputSequence>(_ transformer: inout CreateMLComponents::FullyConnectedNetworkRegressorModel<Scalar>, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws where InputSequence : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Swift::Float>
5687}
5688@available(macOS, introduced: 13.0, deprecated: 15.0)
5689@available(iOS, introduced: 16.0, deprecated: 18.0)
5690@available(tvOS, introduced: 16.0, deprecated: 18.0)
5691@available(visionOS, introduced: 1.0, deprecated: 2.0)
5692@available(watchOS, unavailable)
5693public protocol SupervisedTemporalEstimator<Transformer, Annotation> {
5694 associatedtype Transformer : CreateMLComponents::TemporalTransformer
5695 associatedtype Annotation : Swift::Equatable, Swift::Sendable
5696 func fitted<InputSequence, FeatureSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler?) async throws -> Self.Transformer where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Self.Annotation>, FeatureSequence.Feature == Self.Transformer.Input
5697 func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler?) async throws -> Self.Transformer where InputSequence : Swift::Sequence, Validation : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Self.Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Self.Annotation>, FeatureSequence.Feature == Self.Transformer.Input
5698 func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5699 func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
5700}
5701@available(macOS, introduced: 13.0, deprecated: 15.0)
5702@available(iOS, introduced: 16.0, deprecated: 18.0)
5703@available(tvOS, introduced: 16.0, deprecated: 18.0)
5704@available(visionOS, introduced: 1.0, deprecated: 2.0)
5705@available(watchOS, unavailable)
5706extension CreateMLComponents::SupervisedTemporalEstimator {
5707 @inlinable public func fitted<InputSequence, FeatureSequence>(to input: InputSequence) async throws -> Self.Transformer where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Self.Annotation>, FeatureSequence.Feature == Self.Transformer.Input {
5708 try await fitted(to: input, eventHandler: nil)
5709 }
5710 @inlinable public func fitted<InputSequence, Validation, FeatureSequence>(to input: InputSequence, validateOn validation: Validation) async throws -> Self.Transformer where InputSequence : Swift::Sequence, Validation : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Self.Annotation>, Validation.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Self.Annotation>, FeatureSequence.Feature == Self.Transformer.Input {
5711 try await fitted(to: input, validateOn: validation, eventHandler: nil)
5712 }
5713}
… 2 unchanged lines …
5716@available(tvOS, introduced: 16.0, deprecated: 18.0)
5717@available(visionOS, introduced: 1.0, deprecated: 2.0)
5718@available(watchOS, unavailable)
5719public protocol UpdatableSupervisedTemporalEstimator<Transformer, Annotation> : CreateMLComponents.SupervisedTemporalEstimator {
5720 func makeTransformer() -> Self.Transformer
5721 func update<InputSequence, FeatureSequence>(_ transformer: inout Self.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler?) async throws where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Self.Annotation>, FeatureSequence.Feature == Self.Transformer.Input
5722 func encodeWithOptimizer(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5723 func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
5724}
5725@available(macOS, introduced: 13.0, deprecated: 15.0)
5726@available(iOS, introduced: 16.0, deprecated: 18.0)
5727@available(tvOS, introduced: 16.0, deprecated: 18.0)
5728@available(visionOS, introduced: 1.0, deprecated: 2.0)
5729@available(watchOS, unavailable)
5730extension CreateMLComponents.UpdatableSupervisedTemporalEstimator {
5731 @inlinable public func update<InputSequence, FeatureSequence>(_ transformer: inout Self.Transformer, with input: InputSequence) async throws where InputSequence : Swift.Sequence, FeatureSequence : CreateMLComponents.TemporalSequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<FeatureSequence, Self.Annotation>, FeatureSequence.Feature == Self.Transformer.Input {
5732 try await update(&transformer, with: input, eventHandler: nil)
5733 }
5734}
5716@available(tvOS, introduced: 16.0, deprecated: 18.0)
5717@available(visionOS, introduced: 1.0, deprecated: 2.0)
5718@available(watchOS, unavailable)
5719public protocol UpdatableSupervisedTemporalEstimator<Transformer, Annotation> : CreateMLComponents::SupervisedTemporalEstimator {
5720 func makeTransformer() -> Self.Transformer
5721 func update<InputSequence, FeatureSequence>(_ transformer: inout Self.Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler?) async throws where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Self.Annotation>, FeatureSequence.Feature == Self.Transformer.Input
5722 func encodeWithOptimizer(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5723 func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
5724}
5725@available(macOS, introduced: 13.0, deprecated: 15.0)
5726@available(iOS, introduced: 16.0, deprecated: 18.0)
5727@available(tvOS, introduced: 16.0, deprecated: 18.0)
5728@available(visionOS, introduced: 1.0, deprecated: 2.0)
5729@available(watchOS, unavailable)
5730extension CreateMLComponents::UpdatableSupervisedTemporalEstimator {
5731 @inlinable public func update<InputSequence, FeatureSequence>(_ transformer: inout Self.Transformer, with input: InputSequence) async throws where InputSequence : Swift::Sequence, FeatureSequence : CreateMLComponents::TemporalSequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<FeatureSequence, Self.Annotation>, FeatureSequence.Feature == Self.Transformer.Input {
5732 try await update(&transformer, with: input, eventHandler: nil)
5733 }
5734}
… 2 unchanged lines …
5737@available(tvOS, introduced: 16.0, deprecated: 18.0)
5738@available(visionOS, introduced: 1.0, deprecated: 2.0)
5739@available(watchOS, unavailable)
5740public struct PreprocessingTemporalEstimator<Preprocessor, Estimator> : CreateMLComponents.TemporalEstimator where Preprocessor : CreateMLComponents.TemporalTransformer, Estimator : CreateMLComponents.TemporalEstimator, Preprocessor.Output == Estimator.Transformer.Input {
5741 public typealias Transformer = CreateMLComponents.ComposedTemporalTransformer<Preprocessor, Estimator.Transformer>
5742 public typealias Input = Preprocessor.Input
5743 public typealias Intermediate = Preprocessor.Output
5744 public typealias Output = Estimator.Transformer.Output
5745 public var preprocessor: Preprocessor
5746 public var estimator: Estimator
5747 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
5748 @inlinable public func preprocessed<InputSequence>(from input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> [CreateMLComponents.PreprocessedFeatureSequence<Preprocessor.Output>] where InputSequence : Swift.Sequence, Preprocessor.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents.TemporalSequence {
5749 var preprocessed = [PreprocessedFeatureSequence<Preprocessor.Output>]()
5750 for item in input {
5751 let transformed = try await preprocessor.applied(to: item, eventHandler: eventHandler)
5737@available(tvOS, introduced: 16.0, deprecated: 18.0)
5738@available(visionOS, introduced: 1.0, deprecated: 2.0)
5739@available(watchOS, unavailable)
5740public struct PreprocessingTemporalEstimator<Preprocessor, Estimator> : CreateMLComponents::TemporalEstimator where Preprocessor : CreateMLComponents::TemporalTransformer, Estimator : CreateMLComponents::TemporalEstimator, Preprocessor.Output == Estimator.Transformer.Input {
5741 public typealias Transformer = CreateMLComponents::ComposedTemporalTransformer<Preprocessor, Estimator.Transformer>
5742 public typealias Input = Preprocessor.Input
5743 public typealias Intermediate = Preprocessor.Output
5744 public typealias Output = Estimator.Transformer.Output
5745 public var preprocessor: Preprocessor
5746 public var estimator: Estimator
5747 public init(_ preprocessor: Preprocessor, _ estimator: Estimator)
5748 @inlinable public func preprocessed<InputSequence>(from input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> [CreateMLComponents::PreprocessedFeatureSequence<Preprocessor.Output>] where InputSequence : Swift::Sequence, Preprocessor.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents::TemporalSequence {
5749 var preprocessed = [PreprocessedFeatureSequence<Preprocessor.Output>]()
5750 for item in input {
5751 let transformed = try await preprocessor.applied(to: item, eventHandler: eventHandler)
… 2 unchanged lines …
5754 }
5755 return preprocessed
5756 }
5757 @inlinable public func fitted(toPreprocessed preprocessed: [CreateMLComponents.PreprocessedFeatureSequence<Preprocessor.Output>], eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingTemporalEstimator<Preprocessor, Estimator>.Transformer {
5758 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
5759 return ComposedTemporalTransformer(preprocessor, fittedTransformer)
5760 }
5761 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.PreprocessingTemporalEstimator<Preprocessor, Estimator>.Transformer where InputSequence : Swift.Sequence, Preprocessor.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents.TemporalSequence {
5762 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
5763 try Task.checkCancellation()
5764 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
5765 }
5766 public func encode(_ transformer: CreateMLComponents.PreprocessingTemporalEstimator<Preprocessor, Estimator>.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5767 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.PreprocessingTemporalEstimator<Preprocessor, Estimator>.Transformer
5768}
5769@available(macOS, introduced: 13.0, deprecated: 15.0)
5770@available(iOS, introduced: 16.0, deprecated: 18.0)
5771@available(tvOS, introduced: 16.0, deprecated: 18.0)
5772@available(visionOS, introduced: 1.0, deprecated: 2.0)
5773@available(watchOS, unavailable)
5774extension CreateMLComponents.PreprocessingTemporalEstimator : Swift.Sendable where Preprocessor : Swift.Sendable, Estimator : Swift.Sendable {
5775}
5776extension CreateMLComponents.Transformer {
5777 @available(macOS, introduced: 13.0, deprecated: 15.0)
5778 @available(iOS, introduced: 16.0, deprecated: 18.0)
5779 @available(tvOS, introduced: 16.0, deprecated: 18.0)
5780 @available(visionOS, introduced: 1.0, deprecated: 2.0)
5781 @available(watchOS, unavailable)
5782 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingTemporalEstimator<CreateMLComponents.TransformerToTemporalAdaptor<Self>, Other> where Other : CreateMLComponents.TemporalEstimator, Self.Output == Other.Transformer.Input
5783}
5784extension CreateMLComponents.TemporalTransformer {
5785 @available(macOS, introduced: 13.0, deprecated: 15.0)
5786 @available(iOS, introduced: 16.0, deprecated: 18.0)
5787 @available(tvOS, introduced: 16.0, deprecated: 18.0)
5788 @available(visionOS, introduced: 1.0, deprecated: 2.0)
5789 @available(watchOS, unavailable)
5790 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingTemporalEstimator<Self, CreateMLComponents.EstimatorToTemporalAdaptor<Other>> where Other : CreateMLComponents.Estimator, Self.Output == Other.Transformer.Input
5791 @available(macOS, introduced: 13.0, deprecated: 15.0)
5792 @available(iOS, introduced: 16.0, deprecated: 18.0)
5793 @available(tvOS, introduced: 16.0, deprecated: 18.0)
5794 @available(visionOS, introduced: 1.0, deprecated: 2.0)
5795 @available(watchOS, unavailable)
5796 public func appending<Other>(_ other: Other) -> CreateMLComponents.PreprocessingTemporalEstimator<Self, Other> where Other : CreateMLComponents.TemporalEstimator, Self.Output == Other.Transformer.Input
5797}
5798@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
5799@available(watchOS, unavailable)
5800public struct TimeSeriesClassifier<Scalar, Label> : CreateMLComponents.SupervisedEstimator where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint, Label : Swift.Comparable, Label : Swift.Decodable, Label : Swift.Encodable, Label : Swift.Hashable {
5801 public typealias Transformer = CreateMLComponents.TimeSeriesClassifier<Scalar, Label>.Model
5802 public typealias Annotation = Label
5803 public var configuration: CreateMLComponents.TimeSeriesClassifierConfiguration
5804 public var labels: Swift.Set<Label>
5805 public init(labels: Swift.Set<Label>, configuration: CreateMLComponents.TimeSeriesClassifierConfiguration = .init())
5806 public func fitted(to input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, Annotation>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.TimeSeriesClassifier<Scalar, Label>.Model
5807 public func fitted(to input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, Annotation>>, validateOn validation: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, Annotation>>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.TimeSeriesClassifier<Scalar, Label>.Model
5808}
5809@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
5810@available(watchOS, unavailable)
5811extension CreateMLComponents.TimeSeriesClassifier : Swift.Sendable where Scalar : Swift.Sendable, Label : Swift.Sendable {
5812}
5813@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5814public struct RobustScaler<Element> : CreateMLComponents.Estimator where Element : Swift.BinaryFloatingPoint, Element : Swift.Decodable, Element : Swift.Encodable {
5815 public var quantileRange: Swift.ClosedRange<Element>
5816 public init(quantileRange: Swift.ClosedRange<Element> = 0.25...0.75)
5817 public func fitted<S>(to input: S, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CreateMLComponents.RobustScaler<Element>.Transformer where Element == S.Element, S : Swift.Sequence
5818}
5819@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5820extension CreateMLComponents.RobustScaler : Swift.Sendable where Element : Swift.Sendable {
5821}
5822extension CreateMLComponents.RobustScaler {
5823 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5824 public struct Transformer : CreateMLComponents.Transformer, Swift.Hashable {
5825 public var median: Element
5826 public var interQuartileRange: Element
5827 public init(median: Element, interQuartileRange: Element)
5828 @inlinable public func applied(to input: Element, eventHandler: CreateMLComponents.EventHandler? = nil) -> Element {
5829 var result = input
5830
5831 if median.isFinite {
5754 }
5755 return preprocessed
5756 }
5757 @inlinable public func fitted(toPreprocessed preprocessed: [CreateMLComponents::PreprocessedFeatureSequence<Preprocessor.Output>], eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer {
5758 let fittedTransformer = try await estimator.fitted(to: preprocessed, eventHandler: eventHandler)
5759 return ComposedTemporalTransformer(preprocessor, fittedTransformer)
5760 }
5761 @inlinable public func fitted<InputSequence>(to input: InputSequence, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::PreprocessingTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer where InputSequence : Swift::Sequence, Preprocessor.Input == InputSequence.Element.Feature, InputSequence.Element : CreateMLComponents::TemporalSequence {
5762 let preprocessed = try await preprocessed(from: input, eventHandler: eventHandler)
5763 try Task.checkCancellation()
5764 return try await fitted(toPreprocessed: preprocessed, eventHandler: eventHandler)
5765 }
5766 public func encode(_ transformer: CreateMLComponents::PreprocessingTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5767 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::PreprocessingTemporalEstimator<Preprocessor, Estimator>.CreateMLComponents::Transformer
5768}
5769@available(macOS, introduced: 13.0, deprecated: 15.0)
5770@available(iOS, introduced: 16.0, deprecated: 18.0)
5771@available(tvOS, introduced: 16.0, deprecated: 18.0)
5772@available(visionOS, introduced: 1.0, deprecated: 2.0)
5773@available(watchOS, unavailable)
5774extension CreateMLComponents::PreprocessingTemporalEstimator : Swift::Sendable where Preprocessor : Swift::Sendable, Estimator : Swift::Sendable {
5775}
5776extension CreateMLComponents::Transformer {
5777 @available(macOS, introduced: 13.0, deprecated: 15.0)
5778 @available(iOS, introduced: 16.0, deprecated: 18.0)
5779 @available(tvOS, introduced: 16.0, deprecated: 18.0)
5780 @available(visionOS, introduced: 1.0, deprecated: 2.0)
5781 @available(watchOS, unavailable)
5782 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingTemporalEstimator<CreateMLComponents::TransformerToTemporalAdaptor<Self>, Other> where Other : CreateMLComponents::TemporalEstimator, Self.Output == Other.Transformer.Input
5783}
5784extension CreateMLComponents::TemporalTransformer {
5785 @available(macOS, introduced: 13.0, deprecated: 15.0)
5786 @available(iOS, introduced: 16.0, deprecated: 18.0)
5787 @available(tvOS, introduced: 16.0, deprecated: 18.0)
5788 @available(visionOS, introduced: 1.0, deprecated: 2.0)
5789 @available(watchOS, unavailable)
5790 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingTemporalEstimator<Self, CreateMLComponents::EstimatorToTemporalAdaptor<Other>> where Other : CreateMLComponents::Estimator, Self.Output == Other.Transformer.Input
5791 @available(macOS, introduced: 13.0, deprecated: 15.0)
5792 @available(iOS, introduced: 16.0, deprecated: 18.0)
5793 @available(tvOS, introduced: 16.0, deprecated: 18.0)
5794 @available(visionOS, introduced: 1.0, deprecated: 2.0)
5795 @available(watchOS, unavailable)
5796 public func appending<Other>(_ other: Other) -> CreateMLComponents::PreprocessingTemporalEstimator<Self, Other> where Other : CreateMLComponents::TemporalEstimator, Self.Output == Other.Transformer.Input
5797}
5798@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
5799@available(watchOS, unavailable)
5800public struct TimeSeriesClassifier<Scalar, Label> : CreateMLComponents::SupervisedEstimator where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint, Label : Swift::Comparable, Label : Swift::Decodable, Label : Swift::Encodable, Label : Swift::Hashable {
5801 public typealias Transformer = CreateMLComponents::TimeSeriesClassifier<Scalar, Label>.CreateMLComponents::Model
5802 public typealias Annotation = Label
5803 public var configuration: CreateMLComponents::TimeSeriesClassifierConfiguration
5804 public var labels: Swift::Set<Label>
5805 public init(labels: Swift::Set<Label>, configuration: CreateMLComponents::TimeSeriesClassifierConfiguration = .init())
5806 public func fitted(to input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, Annotation>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::TimeSeriesClassifier<Scalar, Label>.CreateMLComponents::Model
5807 public func fitted(to input: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, Annotation>>, validateOn validation: some Sequence<AnnotatedFeature<MLShapedArray<Scalar>, Annotation>>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::TimeSeriesClassifier<Scalar, Label>.CreateMLComponents::Model
5808}
5809@available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, *)
5810@available(watchOS, unavailable)
5811extension CreateMLComponents::TimeSeriesClassifier : Swift::Sendable where Scalar : Swift::Sendable, Label : Swift::Sendable {
5812}
5813@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5814public struct RobustScaler<Element> : CreateMLComponents::Estimator where Element : Swift::BinaryFloatingPoint, Element : Swift::Decodable, Element : Swift::Encodable {
5815 public var quantileRange: Swift::ClosedRange<Element>
5816 public init(quantileRange: Swift::ClosedRange<Element> = 0.25...0.75)
5817 public func fitted<S>(to input: S, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CreateMLComponents::RobustScaler<Element>.CreateMLComponents::Transformer where Element == S.Element, S : Swift::Sequence
5818}
5819@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5820extension CreateMLComponents::RobustScaler : Swift::Sendable where Element : Swift::Sendable {
5821}
5822extension CreateMLComponents::RobustScaler {
5823 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5824 public struct Transformer : CreateMLComponents::Transformer, Swift::Hashable {
5825 public var median: Element
5826 public var interQuartileRange: Element
5827 public init(median: Element, interQuartileRange: Element)
5828 @inlinable public func applied(to input: Element, eventHandler: CreateMLComponents::EventHandler? = nil) -> Element {
5829 var result = input
5830
5831 if median.isFinite {
… 6 unchanged lines …
5838
5839 return result
5840 }
5841 public static func == (a: CreateMLComponents.RobustScaler<Element>.Transformer, b: CreateMLComponents.RobustScaler<Element>.Transformer) -> Swift.Bool
5842 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
5843 public typealias Input = Element
5844 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
5845 public typealias Output = Element
5846 public func hash(into hasher: inout Swift.Hasher)
5847 public var hashValue: Swift.Int {
5848 get
5849 }
5850 }
5851}
5852@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5853extension CreateMLComponents.RobustScaler.Transformer : Swift.CustomDebugStringConvertible {
5854 public var debugDescription: Swift.String {
5855 get
5856 }
5857}
5858@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5859extension CreateMLComponents.RobustScaler.Transformer : Swift.Encodable {
5860 public func encode(to encoder: any Swift.Encoder) throws
5861}
5862@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5863extension CreateMLComponents.RobustScaler.Transformer : Swift.Decodable {
5864 public init(from decoder: any Swift.Decoder) throws
5865}
5866@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5867extension CreateMLComponents.RobustScaler.Transformer : Swift.Sendable where Element : Swift.Sendable {
5868}
5869@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5870public struct BoostedTreeRegressor<Annotation> : CreateMLComponents.SupervisedTabularEstimator {
5871 public typealias Transformer = CreateMLComponents.TreeRegressorModel
5872 public var configuration: CreateMLComponents.BoostedTreeConfiguration {
5873 get
5874 set
5875 }
5876 public var annotationColumnID: TabularData.ColumnID<Annotation>
5877 public var featureColumnNames: [Swift.String]
5878 public init(annotationColumnName: Swift.String, featureColumnNames: [Swift.String], configuration: CreateMLComponents.BoostedTreeConfiguration = BoostedTreeConfiguration())
5879 public func fitted(to input: TabularData.DataFrame, validateOn validation: TabularData.DataFrame? = nil, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.TreeRegressorModel
5880 public func encode(_ transformer: CreateMLComponents.TreeRegressorModel, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5881 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.TreeRegressorModel
5882}
5883@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5884extension CreateMLComponents.BoostedTreeRegressor : CreateMLComponents.UpdatableSupervisedTabularEstimator {
5885 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5886 public func makeTransformer() -> CreateMLComponents.TreeRegressorModel
5887 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5888 public func update(_ transformer: inout CreateMLComponents.TreeRegressorModel, with input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler?) async throws
5889 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5890 public func encodeWithOptimizer(_ transformer: CreateMLComponents.TreeRegressorModel, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5891 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5892 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.TreeRegressorModel
5893}
5894@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5895extension CreateMLComponents.BoostedTreeRegressor : Swift.Sendable where Annotation : Swift.Sendable {
5896}
5897@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5898public struct LinearRegressor<Scalar> : CreateMLComponents.SupervisedEstimator where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint {
5899 public typealias Transformer = CreateMLComponents.LinearRegressorModel<Scalar>
5900 public typealias Annotation = Scalar
5901 public var configuration: CreateMLComponents.LinearRegressor<Scalar>.Configuration {
5902 get
5903 set
5904 }
5905 public init(configuration: CreateMLComponents.LinearRegressor<Scalar>.Configuration = Configuration())
5906 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.LinearRegressorModel<Scalar> where Input : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Scalar>
5907 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CreateMLComponents.LinearRegressorModel<Scalar> where Input : Swift.Sequence, Validation : Swift.Sequence, Input.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Scalar>, Validation.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Scalar>
5908 public func encode(_ transformer: CreateMLComponents.LinearRegressorModel<Scalar>, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5909 public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.LinearRegressorModel<Scalar>
5910}
5911@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5912extension CreateMLComponents.LinearRegressor : CreateMLComponents.UpdatableSupervisedEstimator {
5913 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5914 public func makeTransformer() -> CreateMLComponents.LinearRegressorModel<Scalar>
5915 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5916 public func update<InputSequence>(_ transformer: inout CreateMLComponents.LinearRegressor<Scalar>.Transformer, with input: InputSequence, eventHandler: CreateMLComponents.EventHandler?) async throws where InputSequence : Swift.Sequence, InputSequence.Element == CreateMLComponents.AnnotatedFeature<CoreML.MLShapedArray<Scalar>, Scalar>
5917 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5918 public func encodeWithOptimizer(_ transformer: CreateMLComponents.LinearRegressorModel<Scalar>, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5919 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5920 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> CreateMLComponents.LinearRegressorModel<Scalar>
5921}
5922@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5923extension CreateMLComponents.LinearRegressor : Swift.Sendable where Scalar : Swift.Sendable {
5924}
5925extension CreateMLComponents.LinearRegressor {
5926 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5927 public struct Configuration : Swift.Hashable, Swift.Codable, Swift.Sendable {
5928 public var l2Penalty: Swift.Double
5929 public var l1Penalty: Swift.Double
5930 public var maximumIterations: Swift.Int
5931 public var stepSize: Swift.Double
5932 public var convergenceThreshold: Swift.Double
5933 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5934 public var earlyStopIterationCount: Swift.Int
5935 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5936 public var scaleFeatures: Swift.Bool
5937 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5938 public var optimizationStrategy: CreateMLComponents.OptimizationStrategy {
5939 get
5940 set
5941 }
5942 public init()
5943 public static func == (a: CreateMLComponents.LinearRegressor<Scalar>.Configuration, b: CreateMLComponents.LinearRegressor<Scalar>.Configuration) -> Swift.Bool
5944 public func encode(to encoder: any Swift.Encoder) throws
5945 public func hash(into hasher: inout Swift.Hasher)
5946 public var hashValue: Swift.Int {
5947 get
5948 }
5949 public init(from decoder: any Swift.Decoder) throws
5950 }
5951}
5952@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5953public protocol TabularEstimator<Transformer> {
5954 associatedtype Transformer : CreateMLComponents.TabularTransformer
5955 func fitted(to input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler?) async throws -> Self.Transformer
5956 func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5957 func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
5958}
5959extension CreateMLComponents.TabularEstimator where Self.Transformer : Swift.Encodable {
5960 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5961 @inlinable public func fitted(to input: TabularData.DataFrame) async throws -> Self.Transformer {
5962 try await fitted(to: input, eventHandler: nil)
5963 }
5964 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5965 @inlinable public func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws {
5966 try encoder.encode(transformer)
5967 }
5968}
5969extension CreateMLComponents.TabularEstimator {
5970 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, *)
5971 @inlinable public func fitted(to input: TabularData.DataFrame) async throws -> Self.Transformer {
5972 try await fitted(to: input, eventHandler: nil)
5973 }
5974}
5975@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5976extension CreateMLComponents.TabularEstimator where Self.Transformer : Swift.Decodable {
5977 @inlinable public func decode(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer {
5978 try decoder.decode(Transformer.self)
5979 }
5980}
5981@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5982public protocol UpdatableTabularEstimator<Transformer> : CreateMLComponents.TabularEstimator {
5983 func makeTransformer() -> Self.Transformer
5984 func update(_ transformer: inout Self.Transformer, with input: TabularData.DataFrame, eventHandler: CreateMLComponents.EventHandler?) async throws
5985 func encodeWithOptimizer(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents.EstimatorEncoder) throws
5986 func decodeWithOptimizer(from decoder: inout any CreateMLComponents.EstimatorDecoder) throws -> Self.Transformer
5987}
5988extension CreateMLComponents.UpdatableTabularEstimator {
5989 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5990 @inlinable public func update(_ transformer: inout Self.Transformer, with input: TabularData.DataFrame) async throws {
5991 try await update(&transformer, with: input, eventHandler: nil)
5992 }
5993}
5994@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5995public struct MLModelRegressorAdaptor<Scalar> : CreateMLComponents.Regressor where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.BinaryFloatingPoint {
5996 public let model: CoreML.MLModel
5997 public init(contentsOf url: Foundation.URL, configuration: CoreML.MLModelConfiguration) throws
5998 public init(model: CoreML.MLModel) throws
5999 public func applied(to input: CoreML.MLShapedArray<Scalar>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> Swift.Double
6000 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
6001 public typealias Input = CoreML.MLShapedArray<Scalar>
6002 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
6003 public typealias Output = Swift.Double
6004}
6005@available(*, unavailable)
6006extension CreateMLComponents.MLModelRegressorAdaptor : Swift.Sendable {
6007}
6008@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
6009public enum VideoReaderError : Foundation.LocalizedError, Swift.Equatable, Swift.Sendable {
6010 case missingVideoTrack(Foundation.URL)
6011 case cameraAuthorizationDenied
6012 case cameraAuthorizationRestricted
6013 case sourceCameraNotAvailable
6014 case frameRateNotSupported(Swift.Double)
6015 @available(macOS 15.0, iOS 18.0, tvOS 18.0, *)
6016 case captureSessionStopped
6017 public var errorDescription: Swift.String? {
6018 get
6019 }
6020 public static func == (a: CreateMLComponents.VideoReaderError, b: CreateMLComponents.VideoReaderError) -> Swift.Bool
6021}
6022@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
6023extension CreateMLComponents.VideoReaderError : Swift.CustomDebugStringConvertible {
6024 public var debugDescription: Swift.String {
6025 get
6026 }
6027}
6028@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6029public struct Reshaper<Scalar> : CreateMLComponents.Transformer, Swift.Equatable, Swift.Codable where Scalar : CoreML.MLShapedArrayScalar, Scalar : Swift.Decodable, Scalar : Swift.Encodable {
6030 public var shape: [Swift.Int]
6031 public init(shape: [Swift.Int])
6032 public func applied(to input: CoreML.MLShapedArray<Scalar>, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> CoreML.MLShapedArray<Scalar>
6033 public func applied<S>(_ input: S, eventHandler: CreateMLComponents.EventHandler? = nil) throws -> [CoreML.MLShapedArray<Scalar>] where S : Swift.Sequence, S.Element == CoreML.MLShapedArray<Scalar>
6034 public static func == (a: CreateMLComponents.Reshaper<Scalar>, b: CreateMLComponents.Reshaper<Scalar>) -> Swift.Bool
6035 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
6036 public typealias Input = CoreML.MLShapedArray<Scalar>
6037 @available(iOS 16.0, tvOS 16.0, watchOS 11.0, macOS 13.0, *)
6038 public typealias Output = CoreML.MLShapedArray<Scalar>
6039 public func encode(to encoder: any Swift.Encoder) throws
6040 public init(from decoder: any Swift.Decoder) throws
6041}
6042@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6043extension CreateMLComponents.Reshaper : Swift.CustomDebugStringConvertible {
6044 public var debugDescription: Swift.String {
6045 get
6046 }
6047}
6048@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6049extension CreateMLComponents.Reshaper : Swift.Sendable where Scalar : Swift.Sendable {
6050}
6051extension CreateMLComponents.MultivariateLinearRegressor {
6052 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
6053 public struct Model : CreateMLComponents.Transformer, Swift.Sendable {
6054 public typealias Input = CoreML.MLShapedArray<Scalar>
6055 public var inputSize: Swift.Int {
6056 get
6057 }
6058 public var outputSize: Swift.Int {
6059 get
6060 }
6061 public var weight: CoreML.MLShapedArray<Scalar> {
6062 get
6063 }
6064 public var bias: CoreML.MLShapedArray<Scalar>? {
6065 get
6066 }
6067 public init(weight: CoreML.MLShapedArray<Scalar>, bias: CoreML.MLShapedArray<Scalar>?)
6068 public func applied(to input: CoreML.MLShapedArray<Scalar>, eventHandler: CreateMLComponents.EventHandler? = nil) async throws -> CoreML.MLShapedArray<Scalar>
6069 @available(iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, macOS 15.0, *)
6070 public typealias Output = CoreML.MLShapedArray<Scalar>
6071 }
6072}
6073@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
6074extension CreateMLComponents.ObjectDetectionAnnotation.Annotation.CodingKeys : Swift.Equatable {}
6075@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
6076extension CreateMLComponents.ObjectDetectionAnnotation.Annotation.CodingKeys : Swift.Hashable {}
6077@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
6078extension CreateMLComponents.ObjectDetectionAnnotation.Annotation.CodingKeys : Swift.RawRepresentable {}
6079@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
6080extension CreateMLComponents.ObjectDetectionAnnotation.CodingKeys : Swift.Equatable {}
6081@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
6082extension CreateMLComponents.ObjectDetectionAnnotation.CodingKeys : Swift.Hashable {}
6083@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
6084extension CreateMLComponents.ObjectDetectionAnnotation.CodingKeys : Swift.RawRepresentable {}
6085@available(macOS 13.0, iOS 16.0, *)
6086@available(tvOS, unavailable)
6087extension CreateMLComponents.VideoReader.CameraConfiguration.Position : Swift.Equatable {}
6088@available(macOS 13.0, iOS 16.0, *)
6089@available(tvOS, unavailable)
6090extension CreateMLComponents.VideoReader.CameraConfiguration.Position : Swift.Hashable {}
6091@available(macOS 13.0, iOS 16.0, *)
6092@available(tvOS, unavailable)
6093extension CreateMLComponents.VideoReader.CameraConfiguration.PixelFormat : Swift.Equatable {}
6094@available(macOS 13.0, iOS 16.0, *)
6095@available(tvOS, unavailable)
6096extension CreateMLComponents.VideoReader.CameraConfiguration.PixelFormat : Swift.Hashable {}
6097@available(macOS 13.0, iOS 16.0, *)
6098@available(tvOS, unavailable)
6099extension CreateMLComponents.VideoReader.CameraConfiguration.Resolution : Swift.Equatable {}
6100@available(macOS 13.0, iOS 16.0, *)
6101@available(tvOS, unavailable)
6102extension CreateMLComponents.VideoReader.CameraConfiguration.Resolution : Swift.Hashable {}
6103@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
6104extension CreateMLComponents.PoseSelectionStrategy : Swift.Equatable {}
6105@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
6106extension CreateMLComponents.PoseSelectionStrategy : Swift.Hashable {}
6107@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
6108extension CreateMLComponents.AudioReaderError : Swift.Hashable {}
6109@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
6110extension CreateMLComponents.OptimizationError : Swift.Hashable {}
6111@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6112extension CreateMLComponents.NormalizationScaler.NormalizationStrategy : Swift.Equatable {}
6113@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6114extension CreateMLComponents.NormalizationScaler.NormalizationStrategy : Swift.Hashable {}
5838
5839 return result
5840 }
5841 public static func == (a: CreateMLComponents::RobustScaler<Element>.CreateMLComponents::Transformer, b: CreateMLComponents::RobustScaler<Element>.CreateMLComponents::Transformer) -> Swift::Bool
5842 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5843 public typealias Input = Element
5844 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5845 public typealias Output = Element
5846 public func hash(into hasher: inout Swift::Hasher)
5847 public var hashValue: Swift::Int {
5848 get
5849 }
5850 }
5851}
5852@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5853extension CreateMLComponents::RobustScaler.CreateMLComponents::Transformer : Swift::CustomDebugStringConvertible {
5854 public var debugDescription: Swift::String {
5855 get
5856 }
5857}
5858@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5859extension CreateMLComponents::RobustScaler.CreateMLComponents::Transformer : Swift::Encodable {
5860 public func encode(to encoder: any Swift::Encoder) throws
5861}
5862@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5863extension CreateMLComponents::RobustScaler.CreateMLComponents::Transformer : Swift::Decodable {
5864 public init(from decoder: any Swift::Decoder) throws
5865}
5866@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5867extension CreateMLComponents::RobustScaler.CreateMLComponents::Transformer : Swift::Sendable where Element : Swift::Sendable {
5868}
5869@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5870public struct BoostedTreeRegressor<Annotation> : CreateMLComponents::SupervisedTabularEstimator {
5871 public typealias Transformer = CreateMLComponents::TreeRegressorModel
5872 public var configuration: CreateMLComponents::BoostedTreeConfiguration {
5873 get
5874 set
5875 }
5876 public var annotationColumnID: TabularData::ColumnID<Annotation>
5877 public var featureColumnNames: [Swift::String]
5878 public init(annotationColumnName: Swift::String, featureColumnNames: [Swift::String], configuration: CreateMLComponents::BoostedTreeConfiguration = BoostedTreeConfiguration())
5879 public func fitted(to input: TabularData::DataFrame, validateOn validation: TabularData::DataFrame? = nil, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::TreeRegressorModel
5880 public func encode(_ transformer: CreateMLComponents::TreeRegressorModel, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5881 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::TreeRegressorModel
5882}
5883@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5884extension CreateMLComponents::BoostedTreeRegressor : CreateMLComponents::UpdatableSupervisedTabularEstimator {
5885 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5886 public func makeTransformer() -> CreateMLComponents::TreeRegressorModel
5887 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5888 public func update(_ transformer: inout CreateMLComponents::TreeRegressorModel, with input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler?) async throws
5889 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5890 public func encodeWithOptimizer(_ transformer: CreateMLComponents::TreeRegressorModel, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5891 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5892 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::TreeRegressorModel
5893}
5894@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5895extension CreateMLComponents::BoostedTreeRegressor : Swift::Sendable where Annotation : Swift::Sendable {
5896}
5897@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5898public struct LinearRegressor<Scalar> : CreateMLComponents::SupervisedEstimator where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint {
5899 public typealias Transformer = CreateMLComponents::LinearRegressorModel<Scalar>
5900 public typealias Annotation = Scalar
5901 public var configuration: CreateMLComponents::LinearRegressor<Scalar>.CreateMLComponents::Configuration {
5902 get
5903 set
5904 }
5905 public init(configuration: CreateMLComponents::LinearRegressor<Scalar>.CreateMLComponents::Configuration = Configuration())
5906 public func fitted<Input>(to input: Input, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::LinearRegressorModel<Scalar> where Input : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Scalar>
5907 public func fitted<Input, Validation>(to input: Input, validateOn validation: Validation, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CreateMLComponents::LinearRegressorModel<Scalar> where Input : Swift::Sequence, Validation : Swift::Sequence, Input.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Scalar>, Validation.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Scalar>
5908 public func encode(_ transformer: CreateMLComponents::LinearRegressorModel<Scalar>, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5909 public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::LinearRegressorModel<Scalar>
5910}
5911@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5912extension CreateMLComponents::LinearRegressor : CreateMLComponents::UpdatableSupervisedEstimator {
5913 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5914 public func makeTransformer() -> CreateMLComponents::LinearRegressorModel<Scalar>
5915 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5916 public func update<InputSequence>(_ transformer: inout CreateMLComponents::LinearRegressor<Scalar>.CreateMLComponents::Transformer, with input: InputSequence, eventHandler: CreateMLComponents::EventHandler?) async throws where InputSequence : Swift::Sequence, InputSequence.Element == CreateMLComponents::AnnotatedFeature<CoreML::MLShapedArray<Scalar>, Scalar>
5917 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5918 public func encodeWithOptimizer(_ transformer: CreateMLComponents::LinearRegressorModel<Scalar>, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5919 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5920 public func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> CreateMLComponents::LinearRegressorModel<Scalar>
5921}
5922@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5923extension CreateMLComponents::LinearRegressor : Swift::Sendable where Scalar : Swift::Sendable {
5924}
5925extension CreateMLComponents::LinearRegressor {
5926 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5927 public struct Configuration : Swift::Hashable, Swift::Codable, Swift::Sendable {
5928 public var l2Penalty: Swift::Double
5929 public var l1Penalty: Swift::Double
5930 public var maximumIterations: Swift::Int
5931 public var stepSize: Swift::Double
5932 public var convergenceThreshold: Swift::Double
5933 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5934 public var earlyStopIterationCount: Swift::Int
5935 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5936 public var scaleFeatures: Swift::Bool
5937 @available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
5938 public var optimizationStrategy: CreateMLComponents::OptimizationStrategy {
5939 get
5940 set
5941 }
5942 public init()
5943 public static func == (a: CreateMLComponents::LinearRegressor<Scalar>.CreateMLComponents::Configuration, b: CreateMLComponents::LinearRegressor<Scalar>.CreateMLComponents::Configuration) -> Swift::Bool
5944 public func encode(to encoder: any Swift::Encoder) throws
5945 public func hash(into hasher: inout Swift::Hasher)
5946 public var hashValue: Swift::Int {
5947 get
5948 }
5949 public init(from decoder: any Swift::Decoder) throws
5950 }
5951}
5952@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5953public protocol TabularEstimator<Transformer> {
5954 associatedtype Transformer : CreateMLComponents::TabularTransformer
5955 func fitted(to input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler?) async throws -> Self.Transformer
5956 func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5957 func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
5958}
5959extension CreateMLComponents::TabularEstimator where Self.Transformer : Swift::Encodable {
5960 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5961 @inlinable public func fitted(to input: TabularData::DataFrame) async throws -> Self.Transformer {
5962 try await fitted(to: input, eventHandler: nil)
5963 }
5964 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5965 @inlinable public func encode(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws {
5966 try encoder.encode(transformer)
5967 }
5968}
5969extension CreateMLComponents::TabularEstimator {
5970 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, *)
5971 @inlinable public func fitted(to input: TabularData::DataFrame) async throws -> Self.Transformer {
5972 try await fitted(to: input, eventHandler: nil)
5973 }
5974}
5975@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5976extension CreateMLComponents::TabularEstimator where Self.Transformer : Swift::Decodable {
5977 @inlinable public func decode(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer {
5978 try decoder.decode(Transformer.self)
5979 }
5980}
5981@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5982public protocol UpdatableTabularEstimator<Transformer> : CreateMLComponents::TabularEstimator {
5983 func makeTransformer() -> Self.Transformer
5984 func update(_ transformer: inout Self.Transformer, with input: TabularData::DataFrame, eventHandler: CreateMLComponents::EventHandler?) async throws
5985 func encodeWithOptimizer(_ transformer: Self.Transformer, to encoder: inout any CreateMLComponents::EstimatorEncoder) throws
5986 func decodeWithOptimizer(from decoder: inout any CreateMLComponents::EstimatorDecoder) throws -> Self.Transformer
5987}
5988extension CreateMLComponents::UpdatableTabularEstimator {
5989 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5990 @inlinable public func update(_ transformer: inout Self.Transformer, with input: TabularData::DataFrame) async throws {
5991 try await update(&transformer, with: input, eventHandler: nil)
5992 }
5993}
5994@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
5995public struct MLModelRegressorAdaptor<Scalar> : CreateMLComponents::Regressor where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::BinaryFloatingPoint {
5996 public let model: CoreML::MLModel
5997 public init(contentsOf url: Foundation::URL, configuration: CoreML::MLModelConfiguration) throws
5998 public init(model: CoreML::MLModel) throws
5999 public func applied(to input: CoreML::MLShapedArray<Scalar>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> Swift::Double
6000 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6001 public typealias Input = CoreML::MLShapedArray<Scalar>
6002 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6003 public typealias Output = Swift::Double
6004}
6005@available(*, unavailable)
6006extension CreateMLComponents::MLModelRegressorAdaptor : Swift::Sendable {
6007}
6008@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
6009public enum VideoReaderError : Foundation::LocalizedError, Swift::Equatable, Swift::Sendable {
6010 case missingVideoTrack(Foundation::URL)
6011 case cameraAuthorizationDenied
6012 case cameraAuthorizationRestricted
6013 case sourceCameraNotAvailable
6014 case frameRateNotSupported(Swift::Double)
6015 @available(macOS 15.0, iOS 18.0, tvOS 18.0, *)
6016 case captureSessionStopped
6017 public var errorDescription: Swift::String? {
6018 get
6019 }
6020 public static func == (a: CreateMLComponents::VideoReaderError, b: CreateMLComponents::VideoReaderError) -> Swift::Bool
6021}
6022@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
6023extension CreateMLComponents::VideoReaderError : Swift::CustomDebugStringConvertible {
6024 public var debugDescription: Swift::String {
6025 get
6026 }
6027}
6028@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6029public struct Reshaper<Scalar> : CreateMLComponents::Transformer, Swift::Equatable, Swift::Codable where Scalar : CoreML::MLShapedArrayScalar, Scalar : Swift::Decodable, Scalar : Swift::Encodable {
6030 public var shape: [Swift::Int]
6031 public init(shape: [Swift::Int])
6032 public func applied(to input: CoreML::MLShapedArray<Scalar>, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> CoreML::MLShapedArray<Scalar>
6033 public func applied<S>(_ input: S, eventHandler: CreateMLComponents::EventHandler? = nil) throws -> [CoreML::MLShapedArray<Scalar>] where S : Swift::Sequence, S.Element == CoreML::MLShapedArray<Scalar>
6034 public static func == (a: CreateMLComponents::Reshaper<Scalar>, b: CreateMLComponents::Reshaper<Scalar>) -> Swift::Bool
6035 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6036 public typealias Input = CoreML::MLShapedArray<Scalar>
6037 @available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6038 public typealias Output = CoreML::MLShapedArray<Scalar>
6039 public func encode(to encoder: any Swift::Encoder) throws
6040 public init(from decoder: any Swift::Decoder) throws
6041}
6042@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6043extension CreateMLComponents::Reshaper : Swift::CustomDebugStringConvertible {
6044 public var debugDescription: Swift::String {
6045 get
6046 }
6047}
6048@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6049extension CreateMLComponents::Reshaper : Swift::Sendable where Scalar : Swift::Sendable {
6050}
6051extension CreateMLComponents::MultivariateLinearRegressor {
6052 @available(macOS 15.0, iOS 18.0, tvOS 18.0, visionOS 2.0, watchOS 11.0, *)
6053 public struct Model : CreateMLComponents::Transformer, Swift::Sendable {
6054 public typealias Input = CoreML::MLShapedArray<Scalar>
6055 public var inputSize: Swift::Int {
6056 get
6057 }
6058 public var outputSize: Swift::Int {
6059 get
6060 }
6061 public var weight: CoreML::MLShapedArray<Scalar> {
6062 get
6063 }
6064 public var bias: CoreML::MLShapedArray<Scalar>? {
6065 get
6066 }
6067 public init(weight: CoreML::MLShapedArray<Scalar>, bias: CoreML::MLShapedArray<Scalar>?)
6068 public func applied(to input: CoreML::MLShapedArray<Scalar>, eventHandler: CreateMLComponents::EventHandler? = nil) async throws -> CoreML::MLShapedArray<Scalar>
6069 @available(macOS 15.0, iOS 18.0, tvOS 18.0, watchOS 11.0, visionOS 2.0, *)
6070 public typealias Output = CoreML::MLShapedArray<Scalar>
6071 }
6072}
6073@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
6074extension CreateMLComponents::ObjectDetectionAnnotation.CreateMLComponents::Annotation.CreateMLComponents::CodingKeys : Swift::Equatable {}
6075@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
6076extension CreateMLComponents::ObjectDetectionAnnotation.CreateMLComponents::Annotation.CreateMLComponents::CodingKeys : Swift::Hashable {}
6077@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
6078extension CreateMLComponents::ObjectDetectionAnnotation.CreateMLComponents::Annotation.CreateMLComponents::CodingKeys : Swift::RawRepresentable {}
6079@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
6080extension CreateMLComponents::ObjectDetectionAnnotation.CreateMLComponents::CodingKeys : Swift::Equatable {}
6081@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
6082extension CreateMLComponents::ObjectDetectionAnnotation.CreateMLComponents::CodingKeys : Swift::Hashable {}
6083@available(macOS 14.0, iOS 17.0, tvOS 17.0, *)
6084extension CreateMLComponents::ObjectDetectionAnnotation.CreateMLComponents::CodingKeys : Swift::RawRepresentable {}
6085@available(macOS 13.0, iOS 16.0, *)
6086@available(tvOS, unavailable)
6087extension CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::Position : Swift::Equatable {}
6088@available(macOS 13.0, iOS 16.0, *)
6089@available(tvOS, unavailable)
6090extension CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::Position : Swift::Hashable {}
6091@available(macOS 13.0, iOS 16.0, *)
6092@available(tvOS, unavailable)
6093extension CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::PixelFormat : Swift::Equatable {}
6094@available(macOS 13.0, iOS 16.0, *)
6095@available(tvOS, unavailable)
6096extension CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::PixelFormat : Swift::Hashable {}
6097@available(macOS 13.0, iOS 16.0, *)
6098@available(tvOS, unavailable)
6099extension CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::Resolution : Swift::Equatable {}
6100@available(macOS 13.0, iOS 16.0, *)
6101@available(tvOS, unavailable)
6102extension CreateMLComponents::VideoReader.CreateMLComponents::CameraConfiguration.CreateMLComponents::Resolution : Swift::Hashable {}
6103@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
6104extension CreateMLComponents::PoseSelectionStrategy : Swift::Equatable {}
6105@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
6106extension CreateMLComponents::PoseSelectionStrategy : Swift::Hashable {}
6107@available(macOS 13.0, iOS 16.0, tvOS 16.0, *)
6108extension CreateMLComponents::AudioReaderError : Swift::Hashable {}
6109@available(macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 11.0, *)
6110extension CreateMLComponents::OptimizationError : Swift::Hashable {}
6111@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6112extension CreateMLComponents::NormalizationScaler.CreateMLComponents::NormalizationStrategy : Swift::Equatable {}
6113@available(macOS 13.0, iOS 16.0, tvOS 16.0, watchOS 11.0, *)
6114extension CreateMLComponents::NormalizationScaler.CreateMLComponents::NormalizationStrategy : Swift::Hashable {}