我正在尝试进行电话价格预测,我的数据集看起来像这样
call_category_id,duration,Number 1,Number 2,price
9,24,77348,70000,0.01
9,144,77348,70000,0.08
9,138,77348,70000,0.08
9,12,77348,70000,0.01
拨出的号码分为两个号码(号码1,号码2),因为我认为它将改善预测结果。通常,通话的前几位指示每分钟的价格。
我的模型如下所示:
def get_model():
model = Sequential([
Dense(40,
activation='relu',
kernel_initializer='uniform',
input_shape=(4,)),
Dropout(0.3),
Dense(36,
activation='relu',
kernel_initializer='uniform'),
Dropout(0.3),
Dense(32,
activation='relu',
kernel_initializer='uniform'),
Dropout(0.3),
Dense(28,
activation='relu',
kernel_initializer='uniform'),
Dropout(0.3),
Dense(24,
activation='relu',
kernel_initializer='uniform'),
Dense(32,
activation='relu',
kernel_initializer='uniform'),
Dropout(0.3),
Dense(20,
activation='relu',
kernel_initializer='uniform'),
Dropout(0.3),
Dense(1, activation='linear'),
])
c_optimizers = optimizers.Adam()
model.compile(optimizer=c_optimizers,
loss='mean_squared_error',
metrics=['accuracy'])
return model
model.fit(
x_train,
y_train,
batch_size=1024,
epochs=1000,
validation_data=(x_test, y_test),
shuffle=True,
callbacks=[tensor_board])
然而,挑战是准确性永远不会提高,它停留在19.6%。
39879/39879 [==============================] - 0s 5us/step - loss: 0.1646 - acc: 0.1969 - val_loss: 0.1003 - val_acc: 0.2065