private void btn_veriSetiniSec_Click(object sender, EventArgs e) { openFileDialog1.Title = "Veri setini seçiniz"; openFileDialog1.Filter = "Dosya Seçin(*.txt)|*.txt"; openFileDialog1.FilterIndex = 1; try { if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { if (openFileDialog1.CheckFileExists) { string path = System.IO.Path.GetFullPath(openFileDialog1.FileName); v = new Veri(); data = v.Oku(path, ';'); DataGridVeriEkle(dataGridView1, data); } } else { MessageBox.Show("Lütfen belgeyi karşıya yükleyin."); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public KNN(int k, Veri v, IMetric metric) { K = k; Metric = metric; V = v; }
private void Form1_Load(object sender, EventArgs e) { var data = Veri.Oku(@"../../wine_data.txt", ';'); var kf = new KFold(data, 4); }