/// <summary> /// 计算分类精度 /// </summary> /// <param name="list"></param> /// <returns></returns> private double Accuracy() { //eval data batchSize const int evalSize = 100; var(states, rawLabels) = _env.RandomEval(evalSize); double[][] predicts = new double[evalSize][]; for (int i = 0; i < evalSize; i++) { predicts[i] = ChooseAction(states[i]).action; } //calcute accuracy var accuracy = NP.CalcuteAccuracy(predicts, rawLabels); return(accuracy); }