KNN_Regression

scalation.modeling.KNN_Regression
See theKNN_Regression companion class

The KNN_Regression companion object provides factory methods for creating k-nearest neighbor regression models.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(xy: MatrixD, fname: Array[String], hparam: HyperParameter)(col: Int): KNN_Regression

Create a KNN_Regression object from a combined xy data-response matrix.

Create a KNN_Regression object from a combined xy data-response matrix.

Value parameters

col

the designated response column (defaults to the last column)

fname

the names for all features/variables (defaults to null)

hparam

the number of nearest neighbors to consider (defaults to hp)

xy

the combined data-response matrix

Attributes

def rescale(x: MatrixD, y: VectorD, fname: Array[String], hparam: HyperParameter): KNN_Regression

Create a KNN_Regression object from a data matrix and a response vector. This method provides data rescaling.

Create a KNN_Regression object from a data matrix and a response vector. This method provides data rescaling.

Value parameters

fname

the feature/variable names (defaults to null)

hparam

the hyper-parameters (default to hp)

x

the data/input m-by-n matrix (augment with a first column of ones to include intercept in model)

y

the response/output m-vector

Attributes

Concrete fields