What choices of losses are there for an LSTM autoencoder?
Other than Mean Squared Error (MSE), is there a possibility of using anything else?
If yes, can you please link me to a keras (tf backend) implementation or provide me with one?
Thanks in advance.
If the dataset is highly-imbalanced, using "Median frequency class weighting" as the loss function other than MSE reconstruction loss is recommended.
The following links should help too:
https://datascience.stackexchange.com/questions/13490/how-to-set-class-weights-for-imbalanced-classes-in-keras
https://github.com/keras-team/keras/issues/3653
Related
I have been trying to figure this out for some time but i am still a bit unsure. Does the PyTorch pre-trained VGG-16 (torchvision model) have exactly the same weights as the MATLAB pre-trained VGG-16?
If you are interested to find out, just take the norm of the weights in both libraries. I think they should be same.
I'm approaching a 4 class classification problem, it's not particularly unbalanced, no missing features a lot of observation.. It seems everything good but when I approach the classification with fitcecoc it classifies everything as part of the first class. I try. to use fitclinear and fitcsvm on one vs all decomposed data but gaining the same results. Do you have any clue about the reason of that problem ?
Here are a few recommendations:
Have you normalized your data? SVM is sensitive to the features being
from different scales.
Save the mean and std you obtain during the training and use
those values during the prediction phase for normalizing the test
samples.
Change the C value and see if that changes the results.
I hope these help.
I've used Matlab Classification Learner App to train my SVM classifier and i have 99.9% of accuracy in prediction (i tested it with the function predict on matlab). What i wanted to do now was to predict without usind this function but using the hyperplane. I exported the trained classifier and so i have all the weights and the bias to find the hyperplane. Which formula should i use to predict new data? I tryed computing the sign of w'x but it works only in few cases. Can you help me understand what should i do?
Thanks a lot!
Does anyone know the default activation function used in the recurrent layers in Keras? https://keras.io/layers/recurrent/
It says the default activation function is linear. But what about the default recurrent activation function. Nothing is mentioned about that. Any help would be highly appreciated.
Thanks in advance
Keras Recurrent is an abstact class for recurrent layers. In Keras 2.0 all default activations are linear for all implemented RNNs (LSTM, GRU and SimpleRNN). In previous versions you had:
linear for SimpleRNN,
tanh for LSTM and GRU.
https://github.com/keras-team/keras/blob/master/keras/layers/recurrent.py#L2081
It mentions tanh here for version 2.3.0 :-)
In the lectures we only mention how to train the RBF network with Gausian function and how to use the "newrb" tool box in Matlab. But in the assignemnet I need to create my own RBF network which using the NN toolbox is forbidden. Basically I not even know how to start it and our professor not willing to provide any information.
With some tips I have write my own program but the performance is very bad, I am wonder if any one can give me some helpful tutorial or guides that how to create the RBF network with Gaussian function without using NN toolbox.
I have used k-means to obtain the centers and gaussian function to caculuate the weights, the main probrlem is that I have no idea how to design the method that transform the Input matrix to the RBF matrix. Hope you can help.
This is clearly homework, and it's not clear what your question is. But I think you are wondering how to create the Gram matrix. If so, see:
http://en.wikipedia.org/wiki/Gramian_matrix
You should have the math for how to do each step in your textbook and/or notes.