tumourkit.utils.read_nodes.create_node_splits

tumourkit.utils.read_nodes.create_node_splits(node_dir: str, val_size: float, test_size: float, seed: int | None = None, mode: str | None = 'total') List[ndarray]
Input

node_dir: Path to folder with csv files containing node features. val_size: Percentage of data to use as validation. test_size: Percentage of data to use as test. seed: Seed for the random split. mode: Whether to mix images in the splits or not. It can be ‘total’ or ‘by_img’.

Output

X_train, X_val, X_test, y_train, y_val, y_test: Node features and labels.