TnT_Split

scalation.mathstat.TnT_Split
object TnT_Split

The TnT_Split object provides methods for splitting datasets into TESTING-sets (.) and TRAINING-sets (-). There are three options on how to split the full dataset: (1) select at RANDOM n_test indices for the test-set (@see tnT_SplitTest) | -.--.---.--.----.--.---.-----.| (2) select the FIRSTn_testindices for the test-set (@see tnT_SplitTest2) | test-set | training-set | (3) select the LAST n_test indices for the test-set (@see tnT_SplitTest3`) | training-set | test-set |

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
TnT_Split.type

Members list

Value members

Concrete methods

def apply(xy: MatrixD, idx: IndexedSeq[Int]): (MatrixD, MatrixD)

Split the dataset given as a combined data-response matrix into a testing-set and training-set based on the given indices.

Split the dataset given as a combined data-response matrix into a testing-set and training-set based on the given indices.

Value parameters

idx

the indices for the testing-set

xy

the combined data-response matrix

Attributes

def apply(x: MatrixD, y: VectorD, idx: Set[Int]): (MatrixD, MatrixD, VectorD, VectorD)

Split the dataset given as a data matrix and a response vector into a testing-set and training-set based on the given indices.

Split the dataset given as a data matrix and a response vector into a testing-set and training-set based on the given indices.

Value parameters

idx

the set of indices for the testing-set

x

the input/data matrix (for some models this may be null => return (null, null)

y

the output/response vector

Attributes

See also

scalation.modeling.Predictor

def apply(x: MatrixD, y: VectorD, idx: IndexedSeq[Int]): (MatrixD, MatrixD, VectorD, VectorD)
def apply(x: MatrixD, y: VectorI, idx: IndexedSeq[Int]): (MatrixD, MatrixD, VectorI, VectorI)

Split the dataset given as a data matrix and an integer-valued response vector into a testing-set and training-set based on the given indices.

Split the dataset given as a data matrix and an integer-valued response vector into a testing-set and training-set based on the given indices.

Value parameters

idx

the indices for the testing-set

x

the input/data matrix (for some models this may be null => return (null, null)

y

the integer-valued output/response vector

Attributes

See also

scalation.modelingq.classifying.Classifier

def apply(x: MatrixD, y: MatrixD, idx: IndexedSeq[Int]): (MatrixD, MatrixD, MatrixD, MatrixD)

Split the dataset given as a data matrix and a response matrix into a testing-set and training-set based on the given indices.

Split the dataset given as a data matrix and a response matrix into a testing-set and training-set based on the given indices.

Value parameters

idx

the indices for the testing-set

x

the input/data matrix

y

the output/response matrix

Attributes

See also

scalation.modeling.neuralnet.PredictorMV

def makePermGen(limit: Int, stream: Int = ...): PermutedVecI

Make a permutation generator for integers from 0 until limit.

Make a permutation generator for integers from 0 until limit.

Value parameters

limit

the upper limit of integers (exclusive)

stream

the random number stream to use

Attributes

def testIndices(permGen: PermutedVecI, n_test: Int, rando: Boolean = ...): IndexedSeq[Int]

Return the indices for the test-set. If rando = false, pick the FIRST indices.

Return the indices for the test-set. If rando = false, pick the FIRST indices.

Value parameters

n_test

the size of test-set

rando

whether to select indices randomly or in blocks (defaults to true)

Attributes

def testIndices(permGen: PermutedVecI, n_total: Int, n_test: Int, rando: Boolean): IndexedSeq[Int]

Return the indices for the test-set. If rando = false, pick the LAST indices.

Return the indices for the test-set. If rando = false, pick the LAST indices.

Value parameters

n_test

the size of test-set

n_total

the size of full dataset (train plus test)

rando

whether to select indices randomly or in blocks (defaults to true)

Attributes

def testIndices2(permGen: PermutedVecI, n_test: Int, rando: Boolean = ...): Set[Int]
def testIndices2(permGen: PermutedVecI, n_total: Int, n_test: Int, rando: Boolean): Set[Int]