Changed the covariates to be more clever with how they produce the different splits. In the future (not yet implemented) a clever GroupDifferentiator could update the current score calculation based just on how many rows moved from one hand to the other. There were a few other changes as well; TreeTrainer#growTree now accepts a Random as a parameter which is used throughout the entire growing process. This means it's now theoretically possible to grow trees using a seed, so that results can be fully reproducible.
23 lines
484 B
Java
23 lines
484 B
Java
package ca.joeltherrien.randomforest.tree;
|
|
|
|
import ca.joeltherrien.randomforest.Row;
|
|
import ca.joeltherrien.randomforest.covariates.Covariate;
|
|
import lombok.Data;
|
|
|
|
import java.util.List;
|
|
|
|
/**
|
|
* Very simple class that contains three lists and a SplitRule.
|
|
*
|
|
* @author joel
|
|
*
|
|
*/
|
|
@Data
|
|
public final class Split<Y, V> {
|
|
|
|
public final Covariate.SplitRule<V> splitRule;
|
|
public final List<Row<Y>> leftHand;
|
|
public final List<Row<Y>> rightHand;
|
|
public final List<Row<Y>> naHand;
|
|
|
|
}
|