trainAutoencoder, how does ScaleData work?

3 Ansichten (letzte 30 Tage)
Einar
Einar am 23 Mär. 2021
Beantwortet: Avadhoot am 10 Apr. 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?

Antworten (1)

Avadhoot
Avadhoot am 10 Apr. 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.

Kategorien

Mehr zu Sequence and Numeric Feature Data Workflows finden Sie in Help Center und File Exchange

Produkte


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by