> For the complete documentation index, see [llms.txt](https://lijeffrey39.gitbook.io/sentiment-ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lijeffrey39.gitbook.io/sentiment-ai/prediction/backtesting/feature-standardization.md).

# Feature standardization

All user features are standardized and normalized to be used in user weighting. Standardization is done by looking at the previous *n* users before the current tweet. Then the average and standard deviation from these n users is used to standardize the feature.

```python
def standardizeFeature(value):
    max_value = avg + (3 * std)
    result = math.log10(value / max_value)
    return result
```
