-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a breaking change which replaces the `Transform` enum with a trait, which allows it to be extended. The API is also changed from transforming iterators to transforming slices. On the surface this seems suboptimal, but many transforms actually need to know some information about the data before they can be applied (i.e. they can't be applied in a simple streaming manner). Prior to this, this meant that either: 1. the user had to pass a slice into the transform constructor to allow some parameters to be calculated, or 2. the transform had to collect the iterator anyway, which could cause issues with lifetimes and meant it was hard to compose transforms. Now, the transform is passed a mutable slice instead, which is reused by all transforms. This commit also reworks errors, since they're required by the `Transform` trait anyway. I'm still not sure if we want to have a `fit` method on the transform; it does seem sensible if the user wants to be able to have more control over the fitting process (currently it's unspecified how that will work, but all current transforms fit when `transform` is first called, unless they have a way to override their parameters).
- Loading branch information
Showing
16 changed files
with
750 additions
and
1,011 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.