# basics
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
# linear models
import statsmodels.api as sm
from patsy import dmatrices
# machine learning
from sklearn import metrics
from sklearn import datasets
import lightgbm as lgb
from sklearn.pipeline import make_pipeline
from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor
from sklearn.metrics import mean_squared_error
from sklearn.metrics import roc_curve
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder, OneHotEncoder
from sklearn.tree import DecisionTreeRegressor
# Lasso
from sklearn.linear_model import LassoCV
from sklearn.preprocessing import StandardScaler
from sklearn.linear_model import LassoLarsIC
# parameters search
from bayes_opt import BayesianOptimization
from sklearn.model_selection import GridSearchCV
# plotting
plt.style.use(['ggplot','seaborn-talk'])
plt.rcParams['figure.figsize'] = [6,4]
plt.rcParams['figure.dpi'] = 80
# others
import imp
# personal helper functions
import ml_helper as hp