protected void init() { isMultiLabel = getDiscriminator(getContext(), DIM_LEARNING_MODE).equals(LM_MULTI_LABEL); isRegression = getDiscriminator(getContext(), DIM_LEARNING_MODE).equals(LM_REGRESSION); if (isMultiLabel) { THRESHOLD = getDiscriminator(getContext(), DIM_BIPARTITION_THRESHOLD); } isIntegerMode = Boolean.valueOf(getDiscriminator(getContext(), DIM_VECTORIZE_TO_INTEGER)); }
protected void init() { isMultiLabel = getDiscriminator(getContext(), DIM_LEARNING_MODE).equals(LM_MULTI_LABEL); isRegression = getDiscriminator(getContext(), DIM_LEARNING_MODE).equals(LM_REGRESSION); if (isMultiLabel) { THRESHOLD = getDiscriminator(getContext(), DIM_BIPARTITION_THRESHOLD); } isIntegerMode = Boolean.valueOf(getDiscriminator(getContext(), DIM_VECTORIZE_TO_INTEGER)); }
protected File getTargetFile() { return getContext().getFile(Constants.ID_OUTCOME_KEY, AccessMode.READWRITE); }
protected File getTargetFile() { return getContext().getFile(Constants.ID_OUTCOME_KEY, AccessMode.READWRITE); }
private List<String> getNameOfTargets() throws IOException { File targetIdMappingFolder = getContext() .getFolder(TcDeepLearningAdapter.TARGET_ID_MAPPING_TEST, AccessMode.READONLY); File targetIdMappingFile = new File(targetIdMappingFolder, DeepLearningConstants.FILENAME_TARGET_ID_TO_INDEX); List<String> t = new ArrayList<>(); List<String> readLines = FileUtils.readLines(targetIdMappingFile, "utf-8"); for (String s : readLines) { if (s.startsWith("#")) { continue; } if (s.isEmpty()) { t.add(""); continue; } String[] split = s.split("\t"); if (split[0].contains("_")) { t.add(s.replaceAll("\t", "_")); } else { t.add(split[1]); } } return t; }
private List<String> getNameOfTargets() throws IOException { File targetIdMappingFolder = getContext() .getFolder(TcDeepLearningAdapter.TARGET_ID_MAPPING_TEST, AccessMode.READONLY); File targetIdMappingFile = new File(targetIdMappingFolder, DeepLearningConstants.FILENAME_TARGET_ID_TO_INDEX); List<String> t = new ArrayList<>(); List<String> readLines = FileUtils.readLines(targetIdMappingFile, "utf-8"); for (String s : readLines) { if (s.startsWith("#")) { continue; } if (s.isEmpty()) { t.add(""); continue; } String[] split = s.split("\t"); if (split[0].contains("_")) { t.add(s.replaceAll("\t", "_")); } else { t.add(split[1]); } } return t; }
File prepFolder = getContext().getFolder(TcDeepLearningAdapter.PREPARATION_FOLDER, AccessMode.READONLY); File mapping = new File(prepFolder, DeepLearningConstants.FILENAME_OUTCOME_MAPPING); File prepFolder = getContext().getFolder(TcDeepLearningAdapter.PREPARATION_FOLDER, AccessMode.READONLY); File file = new File(prepFolder, DeepLearningConstants.FILENAME_OUTCOMES);
File prepFolder = getContext().getFolder(TcDeepLearningAdapter.PREPARATION_FOLDER, AccessMode.READONLY); File mapping = new File(prepFolder, DeepLearningConstants.FILENAME_OUTCOME_MAPPING); File prepFolder = getContext().getFolder(TcDeepLearningAdapter.PREPARATION_FOLDER, AccessMode.READONLY); File file = new File(prepFolder, DeepLearningConstants.FILENAME_OUTCOMES);
File file = getContext().getFile(FILENAME_PREDICTION_OUT, AccessMode.READONLY); List<String> predictions = getPredictions(file);
File file = getContext().getFile(FILENAME_PREDICTION_OUT, AccessMode.READONLY); List<String> predictions = getPredictions(file);