neuralnet (module)¶
Submodules¶
-
neuralnet.nn.
define_activation
(df, targets, input_columns, test_blocks, n_samples=None, exclude=None, scale=1)¶ Function to build training objects for neural networks from a DataFrame
Parameters: - df: DataFrame
- targets: list of strings
list of targets (values in df.target)
- input_columns: list of strings
columns to include as inputs
- test_blocks: list of numerics
steps to include
- n_samples: int, optional
exact number of samples to use
- exclude: int, optional
exact number of initial samples to exclude
- scale: list of floats, optional
divisors to scale inputs, one per input column
Returns: - inputs: list of lists
- inputs[]: list of numeric
input values
-
neuralnet.nn.
define_trainer_data
(df, targets, training_columns, n_samples=None)¶ Function to build training objects for neural networks from a DataFrame, casting training columns to relative z-scores.
Parameters: - df: DataFrame
- targets: dictionary
- targets[“target”]: list of strings
list of targets (values in df.target)
- targets[“offtarget”]: list of strings
list of offtargets (values in df.target)
- training_columns: list of strings
columns to include as inputs
- n_samples: int, optional
exact number of samples to use
Returns: - on_target: list of dictionaries
- on_target[][“input”]: list of numeric
input values
- on_target[][“output”]: list of numeric
output values
-
neuralnet.nn.
place_true
(total, index)¶ Function to place one 1 in a list of 0s
Parameters: - total: int
length of list of zeroes
- index: int
0-indexed placement of 1
Returns: - l: list of ints
one-hot list