Refactor different classes into subpackages.
This commit is contained in:
parent
662a6cf761
commit
2cdcbe6cbf
17 changed files with 25 additions and 19 deletions
|
@ -1,5 +1,6 @@
|
|||
package ca.joeltherrien.randomforest;
|
||||
|
||||
import ca.joeltherrien.randomforest.covariates.Covariate;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package ca.joeltherrien.randomforest;
|
||||
|
||||
|
||||
import ca.joeltherrien.randomforest.covariates.Covariate;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class Row<Y> extends CovariateRow {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.joeltherrien.randomforest;
|
||||
package ca.joeltherrien.randomforest.covariates;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
|
@ -1,4 +1,8 @@
|
|||
package ca.joeltherrien.randomforest;
|
||||
package ca.joeltherrien.randomforest.covariates;
|
||||
|
||||
import ca.joeltherrien.randomforest.CovariateRow;
|
||||
import ca.joeltherrien.randomforest.Row;
|
||||
import ca.joeltherrien.randomforest.tree.Split;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
|
@ -1,4 +1,4 @@
|
|||
package ca.joeltherrien.randomforest;
|
||||
package ca.joeltherrien.randomforest.covariates;
|
||||
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package ca.joeltherrien.randomforest;
|
||||
package ca.joeltherrien.randomforest.covariates;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
|
@ -1,6 +1,6 @@
|
|||
package ca.joeltherrien.randomforest.regression;
|
||||
|
||||
import ca.joeltherrien.randomforest.ResponseCombiner;
|
||||
import ca.joeltherrien.randomforest.tree.ResponseCombiner;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
package ca.joeltherrien.randomforest.tree;
|
||||
|
||||
import ca.joeltherrien.randomforest.CovariateRow;
|
||||
import ca.joeltherrien.randomforest.ResponseCombiner;
|
||||
import lombok.Builder;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@Builder
|
||||
public class Forest<Y> {
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
package ca.joeltherrien.randomforest.tree;
|
||||
|
||||
import ca.joeltherrien.randomforest.Bootstrapper;
|
||||
import ca.joeltherrien.randomforest.Covariate;
|
||||
import ca.joeltherrien.randomforest.ResponseCombiner;
|
||||
import ca.joeltherrien.randomforest.covariates.Covariate;
|
||||
import ca.joeltherrien.randomforest.Row;
|
||||
import lombok.Builder;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package ca.joeltherrien.randomforest;
|
||||
package ca.joeltherrien.randomforest.tree;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collector;
|
|
@ -1,5 +1,6 @@
|
|||
package ca.joeltherrien.randomforest;
|
||||
package ca.joeltherrien.randomforest.tree;
|
||||
|
||||
import ca.joeltherrien.randomforest.Row;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
|
@ -1,6 +1,6 @@
|
|||
package ca.joeltherrien.randomforest.tree;
|
||||
|
||||
import ca.joeltherrien.randomforest.Covariate;
|
||||
import ca.joeltherrien.randomforest.covariates.Covariate;
|
||||
import ca.joeltherrien.randomforest.CovariateRow;
|
||||
import lombok.Builder;
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package ca.joeltherrien.randomforest.tree;
|
||||
|
||||
import ca.joeltherrien.randomforest.*;
|
||||
import ca.joeltherrien.randomforest.covariates.Covariate;
|
||||
import lombok.Builder;
|
||||
|
||||
import java.util.*;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package ca.joeltherrien.randomforest.covariates;
|
||||
|
||||
|
||||
import ca.joeltherrien.randomforest.FactorCovariate;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.function.Executable;
|
||||
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
package ca.joeltherrien.randomforest.workshop;
|
||||
|
||||
import ca.joeltherrien.randomforest.*;
|
||||
import ca.joeltherrien.randomforest.covariates.Covariate;
|
||||
import ca.joeltherrien.randomforest.covariates.NumericCovariate;
|
||||
import ca.joeltherrien.randomforest.regression.MeanResponseCombiner;
|
||||
import ca.joeltherrien.randomforest.regression.WeightedVarianceGroupDifferentiator;
|
||||
import ca.joeltherrien.randomforest.tree.Forest;
|
||||
import ca.joeltherrien.randomforest.tree.ForestTrainer;
|
||||
import ca.joeltherrien.randomforest.tree.TreeTrainer;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
public class TrainForest {
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package ca.joeltherrien.randomforest.workshop;
|
||||
|
||||
|
||||
import ca.joeltherrien.randomforest.Covariate;
|
||||
import ca.joeltherrien.randomforest.covariates.Covariate;
|
||||
import ca.joeltherrien.randomforest.CovariateRow;
|
||||
import ca.joeltherrien.randomforest.NumericCovariate;
|
||||
import ca.joeltherrien.randomforest.covariates.NumericCovariate;
|
||||
import ca.joeltherrien.randomforest.Row;
|
||||
import ca.joeltherrien.randomforest.regression.MeanResponseCombiner;
|
||||
import ca.joeltherrien.randomforest.regression.WeightedVarianceGroupDifferentiator;
|
||||
|
|
|
@ -2,6 +2,9 @@ package ca.joeltherrien.randomforest.workshop;
|
|||
|
||||
|
||||
import ca.joeltherrien.randomforest.*;
|
||||
import ca.joeltherrien.randomforest.covariates.Covariate;
|
||||
import ca.joeltherrien.randomforest.covariates.FactorCovariate;
|
||||
import ca.joeltherrien.randomforest.covariates.NumericCovariate;
|
||||
import ca.joeltherrien.randomforest.regression.MeanResponseCombiner;
|
||||
import ca.joeltherrien.randomforest.regression.WeightedVarianceGroupDifferentiator;
|
||||
import ca.joeltherrien.randomforest.tree.Node;
|
||||
|
@ -13,7 +16,6 @@ import java.util.Map;
|
|||
import java.util.Random;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.DoubleStream;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class TrainSingleTreeFactor {
|
||||
|
||||
|
|
Loading…
Reference in a new issue