Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examlpe on how to use SDK for creating classifiers metrics #29

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mickyfi
Copy link

@mickyfi mickyfi commented Mar 5, 2015

No description provided.

@znation
Copy link
Contributor

znation commented Mar 5, 2015

Should this be added to the README.md (perhaps underneath a new "C++ SDK" section)?

#include <graphlab/sdk/gl_sarray.hpp>
using namespace graphlab;
int true_positive(gl_sarray actual, gl_sarray predicted, flexible_type pos_label) {
if(actual.size() != predicted.size())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be done in 1 line. (actual == pos_label) * (predicted == pos_label)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants