Author: Not specified Language: python
Description: (v3) Timestamp: 2018-05-21 03:08:29 +0000
View raw paste Parent paste by: Not specified - Child paste by: Not specified Reply
  1. def decision_function(alphas,data,b,X_Test):
  2.    
  3.     # The following is the loop function.
  4.     sum = 0
  5.     for i in range(len(data)):
  6.         sum += alphas[i] * data[i,2] * gaussian_kernel(data[i,0:2],X_Test)
  7.    
  8.     f_x = sum + b
  9.     return f_x
  10.  
View raw paste Parent paste by: Not specified - Child paste by: Not specified Reply