这里有一个回归问题的基本设置。你可以尝试使用神经网络工具包来解决这个问题。我写了一个叫theanets工具包,可以帮助,所以我给的如何使用它一个简单的例子:
import numpy as np
import theanets
# set up data arrays: X is input, Y is target output
X = np.array([
[0.2,0.6,0.2,0.6,0.1,0.3,0.1],
[0.1,0.2,0.3,0.6,0.5,0.1,0.2],
], 'f')
Y = np.array([
[100,0,123,2,14,15,2],
[10,10,13,22,4,135,22],
], 'f')
# set up a regression model:
# map from X to Y using one hidden layer.
exp = theanets.Experiment(
theanets.Regressor,
(X.shape[1], 100, Y.shape[1]))
# train the model using rmsprop.
exp.train([X, Y], algorithm='rmsprop')
# predict outputs for some inputs.
Yhat = exp.network.predict(X)
有用于配置和训练模型的几个选项,看看该文件更多信息。
也有许多,许多其他的神经网络工具包在那里,这里仅仅是几个常见的,我很熟悉:
你可能想试试看看它们是否适合你想要解决的问题的心智模型。