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

Error #2

Open
ukamath opened this issue Dec 17, 2020 · 1 comment
Open

Error #2

ukamath opened this issue Dec 17, 2020 · 1 comment

Comments

@ukamath
Copy link

ukamath commented Dec 17, 2020

uday:BOA uday.kamath$ python ./example.py
/Users/uday.kamath/anaconda/lib/python3.6/site-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release.
from numpy.core.umath_tests import inner1d
Took 8.330s to generate 18860 rules
Screening rules using information gain
/Users/uday.kamath/BOA/BOAmodel.py:110: RuntimeWarning: divide by zero encountered in log
cond_entropy = -pp*(p1np.log(p1)+(1-p1)np.log(1-p1))-(1-pp)(p2np.log(p2)+(1-p2)np.log(1-p2))
/Users/uday.kamath/BOA/BOAmodel.py:110: RuntimeWarning: invalid value encountered in multiply
cond_entropy = -pp
(p1np.log(p1)+(1-p1)np.log(1-p1))-(1-pp)(p2np.log(p2)+(1-p2)np.log(1-p2))
/Users/uday.kamath/BOA/BOAmodel.py:112: RuntimeWarning: divide by zero encountered in log
cond_entropy[p2
(1-p2)==0] = -(pp*(p1np.log(p1)+(1-p1)np.log(1-p1)))[p2(1-p2)==0]
/Users/uday.kamath/BOA/BOAmodel.py:112: RuntimeWarning: invalid value encountered in multiply
cond_entropy[p2
(1-p2)==0] = -(pp*(p1*np.log(p1)+(1-p1)np.log(1-p1)))[p2(1-p2)==0]
Took 1.395s to generate 2000 rules
Computing sizes for pattern space ...
Took 0.001s to compute patternspace
No or wrong input for alpha_l and beta_l. The model will use default parameters!
Traceback (most recent call last):
File "./example.py", line 39, in
rules = model.SA_patternbased(Niteration,Nchain,print_message=True)
File "/Users/uday.kamath/BOA/BOAmodel.py", line 162, in SA_patternbased
rules_new, rules_norm = self.propose(rules_curr.copy(), rules_curr_norm.copy(),q)
File "/Users/uday.kamath/BOA/BOAmodel.py", line 193, in propose
ex = sample(incorr,1)[0]
File "/Users/uday.kamath/anaconda/lib/python3.6/random.py", line 313, in sample
raise TypeError("Population must be a sequence or set. For dicts, use list(d).")

@ukamath
Copy link
Author

ukamath commented Dec 17, 2020

resolved it by adding list()

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

No branches or pull requests

1 participant