1 from chainer.datasets import tuple_dataset
4 class DatasetGenerator:
6 def generateDataset(self,dataList):
7 graphdata = [] #type: List[float]
8 labeldata = [] #type: List[float]
12 labeldata.append(data.getLable())
13 graphdata.append(self.createGraphData(data.getData()))
15 return tuple_dataset(graphdata,labeldata)
17 def createGraphData(self,targetData):
19 result=[] #type: List[float]
21 for strline in targetData:
23 floatLine=[] #type: List[float]
26 floatLine.append(float(block))
27 #TODO floatLineの変換処理(データ正規化)を入れておく
28 result.extend(floatLine)