I am trying to standardize a dataset in Weka. I was able too use to standardize function however the results which I have found using Excel and using Weka were little different.

```
Following are the screenshots:
```

**Initial Data**

**Standardized data given by Weka**

**Manual Excel results**

**Formula Used for calculating manual results:**

```
z = (x-mean)/SD
z = Std value
x = value to be standardized
mean = mean of dataset
SD = standard deviation
```

**I would like to know the formula which Weka uses to calculate the standardized value.**

Any help is appreciated!!

Thanks!!

To get the formula that weka usage you need to go through the source code that weka provides.

chekc the souece here @ GC: Standardize – weka.filters.unsupervised.attribute.Standardize (.java) – GrepCode Class Source

You may be able to get the formula you are looking for.

### Answer：

I checked using Python and NumPy to do the standardization procedure. Weka (v3.6.12) uses indeed

```
z = (x - mean) / std
```

where `std`

is the standard deviation. Be sure that your `SD`

corresponds indeed the standard deviations (and not the variances, for instance).

Tags: excelexcel, sed