Updating training October 2024

This commit is contained in:
2024-10-26 12:27:07 -04:00
parent 9146dca17b
commit 93bc8fce03
3 changed files with 3 additions and 8 deletions

View File

@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MarketData.Generator.CMMomentum
{

View File

@@ -6,8 +6,6 @@ using MarketData.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MarketData.Generator.CMMomentum
{

View File

@@ -129,13 +129,13 @@ namespace MarketData.Generator.CMMomentum
dataProcessor.Height=128;
dataProcessor.PenWidth=1;
TestCase testCase=new TestCase(cmCandidate.Symbol,cmCandidate.TradeDate,cmParams.UseCNNDayCount,TestCase.CaseType.Test,TestCase.GenerateType.BollingerBand,TestCase.OutputType.OutputStream);
dataProcessor.ProcessData(testCase);
String prediction = cnnClient.Predict(CNNClient.Model.resnet50,testCase.LastStream);
dataProcessor.ProcessData(testCase);
// String prediction = cnnClient.Predict(CNNClient.Model.resnet50,testCase.LastStream);
String prediction = cnnClient.Predict(CNNClient.Model.resnet50_20241024_270,testCase.LastStream);
prediction=prediction.Substring(prediction.IndexOf("-->"));
int result=int.Parse(Utility.BetweenString(prediction,"[[","]"));
if(1==result)
{
// MDTrace.WriteLine(LogLevel.DEBUG,String.Format("PredictCandidate: Found positive convolutional model match for {0} on {1}. Score {2} -> {3}",cmCandidate.Symbol,cmCandidate.TradeDate.ToShortDateString(),cmCandidate.Score,cmCandidate.Score*(1.00+cmParams.UseCNNRewardPercentDecimal)));
cmCandidate.Score*=(1.00+cmParams.UseCNNRewardPercentDecimal); // increase the score by the percentage indicated in the params settings
cmCandidate.CNNPrediction=true;
}