public async Task TrainSvm() { try { if (currentSet == null) { throw new ArgumentNullException(nameof(currentSet)); } IArffDataSet dataSet = currentSet; MachineSentiment machine = await MachineSentiment.Train(dataSet, CancellationToken.None).ConfigureAwait(false); machine.Save(SvmPath); LoadSvm(); log.LogInformation("SVM Training Completed..."); } catch (Exception ex) { log.LogError(ex, "Error"); throw; } }
private void LoadSvm() { log.LogInformation("Loading SVM vectors..."); Model = MachineSentiment.Load(SvmPath); }