COMMAND(1)

NAME
encsmpl - adjust sampling information for the encoded data file

SYNOPSIS
enc sample_args stem

DESCRIPTION

encsmpl takes an encoded example file "stem.enc" produced by enc(1) and creates a sampling record as specified by sample_args. The sampling record is stored in the file "stem.encspl". If no seed is specified, then encsmpl generates a psuedo-random seed from the current time in milliseconds.

The option arguments sample_args can be one of:

    S,size[,seed]
        Sample without replacement from the encoded example file. Extract a sample of size size using seed to initialize the random number generator. The training set is the sample, the test set is the remainder.

    R,size[,seed]
        Sample with replacement from the full encoded example file. Extract a sample of size size using seed to initialize the random number generator. The training set is the sample, the test set is the remainder, any item not sampled.

    L,size[,seed]
        Like R but the test set is taken to be the full encoded example file.

    C,parts,part[,seed]
        Used for cross validation. Split the full encoded example file into parts mutually exclusive and exhaustive partitions. Take the part-th one as the test set and the others as the training set. seed initializes the random number generator.

    D,size,parts,part[,seed]
        Like C but first take a subsample of size size and partition that.

    N   No sampling, use the entire file for both testing and training. This is the initial encoded value. Use to reset the file.

    P   Leave the sampling as it was. Useful in conjunction with the -v and -c or -g options.

Both tgen or tclass automatically look for sampling records to match the "stem.enc" file. If none is found, then take the full sample (the N option above). Both tgen and tclass extract the training and test samples respectively.

OPTIONS

-c  Print out the test set on completion. Used primarily to check operation.

-g  Print out the training set on completion. Used primarily to check operation.

-s  If encsmpl generates a seed, print it out.

-v  Verbose option. Print details of sampling taken.

SEE ALSO
enc(1).