From b842661b2f5d82fa1edb18f29d8a5e5b56389a0d Mon Sep 17 00:00:00 2001 From: AndrewQuijano Date: Sun, 30 Jul 2023 11:14:47 -0400 Subject: [PATCH] Don't forget to add the full training path --- src/main/java/weka/finito/utils/DataHandling.java | 3 +-- src/test/java/TrainingTest.java | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main/java/weka/finito/utils/DataHandling.java b/src/main/java/weka/finito/utils/DataHandling.java index e289177..5e892b8 100644 --- a/src/main/java/weka/finito/utils/DataHandling.java +++ b/src/main/java/weka/finito/utils/DataHandling.java @@ -18,8 +18,7 @@ public class DataHandling { // Question: Are we assuming all Data Providers know all classes??? Perhaps we can assume yes for now... public static Instances @NotNull [] createPartitions(String fullDataSetPath, int noParties) throws Exception { - ConverterUtils.DataSource source = new ConverterUtils.DataSource(fullDataSetPath); - Instances data = source.getDataSet(); + Instances data = read_data(fullDataSetPath); //data.deleteWithMissingClass(); int numAttributes, noElementsForPartition, noElementsForLastPartition; diff --git a/src/test/java/TrainingTest.java b/src/test/java/TrainingTest.java index 2d0b388..c007ba1 100644 --- a/src/test/java/TrainingTest.java +++ b/src/test/java/TrainingTest.java @@ -54,7 +54,11 @@ public void train_all() throws Exception { while ((line = br.readLine()) != null) { String [] values = line.split(","); String data_set = values[0]; - train(data_set); + String full_data_set_path = new File(data_directory, data_set).toString(); + + if (!data_set.endsWith(".model")) { + train(full_data_set_path); + } } } }