plot_optimization_progress: Visualisation of optimization process

plot_optimization_progressR Documentation

Visualisation of optimization process

Description

Visualisation of optimization process based on log files. plot_optimization_progress is also used by optim_pso & Co. when used with plot_optimization_progress=TRUE.

Usage

plot_optimization_progress (logfile="pso.log", projectfile="pso.pro", progress_plot_filename=NULL, goodness_plot_filename=NULL, cutoff_quantile=0.95, verbose=FALSE)

Arguments

logfile

log file as produced by optim_pso & Co.

projectfile

project file as produced by optim_pso & Co.

progress_plot_filename

optional file name to save the contents of the progress_plot window to. See details.

goodness_plot_filename

optional file name to save the contents of the goodness_plot window to. See details.

cutoff_quantile

upper quantile at which poorer goodness values are no more displayed (e.g. 0.95). This clarifies scatter plots.

verbose

print information on current optimum, the respective parameters and its function call number.

Details

plot_optimization_progress can be used to inspect an ongoing optimization progress if its recording of log file and project file are enabled. It produces two windows:

  • progress_plot depicts the variation of each parameter versus the number of function evaluations. This helps checking which of the parameters are converging. Likewise, the development of the value of the objective function is illustrated. The best parameter set of each particle so far is marked with a red diamond.

  • goodness_plot depicts the value of each parameter versus the objective function, giving clues to parameter sensitivity. Additionally, the distribution of the workload of the slaves and their time for function evaluations is displayed. Execution times less than a second are displayed as 0.5 second.

The plots are saved when progress_plot_filename or goodness_plot_filename, respectively, are specified. This is especially useful in conjunction with internal calls by optim_pso & Co. to supervise an optimization run. If the file names contain an extension supported by savePlot, this file format is used, otherwise a PostScript file is stored.

Value

vector of optimum solution so far.

Author(s)

Till Francke

See Also

optim_pso

Examples

## Not run: 
	projectfile	=tempfile()
  logfile	=tempfile()
	result = optim_pso(objective_function=rastrigin_function, projectfile=projectfile, logfile=logfile, load_projectfile="no")		#start optimization, generate project file and log file
  plot_optimization_progress(logfile=logfile, projectfile=projectfile)
  unlink(c(projectfile,logfile))	#delete log file and project file

## End(Not run)

TillF/ppso documentation built on March 11, 2024, 1:27 a.m.