I am trying to calculate value of decision function for 4 classification problem. So, calculate sv, which are 178. Then checked the size of sv_coef(alpha*y), which is coming as [178 3], actually I read a related question in which size of sv_coef must be [178 1]. Another thing is size of model.rho i.e. b is [6 1]. Then how can i calculate decision function value for z, which is sum(sv_coef * k( sv, z) )- b. It is dimension miss match problem. I don't know where I am doing mistake. z:test instance.