onlearn-class            package:kernlab            R Documentation

_C_l_a_s_s "_o_n_l_e_a_r_n"

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

     The class of objects used by the Kernel-based Online learning
     algorithms

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'new("onlearn", ...)'.
     or by calls to the function 'inlearn'.

_S_l_o_t_s:

     '_k_e_r_n_e_l_f': Object of class '"function"' containing the used kernel
          function

     '_b_u_f_f_e_r': Object of class '"numeric"' containing the size of the
          buffer

     '_k_p_a_r': Object of class '"list"' containing the hyperparameters of
          the kernel function.

     '_x_m_a_t_r_i_x': Object of class '"matrix"' containing the data points
          (similar to support vectors) 

     '_f_i_t': Object of class '"numeric"' containing the decision
          function value of the last data point

     '_o_n_s_t_a_r_t': Object of class '"numeric"' used for indexing 

     '_o_n_s_t_o_p': Object of class '"numeric"' used for indexing

     '_a_l_p_h_a': Object of class '"ANY"' containing the model parameters

     '_r_h_o': Object of class '"numeric"' containing model parameter

     '_b': Object of class '"numeric"' containing the offset

     '_p_a_t_t_e_r_n': Object of class '"factor"' used for dealing with
          factors

     '_t_y_p_e': Object of class '"character"' containing the problem type
          (classification, regression, or novelty 

_M_e_t_h_o_d_s:

     _a_l_p_h_a 'signature(object = "onlearn")': returns the model
          parameters

     _b 'signature(object = "onlearn")': returns the offset 

     _b_u_f_f_e_r 'signature(object = "onlearn")': returns the buffer size

     _f_i_t 'signature(object = "onlearn")': returns the last decision
          function value

     _k_e_r_n_e_l_f 'signature(object = "onlearn")': return the kernel
          function used

     _k_p_a_r 'signature(object = "onlearn")': returns the hyper-parameters
          used

     _o_n_l_e_a_r_n 'signature(obj = "onlearn")': the learning function

     _p_r_e_d_i_c_t 'signature(object = "onlearn")': the predict function

     _r_h_o 'signature(object = "onlearn")': returns model parameter

     _s_h_o_w 'signature(object = "onlearn")': show function

     _t_y_p_e 'signature(object = "onlearn")': returns the type of proplem

     _x_m_a_t_r_i_x 'signature(object = "onlearn")': returns the stored data
          points

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

     Alexandros Karatzoglou
      alexandros.karatzoglou@ci.tuwien.ac.at

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

     'onlearn', 'inlearn'

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

     ## create toy data set
     x <- rbind(matrix(rnorm(100),,2),matrix(rnorm(100)+3,,2))
     y <- matrix(c(rep(1,50),rep(-1,50)),,1)

     ## initialize onlearn object
     on <- inlearn(2,kernel="rbfdot",kpar=list(sigma=0.2),type="classification")

     ## learn one data point at the time
     for(i in sample(1:100,100))
     on <- onlearn(on,x[i,],y[i],nu=0.03,lambda=0.1)

     sign(predict(on,x))

