# Sampling API Reference

## Functions

`ChemometricsTools.KennardStone`

— Method.`KennardStone(X, TrainSamples; distance = "euclidean")`

Returns the indices of the Kennard-Stone sampled exemplars (E), and those not sampled (O) as a 2-Tuple (E, O).

Note: there is an indexing bug here...

R. W. Kennard & L. A. Stone (1969) Computer Aided Design of Experiments, Technometrics, 111, 137-148, DOI: 10.1080/00401706.1969.10490666

`ChemometricsTools.SplitByProportion`

— Function.`SplitByProportion(X::Array, Proportion::Float64 = 0.5)`

Splits `X`

Array along the observations dimension into a 2-Tuple based on the `Proportion`

. The form of the output is the following: ( X1, X2 )

`ChemometricsTools.SplitByProportion`

— Function.`SplitByProportion(X::Array, Y::Array,Proportion::Float64 = 0.5)`

Splits an `X`

and Associated `Y`

Array along the observations dimension into a 2-Tuple of 2-Tuples based on the `Proportion`

. The form of the output is the following: ( (X1, Y1), (X2, Y2) )

`ChemometricsTools.VenetianBlinds`

— Method.`VenetianBlinds(X,Y)`

Splits an `X`

and associated `Y`

Array along the observation dimension into a 2-Tuple of 2-Tuples based on the whether it is even or odd. The form of the output is the following: ( (X1,Y1), (X2, Y2) )

`ChemometricsTools.VenetianBlinds`

— Method.`VenetianBlinds(X)`

Splits an `X`

Array along the observations dimension into a 2-Tuple of 2-Tuples based on the whether it is even or odd. The form of the output is the following: ( X1, X2 )