我正在尝试预测连续值(第一次使用神经网络)。我已经标准化了输入数据。我不明白为什么我loss: nan从第一个纪元开始就得到输出。
我阅读并尝试了以前对同一问题的答案中的许多建议,但没有一个对我有帮助。我的训练数据形状是:(201917, 64)。这是我的代码:
model = Sequential()
model.add(Dense(100, input_dim=X.shape[1], activation='relu'))
model.add(Dense(100, activation='relu'))
model.add(Dense(100, activation='relu'))
# Output layer
model.add(Dense(1, activation='linear'))
# Construct the neural network inside of TensorFlow
model.compile(loss='mean_squared_error', optimizer='Adam')
# train the model
model.fit(X_train, y_train, epochs=10, batch_size=32,
shuffle=True, verbose=2)
Run Code Online (Sandbox Code Playgroud) 有以下声明:
rules = association_rules(frequent_itemsets, metric="lift", min_threshold=1.2)
Run Code Online (Sandbox Code Playgroud)
我得到一个格式的规则数据框:
frozenset({'Co_Apples'})
Run Code Online (Sandbox Code Playgroud)
但我需要将 a 提取Co_Apples为字符串。
我怎样才能做到这一点?