Код: Выделить всё
| ln_q | ln_p | .... weather variables ... | ... instruments ... |... user id dummies ...|Используя линейные модели IV2SLS, я настроил свою модель следующим образом:
Код: Выделить всё
dependent = ln_qКод: Выделить всё
endog = weather variables + user id dummiesКод: Выделить всё
exog = ln_pКод: Выделить всё
instruments = instrumentsКод: Выделить всё
results = IV2SLS(dependent, endog, exog, instruments).fit()Код: Выделить всё
Unable to allocate 27.8GiB of memory to an array with shape (202507, 18450) and data type float64Я пытался обойти эту проблему, передав свои собственные веса:
Код: Выделить всё
results = IV2SLS(dependent, endog, exog, instruments, weights=np.ones(dependent.shape, dtype=np.float32)).fit()Почему в этом процессе массив размером ~16 ГБ использует >100 ГБ ОЗУ?
Что я могу сделать, чтобы запустить эту регрессию?
Подробнее здесь: https://stackoverflow.com/questions/786 ... mory-error