Comments (3)
@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.
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.
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)
- KeyError: 'weight' in method assign_weight_vector HOT 1
- compare_continuous doesn't work, and compare_categorical get all predictors HOT 4
- Can I create age-matched control groups with this package?
- Error in Example.ipynb "ValueError: negative dimensions are not allowed" HOT 3
- drop_static_cols actually drops a column and breaks fit_scores()
- Exclusion Features - Shouldn't they be allowed to be NULL?
- Next steps after matching
- m.predict_scores() - list index out of range error HOT 1
- errors for continuous_results
- m.fit_scores HOT 1
- Fitting Models on Balanced Samples: 1\100Error: Unable to coerce to Series, length must be 1: given 158
- Matcher can not use spark data frame
- Example Loan data for replication
- record_id HOT 1
- How to keep track of dropped data when matching?
- Dived a data set based on PS
- Meaning of `nmodels` unclear
- Can pymatch be used for a dataset in long format?
- Is pymatch dead? HOT 2
- Citation guide? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymatch.