這裏有一個迴歸問題的基本設置。你可以嘗試使用神經網絡工具包來解決這個問題。我寫了一個叫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)
有用於配置和訓練模型的幾個選項,看看該文件更多信息。
也有許多,許多其他的神經網絡工具包在那裏,這裏僅僅是幾個常見的,我很熟悉:
你可能想試試看看它們是否適合你想要解決的問題的心智模型。