Skip to main content

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


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

Uploaded Source

Built Distribution

minx-0.0.2-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page