def train_linear_regress():
    train_set, train_target, test_set, test_target, train_reg_target = get_data_set(
    )
    train_set, test_set, features = models.get_fitted_data_set(
        train_set, test_set)
    models.linear_regression(train_set, train_reg_target, test_set,
                             test_target)
def train_xgboost():
    train_set, train_target, test_set, test_target, train_reg_target = get_data_set(
    )
    print('indexes count: ' + str(len(train_set.columns)))
    train_set, test_set, features = models.get_fitted_data_set(
        train_set, test_set)
    models.xgboost(train_set, train_target, test_set, test_target, features)
def train_random_forest_kneighbours_reg():
    train_set, train_target, test_set, test_target, train_reg_target = get_data_set(
    )
    print('indexes count: ' + str(len(train_set.columns)))
    train_set, test_set, features = models.get_fitted_data_set(
        train_set, test_set)
    models.random_forest_kneighbours_reg(train_set, train_target,
                                         train_reg_target, test_set,
                                         test_target, features)
def train_random_forest_random_forest():
    train_set, train_target, test_set, test_target, train_reg_target = get_data_set(
    )
    corporations = range(test_start, test_end + 1)
    print('indexes count: ' + str(len(train_set.columns)))
    train_set, test_set, features = models.get_fitted_data_set(
        train_set, test_set)
    prediction = models.random_forest_random_forest(train_set, train_target,
                                                    train_reg_target, test_set,
                                                    test_target, features)
    save_results(corporations, prediction)
def train_decision_tree_regress():
    train_set, train_target, test_set, test_target, train_reg_target = get_data_set(
    )
    train_set, test_set, features = models.get_fitted_data_set(
        train_set, test_set)
    models.decision_tree_reg(train_set, train_target, test_set, test_target)
def train_kneighbors_regress():
    train_set, train_target, test_set, test_target, train_reg_target = get_data_set(
    )
    train_set, test_set, features = models.get_fitted_data_set(
        train_set, test_set)
    models.kneighbors_reg(train_set, train_reg_target, test_set, test_target)
def train_gradient_boosting():
    train_set, train_target, test_set, test_target, train_reg_target = get_data_set(
    )
    train_set, test_set, features = models.get_fitted_data_set(
        train_set, test_set)
    models.gradient_boosting(train_set, train_target, test_set, test_target)