public void Change(bool isSave) { if (isSave) { TrainingSets.Apply(x => x.IsNew = false); isChange = false; } }
public void Add() { TrainingSets.Add(new TrainingItem(true)); SelectedTItem = TrainingSets.LastOrDefault(); foreach (var item in TrainingSets) { NotifyOfPropertyChange(() => item); } OnDataChange(); }
public void Remove(TrainingItem trainingItem) { bool isSelected = SelectedTItem == trainingItem; TrainingSets.Remove(trainingItem); if (isSelected) { SelectedTItem = TrainingSets.LastOrDefault(); } OnDataChange(); }
public void AddRange(IList <TrainingItem> items) { Clear(); foreach (var item in items) { TrainingSets.Add(item.SubcribeTrainingSet()); } SelectedTItem = TrainingSets.LastOrDefault(); isChange = false; OnDataChange(); }
private void ConstructTrainingSet() { //Sharpness vs Edible - a 0 = a weapon and a 1 = food TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0.5, 1 }, Output = 1 }); //croisant TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0, 0.8 }, Output = 1 }); //burger TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0.2, 1 }, Output = 1 }); //strawberry TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0.1, 0.5 }, Output = 1 }); //cupcake TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0.1, 0.5 }, Output = 1 }); //fries TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0.3, 0.5 }, Output = 1 }); //cutlet TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0.5, 0.9 }, Output = 1 }); //carrot TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0.8, 1 }, Output = 1 }); //pineabple TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0.1, 0 }, Output = 1 }); //numchucks TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0.5, 0.3 }, Output = 1 }); //bow TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0.5, 0.3 }, Output = 1 }); //stick TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0.1, 0.1 }, Output = 1 }); //sword TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0.7, 0 }, Output = 1 }); //axe TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0.9, 0 }, Output = 1 }); //kunai //if you graph these you will see the food items are towards the up part of the graph and the weapons toward the bottom and a clear line you can //draw (decision boundary) to see what that looks like }
private void ConstructTrainingSet() { //OR training set //0 || 0 = 0 //0 || 1 = 1 //1 || 0 = 1 //1 || 1 = 1 TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0, 0 }, Output = 0 }); TrainingSets.Add(new TrainingSet { Inputs = new double[] { 0, 1 }, Output = 1 }); TrainingSets.Add(new TrainingSet { Inputs = new double[] { 1, 0 }, Output = 1 }); TrainingSets.Add(new TrainingSet { Inputs = new double[] { 1, 1 }, Output = 1 }); }
public void Clear() { TrainingSets.Clear(); OnDataChange(); }