lapros data for better AI
Project description
LaPros
Install
pip install lapros
How to use
LaPros works with classifiers. It ranks the suspicious labels given probabilies by some classification model. You can use normal Python lists, Numpy arrays or Pandas data. Return values are in a Numpy array or a Pandas series, the larger the value, the more suspicious are the coresponding labels.
from lapros import suspect
labels = [1, 0, 0, 1, 1];
probas = [
#
[0.5, 0.6, 0.7, 0.8, 0.9],
[0.5, 0.4, 0.3, 0.2, 0.1],
];
suspect(
probas,
labels=labels,
)
DEBUG lapros.api.suspect:68 Normal Python lists
DEBUG lapros.api.suspect:30 Numpy arrays labels and probas must have same length 5 vs 2
DEBUG lapros.api.suspect:34 Trying to reshape probas
DEBUG lapros.api.suspect:36 Shape of labels and probas: (5,) vs (5, 2)
DEBUG lapros.alg.avg_confidence:26 [0.8 0.33333333]
DEBUG lapros.alg.find_likely_label:44 [1 1 1 1 1]
DEBUG lapros.alg.rank_suspicious:70 err
id
1 0.566667
2 0.066667
<style scoped>
.dataframe tbody tr th:only-of-type {
vertical-align: middle;
}
.dataframe tbody tr th {
vertical-align: top;
}
.dataframe thead th {
text-align: right;
}
</style>
err | |
---|---|
id | |
1 | 0.566667 |
2 | 0.066667 |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lapros-0.1.2.tar.gz
(10.9 kB
view hashes)
Built Distribution
lapros-0.1.2-py3-none-any.whl
(11.1 kB
view hashes)