danieldux's picture
Update hierarchical precision and recall values in tests.py
667672b
raw
history blame
3.36 kB
test_cases = [
{
"references": [
"1111",
"1111",
"1111",
"1111",
"1111",
"1111",
"1111",
"1111",
"1111",
"1111",
],
"predictions": [
"1111",
"1112",
"1120",
"1211",
"1311",
"2111",
"111",
"11",
"1",
"9999",
],
"result": {
"accuracy": 0.1111111111111111,
"hierarchical_precision": 0.26666666666666666,
"hierarchical_recall": 1.0,
"hierarchical_fmeasure": 0.4210526315789474,
},
},
{
"references": ["1111"],
"predictions": ["1111"],
"result": {
"accuracy": 1.0,
"hierarchical_precision": 1.0,
"hierarchical_recall": 1.0,
"hierarchical_fmeasure": 1.0,
},
},
{
"references": ["1111"],
"predictions": ["1112"],
"result": {
"accuracy": 0.0,
"hierarchical_precision": 0.75,
"hierarchical_recall": 0.75,
"hierarchical_fmeasure": 0.75,
},
},
{
"references": ["1111"],
"predictions": ["1120"],
"result": {
"accuracy": 0.0,
"hierarchical_precision": 0.5,
"hierarchical_recall": 0.5,
"hierarchical_fmeasure": 0.5,
},
},
{
"references": ["1111"],
"predictions": ["1211"],
"result": {
"accuracy": 0.0,
"hierarchical_precision": 0.25,
"hierarchical_recall": 0.25,
"hierarchical_fmeasure": 0.25,
},
},
{
"references": ["1111"],
"predictions": ["1311"],
"result": {
"accuracy": 0.0,
"hierarchical_precision": 0.25,
"hierarchical_recall": 0.25,
"hierarchical_fmeasure": 0.25,
},
},
{
"references": ["1111"],
"predictions": ["2111"],
"result": {
"accuracy": 0.0,
"hierarchical_precision": 0.0,
"hierarchical_recall": 0.0,
"hierarchical_fmeasure": 0,
},
},
{
"references": ["1111"],
"predictions": ["111"],
"result": {
"accuracy": 0.0,
"hierarchical_precision": 1.0,
"hierarchical_recall": 0.25,
"hierarchical_fmeasure": 0.4,
},
},
{
"references": ["1111"],
"predictions": ["11"],
"result": {
"accuracy": 0.0,
"hierarchical_precision": 1.0,
"hierarchical_recall": 0.25,
"hierarchical_fmeasure": 0.4,
},
},
{
"references": ["1111"],
"predictions": ["1"],
"result": {
"accuracy": 0.0,
"hierarchical_precision": 1.0,
"hierarchical_recall": 0.25,
"hierarchical_fmeasure": 0.4,
},
},
{
"references": ["1111"],
"predictions": ["9999"],
"result": {
"accuracy": 0.0,
"hierarchical_precision": 0.0,
"hierarchical_recall": 0.0,
"hierarchical_fmeasure": 0,
},
},
]