We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
spread_min
hyperectangle_csr
The spread_min setting is somehow not respected. For example,
import xcsf import json model = xcsf.XCS(max_trials=10, condition={"args": {"spread_min": 0.5}}) pop = json.loads(model.json())["classifiers"] spreads = [rule["condition"]["spread"][0] for rule in pop] print(np.min(spreads))
prints 0.10028… but I would expect this to be a number greater than 0.5.
Interestingly, the spread_min does not get propagated to the internal_params upon initialization
internal_params
print(model.get_params()["condition"]["args"]["spread_min"]) # 0.5 print(model.internal_params()["condition"]["args"]["spread_min"]) # 0.1
and also not after during fitting
import numpy as np X = np.random.random((100, 1)) y = np.random.random(100) model.fit(X, y) print(model.internal_params()["condition"]["args"]["spread_min"]) # 0.1
Since eta is not propagated through either, this may have something to do with the nested dict in the condition parameter?
eta
dict
condition
model = xcsf.XCS(max_trials=10, condition={"args": {"eta": 0.5}}) print(model.get_params()["condition"]["args"]["eta"]) # 0.5 print(model.internal_params()["condition"]["args"]["eta"]) # 0
The text was updated successfully, but these errors were encountered:
I believe this is because the condition dict doesn't include the type: if you use the following it will set the parameters:
model = xcsf.XCS(max_trials=10, condition={"type": "hyperrectangle_csr", "args": {"spread_min": 0.5}})
Sorry, something went wrong.
So probably there should be some better input checking to test for this...
Thank you!
Successfully merging a pull request may close this issue.
The
spread_min
setting is somehow not respected. For example,prints 0.10028… but I would expect this to be a number greater than 0.5.
Interestingly, the
spread_min
does not get propagated to theinternal_params
upon initializationand also not after during fitting
Since
eta
is not propagated through either, this may have something to do with the nesteddict
in thecondition
parameter?The text was updated successfully, but these errors were encountered: