Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lambda variable in softmax #3422

Closed
wants to merge 7 commits into from
Closed

Conversation

theshoonyam
Copy link
Contributor

In softmax regression, lambda variable conflicts with that of lambda function in python bindings. Hence writing the code in python results to this output:

model = mlpack.softmax_regression(training=inputdata,labels=labels,number_of_classes=2,max_iterations=100,lambda=0.0001) File "<stdin>", line 1 model = mlpack.softmax_regression(training=inputdata,labels=labels,number_of_classes=2,max_iterations=100,lambda=0.0001) ^^^^^^ SyntaxError: invalid syntax

I have changed the variable name to lambdas to fix the same.

@rcurtin
Copy link
Member

rcurtin commented Feb 17, 2023

The parameter is automatically renamed lambda_ when the Python bindings are built and the documentation accordingly calls the parameter lambda_: https://www.mlpack.org/doc/stable/python_documentation.html#softmax_regression

See also #3302.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants