Hdlib

Latest version: v0.1.16

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

Scan your dependencies

Page 1 of 3

0.1.16

Add:

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

Fix:

- `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

Add:

- 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).

Fix:

- `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

Fix:

- `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

Fix:

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

0.1.12

Add:

- `examples/chopin2.py` now reports the Accuracy, F1, Precision, Recall, and the Matthews correlation coefficient for each of the folds in addition to the average of these scores as evaluation metrics of the hyperdimensional computing models;
- `model.Model` class functions now raise different exceptions based on multiple checks on the input parameters.

0.1.11

Fix:

- The `model.Model.stepwise_regression` function now report the importance corresponding to the best score;
- The `model.Model._init_fit_predict` function uses `average="weighted"` for computing a score different from the accuracy to account for label imbalance;
- `examples/chopin2.py` now computes different scores on the resulting predictions, prints the list of selected features based on the best score, and finally reports the confusion matrices.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.