public bool TestMLMainModelFolderSource(String folderPath) { if (FastTreePredictor.IsMLModelExisting(folderPath) && LottoMatchCountPredictor.IsMLModelExisting(folderPath) && DrawResultWinCountPredictor.IsMLModelExisting(folderPath) && SDCARegressionPredictor.IsMLModelExisting(folderPath)) { return(true); } return(false); }
public List <int[]> GenerateSequence() { StartPickGeneration(); int maximumPickCount = GetFieldParamValueForCount(0); int matchPerc = GetFieldParamValueForCount(1); int maxLoopBreaker = int.MaxValue - 100; int maxLoopCtr = 0; List <int[]> results = new List <int[]>(); LottoMatchCountInputModel sampleData; LotteryBetSetup lotteryBet = new LotteryBetSetup(); lotteryBet.GameCode = lotteryDataServices.LotteryDetails.GameCode; Random ran = new Random(); while (results.Count < maximumPickCount) { int[] randomSeq = LuckyPickGenerator(ran); lotteryBet.ResetSequenceToZero(); lotteryBet.FillNumberBySeq(randomSeq); sampleData = lotteryBet.GetLottoMatchCountInputModel(); LottoMatchCountOutputModel output = LottoMatchCountPredictor.Predict(sampleData); int score = (int)(output.Score * 100); PickGenerationProgressEvent.IncrementGenerationAttemptCount(); if (score >= matchPerc) { Array.Sort(randomSeq); results.Add(randomSeq); PickGenerationProgressEvent.IncrementGeneratedPickCount(); } if (!IsContinuePickGenerationProgress()) { break; } if (maxLoopCtr++ > maxLoopBreaker) { break; } } return(results); }