AnnotatedFeatureProvider
struct · iOS 16.0+ · SDK 27.1
struct AnnotatedFeatureProvider<Base, UnwrappedInput> where Base : SupervisedEstimator, Base.Transformer.Input == UnwrappedInput?An adaptor that converts a regular estimator to a tabular estimator by selecting features and annotations from columns. Tabular estimators use multiple features columns as input. When there is a single column of features, you may use a non-tabular estimator. Do this by combining multiple columns with a `ColumnConcatenator` transformer. Once there is a single column of features, use `AnnotatedFeatureProvider` to specify which column contains the features, which column contains the annotations, and which column should hold the results. When using `AnnotatedFeatureProvider`, make sure to handle missing values before using a non-tabular estimator that takes non-optional values. This example includes an `OptionalUnwrapper` transformer. let concatenation = ColumnConcatenator<Float>( columnSelection: .include(columnNames: ["type", "region"]), concatenatedColumnName: "features" ) let regression = AnnotatedFeatureProvider( OptionalUnwrapper<MLShapedArray<Float>>().appending(LinearRegressor<Float>()), annotationsColumnName: "price", featuresColumnName: "features", resultsColumnName: "result" ) let task = concatenation.appending(regression)
Members (0)
This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.
Skipped declarations
7 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
AnnotatedFeatureProvider.base
This declaration needs Swift generic type arguments. (no canonical witness for Base)
AnnotatedFeatureProvider.init(_:annotationsColumnName:featuresColumnName:resultsColumnName:)
This declaration needs Swift generic type arguments. (no canonical witness for Base)
AnnotatedFeatureProvider.fitted(to:validateOn:eventHandler:)
This declaration needs Swift generic type arguments. (no canonical witness for Base.Transformer)
AnnotatedFeatureProvider.makeTransformer()
The containing type needs Swift generic type arguments. (no canonical witness for Base)
AnnotatedFeatureProvider.update(_:with:eventHandler:)
The containing type needs Swift generic type arguments. (no canonical witness for Base)
AnnotatedFeatureProvider.encodeWithOptimizer(_:to:)
The containing type needs Swift generic type arguments. (no canonical witness for Base)
AnnotatedFeatureProvider.decodeWithOptimizer(from:)
The containing type needs Swift generic type arguments. (no canonical witness for Base)