List of usage examples for weka.gui.experiment ExperimenterDefaults PROPERTY_FILE
String PROPERTY_FILE
To view the source code for weka.gui.experiment ExperimenterDefaults PROPERTY_FILE.
Click Source Link
From source file:adams.gui.application.WekaExperimenterPreferencesPanel.java
License:Open Source License
@Override protected void initGUI() { super.initGUI(); addPropertyType("Extension", PropertyType.LIST); setList("Extension", new String[] { ".exp", ".xml" }); addPropertyType("Destination", PropertyType.LIST); setList("Destination", new String[] { "ARFF file", "CSV file", "JDBC database" }); addPropertyType("ExperimentType", PropertyType.LIST); setList("ExperimentType", new String[] { "Cross-validation", "Train/Test Percentage Split (data randomized)", "Train/Test Percentage Split (order preserved)" }); addPropertyType("UseClassification", PropertyType.BOOLEAN); addPropertyType("Folds", PropertyType.INTEGER); addPropertyType("TrainPercentage", PropertyType.INTEGER); addPropertyType("Repetitions", PropertyType.INTEGER); addPropertyType("DatasetsFirst", PropertyType.BOOLEAN); addPropertyType("InitialDatasetsDirectory", PropertyType.DIRECTORY); addPropertyType("UseRelativePaths", PropertyType.BOOLEAN); addPropertyType("Tester", PropertyType.LIST); setList("Tester", new String[] { "Paired T-Tester (corrected)", "Paired T-Tester" }); addPropertyType("Row", PropertyType.STRING); addPropertyType("Column", PropertyType.STRING); addPropertyType("ComparisonField", PropertyType.STRING); addPropertyType("Significance", PropertyType.DOUBLE); addPropertyType("Sorting", PropertyType.STRING); addPropertyType("ShowStdDev", PropertyType.BOOLEAN); addPropertyType("ShowAverage", PropertyType.BOOLEAN); addPropertyType("MeanPrecision", PropertyType.INTEGER); addPropertyType("StdDevPrecision", PropertyType.INTEGER); addPropertyType("OutputFormat", PropertyType.OBJECT_EDITOR); setChooser("OutputFormat", new GenericObjectEditorPanel(weka.experiment.ResultMatrix.class, new weka.experiment.ResultMatrixPlainText(), true)); addPropertyType("RemoveFilterClassnames", PropertyType.BOOLEAN); try {/*from ww w . j av a 2s . co m*/ setPreferences(new Properties(Utils.readProperties(ExperimenterDefaults.PROPERTY_FILE))); } catch (Exception e) { System.err.println("Failed to load WEKA Experimenter properties:"); e.printStackTrace(); setPreferences(new Properties()); } }
From source file:adams.gui.application.WekaExperimenterPreferencesPanel.java
License:Open Source License
/** * Activates the settings.// w ww .j a v a 2s . c o m * * @return null if successfully activated, otherwise error message */ @Override public String activate() { String filename; if (!WekaPackageManager.PROPERTIES_DIR.exists()) { WekaPackageManager.PROPERTIES_DIR.mkdirs(); if (!WekaPackageManager.PROPERTIES_DIR.exists()) return "Failed to create WEKA props directory: " + WekaPackageManager.PROPERTIES_DIR; } filename = WekaPackageManager.PROPERTIES_DIR.getAbsolutePath() + File.separator + new File(ExperimenterDefaults.PROPERTY_FILE).getName(); if (!getPreferences().save(filename)) return "Failed to save WEKA Experimenter properties: " + filename; return null; }