PLOT_COST(1)

NAME
plot_cost - Plot program for cost results during iterative training of LNKnet classifiers.

SYNOPSIS
Plots average cost every n trials during training for any iteratively trained LNKet classifier. The verbosity flag, verror, must be greater than or equal to 1 during training to generate a cost plot.

plot_cost [ -pathexp directory ] [ -ferror file ]
[ -fplot file ] [ -autoscale ]
[ -xmin x ] [ -xmax x ] [ -xstep x ] [ -ymin x ]
[ -ymax x ] [ -ystep x ] [ -trials n ]
[ -title string ] [ -cost_func n ] [ -mac ]
[ -fmaclines file ]

EXAMPLE
This example trains a Multi-Layer Perceptron classifier for 40 epochs, presenting all 338 patterns in the vowel training file 40 times. The pattern by pattern classification results are stored in X1mlp.err.train. plot_cost then plots the value of the cost function over the training, averaging the cost during each epoch. The cost function in this example is root mean squared error.

mlp -epochs 40 -train -create -nodes 2,25,10 -etta .1 \
-pathdata $LNKHOME/data/class -finput vowel.train \
-fdescribe vowel.defaults -npatterns 338 \
-ferror mlp.err.train -verror 1

plot_cost -ferror mlp.err.train -autoscale -trials 338 \
-cost_func 0

OPTIONS

--  Prints a list of all flags and arguments.

-pathexp directory
    Directory where ferror and fplot are stored.

-ferror file
    File where pattern by pattern classification results during training are stored.

-fplot file
    File for storing plot.

-autoscale
    If this flag is set, the values in the parameter file ferror will be used to set the scales for the X and Y axes.

-xmin x
    If autoscale is not set, the lower limit of the N_patterns axis for the plot.

-xmax x
    If autoscale is not set, the upper limit of the N_patterns axis for the plot.

-xstep x
    If autoscale is not set, the space between tic marks on the N_patterns axis for the plot.

-ymin x
    If autoscale is not set, the lower limit of the cost axis for the plot.

-ymax x
    If autoscale is not set, the upper limit of the cost axis for the plot.

-ystep x
    If autoscale is not set, the space between tic marks on the cost axis for the plot.

-title string
    Title for plot.

-trials n
    The number of pattern results to average to generate each point on the plot.

-cost_func n
    The cost function that should be plotted. This flag must match the classifier cost function. The cost functions and the classifiers they are available for are:

    0 Squared Error
        Used by: mlp, irbf

    1 Cross Entropy
        Used by: mlp

    2 Maximum Likelihood
        Used by: mlp

    3 Perceptron Convergence Procedure
        Used by: mlp

    4 Top Two Difference
        Used by: mlp, irbf

    5 Log Likelihood
        Used by: gmix

    6 Centers
        Used by: cknn, hyper

    7 None
        Used by: lvq

-mac
    If this flag is set, the points in the plot will be written to the file -fmaclines.

-fmaclines file
    This is an ASCII file containing the data used to create the normalization plot. Each line contains the number of patterns seen so far and the average cost for the last trials patterns. This file can be used to generate plots on a MacIntosh or other PC using a spread-sheet graphing program such as Excel or DeltaGraph.

SEE ALSO
classifier(1), cknn_lnk(1), gmix_lnk(1), hyper_lnk(1), irbf_lnk(1), lvq_lnk(1), mlp_lnk(1)

HISTORY
First written 5 July 1993 by Linda Kukolich
Modified 22 June 1994, took out line_type

BUGS
Send bug reports to Linda Kukolich (kukolich@sst.ll.mit.edu)