Post

PythonPython

S
Swetha Shetty

Posted on 19th April 2024|49 views

0
votes

Keyword Can't Be An Expression

How to resolve the error keyword can’t be an expression?

Whenever I am trying to call rpy2 function I am getting this error here is the code I am using

res = DirichletReg.ddirichlet(np.asarray(my_values),alphas, 

log=False, sum.up=False) 

SyntaxError: keyword can't be an expression

 

Answers
P
cayrel rings

Posted on 19th April 2024

There is a very easy solution for this problem just by creating a dictionary by passing parameters to the model like this

params = {'C': 1e9, 'gamma': 1e-07} 

cls = SVC(**params)

 

Write your answer

STILL GOT QUERIES?

Get a Live FREE Demo
  • Explore the trending and niche courses and learning maps
  • Learn about tuition fee, payment plans, and scholarships
  • Get access to webinars and self-paced learning videos