@Test public void testGetAlgorithm() { TrainingParameters tp = build("Algorithm=Perceptron,n1.Algorithm=SVM"); Assert.assertEquals("Perceptron", tp.algorithm()); Assert.assertEquals("SVM", tp.algorithm("n1")); }
public String algorithm(String namespace) { return (String)parameters.get(getKey(namespace, ALGORITHM_PARAM)); }
TrainingParameters { public String algorithm(String namespace) { return (String)parameters.get(getKey(namespace, ALGORITHM_PARAM)); } }
TrainingParameters { public String algorithm(String namespace) { return (String)parameters.get(getKey(namespace, ALGORITHM_PARAM)); } TrainingParameters();  TrainingParameters(TrainingParameters trainingParameters);  TrainingParameters(Map<String,String> map);  TrainingParameters(InputStream in); }
TrainingParameters { public String algorithm(String namespace) { return (String)parameters.get(getKey(namespace, ALGORITHM_PARAM)); } TrainingParameters();  TrainingParameters(TrainingParameters trainingParameters);  TrainingParameters(Map<String,String> map);  TrainingParameters(InputStream in); String algorithm(String namespace); String algorithm(); Map<String, String> getSettings(String namespace); Map<String, String> getSettings(); Map<String, Object> getObjectSettings(String namespace); Map<String, Object> getObjectSettings(); TrainingParameters getParameters(String namespace); void putIfAbsent(String namespace, String key, String value); void putIfAbsent(String key, String value); void putIfAbsent(String namespace, String key, int value); void putIfAbsent(String key, int value); void putIfAbsent(String namespace, String key, double value); void putIfAbsent(String key, double value); void putIfAbsent(String namespace, String key, boolean value); void putIfAbsent(String key, boolean value); void put(String namespace, String key, String value); void put(String key, String value); void put(String namespace, String key, int value); void put(String key, int value); void put(String namespace, String key, double value); void put(String key, double value); void put(String namespace, String key, boolean value); void put(String key, boolean value); void serialize(OutputStream out); String getStringParameter(String key, String defaultValue); String getStringParameter(String namespace, String key, String defaultValue); int getIntParameter(String key, int defaultValue); int getIntParameter(String namespace, String key, int defaultValue); double getDoubleParameter(String key, double defaultValue); double getDoubleParameter(String namespace, String key, double defaultValue); boolean getBooleanParameter(String key, boolean defaultValue); boolean getBooleanParameter(String namespace, String key, boolean defaultValue); static TrainingParameters defaultParams(); }
TrainingParameters { public String algorithm(String namespace) { return (String)parameters.get(getKey(namespace, ALGORITHM_PARAM)); } TrainingParameters();  TrainingParameters(TrainingParameters trainingParameters);  TrainingParameters(Map<String,String> map);  TrainingParameters(InputStream in); String algorithm(String namespace); String algorithm(); Map<String, String> getSettings(String namespace); Map<String, String> getSettings(); Map<String, Object> getObjectSettings(String namespace); Map<String, Object> getObjectSettings(); TrainingParameters getParameters(String namespace); void putIfAbsent(String namespace, String key, String value); void putIfAbsent(String key, String value); void putIfAbsent(String namespace, String key, int value); void putIfAbsent(String key, int value); void putIfAbsent(String namespace, String key, double value); void putIfAbsent(String key, double value); void putIfAbsent(String namespace, String key, boolean value); void putIfAbsent(String key, boolean value); void put(String namespace, String key, String value); void put(String key, String value); void put(String namespace, String key, int value); void put(String key, int value); void put(String namespace, String key, double value); void put(String key, double value); void put(String namespace, String key, boolean value); void put(String key, boolean value); void serialize(OutputStream out); String getStringParameter(String key, String defaultValue); String getStringParameter(String namespace, String key, String defaultValue); int getIntParameter(String key, int defaultValue); int getIntParameter(String namespace, String key, int defaultValue); double getDoubleParameter(String key, double defaultValue); double getDoubleParameter(String namespace, String key, double defaultValue); boolean getBooleanParameter(String key, boolean defaultValue); boolean getBooleanParameter(String namespace, String key, boolean defaultValue); static TrainingParameters defaultParams(); static final String ALGORITHM_PARAM; static final String TRAINER_TYPE_PARAM; static final String ITERATIONS_PARAM; static final String CUTOFF_PARAM; static final String THREADS_PARAM; }