Giter VIP home page Giter VIP logo

Comments (3)

mark-mediware avatar mark-mediware commented on August 15, 2024

@wiekern Not sure if it helps you, but I had similar errors and was pretty stuck. After some basic data analysis, I realized I had a few input variables with very limited distribution across groups (ex. Binary age bin with 10,000 rows = 0, and 5 rows = 1). After removing these variables/features, I had no errors.

Again, not sure if that's applicable to you, but was my (embarrassing ) issue.

from pymatch.

wiekern avatar wiekern commented on August 15, 2024

Thanks for your answer!
The distribution might not be the problem, that was my view. I am wondering if the regression model supports input with string like in my case column of "text". I am think of I must be convert text into a numeric value or word embeddings (vector).

from pymatch.

umangdadhaniya avatar umangdadhaniya commented on August 15, 2024

model = sm.logit('Result ~ Year + Amount_Spent + Popularity_Rank', data = train_data).fit()
Traceback (most recent call last):

File "", line 1, in
model = sm.logit('Result ~ Year + Amount_Spent + Popularity_Rank', data = train_data).fit()

File "C:\Users\UMANG\anaconda3\lib\site-packages\statsmodels\discrete\discrete_model.py", line 1963, in fit
bnryfit = super().fit(start_params=start_params,

File "C:\Users\UMANG\anaconda3\lib\site-packages\statsmodels\discrete\discrete_model.py", line 227, in fit
mlefit = super().fit(start_params=start_params,

File "C:\Users\UMANG\anaconda3\lib\site-packages\statsmodels\base\model.py", line 519, in fit
xopt, retvals, optim_settings = optimizer._fit(f, score, start_params,

File "C:\Users\UMANG\anaconda3\lib\site-packages\statsmodels\base\optimizer.py", line 215, in _fit
xopt, retvals = func(objective, gradient, start_params, fargs, kwargs,

File "C:\Users\UMANG\anaconda3\lib\site-packages\statsmodels\base\optimizer.py", line 327, in _fit_newton
callback(newparams)

File "C:\Users\UMANG\anaconda3\lib\site-packages\statsmodels\discrete\discrete_model.py", line 211, in _check_perfect_pred
raise PerfectSeparationError(msg)

PerfectSeparationError: Perfect separation detected, results not available

model = sm.logit('Result ~ Year + Amount_Spent + Popularity_Rank', data = train_data).fit()
Traceback (most recent call last):

File "", line 1, in
model = sm.logit('Result ~ Year + Amount_Spent + Popularity_Rank', data = train_data).fit()

File "C:\Users\UMANG\anaconda3\lib\site-packages\statsmodels\discrete\discrete_model.py", line 1963, in fit
bnryfit = super().fit(start_params=start_params,

File "C:\Users\UMANG\anaconda3\lib\site-packages\statsmodels\discrete\discrete_model.py", line 227, in fit
mlefit = super().fit(start_params=start_params,

File "C:\Users\UMANG\anaconda3\lib\site-packages\statsmodels\base\model.py", line 519, in fit
xopt, retvals, optim_settings = optimizer._fit(f, score, start_params,

File "C:\Users\UMANG\anaconda3\lib\site-packages\statsmodels\base\optimizer.py", line 215, in _fit
xopt, retvals = func(objective, gradient, start_params, fargs, kwargs,

File "C:\Users\UMANG\anaconda3\lib\site-packages\statsmodels\base\optimizer.py", line 327, in _fit_newton
callback(newparams)

File "C:\Users\UMANG\anaconda3\lib\site-packages\statsmodels\discrete\discrete_model.py", line 211, in _check_perfect_pred
raise PerfectSeparationError(msg)

PerfectSeparationError: Perfect separation detected, results not available

from pymatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.