def compute_hidden_nodes(samples, inputs, outputs, scaling_factor=2):
    """
    Compute the approximate number of hidden nodes for a layer.

    :param samples: number of samples in the data
    :param inputs: number of input neurons
    :param outputs: number of output neurons
    :param scaling_factor: scaling factor (usually between 2 [most hidden nodes] and 10 [least hidden nodes])
    :return:
    """
    return int(round(samples / (scaling_factor * (inputs + outputs))))