EconML
EconML copied to clipboard
StatsModelsLinearRegression needs check_input
If the numpy arrays passed are of type object and not float, then an exception is thrown in param, _, rank, _ = np.linalg.lstsq(WX, wy, rcond=None)
Simple reproduction:
from econml.sklearn_extensions.linear_model import StatsModelsLinearRegression
from sklearn.linear_model import LinearRegression
import numpy as np
X = np.random.normal(size=(100,5)).astype('O')
y = np.random.normal(size=100)
LinearRegression().fit(X,y)
StatsModelsLinearRegression().fit(X,y)