KNN.Seq Module
Functions and values
| Function or value | Description |
Full Usage:
Seq.predict distance labeledPoints k x
Parameters:
Distance<'a>
-
the distance function, e.g. `euclidean`
labeledPoints : ('a * 'l) seq
-
the array of classified (or labeled) points [in the format (point, label)],
used for the classification
k : int
-
The _positive_ number of nearest neighbors from x to look for.
x : 'a
-
The point to classify
Returns: 'l option
The most common label from the k nearest neighbors for x.
Modifiers: inline Type parameters: 'a, 'l |
Example
val points: float list seq
Multiple items
val seq: sequence: 'T seq -> 'T seq -------------------- type 'T seq = System.Collections.Generic.IEnumerable<'T> val labels: string seq
val labeledPoints: (float list * string) seq
module Seq
from Microsoft.FSharp.Collections
val zip: source1: 'T1 seq -> source2: 'T2 seq -> ('T1 * 'T2) seq
val prediction: (float list -> obj)
namespace Microsoft.FSharp
val color: obj
|
FSharp.Stats