/** * Retrieves a map with the training parameters which have the passed name space. * * @param namespace * * @return a parameter map which can be passed to the train and validate methods. * * @deprecated use {@link #getObjectSettings(String)} instead */ public Map<String, String> getSettings(String namespace) { Map<String, String> trainingParams = new HashMap<>(); String prefix = namespace + "."; for (Map.Entry<String, Object> entry : parameters.entrySet()) { String key = entry.getKey(); if (namespace != null) { if (key.startsWith(prefix)) { trainingParams.put(key.substring(prefix.length()), getStringValue(entry.getValue())); } } else { if (!key.contains(".")) { trainingParams.put(key, getStringValue(entry.getValue())); } } } return Collections.unmodifiableMap(trainingParams); }
/** * Retrieves a map with the training parameters which have the passed name space. * * @param namespace * * @return a parameter map which can be passed to the train and validate methods. * * @deprecated use {@link #getObjectSettings(String)} instead */ public Map<String, String> getSettings(String namespace) { Map<String, String> trainingParams = new HashMap<>(); String prefix = namespace + "."; for (Map.Entry<String, Object> entry : parameters.entrySet()) { String key = entry.getKey(); if (namespace != null) { if (key.startsWith(prefix)) { trainingParams.put(key.substring(prefix.length()), getStringValue(entry.getValue())); } } else { if (!key.contains(".")) { trainingParams.put(key, getStringValue(entry.getValue())); } } } return Collections.unmodifiableMap(trainingParams); }
/** * Retrieves a map with the training parameters which have the passed name space. * * @param namespace * * @return a parameter map which can be passed to the train and validate methods. * * @deprecated use {@link #getObjectSettings(String)} instead */ public Map<String, String> getSettings(String namespace) { Map<String, String> trainingParams = new HashMap<>(); String prefix = namespace + "."; for (Map.Entry<String, Object> entry : parameters.entrySet()) { String key = entry.getKey(); if (namespace != null) { if (key.startsWith(prefix)) { trainingParams.put(key.substring(prefix.length()), getStringValue(entry.getValue())); } } else { if (!key.contains(".")) { trainingParams.put(key, getStringValue(entry.getValue())); } } } return Collections.unmodifiableMap(trainingParams); }