bulbea
bulbea copied to clipboard
missing 1 required positional argument: 'units' ann.py rnn
Hi, I have been trying to set this up and I receive this error after running the script in the readme. Please let me know how to fix; I am not very familiar with python. Thanks!
File "main.py", line 16, in
The whole script:
import bulbea as bb share = bb.Share('WIKI', 'GOOGL') share.data
from bulbea.learn.evaluation import split Xtrain, Xtest, ytrain, ytest = split(share, 'Close', normalize = True)
import numpy as np Xtrain = np.reshape(Xtrain, (Xtrain.shape[0], Xtrain.shape[1], 1)) Xtest = np.reshape(Xtest, (Xtest.shape[0], Xtest.shape[1], 1))
from bulbea.learn.models import RNN rnn = RNN([1, 100, 100, 1]) # number of neurons in each layer rnn.fit(Xtrain, ytrain)
from sklearn.metrics import mean_squared_error p = rnn.predict(Xtest) mean_squared_error(ytest, p)
import matplotlib.pyplot as pplt pplt.plot(ytest) pplt.plot(p) pplt.show()
Hi, I met the same problem as u. I have tried many methods to solve it but I failed. Did u solve it finally?
I had the same issue. I was able to work around it by modifying the ann.py script.
I changes all occurrences of output_dim
to units
.
Then you have to reinstall bulbea by running python setup.py install