Plotting results of the KSC model tuning

Functionalities for visualising the results of KSC hyper parameter tuning.

Description

The KscIchol_Tune application

  • trains a sparse KSC model at each points of a 2D grid of candidate cluster numbers and RBF kernel parameter values on the training set

  • each of the traind KSC models are evaluated on validation set and the model selection criterion value is reported

  • the 2D grid data as well as the corresponding model selection criterion values are written into files as final results of the hyper parameter tuning

The output of the hyper parameter tuning application can be visualised by this application. The application reads the output files of the tuning application and generates

  • a 2D image plot of the model selection criterion values(its maximum scalled to 1) over the cluster number and RBF kernel parameter value grid

  • a projection of this 2D image to the cluster number values containing the maximum model selection criterion value at each cluster number values (i.e. the maximum values over the kernel parameters at each cluster number)

  • see more at the Example below

Example:

Example for calling the plotResTuning function for visualising the results of the KscIchol_Tune application written to the \(\texttt{TuningRes}\) files

$ python plotResTuning.py -f TuningRes

Note, that the output file names of the KscIchol_Tune application can be set by its \(\texttt{--resFile}\) input argument e.g. \(\texttt{--resFile TuningRes}\) that will generate 3 files containing

  • \(\texttt{TuningRes\_clusterNumbers}\) : the cluster number values

  • \(\texttt{TuningRes\_kernelPars}\) : the RBF kernel parameter values

  • \(\texttt{TuningRes}\) : model selection criteria over this 2D grid

The title of the generated plots can be set by providing an additional argument with :math:texttt{-title} option. The plots can be saved to a location specified by an additional :math:texttt{-saveTo} argument. The 2D image plot is smoothed by default to get nicer images. The level of this smoothing can be set by the :math:texttt{-s} argument and can be turned off by setting it to 1. The following example is used in case of Test2

python ../utils/plotResTuning.py -f out/TuningRes.dat -s 1 --title "Test2 tuning (stdv = 2.0)" --saveTo "out/fig"

plotResTuning.PlotResTuning2D(clusterNumbers, kernelParams, resTuneMatrix, smooth, title, saveTo)[source]
plotResTuning.PlotResTuningMaxAt(clusterNumbers, kernelParams, resTuneMatrix, which, title, saveTo=' ')[source]
plotResTuning.Help()[source]
plotResTuning.main(argv)[source]