Genalgplot: Difference between revisions
imported>Jeremy (Importing text file) |
imported>Jeremy (Importing text file) |
||
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(fit,pop,''spectrum'',''xaxis'',''xtitle'') | ||
:indicies = genalgplot(results,''spectrum'',''xaxis'',''xtitle'') | :indicies = 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). | 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). | 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). | ||
The one output is the indicies of the selected individuals (rows of pop). | The one output is the indicies of the selected individuals (rows of pop). | ||
===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) | :genalgplot(gamodel.rmsecv,gamodel.icol) | ||
===See Also=== | ===See Also=== | ||
[[genalg]], [[gaselctr]] | [[genalg]], [[gaselctr]] |
Revision as of 14:25, 3 September 2008
Purpose
Selected variable plot, color-coded by RMSECV for GA results.
Synopsis
- indicies = genalgplot(fit,pop,spectrum,xaxis,xtitle)
- indicies = 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 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).
The one output is the indicies of the selected individuals (rows of pop).
Examples
Given the GENALG results structure gamodel, the following would plot the results:
- genalgplot(gamodel.rmsecv,gamodel.icol)