text_plain_output_1.png
"""#стакнем-ка ридж регерссию и метод опорных векторов
from sklearn.linear_model import RidgeCV
from sklearn.svm import LinearSVR
from sklearn.ensemble import RandomForestRegressor
from sklearn.ensemble import StackingRegressor
import warnings
warnings.filterwarnings('ignore') #нужна линеризация данных, а мне лень
estimators = [('lr', RidgeCV()), ('svr', LinearSVR(random_state=42, max_iter = 1000))]
regStack = StackingRegressor(estimators=estimators, final_estimator=RandomForestRegressor(n_estimators=10, random_state=42))
regStack.fit(X_train, Y_train)
print("train score", regStack.score(X_train, Y_train))
print("test score", regStack.score(X_test, Y_test))
#print("crossVal score", cross_val_score(regStack, X, Y, cv=3).mean())"""