//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> Do a learning process with a batch. </summary> /// /// <param name="functionStack"> Stack of functions. </param> /// <param name="input"> The input. </param> /// <param name="teach"> The teach. </param> /// <param name="lossFunction"> The loss function. </param> /// <param name="isUpdate"> (Optional) True if this object is update. </param> /// /// <returns> A Real. </returns> //////////////////////////////////////////////////////////////////////////////////////////////////// public static Real Train([CanBeNull] FunctionStack functionStack, [NotNull] Array[] input, [NotNull] Array[] teach, [CanBeNull] LossFunction lossFunction, bool isUpdate = true) { return(Train(functionStack, NdArray.FromArrays(input), NdArray.FromArrays(teach), lossFunction, isUpdate)); }
//精度測定 public static double Accuracy(FunctionStack functionStack, Array[] x, Array[] y) { return(Accuracy(functionStack, NdArray.FromArrays(x), NdArray.FromArrays(y))); }
//////////////////////////////////////////////////////////////////////////////////////////////////// /// <summary> Determination of accuracy. </summary> /// /// <param name="functionStack"> Stack of functions. </param> /// <param name="x"> An Array[] to process. </param> /// <param name="y"> An Array[] to process. </param> /// /// <returns> A double. </returns> //////////////////////////////////////////////////////////////////////////////////////////////////// public static double Accuracy([CanBeNull] FunctionStack functionStack, [NotNull] Array[] x, [NotNull] Array[] y) { return(Accuracy(functionStack, NdArray.FromArrays(x), NdArray.FromArrays(y))); }
//バッチで学習処理を行う public static Real Train(FunctionStack functionStack, Array[] input, Array[] teach, LossFunction lossFunction, bool isUpdate = true) { return(Train(functionStack, NdArray.FromArrays(input), NdArray.FromArrays(teach), lossFunction, isUpdate)); }