Python API¶
Models¶
|
Probabilistic Labels Trees (PLTs) (multi-label) classifier with linear node estimators, using CPP core. |
|
Hierarchical Softmax (multi-class) classifier with linear node estimators, using CPP core. |
|
Binary Relevance (multi-label) classifier with linear estimators, using CPP core |
|
One Versus Rest (multi-class) classifier with linear estimators, using CPP core. |
Datasets¶
|
Downloads the dataset from the internet and puts it in root directory. |
|
Downloads the dataset from the internet and puts it in root directory. |
|
Load data in the libsvm format into sparse CSR matrix. |
|
Load data in the JSON lines format into list of features and list of labels. |
|
Converts sparse matrix-like data, like list of list of tuples (idx, value), to Scipy csr_matrix. |
|
Converts sparse matrix-like data, like list of list of tuples (idx, value), to Numpy matrix (2D array). |
Measures¶
|
Calculate precision at 1-k places. |
|
Calculate recall at 1-k places. |
|
Calculate coverage at 1-k places. |
|
Calculate Discounted Cumulative Gain (DCG) at 1-k places. |
|
Calculate inverse propensity as proposed in Jain et al. 2016. |
|
Calculate propensity as proposed in Jain et al. 2016. |
|
Calculate normalized Discounted Cumulative Gain (nDCG) at 1-k places. |
|
Calculate Propensity Scored Precision (PSP) at 1-k places. |
|
Calculate Propensity Scored Recall (PSR) at 1-k places. |
|
Calculate Propensity Scored Discounted Cumulative Gain (PSDCG) at 1-k places. |
|
Calculate Propensity Scored normalized Discounted Cumulative Gain (PSnDCG) at 1-k places. |
|
Calculate unnormalized (to avoid very small numbers because of large number of labels) hamming loss - average number of misclassified labels. |
|
Calculate F1 measure, also known as balanced F-score or F-measure. |