softmax                 package:mda                 R Documentation

_i_d_e_n_t_i_f_y _t_h_e _m_a_x_i_m_u_m _i_n _e_a_c_h _r_o_w _o_f _a _m_a_t_r_i_x

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

     softmax(x, gap = F)

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

       x: a matrix of mode numeric

     gap: if `TRUE', the difference between the largest and next
          largest column is returned.

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

     A factor with levels the column labels of `x' and values the
     columns corresponding to the maximum column. If `gap = TRUE' a
     list is returned, the second component of which is the difference
     between the largest and next largest column of `x'.

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

     `predict.fda', `confusion', `fda'

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

     data(iris)
     irisfit <- fda(Species ~ ., data = iris)
     posteriors <- predict(irisfit, type = "post")
     confusion(softmax(posteriors), iris[, "Species"])

