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()))
16 return tuple_dataset(graphdata,labeldata)
18 def createGraphData(self,targetData):
20 result=[] #type: List[float]
22 for strline in targetData:
25 floatLine=[] #type: List[float]
28 floatLine.append(float(block))
29 #TODO floatLineの変換処理(データ正規化)を入れておく
30 result.extend(floatLine)