/** * Returns a list of non flattened moving window matrices * @return the list of matrices */ public List<INDArray> windows() { return windows(false); }
public MovingWindowDataSetFetcher(DataSet data, int windowRows, int windowColumns) { this.data = data; this.windowRows = windowRows; this.windowColumns = windowColumns; List<DataSet> list = data.asList(); List<DataSet> flipped = new ArrayList<>(); for (int i = 0; i < list.size(); i++) { INDArray label = list.get(i).getLabels(); List<INDArray> windows = new MovingWindowMatrix(list.get(i).getFeatures(), windowRows, windowColumns, true) .windows(true); for (int j = 0; j < windows.size(); j++) { flipped.add(new DataSet(windows.get(j), label)); } flipped.add(list.get(i)); } this.data = DataSet.merge(flipped); }
public MovingWindowDataSetFetcher(DataSet data, int windowRows, int windowColumns) { this.data = data; this.windowRows = windowRows; this.windowColumns = windowColumns; List<DataSet> list = data.asList(); List<DataSet> flipped = new ArrayList<>(); for (int i = 0; i < list.size(); i++) { INDArray label = list.get(i).getLabels(); List<INDArray> windows = new MovingWindowMatrix(list.get(i).getFeatureMatrix(), windowRows, windowColumns, true) .windows(true); for (int j = 0; j < windows.size(); j++) { flipped.add(new DataSet(windows.get(j), label)); } flipped.add(list.get(i)); } this.data = DataSet.merge(flipped); }
/** * Returns a list of non flattened moving window matrices * @return the list of matrices */ public List<INDArray> windows() { return windows(false); }