Autoencoder for Dimensionality ReductionBehavioral Differences between Standard Autoencoder and Variational...
Why is mind meld hard for T'pol in Star Trek: Enterprise?
Who is this Ant Woman character in this image alongside the Wasp?
Is it a fallacy if someone claims they need an explanation for every word of your argument to the point where they don't understand common terms?
CREATE ASSEMBLY System.DirectoryServices.AccountManagement.dll without enabling TRUSTWORTHY
Why is working on the same position for more than 15 years not a red flag?
Do authors have to be politically correct in article-writing?
How to prevent users from executing commands through browser URL
How to count the characters of jar files by wc
awk + sum all numbers
What is the lore based reason that the Spectator has the Create Food and Water trait, instead of simply not requiring food and water?
Advice for a new journal editor
what does しにみえてる mean?
Porting Linux to another platform requirements
Intern applicant asking for compensation equivalent to that of permanent employee
Why publish a research paper when a blog post or a lecture slide can have more citation count than a journal paper?
Why do neural networks need so many training examples to perform?
How can my powered armor quickly replace its ceramic plates?
Can I string the D&D Starter Set campaign into another module, keeping the same characters?
Early credit roll before the end of the film
Can an insurance company drop you after receiving a bill and refusing to pay?
How would an AI self awareness kill switch work?
Pronunciation of umlaut vowels in the history of German
If I delete my router's history can my ISP still provide it to my parents?
Can I write a book of my D&D game?
Autoencoder for Dimensionality Reduction
Behavioral Differences between Standard Autoencoder and Variational AutoencoderRetain similarity distances when using an autoencoder for dimensionality reductionKeras LSTM: use weights from Keras model to replicate predictions using numpyautoEncoder as LSTM input, any benefit?How to set input for proper fit with lstm?Why is predicted rainfall by LSTM coming negative for some data points?What does SpatialDropout1D() do to output of Embedding() in Keras?Understanding LSTM structureAutoencoder Dimensionality ErrorLSTM sequence prediction: 3d input to 2d output
$begingroup$
My task is to reduce the features of my temporal sequence. Each input is of the shape (timesteps, features) = (240,117). I am using an autoencoder consisting of intermediate lstm layers and I am having difficulty for the same. I desire an output of shape (240,4).
The code for the same is
arr = x['Train_Data']
arr_list = []
for i in range(0,90):
arr_list.append(arr[0,i])
arr = np.dstack(arr_list)
arr = np.rollaxis(arr,-1)
samples = arr.shape[0]
timesteps = arr.shape[1]
features = arr.shape[2]
model = Sequential()
model.add(LSTM(30, activation='relu', return_sequences = True, input_shape=(timesteps,features)))
model.add(LSTM(10, activation='relu', return_sequences = True))
model.add(LSTM(4, activation='relu', return_sequences=True))
model.add(LSTM(10, activation='relu', return_sequences = True))
model.add(LSTM(30, activation='relu', return_sequences = True))
model.add(LSTM(117, activation='relu', return_sequences=True))
model.add(TimeDistributed(Dense(features), input_shape=(timesteps,features)))
model.compile(optimizer='adam', loss='mse', metrics=['accuracy'])
model.fit(arr, arr, validation_split=0.33, epochs = 300)
model = Model(inputs=model.inputs, outputs=model.layers[2].output)
Train_Data_Reduced = model.predict(arr)
Am I going about it the right way? If I do not introduce a return_sequence = true for every layer then my output will be a fixed vector of the size(1,4) which is not what I desire. How do I go about it?
lstm autoencoder
New contributor
Sanjana Krishnam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
My task is to reduce the features of my temporal sequence. Each input is of the shape (timesteps, features) = (240,117). I am using an autoencoder consisting of intermediate lstm layers and I am having difficulty for the same. I desire an output of shape (240,4).
The code for the same is
arr = x['Train_Data']
arr_list = []
for i in range(0,90):
arr_list.append(arr[0,i])
arr = np.dstack(arr_list)
arr = np.rollaxis(arr,-1)
samples = arr.shape[0]
timesteps = arr.shape[1]
features = arr.shape[2]
model = Sequential()
model.add(LSTM(30, activation='relu', return_sequences = True, input_shape=(timesteps,features)))
model.add(LSTM(10, activation='relu', return_sequences = True))
model.add(LSTM(4, activation='relu', return_sequences=True))
model.add(LSTM(10, activation='relu', return_sequences = True))
model.add(LSTM(30, activation='relu', return_sequences = True))
model.add(LSTM(117, activation='relu', return_sequences=True))
model.add(TimeDistributed(Dense(features), input_shape=(timesteps,features)))
model.compile(optimizer='adam', loss='mse', metrics=['accuracy'])
model.fit(arr, arr, validation_split=0.33, epochs = 300)
model = Model(inputs=model.inputs, outputs=model.layers[2].output)
Train_Data_Reduced = model.predict(arr)
Am I going about it the right way? If I do not introduce a return_sequence = true for every layer then my output will be a fixed vector of the size(1,4) which is not what I desire. How do I go about it?
lstm autoencoder
New contributor
Sanjana Krishnam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
My task is to reduce the features of my temporal sequence. Each input is of the shape (timesteps, features) = (240,117). I am using an autoencoder consisting of intermediate lstm layers and I am having difficulty for the same. I desire an output of shape (240,4).
The code for the same is
arr = x['Train_Data']
arr_list = []
for i in range(0,90):
arr_list.append(arr[0,i])
arr = np.dstack(arr_list)
arr = np.rollaxis(arr,-1)
samples = arr.shape[0]
timesteps = arr.shape[1]
features = arr.shape[2]
model = Sequential()
model.add(LSTM(30, activation='relu', return_sequences = True, input_shape=(timesteps,features)))
model.add(LSTM(10, activation='relu', return_sequences = True))
model.add(LSTM(4, activation='relu', return_sequences=True))
model.add(LSTM(10, activation='relu', return_sequences = True))
model.add(LSTM(30, activation='relu', return_sequences = True))
model.add(LSTM(117, activation='relu', return_sequences=True))
model.add(TimeDistributed(Dense(features), input_shape=(timesteps,features)))
model.compile(optimizer='adam', loss='mse', metrics=['accuracy'])
model.fit(arr, arr, validation_split=0.33, epochs = 300)
model = Model(inputs=model.inputs, outputs=model.layers[2].output)
Train_Data_Reduced = model.predict(arr)
Am I going about it the right way? If I do not introduce a return_sequence = true for every layer then my output will be a fixed vector of the size(1,4) which is not what I desire. How do I go about it?
lstm autoencoder
New contributor
Sanjana Krishnam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
My task is to reduce the features of my temporal sequence. Each input is of the shape (timesteps, features) = (240,117). I am using an autoencoder consisting of intermediate lstm layers and I am having difficulty for the same. I desire an output of shape (240,4).
The code for the same is
arr = x['Train_Data']
arr_list = []
for i in range(0,90):
arr_list.append(arr[0,i])
arr = np.dstack(arr_list)
arr = np.rollaxis(arr,-1)
samples = arr.shape[0]
timesteps = arr.shape[1]
features = arr.shape[2]
model = Sequential()
model.add(LSTM(30, activation='relu', return_sequences = True, input_shape=(timesteps,features)))
model.add(LSTM(10, activation='relu', return_sequences = True))
model.add(LSTM(4, activation='relu', return_sequences=True))
model.add(LSTM(10, activation='relu', return_sequences = True))
model.add(LSTM(30, activation='relu', return_sequences = True))
model.add(LSTM(117, activation='relu', return_sequences=True))
model.add(TimeDistributed(Dense(features), input_shape=(timesteps,features)))
model.compile(optimizer='adam', loss='mse', metrics=['accuracy'])
model.fit(arr, arr, validation_split=0.33, epochs = 300)
model = Model(inputs=model.inputs, outputs=model.layers[2].output)
Train_Data_Reduced = model.predict(arr)
Am I going about it the right way? If I do not introduce a return_sequence = true for every layer then my output will be a fixed vector of the size(1,4) which is not what I desire. How do I go about it?
lstm autoencoder
lstm autoencoder
New contributor
Sanjana Krishnam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Sanjana Krishnam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
edited 7 hours ago
Hari_Sheldon
31
31
New contributor
Sanjana Krishnam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 13 hours ago
Sanjana KrishnamSanjana Krishnam
1
1
New contributor
Sanjana Krishnam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Sanjana Krishnam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Sanjana Krishnam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "557"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sanjana Krishnam is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f46405%2fautoencoder-for-dimensionality-reduction%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sanjana Krishnam is a new contributor. Be nice, and check out our Code of Conduct.
Sanjana Krishnam is a new contributor. Be nice, and check out our Code of Conduct.
Sanjana Krishnam is a new contributor. Be nice, and check out our Code of Conduct.
Sanjana Krishnam is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Data Science Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdatascience.stackexchange.com%2fquestions%2f46405%2fautoencoder-for-dimensionality-reduction%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown