Sam

Latest version: v3.2.0

Safety actively analyzes 666166 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 12

3.1.0

New features

- New class `sam.models.LassoTimeseriesRegressor` to create a Lasso regression model for time series data incl. quantile predictions.
- New class `sam.preprocessing.ClipTransformer` to clip input values to the range from the train set, making models more robust again
- New abstract base class `sam.validation.BaseValidator` for all validators.
- Renamed `sam.validation.RemoveFlatlines` to `sam.validation.FlatlineValidator`. `sam.validation.RemoveFlatlines` is still available, but removed in future versions.
- Renamed `sam.validation.RemoveExtremeValues` to `sam.validation.MADValidator`. `sam.validation.RemoveExtremeValues` is still available, but removed in future versions.
- New class `sam.validation.OutsideRangeValidator` for checking / removing data outside of a range.
- New function `datetime_train_test_split` to split pandas dataframes and series based on a datetime.
- New `sam.datasets` module containing functions for loading read-to-use datasets: `sam.datasets.load_rainbow_beach` and `sam.datasets.load_sewage_data`.
st outliers.

3.0.4

Changes
- Added `average_type` to `BaseTimeseriesRegressor.__init__()`.
- `MLPTimeseriesRegressor.__init__()` now passes `average_type` to `BaseTimeseriesRegressor.__init__()`.
- Update `BaseTimeseriesRegressor.score()` to account for the `self.average_type`: in case of "mean" take the MSE of the average predictions and in case of "median" take the MAE of the average predictions.
- Fixed various spelling errors in `CHANGELOG.MD` and `models`.
- Updated package dependencies for scikit-learn
- Changed the DeepExplainer to the model agnostic KernelExplainer, so we can remove all the v1 dependencies on tensorflow
- Fixed pytest MPL bug by temporarily setting it to a previous version

3.0.3

New features
- Data collection function `sam.data_sources.read_regenradar` does now accept `batch_size` and collects data in batches to avoid timeouts.

3.0.2

No changes, version bump only.

3.0.1

No changes, version bump only.

3.0.0

New features
- New class `sam.feature_engineering.BaseFeatureEngineer` to create a default interface for feature engineering transformers.
- New class `sam.feature_engineering.FeatureEngineer` to make any feature engineering transformer from a function.
- New class `sam.feature_engineering.IdentyEngineer` to make a transformer that only passes data (does nothing). Utility for other features.
- New class `sam.feature_engineering.SimpleFeatureEngineer` for creating time series features: rolling features and time components (one-hot or cyclical)
- Utility functions `sam.models.utils.remove_target_nan` and `sam.models.utils.remove_until_first_value` for removing missings values in training data.

Changes
- Replaces `SamQuantileMLP` with new `MLPTimeseriesRegressor`, which has more general purpose. Allows to provide any feature engineering transformer / pipeline. Default parameters are changed as well.
- New example notebooks and corresponding datasets for new feature engineering and model classes.
- Renaming name of `SPCRegressor` to `ConstantTimeseriesRegressor` for consistency. Also `SPCTemplate` was renamed to `ConstantTemplate` accordingly.
- Combination of `use_diff_of_y=True` and providing `y_scaler` did not work correctly. Fixed.
- Changed deprecated `lr` to `learning_rate` in `tensorflow.keras.optimizers.Adam`.
- All classes now support `get_feature_names_out` instead of `get_feature_names`, which is consistent with `scikit-learn>=1.1`.
- Updated documentation and new examples for new feature engineering and model classes. `data/rainbow_beach.parquet` provides a new example dataset.

Page 3 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.