Skip to content
Snippets Groups Projects
Commit 71a6ff64 authored by Luc Giffon's avatar Luc Giffon
Browse files

ajoute commentaire pour possible normalisation avant noyau lineaire

parent 78d9356c
Branches
No related tags found
No related merge requests found
...@@ -26,6 +26,8 @@ def tf_rbf_kernel(X, Y, gamma): ...@@ -26,6 +26,8 @@ def tf_rbf_kernel(X, Y, gamma):
def tf_linear_kernel(X, Y): def tf_linear_kernel(X, Y):
# X = tf.nn.l2_normalize(X, axis=-1)
# Y = tf.nn.l2_normalize(Y, axis=-1)
return tf.matmul(X, tf.transpose(Y)) return tf.matmul(X, tf.transpose(Y))
def tf_polynomial_kernel(X, Y, degree=2, gamma=None, **kwargs): def tf_polynomial_kernel(X, Y, degree=2, gamma=None, **kwargs):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment