Created
March 10, 2016 22:52
-
-
Save CVertex/a0a3c02ec925f7d184ad to your computer and use it in GitHub Desktop.
Prints the non-zero features in the console in BigML cluster console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var scores = []; | |
| $('.kluster-fields').find('.numeric').each(function() { | |
| var r = $(this); | |
| var name = r.find('span:first').text().replace(":",""); | |
| var val = parseFloat(r.find('strong').text()); | |
| //console.log(name + ' ' + val); | |
| var s = {name:name,score:val}; | |
| scores.push(s); | |
| }); | |
| scores.sort(function(a,b) { | |
| return b.score - a.score; | |
| }); | |
| for (var s = 0; s<scores.length; s++) { | |
| var score = scores[s]; | |
| if (score.score > 0.01) { | |
| console.log(score.name + " : " + score.score); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment