New answers tagged

0

A friend of mine answered on this question in different social media on different language, I'll post his answer here: 1. scaler should be saved in this case. You do fit_transform in the example the second time you run it, but you should just transform. Scaler should be "fit" once on data train and not change it afterwards. Then you will get 5 in ...


1

you need to define how many time steps you want to have in each time series block. then for each unique patient, you need to create these blocks so the training set going to be a 3D matrix, and the dimensions are: number of blocks * number of time steps * number of features in addition to time series data, you can also add another head to feed NN with the ...


0

Conceptually, the sound of dropping a metal chain on the floor is different from the sound of dropping the separated links of that chain. Feedforward NN In a feed forward neural network all of sequential features would be consumed independently: $f(x)=WX+b=w_1x_1+..+w_nx_n+b$ This is all good, as far as you’re ready to sacrifice the step-wise dependency ...


0

You don't need to do the n-gram creation for an RNN like you're showing. The point of Neural Language modeling with RNN/LSTM is to avoid having to make the Markov assumptions you state. To use an RNN, you just feed the whole sentence as-is to the RNN as a sequence, and as a target, you feed a sequence with each word from the input shifted one to the right. ...


2

I am not sure this type of model is a good use case for the particular task. More specifically, citing Chollet from Deep Learning with Python book, Always remember that when it comes to markets, past performance is not a good predictor of future returns—looking in the rear-view mirror is a bad way to drive. Machine learning, on the other hand, is applicable ...


0

The last number 40 has nothing to do with the sequence length, its a hyper-parameter setting that is basically the length of the vector 'representation' of each token in the sequence. In this case , its 40 length. If you set it to 40 and use input embeddings of input 300-dimension (common if Glove), then the 300-dimensional word gets mapped to a 40-...


2

Of course that all weights are the same, but the update applied to the weights has a contribution from each of the timesteps, and the contribution associated with the first timesteps is what is more affected by the vanishing gradient problem.


1

50% is quite decent because you have five labels and random guessing model would have achieved only 20% accuracy. So you know your model is learning something. The other thing you want to check out is whether this is suited to be a regression problem more than classification. For e.g, misclassifying a 5 (ground truth) into a 4 is better than misclassifying ...


0

It's not severe overfitting. So, here is my suggestions: 1- Simplify your network! Maybe your network is too complex for your data. If you have a small dataset or features are easy to detect, you don't need a deep network. 2- Add Dropout layers. 3- Use weight regularization. Here is the link for further information: https://keras.io/api/layers/regularizers/


Top 50 recent answers are included