Sam

Latest version: v3.1.11

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

Scan your dependencies

Page 7 of 12

2.5.3

Changes
- Scikit-learn version had to be <0.24.0 for certain features, TODO: update dependencies in the near future
- Updated README, setup.py and CONTRIBUTING in preparation for going open-source.

2.5.2

Bugfix
- `LinearQuantileRegression` only contains parameters and pvalues, and data is no longer stored in
the class. This was unwanted.

New features
- `LinearQuantileRegression` accepts `fit_intercept` parameter, similar to `sklearn.LinearRegression`.

2.5.1

Bugfix

- `read_knmi_station_data`
- Added a with statement to close API connection, which caused errors if used too many times

2.5.0

General changes
- Removed all deprecated functions, see next [subsection](2.5.0.additional_changes) for details. All deprecated tests have been removed as well.
- All docstrings have been checked and (if needed) updated
- Type hinting in all files
- Linting changes:
- Changed pipeline linter to flake8
- Formatted all files in black
- Split large classes and functions to satisfy a [maximum cyclomatic complexity](https://en.wikipedia.org/wiki/Cyclomatic_complexity) of 10
- Moved inline imports to top of file if the packages were already imported by (any) parent
- Sorted imports
- Updated the `README.MD` and `CONTRIBUTING.MD` files

<a id="2.5.0.additional_changes"></a> Additional changes in subpackages
- `sam.data_sources`
- Deleted deprecated function `sam.data_sources.create_synthetic_timeseries`
- `sam.feature_engineering`
- Reduced duplicate code in `sam.feature_engineering.automatic_rolling_engineering` and `sam.feature_engineering.decompose_datetime`
- `sam.feature_engineering.automatic_rolling_engineering`: all dataframe inputs must be linearly increasing in time and have a datetime index, if not an AssertionError is raised
- Deleted deprecated function `sam.feature_engineering.build_timefeatures`
- Moved hardcoded data in `sam.feature_engineering.tests.test_automatic_feature_engineering` to separate `test_data` parent folder
- `sam.feature_selection`
- This subpackage is removed, as it was deprecated
- `sam.models`
- Reduced complexity of `sam.models.SamQuantileMLP` by adding extra internal methods for large methods
- `sam.preprocessing`
- Removed merge conflict files `sam.preprocessing\tests\test_scaling.py.orig` and `sam.preprocessing\data_scaling.py.orig`
- Deleted deprecated function `sam.preprocessing.complete_timestamps`
- `sam.train_models`
- This subpackage is removed, as it was deprecated
- `sam.utils`
- Deleted deprecated functions: `sam.utils.MongoWrapper`, `sam.utils.label_dst`, `sam.utils.average_winter_time`, and `sam.utils.unit_to_seconds`
- Added new function `sam.utils.has_strictly_increasing_index` to validate the datetime index of a dataframe
- `sam.visualization`
- reduced complexity of `sam.visualization.sam_quantile_plot` by splitting the static and interactive plot in separate functions.

2.4.0

New features
- `sam.data_sources.read_knmi_station_data` was added to get KNMI data for a selection of KNMI station numbers
- `sam.data_sources.read_knmi_stations` was added to get all automatic KNMI station meta data

Bugfixes
- `sam.data_sources.read_knmi` was changed because of a new KNMI API. The package `knmy` does not work anymore.
- `knmy` is no longer a (optional) dependency (outdated)

2.3.0

New features
- `sam.visualization.quantile_plot` accepts `benchmark` parameter that plots the benchmark used to calculate the model performance

Changes
- `sam.preprocessing.sam_reshape.sam_format_to_wide` now explicitly defines the arguments when calling `pd.pivot_table`
- `sam.metrics.r2_calculation.train_r2` can now use an array as a benchmark, not only a scalar average, for r2 calculation

Page 7 of 12

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.