<jupyter_start><jupyter_text>train Meka classifier >note that Meka is also a wrapper for all [Mulan](http://mulan.sourceforge.net/) classifiers<jupyter_code>meka = Meka(
    meka_classifier="meka.classifiers.multilabel.RAkELd -k {} -S {}".format(NUM_LABELS,SEED),
    weka_classifier="weka.classifiers.bayes.NaiveBayes",
    meka_classpath=path_to_meka,
    java_command='/usr/bin/java'
)
%%time
meka.fit(X_train, Y_train)
%%time
Y_preds_meka = meka.predict(X_test)<jupyter_output>CPU times: user 1.33 s, sys: 44 ms, total: 1.38 s
Wall time: 3.28 s<jupyter_text>train skmultilearn classifier > default value for label size in Mulan RakelD is 3 [source](https://github.com/tsoumakas/mulan/blob/f56e8148812dde357178a053cb09877515b538ad/mulan/src/main/java/mulan/classifier/meta/RAkELd.javaL75)<jupyter_code>%%time
skml = RakelD(
    base_classifier=GaussianNB(),
    labelset_size=NUM_LABELS)
skml.fit(X_train, Y_train)
%%time
Y_preds_skml = skml.predict(X_test)<jupyter_output>CPU times: user 140 ms, sys: 0 ns, total: 140 ms
Wall time: 135 ms<jupyter_text>compare both outputs<jupyter_code>Y_preds_meka.shape,Y_preds_skml.shape
number_of_matches = 0

for i in range(Y_preds_meka.shape[0]):
    preds_meka = Y_preds_meka[i,:].toarray()
    preds_skml = Y_preds_skml[i,:].toarray()
    
    if(np.allclose(preds_meka,preds_skml)):
        number_of_matches += 1
number_of_matches
print("### Predictions equality ###")
print(np.array_equal(Y_preds_meka, Y_preds_skml))
print('')
print("### Pctg of exact matches ###")
print("{:.3f}%".format(number_of_matches/Y_preds_meka.shape[0]*100))
print('')
print("### Hamming loss ###")
print("SKML: %f" % hamming_loss(Y_test, Y_preds_skml))
print("MEKA: %f" % hamming_loss(Y_test, Y_preds_meka))
print('')
print("### Accuracy score ###")
print("SKML: %f" % accuracy_score(Y_test, Y_preds_skml))
print("MEKA: %f " % accuracy_score(Y_test, Y_preds_meka))
print('')
print("### Micro-F1 score ###")
print("SKML: %f" % f1_score(Y_test, Y_preds_skml,average='micro'))
print("MEKA: %f" % f1_score(Y_test, Y_preds_meka,average='micro'))
print('')<jupyter_output>### Predictions equality ###
False

### Pctg of exact matches ###
55.472%

### Hamming loss ###
SKML: 0.142138
MEKA: 0.167925

### Accuracy score ###
SKML: 0.437736
MEKA: 0.249057 

### Micro-F1 score ###
SKML: 0.665350
MEKA: 0.626225
{'fraction_non_alphanumeric': 0.16208082545141875, 'fraction_numerical': 0.04815133276010318, 'mean_word_length': 6.363924050632911, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '178230', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 1087, 'n_tokens_neox': 984, 'n_words': 169, 'path': 'tests/RAkELdTesting.ipynb', 'repo_name': 'queirozfcom/scikit-multilearn', 'size': '2326'}