simulation               package:kknn               R Documentation

_C_r_o_s_s_v_a_l_i_d_a_t_i_o_n _p_r_o_c_e_d_u_r_e _t_o _t_e_s_t _p_r_e_d_i_c_t_i_o_n _a_c_c_u_r_a_c_y

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

     'simulation' tests prediction accuracy of regression and/or
     classification techniques via simulation  of different test sets.

_U_s_a_g_e:

     simulation(formula, data, runs = 10, train = TRUE, k = 11, ...)

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

 formula: A formula object.

    data: Matrix or data frame. 

    runs: Number of crossvalidation runs. 

   train: A logical value. If TRUE the training procedure for selecting
          optimal values of k and kernel is performed.

       k: Number or maximal number of neighbors considered, dependent
          of choice for train.

     ...: Further arguments passed to or from other methods.

_V_a_l_u_e:

     A matrix, containing the mean and variance of the
     misclassification error, the absolute and the squared distances.

_A_u_t_h_o_r(_s):

     Klaus P. Schliep K.P.Schliep@massey.ac.nz

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

     Hechenbichler K. and Schliep K.P. (2004)  _Weighted
     k-Nearest-Neighbor Techniques and Ordinal Classification_,
     Discussion Paper 399, SFB 386, Ludwig-Maximilians University
     Munich (<URL:
     http://www.stat.uni-muenchen.de/sfb386/papers/dsp/paper399.ps>)

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

     'kknn' and 'train.kknn'

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

     library(kknn)
     data(miete)
     simulation(nmqm ~ wfl + bjkat + zh, data = miete, runs = 5, kernel = "triangular", k = 15)
     simulation(wflkat ~ nm + bjkat + zh, data = miete, runs = 5)
     simulation(zh ~ wfl + bjkat + nmqm, data = miete, runs = 5)

