Hdlib

Latest version: v0.1.18

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

Scan your dependencies

Page 1 of 4

0.1.18

New features

- The space dictionary as part of a `Space` object is now an `OrderedDict`, making `Space` objects iterable over their set of vectors;
- Python examples under the `examples` folder are now available as part of the `hdlib` package.

Fixes

- Fix dumping and loading `Vector` and `Space` objects to and from pickle files;
- `space.Space.bulk_insert` function now checks whether the names of the input vectors are instances of `bool`, `int`, `float`, `str`, and `None` before creating and inserting vectors into the space;
- Distance thresholds in `space.Space.find` and `space.Space.find_all` are now set to `numpy.Inf` by default.

0.1.17

New features

- Add the `subtraction` operator to the `arithmetic` module;
- Add `__sub__` to `space.Vector` that makes use of `arithmetic.subtraction` to element-wise subtract two Vector objects;
- Add `space.Vector.subtraction` to element-wise subtract a vector from a Vector object inplace;
- Add `graph.Graph` to build vector-symbolic representations of directed and undirected, weighted and unweighted graphs;
- Extend [test/test.py](https://github.com/cumbof/hdlib/blob/main/test/test.py) with new unit tests.

0.1.16

New features

- Add `__add__` and `__mul__` to `space.Vector`;
- `model.MLModel.predict` now returns the model error rate.

Fixes

- `model.Model` is now `model.MLModel`;
- `parser.kfolds_split` has been deprecated and removed;
- `model.MLModel.cross_val_predict` now uses `sklearn.model_selection.StratifiedKFold` for the generation of balanced folds;
- Fix the order of the test real labels before computing the model metrics in [examples/chopin2.py](https://github.com/cumbof/hdlib/blob/main/examples/chopin2.py).

0.1.15

New features

- Add [examples/chopin2_iris.sh](https://github.com/cumbof/hdlib/blob/main/examples/chopin2_iris.sh) as a test case for [examples/chopin2.py](https://github.com/cumbof/hdlib/blob/main/examples/chopin2.py);
- Add new unit tests to [test/test.py](https://github.com/cumbof/hdlib/blob/main/test/test.py).

Fixes

- `space.Space.bulk_insert` has been refactored to make use of `space.Space.insert`;
- `parser.load_dataset` now throws a `ValueError` in case of non-numerical datasets;
- Add missing `import os` in `space.Model`.

0.1.14

Fixes

- `model.Model.fit` now correctly generates both bipolar and binary level vectors;
- `space.Vector.dist` automatically converts the cosine similarity into a distance measure;
- `model.Model.predict` and `model.Model.error_rate` are now compatible with all the supported distance metrics (euclidean, hamming, and cosine).

0.1.13

Fixes

- Fix the retraining process in `model.Model.predict`.

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.