trainAutoencoder, how does ScaleData work?

3 visualizaciones (últimos 30 días)
Einar
Einar el 23 de Mzo. de 2021
Respondida: Avadhoot el 10 de Abr. de 2024
Im building an anomaly detection model using an autoencoder. I first use the "trainAutoencoder" function with my normal training data, and then the "predict" function on a testset containing normal data and anomaly data. Then I plot the reconstruction error.
When I set the 'ScaleData' parameter to true in the "trainAutoencoder" function call, the anomaly separation is fine. However, when I scale my data prior to "trainAutoencoder", and set the 'ScaleData' to false, the anomaly separation is worse. I use the same "mapminmax" function to scale the data in range [0,1], as done in "trainAutoencoder".
What else does "ScaleData" do to the data?

Respuestas (1)

Avadhoot
Avadhoot el 10 de Abr. de 2024
Hi @Einar,
I understand that you are trying to replicate the functionality of "scaleData" argument in "trainAutoEncoder" using "mapminmax" function. The difference in the results is because the "mapminmax" function maps the input data to a fixed range. i.e. [-1,1]. Whereas the "scaleData" argument in "trainAutoencoder" scales the data to a scale which is suitable for the specific activation functions used in the autoencoder. This scaling is consistently applied to the training as well as testing data. Hence, the performance is better in the case of "scaleData" in comparison to just using "mapminmax".
For more information on "scaleData" refer to the below documentation:
I hope it helps.

Categorías

Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by