question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ZeroInflatedRegressor with AttributeError

See original GitHub issue

Hello,

I was following this tutorial on zero-inflated regression by Dr. Kübler https://towardsdatascience.com/zero-inflated-regression-c7dfc656d8af and got this attribute error AttributeError: ‘ZeroInflatedRegressor’ object has no attribute ‘_check_n_features’

This is the line of code which caused it: zir.fit(dataset[['Age']], dataset.Salary)

Thank you. Vee

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
veeAcommented, Aug 11, 2022

I originally installed the newest version (0.6.12) -> that’s when I had the error. Ended up reverting to 0.6.6 and it worked fine.

However I just reinstalled the newest version and it works fine this time. Maybe it’s something with dependencies or libraries, I’m not sure.

Thanks for the help again.

0reactions
koaningcommented, Aug 11, 2022

Could you share the Python versions? If the issue persists in the newer version we’d still be interested in fixing it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix an error with zero-inflated Poisson regression
pscl 's default behaviour is to use the same formula for both the zero-inflated and the count (conditional) part of the model.
Read more >
Zero-Inflated Regression. Teach your regressor how to output…
If a data point goes into the model, the classifier first checks if the output should be zero. If yes, output zero. Otherwise,...
Read more >
Zero and One inflated Beta Distribution - PyMC Discourse
Hi, General problem statement – I'm trying to predict terminal conversion rates for cohorts that take a while to mature based on their...
Read more >
Source code for statsmodels.miscmodels.count
... added offset and zero-inflated version of Poisson - kind of ok, ... TODO: why would this be ValueError instead of AttributeError?
Read more >
Zero-inflated Poisson Regression | Stata Data ... - OARC Stats
Zero -inflated poisson regression is used to model count data that has an excess of zero counts. Further, theory suggests that the excess...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found