Joel Therrien
e96a578ac9
SplitRules are tested. Most of the refactoring involved the creation of a Covariate class (one instance per column); with SplitRule and Value being folded in as inner classes.
26 lines
475 B
Java
26 lines
475 B
Java
package ca.joeltherrien.randomforest;
|
|
|
|
import lombok.Getter;
|
|
import lombok.RequiredArgsConstructor;
|
|
|
|
import java.util.Map;
|
|
|
|
@RequiredArgsConstructor
|
|
public class CovariateRow {
|
|
|
|
private final Map<String, Covariate.Value> valueMap;
|
|
|
|
@Getter
|
|
private final int id;
|
|
|
|
public Covariate.Value<?> getCovariateValue(String name){
|
|
return valueMap.get(name);
|
|
|
|
}
|
|
|
|
@Override
|
|
public String toString(){
|
|
return "CovariateRow " + this.id;
|
|
}
|
|
|
|
}
|