It's a test
Project description
1.Estimator
功能:计算分类结果的precision,recall,f1,auc,mAP,(precision=recall)'s threshold
用法示例:
from minx import Estimator
labels_name = ['label1', 'label2', 'label3']
est = estimator(labels_name)
pred_scores = [[0.1,0.3,0.6],[0.2,0.7,0.1],[0.5,0.8,0.1]]
true_labels = [2,1,0]
result, values = est.estimate(pred_scores, true_labels)
其中,result={"report":report, "auc_text":auc_text, "mAP_text":mAP_text, "p_r_equal_text":p_r_equal_text},里面所有value均为格式化后的string,可直接打印
而values与result格式基本一致,但字典中的value为list,保存了每个标签具体的值
2.Dialogue
功能:对话文本处理
用法示例:
from minx import Dialogue
test_dg = Dialogue()
input_data = [{"id": 1, "time": 100, "text": "1"}, {"id": 2, "time": 100, "text": "2"},
{"id": 3, "time": 100, "text": "3"}, {"id": 2, "time": 102, "text": "21"},
{"id": 2, "time": 10200, "text": "22"},{"id":2, "time":10211, "text":"23"}]
## 按某一关键字从jsonl中聚合对话,支持jsonl中的item为dict或list
results = test_dg.merge_by_key(input_data, merge_key="id", sort_key="time")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
minx-0.0.2.tar.gz
(4.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
minx-0.0.2-py3-none-any.whl
(6.0 kB
view details)
File details
Details for the file minx-0.0.2.tar.gz.
File metadata
- Download URL: minx-0.0.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2d7b337ba2c630df515ca4b3b26f5d181322d82ce519fcb8ea488abd522f876
|
|
| MD5 |
9c738f9a774b10f2dc3dcf361d4e600d
|
|
| BLAKE2b-256 |
79c01df407c916b6ee63e17788bc965a3b00031cc850a4b96085658eecce6b70
|
File details
Details for the file minx-0.0.2-py3-none-any.whl.
File metadata
- Download URL: minx-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21bd2346ab56b775389b69ca00a259c43abaf2dc7a1545f73a5a5bcf919317d8
|
|
| MD5 |
c02b2e6f1a87aeddc00aa22cd43753d4
|
|
| BLAKE2b-256 |
d9319661e3da489dea178f959e11f918a3d3d5f028a7b50c1c57675ea5e7adeb
|