add DBSCAN outlier detection feature, add supporting documentation
This commit is contained in:
@@ -105,6 +105,7 @@ Mandatory parameters are marked as **Required**, which means that they are requi
|
||||
| `stratify_training_data` | This value is used to indicate the stratification of the data. e.g. 2 would set every 2nd data point into a separate dataset to be pulled from during training/testing. <br> **Datatype:** positive integer.
|
||||
| `indicator_max_period_candles` | The maximum *period* used in `populate_any_indicators()` for indicator creation. FreqAI uses this information in combination with the maximum timeframe to calculate how many data points it should download so that the first data point does not have a NaN <br> **Datatype:** positive integer.
|
||||
| `indicator_periods_candles` | A list of integers used to duplicate all indicators according to a set of periods and add them to the feature set. <br> **Datatype:** list of positive integers.
|
||||
| `DBSCAN_outlier_pct` | Inactive by default. If user sets this to a fractional value, DBSCAN is used to cluster the training data and remove user set percentage of training data as outliers. <br> **Datatype:** float (fraction of 1).
|
||||
| | **Data split parameters**
|
||||
| `data_split_parameters` | Include any additional parameters available from Scikit-learn `test_train_split()`, which are shown [here](https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.train_test_split.html) <br> **Datatype:** dictionary.
|
||||
| `test_size` | Fraction of data that should be used for testing instead of training. <br> **Datatype:** positive float below 1.
|
||||
@@ -519,7 +520,7 @@ variance of the data set is >= 0.999.
|
||||
|
||||
### Removing outliers using a Support Vector Machine (SVM)
|
||||
|
||||
The user can tell Freqai to remove outlier data points from the training/test data sets by setting:
|
||||
The user can tell FreqAI to remove outlier data points from the training/test data sets by setting:
|
||||
|
||||
```json
|
||||
"freqai": {
|
||||
@@ -529,9 +530,20 @@ The user can tell Freqai to remove outlier data points from the training/test da
|
||||
}
|
||||
```
|
||||
|
||||
Freqai will train an SVM on the training data (or components if the user activated
|
||||
FreqAI will train an SVM on the training data (or components if the user activated
|
||||
`principal_component_analysis`) and remove any data point that it deems to be sitting beyond the feature space.
|
||||
|
||||
### Clustering the training data and removing outliers with DBSCAN
|
||||
|
||||
The user can tell FreqAI to use DBSCAN to cluster training data and remove outliers from the training data set. The user set
|
||||
parameter `DBSCAN_outlier_pct` allows the user to indicate the percent of expected outliers to be removed during each training
|
||||
(typically set below 0.05). Higher value increases confidence in the model predictions but reduces the entry frequency.
|
||||
|
||||
The FreqAI DBSCAN wrapper performs an interative solution to solving the `eps` hyper parameter. `eps` controls the fraction of
|
||||
training data considered to be an outlier - thus the iterative solution finds the exact value associated with the user designated
|
||||
`DBSCAN_outlier_pct`. This iterative solution is performed once per training. FreqAI stores the `eps` to be used when DBSCAN
|
||||
is again called to determine if incoming prediction candles are outliers.
|
||||
|
||||
### Stratifying the data
|
||||
|
||||
The user can stratify the training/testing data using:
|
||||
|
Reference in New Issue
Block a user