public static Results EvaluateContinuousRecognizer(DeviceType device) { // Get the list of participants 15 through 24 List <int> participants = new List <int> { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 }; Results all_results = new Results(); all_results.Reset(); long one = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond; // at beginning Results user_results = new Results(); for (int pid = 0; pid < participants.Count; pid++) { Debug.Log("Running Yeah evaluation on Participant " + participants[pid]); user_results.Reset(); for (int ii = 0; ii < 10; ii++) { Results tempResults = EvaluateSession(device, participants[pid]); tempResults.PrintF(); user_results.AppendResults(tempResults); } all_results.AppendResults(user_results); Debug.Log("Results for Participant " + participants[pid]); user_results.PrintF(); } long two = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond; // at beginning Debug.Log(string.Format("Time elapsed {0} seconds", (two - one) / 1000)); Debug.Log("Overall results"); all_results.PrintF(); return(all_results); }
void Update() { if (eStatus == EvaluationStatus.TRAINING) { if (segmentorType == SegmentorType.MACHETE) { Prepare(); } else if (segmentorType == SegmentorType.WINDOW) { PrepareWindow(); } eStatus = EvaluationStatus.EVALUATING; } if (eStatus == EvaluationStatus.EVALUATING) { if (frame_idx > 1) { // Time since last frame timer += Time.deltaTime; // Total time timeStats_UserDependent.add(Time.deltaTime); timeStats_Overall.add(Time.deltaTime); } if (segmentorType == SegmentorType.MACHETE) { Step(); } else if (segmentorType == SegmentorType.WINDOW) { StepWindow(); } frame_idx += 1; if (frame_idx == frames.Count) { eStatus = EvaluationStatus.SUMMARIZING; } } if (eStatus == EvaluationStatus.SUMMARIZING) { Summarize(); eStatus = EvaluationStatus.TRANSITION; } if (eStatus == EvaluationStatus.TRANSITION) { iteration += 1; Debug.Log(string.Format("Iteration {2} User# {0}, (Participant {1}) Completed.\n", currentParticipantIndex, currentParticipantID, iteration)); iteration_results.PrintF(); user_results.AppendResults(iteration_results); // PrintTimes(); iteration_results.Reset(); // If all iterations are done, continue to next participant if (iteration == iterationCount) { // Save results into a file and to all results logResultsToFile("stats.csv", user_results, timeStats_UserDependent, "PID " + currentParticipantID); all_results.AppendResults(user_results); iteration = 0; currentParticipantIndex += 1; timeStats_UserDependent.reset(); user_results.Reset(); } // If all participants done, we're finished if (currentParticipantIndex == participants.Count) { Debug.Log("FINISHED"); eStatus = EvaluationStatus.FINISHED; all_results.PrintF(); logResultsToFile("stats.csv", all_results, timeStats_Overall, "global"); timeStats_Overall.reset(); return; } eStatus = EvaluationStatus.TRAINING; } if (eStatus == EvaluationStatus.FINISHED) { } }