You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
709 B
Python
23 lines
709 B
Python
from ngboost import NGBRegressor
|
|
from sklearn.ensemble import RandomForestRegressor
|
|
from catboost import CatBoostRegressor
|
|
from lightgbm import LGBMRegressor
|
|
from xgboost import XGBRegressor
|
|
from sklearn.linear_model import LogisticRegression
|
|
from sklearn.linear_model import LinearRegression
|
|
from sklearn.linear_model import Ridge
|
|
from sklearn.model_selection import KFold
|
|
import deepforest
|
|
import numpy as np
|
|
import pandas as pd
|
|
from typing import Union
|
|
from sklearn import metrics
|
|
from sklearn.model_selection import train_test_split
|
|
from sklearn.utils.validation import check_X_y
|
|
import joblib
|
|
|
|
def average_R2(evals):
|
|
sum = 0
|
|
for item in evals:
|
|
sum += item['R^2']
|
|
return sum/len(evals) |