Skip to content

Commit

Permalink
Merge pull request freqtrade#10171 from freqtrade/robcaulk-patch-1
Browse files Browse the repository at this point in the history
Bring back PCA doc
  • Loading branch information
xmatthias authored May 4, 2024
2 parents 643bfa0 + 93e65a5 commit a31be68
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/freqai-feature-engineering.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,3 +391,18 @@ Given a number of data points $N$, and a distance $\varepsilon$, DBSCAN clusters
![dbscan](assets/freqai_dbscan.jpg)

FreqAI uses `sklearn.cluster.DBSCAN` (details are available on scikit-learn's webpage [here](https://scikit-learn.org/stable/modules/generated/sklearn.cluster.DBSCAN.html) (external website)) with `min_samples` ($N$) taken as 1/4 of the no. of time points (candles) in the feature set. `eps` ($\varepsilon$) is computed automatically as the elbow point in the *k-distance graph* computed from the nearest neighbors in the pairwise distances of all data points in the feature set.


### Data dimensionality reduction with Principal Component Analysis

You can reduce the dimensionality of your features by activating the principal_component_analysis in the config:

```json
"freqai": {
"feature_parameters" : {
"principal_component_analysis": true
}
}
```

This will perform PCA on the features and reduce their dimensionality so that the explained variance of the data set is >= 0.999. Reducing data dimensionality makes training the model faster and hence allows for more up-to-date models.

0 comments on commit a31be68

Please sign in to comment.