You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is somewhat related to #111; I think the fix for that may have resulted in a new bug: It is now suddenly important to provide the "type" key as the first item in the dictionary. However typical Python dictionaries do not have a way of making something the first item reliably because they're unordered. The following does not work in most cases:
import numpy as np
import xcsf
import json
model = xcsf.XCS(max_trials=10, condition={"args": {"spread_min": 0.5}, "type" : "hyperrectangle_csr"})
pop = json.loads(model.json())["classifiers"]
spreads = [rule["condition"]["spread"][0] for rule in pop]
print(np.min(spreads))
Note that the last three lines of code are not even reached because the whole Python process gets killed by the No condition type has been specified: cannot set params error. Is that intended? (This may be a separate issue, though.)
The text was updated successfully, but these errors were encountered:
Yes, I think it should terminate running if there is an obvious parameter error to make sure it's running exactly as requested (normally throwing an exception would be best, but the current way the C library is built and linked means getting that back up to Python needs some thought - it does do it in some places - and needs to be done in multiple locations not just here) -- I have created issue #115 to deal with this.
This is somewhat related to #111; I think the fix for that may have resulted in a new bug: It is now suddenly important to provide the
"type"
key as the first item in the dictionary. However typical Python dictionaries do not have a way of making something the first item reliably because they're unordered. The following does not work in most cases:Note that the last three lines of code are not even reached because the whole Python process gets killed by the
No condition type has been specified: cannot set params
error. Is that intended? (This may be a separate issue, though.)The text was updated successfully, but these errors were encountered: