Util¶
Here is a list of classes in the package.
Overview:
- class neural_network.DataSplitter(path: str, proportions: List[int])[source]¶
Class to split a dataset into training, validation and testing, given a split ratio.
- class neural_network.Partitioner(n: int, m: int)[source]¶
Class to randomly partition n integers into sets of size m
- class neural_network.WeightedPartitioner(n: int, m: int, df: DataFrame, do_regression: bool = False, bins: int = 10)[source]¶
Class to create m sets from a list of n integers weighted by which ground truth class each integer lies in
- __call__() List[List[int]][source]¶
Uses weights for each class to create sets of size m containing integers (sampled with replacement).
- Returns:
The list of sets
- Return type:
List[List[int]]
- __init__(n: int, m: int, df: DataFrame, do_regression: bool = False, bins: int = 10)[source]¶
Constructor method
- Parameters:
n (int) – Number of integers
m (int) – Number of sets for the partition
df (pd.DataFrame) – The classes for the integers
do_regression (bool) – Whether we are partitioning regressional or classificational data
bins (int) – If regression is True, this represents the number of bins to split the data in to. Otherwise, this parameter is ignored