phenotrex.util package¶
Submodules¶
phenotrex.util.helpers module¶
- phenotrex.util.helpers.get_groups(records: List[phenotrex.structure.records.TrainingRecord]) numpy.ndarray [source]¶
Get groups from list of TrainingRecords
- Parameters
records –
- Returns
list for groups
- phenotrex.util.helpers.get_x_y_tn_ft(records: List[phenotrex.structure.records.TrainingRecord]) Tuple[numpy.ndarray, numpy.ndarray, str, str] [source]¶
Get separate X and y from list of TrainingRecord. Also infer trait name from first TrainingRecord.
- Parameters
records – a List[TrainingRecord]
- Returns
separate lists of features and targets, the trait name and the feature type