本文整理汇总了Python中DataManager.DataManager.chunkifyDataWindowSequentialDS方法的典型用法代码示例。如果您正苦于以下问题:Python DataManager.chunkifyDataWindowSequentialDS方法的具体用法?Python DataManager.chunkifyDataWindowSequentialDS怎么用?Python DataManager.chunkifyDataWindowSequentialDS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataManager.DataManager
的用法示例。
在下文中一共展示了DataManager.chunkifyDataWindowSequentialDS方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DataManager
# 需要导入模块: from DataManager import DataManager [as 别名]
# 或者: from DataManager.DataManager import chunkifyDataWindowSequentialDS [as 别名]
from pybrain.supervised.trainers.evolino import EvolinoTrainer
from pybrain.structure import FullConnection, IdentityConnection
# Prep the data
chunkLen = 200
predGap = 8
histLen = 0
includeDst = True
dataManager = DataManager()
print("Network: Elman")
print("predGap = {} hours".format(predGap))
print("histLen = {} hours".format(histLen))
print("includeDst = {}".format(includeDst))
trainDataset, testDataset = \
dataManager.chunkifyDataWindowSequentialDS(chunkLen, predGap, histLen, includeDst)
# Network parameters
# Needs to be changed if the input parameters are adjusted
recSize = 5 if includeDst else 4
nInputs = (histLen+1)*recSize
hiddenNodes = 20
# Build and train the network
ERNNnet = buildNetwork(nInputs, hiddenNodes, 1, hiddenclass=TanhLayer, bias=False, recurrent=True)
''' Set up the network explictly
ERNNnet = RecurrentNetwork()
inLayer = LinearLayer(nInputs)
hiddenLayer = TanhLayer(20)
outLayer = LinearLayer(1)