目前,我正在使用自动编码器从fMRI图像中提取特征。我有每个候选人的NumPy数组9950,并使用自动编码器提取了4975个特征,并使用SVM对其进行预测,以预测候选人是否患有某种疾病。
这是我的自动编码器模型:
encoding_dim =4975
# this is our input placeholder
input_img = Input(shape=(9950,))
# "encoded" is the encoded representation of the input
encoded = Dense(encoding_dim, activation='relu')(input_img)
# "decoded" is the lossy reconstruction of the input
decoded = Dense(9950, activation='sigmoid')(encoded)
# this model maps an input to its reconstruction
autoencoder = Model(input_img, decoded)
print(autoencoder)
# this model maps an input to its encoded representation
encoder = Model(input_img, encoded)
# create a placeholder for an encoded (32-dimensional) input
encoded_input = Input(shape=(encoding_dim,))
# retrieve the last layer of the autoencoder model
decoder_layer = autoencoder.layers[-1]
# create the decoder model
decoder = Model(encoded_input, decoder_layer(encoded_input))
import tensorflow as tf
from keras.optimizers import Adam,SGD
opt = SGD(lr=0.001)
autoencoder.compile(loss='binary_crossentropy', optimizer=opt, metrics=['AUC'])
当我打印AUC时,它保持在40-50范围内。我想改进编码功能,以便将其提供给SVM进行分类时,应该能获得良好的准确性。有任何改进模型的建议吗?