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
ZeroDivisionError: division by zero #15
Comments
Please see this issue: Looks like you need to limit the number of rounds that the model goes through or adjust criteria to cut out less. Basically, it is removing every feature. I'm going to close this, please open another issue if it persists or reach out to me directly. |
The issue went away when I converted the target (categorical) in to a set of dummy vars
On 17 Apr 2018, at 11:41, Chase DeHan <notifications@github.com<mailto:notifications@github.com>> wrote:
Please see this issue:
#9<#9>
Looks like you need to limit the number of rounds that the model goes through or adjust criteria to cut out less. Basically, it is removing every feature.
I'm going to close this, please open another issue if it persists or reach out to me directly.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#15 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AJqWqTdzk10WSM5gJoCaopTsbAjLNU7rks5tpg0kgaJpZM4TYIoc>.
|
Ahh, in your code you passed in 'logloss' as the metric. If you have a multiclass target, the only metric that will be accepted is 'mlogloss'. |
Doh, thank you!
On 17 Apr 2018, at 14:01, Chase DeHan <notifications@github.com<mailto:notifications@github.com>> wrote:
mlogloss
|
ZeroDivisionError Traceback (most recent call last)
in ()
1 br = BoostARoota(metric='logloss',delta=0.05)
----> 2 br.fit(all_feats,target_data);
~/anaconda2/envs/py3k/lib/python3.6/site-packages/boostaroota/boostaroota.py in fit(self, x, y)
51 max_rounds=self.max_rounds,
52 delta=self.delta,
---> 53 silent=self.silent)
54 return self
55
~/anaconda2/envs/py3k/lib/python3.6/site-packages/boostaroota/boostaroota.py in _BoostARoota(x, y, metric, clf, cutoff, iters, max_rounds, delta, silent)
224 n_iterations=iters,
225 delta=delta,
--> 226 silent=silent)
227 else:
228 crit, keep_vars = _reduce_vars_sklearn(new_x,
~/anaconda2/envs/py3k/lib/python3.6/site-packages/boostaroota/boostaroota.py in _reduce_vars_xgb(x, y, metric, this_round, cutoff, n_iterations, delta, silent)
139 #Check for the stopping criteria
140 #Basically looking to make sure we are removing at least 10% of the variables, or we should stop
--> 141 if (len(real_vars['feature']) / len(x.columns)) > (1-delta):
142 criteria = True
143 else:
ZeroDivisionError: division by zero
The text was updated successfully, but these errors were encountered: