def preprocess_data(self, x, y=None, **kwargs): '''Prepare the data for the neural network. - Remove 0's from the time channels - Center the data on 0 - Scale it to have lie on the interval [-1, 1]''' preprocessing.fix_time_zeros(x) means = preprocessing.center(x) min_, max_, = -1, 1 mins, maxes = preprocessing.scale_min_max(x, min_, max_) if 'channel' in kwargs: channel = kwargs['channel'] else: channel = None preprocessing.standardize_cylinder_rotation(x, channel) def repeat_transformation(other): if len(other) == 0: return else: preprocessing.fix_time_zeros(other) other -= means other -= mins other /= maxes - mins other *= max_ - min_ other += min_ preprocessing.standardize_cylinder_rotation(other, channel) return repeat_transformation
def preprocess_data(self, x, y=None, **kwargs): '''Prepare the data for the neural network. - Remove 0's from the time channels - Center the data on 0 - Scale it to have lie on the interval [-1, 1]''' preprocessing.fix_time_zeros(x) means = preprocessing.center(x) min_, max_, = -1, 1 mins, maxes = preprocessing.scale_min_max(x, min_, max_) if 'channel' in kwargs: channel = kwargs['channel'] else: channel = None preprocessing.standardize_cylinder_rotation(x, channel) def repeat_transformation(other): if len(other) == 0: return else: preprocessing.fix_time_zeros(other) other -= means other -= mins other /= maxes - mins other *= max_ - min_ other += min_ preprocessing.standardize_cylinder_rotation(other, channel) return repeat_transformation
def repeat_transformation(other): if len(other) == 0: return else: preprocessing.fix_time_zeros(other) other -= means other /= stds/std
def repeat_transformation(other): if len(other) == 0: return else: preprocessing.fix_time_zeros(other) other -= means other /= stds / std
def repeat_transformation(other): if len(other) == 0: return else: if not getattr(self, 'only_charge', False): preprocessing.fix_time_zeros(other) other -= means other /= stds / std
def repeat_transformation(other): if len(other) == 0: return else: if not getattr(self, 'only_charge', False): preprocessing.fix_time_zeros(other) other -= means other /= stds/std
def repeat_transformation(other): if len(other) == 0: return else: preprocessing.fix_time_zeros(other) other -= means other -= mins other /= maxes - mins other *= max_ - min_ other += min_
def repeat_transformation(other): if len(other) == 0: return else: preprocessing.fix_time_zeros(other) other -= means other -= mins other /= maxes - mins other *= max_ - min_ other += min_
def repeat_transformation(other): if len(other) == 0: return else: preprocessing.fix_time_zeros(other) other -= means other -= mins other /= maxes - mins other *= max_ - min_ other += min_ preprocessing.standardize_cylinder_rotation(other, channel)
def repeat_transformation(other): if len(other) == 0: return else: preprocessing.fix_time_zeros(other) other -= means other -= mins other /= maxes - mins other *= max_ - min_ other += min_ preprocessing.standardize_cylinder_rotation(other, channel)
def preprocess_data(self, x, y=None): '''Prepare the data for the neural network. - Remove 0's from the time channels - Center the data on 0 - Scale it to have a standard deviation of 1''' std = 1 preprocessing.fix_time_zeros(x) means = preprocessing.center(x) stds = preprocessing.scale(x, std, mode='standardize') def repeat_transformation(other): if len(other) == 0: return else: preprocessing.fix_time_zeros(other) other -= means other /= stds/std return repeat_transformation
def preprocess_data(self, x, y=None): '''Prepare the data for the neural network. - Remove 0's from the time channels - Center the data on 0 - Scale it to have a standard deviation of 1''' std = 1 preprocessing.fix_time_zeros(x) means = preprocessing.center(x) stds = preprocessing.scale(x, std, mode='standardize') def repeat_transformation(other): if len(other) == 0: return else: preprocessing.fix_time_zeros(other) other -= means other /= stds / std return repeat_transformation
def preprocess_data(self, x, y=None): '''Prepare the data for the neural network. - Remove 0's from the time channels - Center the data on 0 - Scale it to have lie on the interval [-1, 1]''' preprocessing.fix_time_zeros(x) means = preprocessing.center(x) min_, max_, = -1, 1 mins, maxes = preprocessing.scale_min_max(x, min_, max_) def repeat_transformation(other): if len(other) == 0: return else: preprocessing.fix_time_zeros(other) other -= means other -= mins other /= maxes - mins other *= max_ - min_ other += min_ return repeat_transformation
def preprocess_data(self, x, y=None): '''Prepare the data for the neural network. - Remove 0's from the time channels - Center the data on 0 - Scale it to have lie on the interval [-1, 1]''' preprocessing.fix_time_zeros(x) means = preprocessing.center(x) min_, max_, = -1, 1 mins, maxes = preprocessing.scale_min_max(x, min_, max_) def repeat_transformation(other): if len(other) == 0: return else: preprocessing.fix_time_zeros(other) other -= means other -= mins other /= maxes - mins other *= max_ - min_ other += min_ return repeat_transformation