mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-03-06 22:03:57 +00:00
fixed mypy errors
freqtrade/optimize/space/optunaspaces.py:39: error: Argument 1 to "__init__" of "IntDistribution" has incompatible type "int | float"; expected "int" [arg-type] freqtrade/optimize/space/optunaspaces.py:39: error: Argument 2 to "__init__" of "IntDistribution" has incompatible type "int | float"; expected "int" [arg-type] remove all references for ExtraTreesRegressor and skopt.space
This commit is contained in:
@@ -4,7 +4,7 @@ This page explains how to tune your strategy by finding the optimal
|
||||
parameters, a process called hyperparameter optimization. The bot uses algorithms included in the `scikit-optimize` package to accomplish this.
|
||||
The search will burn all your CPU cores, make your laptop sound like a fighter jet and still take a long time.
|
||||
|
||||
In general, the search for best parameters starts with a few random combinations (see [below](#reproducible-results) for more details) and then uses Bayesian search with a ML regressor algorithm (currently ExtraTreesRegressor) to quickly find a combination of parameters in the search hyperspace that minimizes the value of the [loss function](#loss-functions).
|
||||
In general, the search for best parameters starts with a few random combinations (see [below](#reproducible-results) for more details) and then uses one of optuna's sampler algorithms (currently NSGAIIISampler) to quickly find a combination of parameters in the search hyperspace that minimizes the value of the [loss function](#loss-functions).
|
||||
|
||||
Hyperopt requires historic data to be available, just as backtesting does (hyperopt runs backtesting many times with different parameters).
|
||||
To learn how to get data for the pairs and exchange you're interested in, head over to the [Data Downloading](data-download.md) section of the documentation.
|
||||
|
||||
@@ -12,7 +12,7 @@ from freqtrade.exceptions import OperationalException
|
||||
|
||||
|
||||
with suppress(ImportError):
|
||||
from skopt.space import Dimension
|
||||
from freqtrade.optimize.space import Dimension
|
||||
|
||||
from freqtrade.optimize.hyperopt.hyperopt_interface import EstimatorType, IHyperOpt
|
||||
|
||||
|
||||
@@ -34,9 +34,9 @@ class ft_IntDistribution(IntDistribution):
|
||||
**kwargs,
|
||||
):
|
||||
self.name = name
|
||||
self.low = low
|
||||
self.high = high
|
||||
return super().__init__(int(low), int(high), **kwargs)
|
||||
self.low = int(low)
|
||||
self.high = int(high)
|
||||
return super().__init__(self.low, self.high, **kwargs)
|
||||
|
||||
def __repr__(self):
|
||||
return f"IntDistribution(low={self.low}, high={self.high})"
|
||||
|
||||
Reference in New Issue
Block a user