youpi
youpi

Reputation: 73

Shogun print shogun.MulticlassLabels values

I wanted to use the mahalanobis distance with LMNN, which is not yet implemented in sklearn.

I try to use the metric-learn library but the LMNN is slow. So, I am looking into shogun.

I saw this tutorial on LMNN . I am using the distance learned in LMNN and using it with the KNN model.

In the tutorial, they only explained how to see the accuracy.

eval = MulticlassAccuracy() accuracy = eval.evaluate(labels_predict, labels_test)

But, I want to see the value of the predicted labels.

Upvotes: 0

Views: 82

Answers (1)

Heiko Strathmann
Heiko Strathmann

Reputation: 81

From the API:

SGVector<float64_t> CMulticlassLabels::get_labels() (inherited from CDenseLabels)

In your case: labels_predict.get_labels(), which will give you a numpy array.

Upvotes: 0

Related Questions