-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Altered knn and ee to use predefined neighbours and full test neighbours
- Loading branch information
Showing
14 changed files
with
381 additions
and
358 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
280 changes: 127 additions & 153 deletions
280
src/main/java/classifiers/distance_based/elastic_ensemble/ElasticEnsemble.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...ain/java/classifiers/distance_based/elastic_ensemble/iteration/linear/LinearIterator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 11 additions & 5 deletions
16
...ain/java/classifiers/distance_based/elastic_ensemble/iteration/random/RandomIterator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,31 @@ | ||
package classifiers.distance_based.elastic_ensemble.iteration.random; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
import java.util.Random; | ||
|
||
public class RandomIterator<A> extends AbstractRandomIterator<A, RandomIterator<A>> { | ||
|
||
public RandomIterator(final Collection<? extends A> values, final Random random) { | ||
super(values, random); | ||
public RandomIterator(final List<A> values, final long seed) { | ||
super(values, seed); | ||
} | ||
|
||
public RandomIterator(RandomIterator<A> other) { | ||
this(other.values, other.random); | ||
this(other.values, other.seed); | ||
index = other.index; | ||
} | ||
|
||
public RandomIterator(Random random) { | ||
super(random); | ||
public RandomIterator(long seed) { | ||
super(seed); | ||
} | ||
|
||
@Override | ||
public RandomIterator<A> iterator() { | ||
return new RandomIterator<>(this); | ||
} | ||
|
||
@Override | ||
public boolean hasNext() { | ||
return !values.isEmpty(); | ||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
...java/classifiers/distance_based/elastic_ensemble/iteration/random/RoundRobinIterator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.