Classifier

scalation.modeling.classifying.Classifier
See theClassifier companion trait
object Classifier

The Classifier companion object provides a method for testing predictive models.

Attributes

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

Members list

Value members

Concrete methods

def downsample(y: VectorI, ns: Int): Array[Int]

Downsample to reduce imbalance of classes, by returning the group indices and the probability for each group.

Downsample to reduce imbalance of classes, by returning the group indices and the probability for each group.

Value parameters

ns

the number of instances in downsample

y

the classification/response vector

Attributes

def partition(y: VectorI): (Array[Set[Int]], VectorI)

Partition the dataset into groups, e.g., to set up for downsampling, by returning each group's indices and frequency counts. Instances with the same classification 'y(i)' will be found in the 'i'th group.

Partition the dataset into groups, e.g., to set up for downsampling, by returning each group's indices and frequency counts. Instances with the same classification 'y(i)' will be found in the 'i'th group.

Value parameters

y

the classification/response vector

Attributes

def shift2zero(z: MatrixD): Unit

Shift the z matrix so that the minimum value for each column equals zero.

Shift the z matrix so that the minimum value for each column equals zero.

Value parameters

z

the matrix to be shifted

Attributes

def test(mod: Classifier, ext: String, check: Boolean): Unit

Test (in-sample) by training and testing on the FULL dataset. Test (out-of-sample) by training on the TRAINING set and testing on the TESTING set.

Test (in-sample) by training and testing on the FULL dataset. Test (out-of-sample) by training on the TRAINING set and testing on the TESTING set.

Value parameters

check

whether to check the assertion that the in-sample and out-of-sample results are in rough agreement (e.g., at 20%)

ext

the model subtype extension (e.g., indicating the transformation function used)

mod

the model to be used

Attributes

Return value counts calculated from the input data. May wish to call shiftToZero before calling this method.

Return value counts calculated from the input data. May wish to call shiftToZero before calling this method.

Value parameters

z

the matrix to be shifted

Attributes

Concrete fields

hyper-parameters for classifiers

hyper-parameters for classifiers

Attributes