--- /dev/null
+from keras.models import Model
+from Learning import ModelGenerator
+import Learning
+import numpy
+
+
+def predict(target: str):
+ """
+ 与えられたパターン(50 x 10)を使い、連続期間を判定する。
+ :param target:
+ :return:
+ """
+ # データ分割
+ target = target.split(",")
+
+ # データサイズ確認
+ if(500 != len(target)):
+ # 例外をスロー
+ print("Unsuported Process. yet")
+
+ # データ変換
+ target = numpy.array(target, dtype=numpy.float32)
+ target = target.reshape(1, 500).astype(float)
+ model = Learning.regenerate_leaning_model() #type: Model
+ result = model.predict(target,batch_size=1).astype(float)
+
+ # 結果をログ出力(debug)
+ numpy.set_printoptions(precision=3, suppress=True)
+ return result
+
+