Closed denizkenankilic closed 5 years ago
@denizkenankilic things are very well thanks. Whenever in doubt, it's a good practice to run your model as a stand-alone Keras model first. Oftentimes it ends up that the issue is with the input model.
Closing here. Feel free to open new issue if anything.
Accuracy is only used for classification tasks. See here
Thanks for your response, so which metrics do I need to use for training part? In many lstm modeling examples (not classification examples), people are using accuracy. Should I look only loss values?
@denizkenankilic things are very well thanks. Whenever in doubt, it's a good practice to run your model as a stand-alone Keras model first. Oftentimes it ends up that the issue is with the input model.
Closing here. Feel free to open new issue if anything.
I tried stand-alone Keras model, it gives good accuracy results for training part. Actually I am not sure that in Scan command, which usage is correct (xx and yy were created in the same way as others, but they are the whole data set):
ta.Scan(x=trainX, y=trainY, x_val=testX, y_val=testY,...
or
ta.Scan(x=xx, y=yy, x_val=testX, y_val=testY,
where
trainX --> (6850, 10 ,2)
trainY --> (6850, )
testX -->(2960, 10 ,2)
testY --> (2960, )
xx --> (9820, 10 ,2)
yy --> (9820,)
@mikkokotila Thanks.
Preferred way is ta.Scan(x=trainX, y=trainY, x_val=testX, y_val=testY)
because it supports all use-cases, where as the other does not.
Hi again, I hope everything is well.
Actually I am new to Talos and as I stated before I am trying to model financial data by using LSTM model. My talos version is 0.5.0
I have 2 columns data with 9830 observations (c1 and c2, daily closing prices data for DAX and NASDAQ respectively) and I am trying to use LSTM model. I want to use both DAX and NASDAQ data in order to forecast DAX data. I want to use Talos to get best hyperparameters.
I divided dataset into training and test as (6860,2) and (2970,2) respectively. Afterwards, I prepared trainX (6850,10,2), trainY (6850,) and testX (2960,10,2), testY (2960,) datasets where time step is 10 in order to create datasets for LSTM type. trainX includes both DAX and NASDAQ, trainY includes NASDAQ (same for test data). I normalized each data between 0 and 1. Size of each data: trainX --> (6850, 10 ,2) trainY --> (6850, ) testX -->(2960, 10 ,2) testY --> (2960, )
After I have defined parameters and created a sequential model, I used Scan function. However for each round accuracy and val_acc are almost zero, they are not raising. I am sharing my codes and results. Is it about data shapes or data parts? If is it the case could you please help me about how to use data shapes to get a right accuracy results?
[ ] My support question includes an input model
Scan()
command scan_object = ta.Scan(x=trainX, y=trainY, x_val=testX, y_val=testY, model=create_model, params=p, dataset_name='finance', experiment_no='1',print_params=True,
def build_timeseries(mat, y_col_index): """ Converts ndarray into timeseries format and supervised data format. Takes first TIME_STEPS number of rows as input and sets the TIME_STEPS+1th data as corresponding output and so on. :param mat: ndarray which holds the dataset :param y_col_index: index of column which acts as output (here close prices) :return: returns two ndarrays-- input and output in format suitable to feed to LSTM. """
total number of time-series samples would be len(mat) - TIME_STEPS