Hiclass

Latest version: v4.13.0

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

Scan your dependencies

4.3.0

This release adds support for [bert-sklearn](https://github.com/charles9n/bert-sklearn). See [the example](https://hiclass.readthedocs.io/en/latest/auto_examples/plot_bert.html) for more information.

4.2.0

In this release we added support for sample_weight for all local hierarchical classifiers. Hence, now it is possible to pass an array of weights that are assigned to individual samples, which are forwarded to the underlying estimators. See [the online API reference](https://hiclass.readthedocs.io/en/latest/api/classifiers.html#LocalClassifierPerParentNode.LocalClassifierPerParentNode.fit) for more information

4.1.0

With this release it becomes possible to train local hierarchical classifiers when the hierarchy has empty levels. For example:

python
from sklearn.linear_model import LogisticRegression

from hiclass import LocalClassifierPerNode

Define data
X_train = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10]]
X_test = [[9, 10], [7, 8], [5, 6], [3, 4], [1, 2]]
Y_train = [
["Bird"],
["Reptile", "Snake"],
["Reptile", "Lizard"],
["Mammal", "Cat"],
["Mammal", "Wolf", "Dog"],
]

Use random forest classifiers for every node
rf = LogisticRegression()
classifier = LocalClassifierPerNode(local_classifier=rf)

Train local classifier per node
classifier.fit(X_train, Y_train)

Predict
predictions = classifier.predict(X_test)
print(predictions)

4.0.10

A gallery of examples was added to the documentation on read the docs [https://hiclass.readthedocs.io/en/latest/auto_examples/index.html](https://hiclass.readthedocs.io/en/latest/auto_examples/index.html). These examples illustrate the usage of the most common features of the library and all code is executed when the documentation is built, ensuring everything is working.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.