Skip to content

Clarify the difference between the FeatureArray wrapper and the wrapped types #108

@aazuspan

Description

@aazuspan

This came up in discussion with @grovduck in #103.

The FeatureArray class is a wrapper around one of several types (currently np.ndarray, xr.DataArray, xr.Dataset, and pd.DataFrame) that provides a consistent interface and tracks NoData for use in estimator methods and other ufuncs. However, the documentation and API frequently refer to the wrapped types as feature arrays, e.g. from the Usage Guide:

sklearn-raster supports applying estimator methods to rasters stored in a variety of formats, referred to collectively as feature arrays

And from the API:

  • FeatureArrayType is a typevar around the wrapped types.
  • FeatureArray.from_feature_array constructs a wrapper from a wrapped instance.
  • FeatureArrayEstimator methods work with the wrapped objects, not `FeatureArray.

Now that ufuncs (and by extension FeatureArray) are becoming a public API rather than an internal implementation within FeatureArrayEstimator, it would be valuable to decide exactly what a "feature array" is (the wrapped object or the wrapper?) and make sure the naming and documentation are consistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions