Skip to content

Instantly share code, notes, and snippets.

@actsasgeek
Created July 7, 2011 15:15
Show Gist options
  • Select an option

  • Save actsasgeek/1069733 to your computer and use it in GitHub Desktop.

Select an option

Save actsasgeek/1069733 to your computer and use it in GitHub Desktop.
The script that runs a classification session.
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