nak.classify

kNearestNeighbor

class kNearestNeighbor[L, T, D] extends Classifier[L, T]

kNearestNeighbor 6/8/14

Linear Supertypes
Classifier[L, T], (T) ⇒ L, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. kNearestNeighbor
  2. Classifier
  3. Function1
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new kNearestNeighbor(c: Iterable[Example[L, T]], k: Int = 1)(implicit dm: UImpl2[D, T, T, Double])

Type Members

  1. type DistanceResult = Iterable[(Example[L, T], Double)]

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. def andThen[A](g: (L) ⇒ A): (T) ⇒ A

    Definition Classes
    Function1
    Annotations
    @unspecialized()
  5. def apply(o: T): L

    Return the most likely label

    Return the most likely label

    Definition Classes
    Classifier → Function1
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def classify(o: T): L

    Return the most likely label

    Return the most likely label

    Definition Classes
    Classifier
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def compose[A](g: (A) ⇒ T): (A) ⇒ L

    Definition Classes
    Function1
    Annotations
    @unspecialized()
  10. def distances(o: T): DistanceResult

  11. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  16. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  17. def map[M](f: (L) ⇒ M): Classifier[M, T]

    Transforms output labels L=>M.

    Transforms output labels L=>M. if f(x) is not one-to-one then the max of score from the L's are used.

    Definition Classes
    Classifier
  18. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. def scores(o: T): Counter[L, Double]

    For the observation, return the max voting label with prob = 1.

    For the observation, return the max voting label with prob = 1.0

    Definition Classes
    kNearestNeighborClassifier
  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. def testLOO(): Double

  24. def toString(): String

    Definition Classes
    Function1 → AnyRef → Any
  25. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Classifier[L, T]

Inherited from (T) ⇒ L

Inherited from AnyRef

Inherited from Any

Ungrouped