

nnreg(funfits)                               R Documentation

_F_i_t_s _a _s_u_r_f_a_c_e _b_a_s_e_d _o_n _a _n_e_u_r_a_l _n_e_t_w_o_r_k

_D_e_s_c_r_i_p_t_i_o_n_:

     Parameters of the model are estimated by nonlinear
     least squares. The parameter space has a large number
     of local minimum so the strategy is to generate "many"
     parameter sets at random and iterate these starts with
     a minimization algorithm. The two function parameters
     ntries and ngrid are used in generating the many start-
     ing parameter sets for nonlinear least squares. Ngrind
     is the number of cubes growing geometrically over a
     range of magnitude of parameters. Ntries is the number
     of parameter sets generated at random by a uniform dis-
     tribution in each cube. The best parameter set ( out
     the Ntries ) in each cube is used as the start of a
     coarse optimization.  Npol of these coarse fits are
     selected for further refinement by a minimization with
     smaller tolerance.

_U_s_a_g_e_:

     nnreg(x, y, k1, k2, start, ngrind=250, ntries=100, npol=20,
     glow=-1.26, ghigh=1.26, scale=0.5, fdata, derivative=F,
     fout="nnreg.out",run=T, just.setup=F, just.read=F,
     fitted.values=F, all.fits=F, greedy=F, seed)

_A_r_g_u_m_e_n_t_s_:

       x: Matrix of independent variables.

       y: Vector of dependent variables.

      k1: Lower limit for K, where K is the number of hidden
          units.

      k2: Upper limit for K.

   start: Starting values for parameters.

  ngrind: Number of coarse optimizations.

  ntries: Number of random starting values for each coarse
          optimization.

    npol: Number of coarse fits improved, i.e polish, using
          smaller minimization tolerance.

    glow: Lower limit for grid of initial parameter values.

   ghigh: Upper limit for grid of initial parameter values.

   scale: Scale factor for grid of initial parameter values.

   fdata: Temporary UNIX file name for the data.

derivative: Return the derivative evaluated at the data
          points.

    fout: Temporary UNIX file name for the output.

     run: Runs the fitting program.

just.setup: Sets up the input files but does not run the
          fitting program.

just.read: Does no fitting, just reads in the results from a
          previous fit.

fitted.values: Computes fitted values and residuals.

all.fits: Includes all polished fits in the output file not
          just the best one.

  greedy: A value of zero fits the full model by nonlinear
          least squares. A positive value uses the greedy
          algorithm to fit hidden units in chunks of size
          greedy, sequentially adding hidden units fit to
          the residuals of the previous fit.

    seed: Seed used in generating the random parameter
          starts.

_V_a_l_u_e_:

     Object of class nnreg. The component model is a list of
     the parameters for each fitted model. Columns of the
     components: residuals and predicted values, correspond
     to the different fitted models. Each component model is
     of class netfit. The best model number as judged by
     minimizing the GCV statistic is also returned.

   model: Component model of class netfit. Includes a list
          of the dimension of the x matrix, the number of
          hidden units used in the model, the mean of each
          column of the x matrix, the mean of the y values,
          the standard deviation of each column of the x
          matrix, the standard deviation of the y values,
          the number of parameters in the model and the
          parameters of model.

 summary: Partial Fortan program output. Summary of the
          nnreg fit. Includes a summary of the polished val-
          ues.

fitted.values: Predicted values from the fit.

residuals: Residuals from the fit.

    call: Call to the function.

       x: Matrix of independent variables.

       y: Vector of dependent variables.

       n: Number of observations or length of y.

   nfits: Number of different model specifications.

    lags: Time lags used in the x matrix, if a time series
          model.

    seed: Seed used in generating the random parameter
          starts.

best.model: Number of the best model based on GCV with
          cost=2.

_S_i_d_e _E_f_f_e_c_t_s_:

     This function does the bulk of the computation using a
     stand-alone FORTRAN program running in the UNIX shell.
     This operation is transparent to the user. For large
     problems the input files can be setup using this func-
     tion and the fitting program can be run separately in
     the background.

_R_e_f_e_r_e_n_c_e_s_:

     S. Ellner, D.W. Nychka, and A.R. Gallant. 1992. LENNS,
     a program to estimate the dominant Lyapunov exponent of
     noisy nonlinear systems from time series data. Insti-
     tute of Statistics Mimeo Series #2235, Statistics
     Department, North Carolina State University, Raleigh,
     NC 27695-8203.

     D.W. Nychka, S. Ellner, D. McCaffrey, and A.R. Gallant.
     1992. Finding Chaos in Noisy Systems. J. R. Statist.
     Soc. B 54:399-426.

_S_e_e _A_l_s_o_:

     predict.nnreg, predict.netfit, plot.nnreg, sum-
     mary.nnreg, print.nnreg

_E_x_a_m_p_l_e_s_:

     nnreg(ozone$x,ozone$y,1,2) -> fit # fitting a surface to ozone
     # measurements, from 1 to 2 hidden units
     plot(fit) # plots fit and residuals

     nnreg(as.matrix(BD[,1:4]),BD[,5],2,4) -> fit # fitting DNA strand
     # displacement amplification surface to various buffer compositions
     plot(fit) # plots fit and residuals

