Пример #1
0
    test_csv['price'] = pd.Series(y_pred, index=test_csv.index)
    # any.print_with_line_separator("test_result head():\n" + str(test_csv.head()))
    test_csv.to_csv('hw_data_set_2_result.csv', index=False)


df_train = any.read_traning_data()
df_test = any.read_testing_data()
# any.plot_corr(df_train)
# any.plot_base_price(df_train)
df_train = any.clean_data(df_train)

# any.plot_price_log_price(df_train)
# any.plot_zip_hist(df_train)
# any.plot_make_id_hist(df_train)
# any.plot_trim_id_hist(df_train)
any.analyze_data(df_train, df_test)

df_train, df_test, max_seq_engine_index, max_seq_trim_index, max_seq_engine, max_seq_trim = any.date_processing(
    df_train, df_test)
max_seq_engine += 5
max_seq_trim += 5
# any.plot_corr(df_train)
# any.plot_eng_seq_hist(df_train)
# any.plot_trim_seq_hist(df_train)
# any.plot_time_hist(df_train)
# any.plot_base_price(df_train)
model, history = train(df_train, df_test, max_seq_engine_index,
                       max_seq_trim_index, max_seq_engine, max_seq_trim)
# plot_acc(history)
plot_err(history)
predict_test_set(model, df_test, max_seq_engine, max_seq_trim)