application_vnd.jupyter.stderr_output_1.png
from sklearn.metrics         import mean_absolute_error, mean_absolute_percentage_error, mean_squared_error

import matplotlib.pyplot as plt

import numpy             as np

import pandas            as pd

import seaborn           as sns

def settings():
    plt.style.use('bmh')
    plt.rcParams['figure.figsize'] = [25, 12]
    plt.rcParams['font.size'] = 24
    plt.rcParams['figure.dpi'] = 100
    sns.set()
def ml_error(model_name, ytest, yhat):
    mae = mean_absolute_error(ytest, yhat)
    mape = mean_absolute_percentage_error(ytest, yhat)
    rmse = np.sqrt(mean_squared_error(ytest, yhat))
    return pd.DataFrame({'Model name': model_name, 'MAE': mae, 'MAPE': mape, 'RMSE': rmse}, index=[0])
def analise_bivariada(df, column):
    aux1 = df[[column, 'preco']].groupby(column).mean().reset_index()
    aux2 = df[[column, 'preco']].groupby(column).median().reset_index()

df_raw = pd.read_csv('treino.csv')
df_test = pd.read_csv('teste.csv')