Genalgplot: Difference between revisions

From Eigenvector Research Documentation Wiki
Jump to navigation Jump to search
imported>Jeremy
(Importing text file)
 
imported>Bob
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
===Purpose===
===Purpose===
Selected variable plot, color-coded by RMSECV for GA results.
Selected variable plot, color-coded by RMSECV for GA results.
===Synopsis===
===Synopsis===
:indicies = genalgplot(fit,pop,''spectrum'',''xaxis'',''xtitle'')
 
:indicies = genalgplot(results,''spectrum'',''xaxis'',''xtitle'')
:indices = genalgplot(fit,pop,''spectrum'',''xaxis'',''xtitle'')
:indices = genalgplot(results,''spectrum'',''xaxis'',''xtitle'')
 
===Description===
===Description===
An interactive plotting routine which displays the results of a genetic algorithm (GA) analysis. GENALGPLOT can aid in identifying patterns of variables that improve model prediction (as estimated by RMSECV). The results of GA analysis include the final unique "population" which is a ''M'' by ''N'' matrix where ''M'' is the number of members in the population and ''N'' is the number of original variables in the predictor block. Each row (member) of the population corresponds to a regression model where a column with a "1" indicates that variable was included in the model and a "0" indicates that the variable was not included. The RMSECV for each model characterized its prediction performance.
An interactive plotting routine which displays the results of a genetic algorithm (GA) analysis. GENALGPLOT can aid in identifying patterns of variables that improve model prediction (as estimated by RMSECV). The results of GA analysis include the final unique "population" which is a ''M'' by ''N'' matrix where ''M'' is the number of members in the population and ''N'' is the number of original variables in the predictor block. Each row (member) of the population corresponds to a regression model where a column with a "1" indicates that variable was included in the model and a "0" indicates that the variable was not included. The RMSECV for each model characterized its prediction performance.
The user selects a subset of the population from a plot of RMSECV versus the total number of included variables for each member of the population. The selected results are displayed in a plot that shows which variables were included for each member in the subset and its corresponding RMSECV. The plot is sorted with the best-performing individuals at the bottom of the plot and the worst at the top.
The user selects a subset of the population from a plot of RMSECV versus the total number of included variables for each member of the population. The selected results are displayed in a plot that shows which variables were included for each member in the subset and its corresponding RMSECV. The plot is sorted with the best-performing individuals at the bottom of the plot and the worst at the top.
GENALGPLOT is most useful when many replicate GA runs have been performed (see GENALG and GASELCTR) with low settings on the maximum number of generations (maxgenerations) or Found at convergence (convergence).
 
Required inputs are fit, the RMSECV fit results from GASELCTR (or rmsecv from a GENALG results structure), and pop, the logical matrix of included variables for all individuals in the final population (or icol from a GENALG results structure). Optional inputs include spectrum, a spectrum to plot on the final "included variables" plot for reference, xaxis, the variable axis scale, and xtitle, the x-axis label for the final plot (e.g. xaxis units).
GENALGPLOT is most useful when many replicate GA runs have been performed (see GENALG and GASELCTR) with low settings on the maximum number of generations <tt>maxgenerations</tt> or Found at convergence <tt>convergence</tt>.
The one output is the indicies of the selected individuals (rows of pop).
 
Required inputs are <tt>fit</tt>, the RMSECV fit results from GASELCTR (or the <tt>rmsecv</tt> field value from a GENALG results structure), and <tt>pop</tt>, the logical matrix of included variables for all individuals in the final population (or the <tt>icol</tt> field valuefrom a GENALG results structure). Optional inputs include <tt>spectrum</tt>, a spectrum to plot on the final "included variables" plot for reference, <tt>xaxis</tt>, the variable axis scale, and <tt>xtitle</tt>, the x-axis label for the final plot (e.g. xaxis units).
 
The one output is the indices of the selected individuals (rows of <tt>pop</tt>).
 
====Inputs====
 
* '''results''' = results structure from GASELCTR or GENALG, or
* '''fit''' = RMSECV fit results from GASELCTR and
* '''pop''' = logical matrix of included variables from GASELCTR
 
====Optional Inputs====
 
* '''spectrum''' = spectrum to plot on final "included variables" plot for reference.
* '''xaxis''' = variable axis scale.
* '''xtitle''' = x-axis label for the final plot.
 
====Outputs====
 
* '''indices''' = indices of selected individuals (rows of <tt>pop</tt> or <tt>results.icol</tt>)
 
===Examples===
===Examples===
Given the GENALG results structure gamodel, the following would plot the results:
Given the GENALG results structure gamodel, the following would plot the results:
:genalgplot(gamodel.rmsecv,gamodel.icol)
 
<pre>
  genalgplot(gamodel.rmsecv,gamodel.icol)
</pre>
 
===See Also===
===See Also===
[[genalg]], [[gaselctr]]
[[genalg]], [[gaselctr]]

Latest revision as of 17:38, 9 October 2008

Purpose

Selected variable plot, color-coded by RMSECV for GA results.

Synopsis

indices = genalgplot(fit,pop,spectrum,xaxis,xtitle)
indices = genalgplot(results,spectrum,xaxis,xtitle)

Description

An interactive plotting routine which displays the results of a genetic algorithm (GA) analysis. GENALGPLOT can aid in identifying patterns of variables that improve model prediction (as estimated by RMSECV). The results of GA analysis include the final unique "population" which is a M by N matrix where M is the number of members in the population and N is the number of original variables in the predictor block. Each row (member) of the population corresponds to a regression model where a column with a "1" indicates that variable was included in the model and a "0" indicates that the variable was not included. The RMSECV for each model characterized its prediction performance.

The user selects a subset of the population from a plot of RMSECV versus the total number of included variables for each member of the population. The selected results are displayed in a plot that shows which variables were included for each member in the subset and its corresponding RMSECV. The plot is sorted with the best-performing individuals at the bottom of the plot and the worst at the top.

GENALGPLOT is most useful when many replicate GA runs have been performed (see GENALG and GASELCTR) with low settings on the maximum number of generations maxgenerations or Found at convergence convergence.

Required inputs are fit, the RMSECV fit results from GASELCTR (or the rmsecv field value from a GENALG results structure), and pop, the logical matrix of included variables for all individuals in the final population (or the icol field valuefrom a GENALG results structure). Optional inputs include spectrum, a spectrum to plot on the final "included variables" plot for reference, xaxis, the variable axis scale, and xtitle, the x-axis label for the final plot (e.g. xaxis units).

The one output is the indices of the selected individuals (rows of pop).

Inputs

  • results = results structure from GASELCTR or GENALG, or
  • fit = RMSECV fit results from GASELCTR and
  • pop = logical matrix of included variables from GASELCTR

Optional Inputs

  • spectrum = spectrum to plot on final "included variables" plot for reference.
  • xaxis = variable axis scale.
  • xtitle = x-axis label for the final plot.

Outputs

  • indices = indices of selected individuals (rows of pop or results.icol)

Examples

Given the GENALG results structure gamodel, the following would plot the results:

  genalgplot(gamodel.rmsecv,gamodel.icol)

See Also

genalg, gaselctr