MetaQuotes:
我们将从最著名的 Boom 1000 开始,逐一分析所有衍生品合成市场。
我们将从最著名的 Boom 1000 开始,逐一分析所有衍生品合成市场。
非常感谢你的文章!我关注这些指数已经很久了,但我不知道该从哪方面入手。
请继续!
#建立模型 model = MLPClassifier(hidden_layer_sizes=(30,10),max_iter=200) # 交叉验证模型 for i,(train,test) in enumerate(tscv.split(train_X)): model.fit( train_X.loc[train[0]:train[-1],:], ohlc_train_y.loc[train[0]:train[-1]] ) validation_accuracy.iloc[i,0] = accuracy_score( ohlc_train_y.loc[test[0]:test[-1]], model.predict(train_X.loc[test[0]:test[-1],:]) )
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[25], line 5 3 #Cross validate the model 4 for i,(train,test) in enumerate(tscv.split(train_X)): ----> 5 model.fit(train_X.loc[train[0]:train[-1],:],ohlc_train_y.loc[train[0]:train[-1]]) 6 validation_accuracy.iloc[i,0] = accuracy_score(ohlc_train_y.loc[test[0]:test[-1]],model.predict(train_X.loc[test[0]:test[-1],:])) File c:\Python\ocrujenie\.ordi\Lib\site-packages\sklearn\base.py:1389, in _fit_context.<locals>.decorator.<locals>.wrapper(estimator, *args, **kwargs) 1382 estimator._validate_params() 1384 with config_context( 1385 skip_parameter_validation=( 1386 prefer_skip_nested_validation or global_skip_validation 1387 ) 1388 ): -> 1389 return fit_method(estimator, *args, **kwargs) File c:\Python\ocrujenie\.ordi\Lib\site-packages\sklearn\neural_network\_multilayer_perceptron.py:754, in BaseMultilayerPerceptron.fit(self, X, y) 736 @_fit_context(prefer_skip_nested_validation=True) 737 def fit(self, X, y): 738 """Fit the model to data matrix X and target(s) y. 739 740 Parameters (...) 752 Returns a trained MLP model. 753 """ ... 476 "Found input variables with inconsistent numbers of samples: %r" 477 % [int(l) for l in lengths] 478 ) ValueError: Found input variables with inconsistent numbers of samples: [4139, 4133] Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...
我尝试了几种工具,每种工具都会因输入数据(X)和目标变量(y)的维度不匹配而导致 您的模型出错。
新文章 使用MQL5和Python构建自优化EA(第三部分):破解Boom 1000算法已发布:
我们将逐一分析Deriv的所有合成市场,从其最知名的合成市场Boom 1000开始。Boom 1000以其波动性和不可预测性而闻名。该市场以缓慢、短暂且大小相等的看跌K线为特征,这些K线随机地被剧烈的、摩天大楼般高度的看涨K线所跟随。看涨K线尤其难以应对,因为与这些K线相关的tick通常不会发送到客户终端,这意味着每次止损都会被突破,并且总是会伴随着滑点。
因此,大多数成功的交易者都创建了一些策略,这些策略主要基于在交易Boom 1000时只寻找买入机会。回想一下,Boom 1000在M1图表上可能会下跌20分钟,然后在一根K线内就完全收复了整个跌幅!因此,鉴于其超强的看涨特性,成功的交易者会利用这一点,将更多的权重放在Boom 1000的买入设置上,而不是卖出设置上。
作者:Gamuchirai Zororo Ndawana