-1

Hello I am trying to implement SVM by using cosine kernel but I can't undertand how I can do this..

What i thought it was the following, but i think its wrong

svmCosine = cosine_similarity(train_X, train_y)
svmCosine.fit(train_X, train_y)

Could someone help?

Alexander L. Hayes
  • 3,892
  • 4
  • 13
  • 34
gma
  • 1

1 Answers1

0

I think that the answer to my question is the following

svmCosine= svm.SVC(kernel = cosine_similarity(train_X, train_y))
svmCosine.fit(train_X, train_y)
Dharman
  • 30,962
  • 25
  • 85
  • 135
gma
  • 1