Custom performance metrics for a supervised machine learning model

I developed a workflow for a binary classification model, and I would like to use custom metrics to evaluate the model’s performance. The scorer node provides metrics like confusion matrix, accuracy, sensitivity, F-score, etc. I want to use a custom metric, like for example the F-2 score ( 5 * Precision * Recall / 4 *( Precision + Recall)).
I would also like to generate output that shows the F-2 score at different threshold levels ranging from 0 to 1.
As I am new to KNIME, I am hoping someone could help me with this.
Thanks!

Hi @saddas,
Welcome to the KNIME forum! You can roll your own metric using the Math Formula and the GroupBy nodes. Maybe you will also need a Rule Engine. First you calculate row-wise metrics, then you can aggregate them with the GroupBy. Sometimes you then need to calculate something from multiple aggregations using the Math Formula once more, then you are done.
Kind regards,
Alexander

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.