Created
July 7, 2011 15:15
-
-
Save actsasgeek/1069733 to your computer and use it in GitHub Desktop.
The script that runs a classification session.
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
| val nearestNeighbor = NearestNeighbor.create( args( 0)) | |
| val query = Instance.parseString( args( 1)) | |
| var k = 3 | |
| if ( args.length == 3) { | |
| k = Integer.parseInt( args( 2)) | |
| } | |
| println( nearestNeighbor.classify( query, k)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment