Traceback (most recent call last):
File "e:/repos/fes-cluster-model/src/demo_model.py", line 17, in <module>
ytrain = simulate_glm('poisson', beta0, beta, Xtrain)[:, 0]
File "E:\Software\Anaconda\lib\site-packages\pyglmnet\pyglmnet.py", line 390, in simulate_glm
raise ValueError("'beta0' must be float, got %s" % type(beta0))
ValueError: 'beta0' must be float, got <class 'numpy.ndarray'>
When fixing this by slicing the float out of the numpy array, another error complains that beta is a 2D array:
Traceback (most recent call last):
File "e:/repos/fes-cluster-model/src/demo_model.py", line 17, in <module>
ytrain = simulate_glm('poisson', beta0, beta, Xtrain)[:, 0]
File "E:\Software\Anaconda\lib\site-packages\pyglmnet\pyglmnet.py", line 393, in simulate_glm
raise ValueError("'beta' must be 1D, got %dD" % beta.ndim)
ValueError: 'beta' must be 1D, got 2D
Flattening the array leads to another error:
Traceback (most recent call last):
File "e:/repos/fes-cluster-model/src/demo_model.py", line 17, in <module>
ytrain = simulate_glm('poisson', beta0, beta, Xtrain)[:, 0]
IndexError: too many indices for array
It then seems to run if you remove the slicing when generating ytrain and ytest.
Issue
Running the current brief example generates an error:
When fixing this by slicing the float out of the numpy array, another error complains that
beta
is a 2D array:Flattening the array leads to another error:
It then seems to run if you remove the slicing when generating
ytrain
andytest
.Version info
python 3.6.2 pyglmnet 1.1 numpy 1.18 scipy 1.1 sklearn 0.18.1