Skip to content

Commit

Permalink
reverted
Browse files Browse the repository at this point in the history
  • Loading branch information
EinsamHauer committed Apr 12, 2017
1 parent 64f3630 commit ec58cd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;

/**
* @author Andrei Ivanov
Expand Down Expand Up @@ -74,14 +72,6 @@ public List<TimeSeries> bootstrap(Target target, List<TimeSeries> original, long
List<TimeSeries> bootstrapped = new ArrayList<>();
bootstrapped.addAll(eval(target.previous(period)));

Set<String> bootstrappedSeries = bootstrapped.stream().map(TimeSeries::getName).collect(Collectors.toSet());

for (TimeSeries ts : original.stream().filter(originalTs -> !bootstrappedSeries.contains(originalTs.getName())).collect(Collectors.toList())) {
TimeSeries emptyTimeSeries = getEmptyTimeSeries(ts.getFrom() - period, ts.getFrom() - 1);
emptyTimeSeries.setName(ts.getName());
bootstrapped.add(emptyTimeSeries);
}

if (bootstrapped.size() != original.size()) throw new InvalidNumberOfSeriesException();
if (!TimeSeriesUtils.checkAlignment(bootstrapped)) throw new TimeSeriesNotAlignedException();

Expand Down

0 comments on commit ec58cd3

Please sign in to comment.