# normalization

## How to calculate relative values based on position of reference flag

How to calculate relative values based on position of reference flag Question: I have some simple table with IsReference column defining the flag indicating the base value of Pmpp based on which relative values for all other values of Pmpp grouped by Item should be calculated, as shown in the picture below. Similarly, I could …

## transform colors in colorbar, not the ticks

transform colors in colorbar, not the ticks Question: When using a custom normalization, for instance PowerNorm, we can adjust the mapping between values and the colors. If we then show a corresponding colorbar, we can see the change when observing the ticks (compare left and right plot in the following picture). Is there a way …

## How to normalization data on numpy array, without MinMaxScaler package

How to normalization data on numpy array, without MinMaxScaler package Question: how to normalize data without minmaxscaler package. here I have tried it according to the minmax scale formula. but i get an error like this IndexError: invalid index to scalar variable. the code: scale = [] for i in range(0,6): minFP = FCData[:,i].min() maxFP …

## 3D numpy array MinMax Normalization

3D numpy array MinMax Normalization Question: I’d like to MinMax normalize the following 3D numpy array "at 2D-layer level" : np.array([[[0, 1, 2], [3, 4, 5], [6, 7, 8]], [[0, 1, 2], [3, 4, 5], [6, 7, 10]], [[0, 1, 2], [3, 4, 5], [6, 7, 12]]]) to obtain : np.array([[[0. , 0.1, 0.2], [0.3, …

## MinMax scaling on numpy array multiple dimensions

MinMax scaling on numpy array multiple dimensions Question: How to minmax normalize in the most efficient way, a XD-numpy array in "columns" of each 2D matrix of the array. For example with a 3D-array : a = np.array([[[ 0, 10], [ 20, 30]], [[ 40, 50], [ 60, 70]], [[ 80, 90], [100, 110]]]) into …

## Automate fractal like nested JSON normalization

Automate fractal like nested JSON normalization Question: The problem : I have 100+ JSON with a fractal like structure of list of dicts. The width and the heigth of the data structure vary a lot from one JSON to another. Each labels are parts of a sentence. test = [ { "label": "I", "children": [ …

## Normalisation layer for tf.data.Dataset

Normalisation layer for tf.data.Dataset Question: I am trying to improve the Tensorflow tutorial on Time series forecasting. The code is quite long, but my doubt regards only a small part of it. In the tutorial the data is normalized is the usual way: it is demeaned and standardized using the mean and standard deviation of …

## how to normalize panda dataframe based on another dataframe

how to normalize panda dataframe based on another dataframe Question: there is two panda dataframe . I used MinMaxScaler to normalize first dataframe in purpose of training a neural network . and for test dataset i need to do the same but how can I scale dataframe base on min and max of the first …