change all "lambda" to "lambda_"
in distribution.cpp for only
geometric distribution
adjust geometric distribution
test to use "lambda_" keyword
Description
When running GaussianNB class in the PyDP_Naive_Bayes.ipynb file, the following error appears:
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
1. pydp.GeometricDistribution(lambda: float)
Invoked with: kwargs: lambda_=0.020202707317519466
This is because, the GeometricDistribution supposed to take in lambda, and not lambda_. However, the word lambda in Python refers to the lambda function; therefore, GeometricDistribution has been adjusted to accept lambda_ instead of lambda (see src/bindings/PyDP/algorithms/distributions.cpp). Test file has also been adjusted (see /tests/algorithms/test_distributions.py)
Affected Dependencies
GeometricDistribution has been adjusted to accept lambda_ instead of lambda.
How has this been tested?
Has been tested in the notebook PyDP_Naive_Bayes.ipynb
Description
When running
GaussianNB
class in thePyDP_Naive_Bayes.ipynb
file, the following error appears:This is because, the
GeometricDistribution
supposed to take inlambda
, and notlambda_
. However, the wordlambda
in Python refers to the lambda function; therefore,GeometricDistribution
has been adjusted to acceptlambda_
instead oflambda
(seesrc/bindings/PyDP/algorithms/distributions.cpp
). Test file has also been adjusted (see/tests/algorithms/test_distributions.py
)Affected Dependencies
GeometricDistribution
has been adjusted to acceptlambda_
instead oflambda
.How has this been tested?
Has been tested in the notebook
PyDP_Naive_Bayes.ipynb
Checklist