我已经将ELM的精度降低了将近一个月。阅读研究论文也没有帮助。 github上给Elm的代码太麻烦了。请帮助我提高模型的准确性
#Loading the Dataset
import tensorflow as tf
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.mnist.load_data()
#Reshaping into 2-D dataframe
x_train = x_train.reshape(60000,784)
x_test = x_test.reshape(10000,784)
x_train = pd.DataFrame(x_train)
y_train = pd.DataFrame(y_train)
#ELM
w = np.random.randn(784,6)#784,6
b = np.random.randn(1,6)#1,6
h = np.dot(x_train,w)+b#5000,6
beta=np.dot(np.linalg.inv((1/(2**1))+np.dot(h.T,h)),np.dot(h.T,y_train))
res = np.dot(h,beta)
#Evaluating
res =np.round(res)#rounding off to nearest integer
from sklearn.metrics import accuracy_score
score = accuracy_score(y_train,res)
print(score)
这提供的准确度仅为0.10,对于标准数据集来说太低了