Skip to content

Commit

Permalink
Merge branch 'master' into haskell
Browse files Browse the repository at this point in the history
  • Loading branch information
izeigerman committed Apr 23, 2020
2 parents 6163e00 + dcd62f4 commit 8260ebc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions m2cgen/assemblers/svm.py
Expand Up @@ -150,11 +150,11 @@ def _rbf_kernel(self, support_vector):
return ast.ExpExpr(kernel)

def _sigmoid_kernel(self, support_vector):
kernel = self._linear_kernel_with_gama_and_coef(support_vector)
kernel = self._linear_kernel_with_gamma_and_coef(support_vector)
return ast.TanhExpr(kernel)

def _poly_kernel(self, support_vector):
kernel = self._linear_kernel_with_gama_and_coef(support_vector)
kernel = self._linear_kernel_with_gamma_and_coef(support_vector)
return ast.PowExpr(kernel, ast.NumVal(self.model.degree))

def _linear_kernel(self, support_vector):
Expand All @@ -164,7 +164,7 @@ def _linear_kernel(self, support_vector):
]
return utils.apply_op_to_expressions(ast.BinNumOpType.ADD, *elem_wise)

def _linear_kernel_with_gama_and_coef(self, support_vector):
def _linear_kernel_with_gamma_and_coef(self, support_vector):
kernel = self._linear_kernel(support_vector)
kernel = utils.mul(self._gamma_expr, kernel)
return utils.add(kernel, ast.NumVal(self.model.coef0))
Expand Down

0 comments on commit 8260ebc

Please sign in to comment.