Ejemplo n.º 1
0
def test_combo_mpg(mpg_data):
    hb_mpg = combo_manip_mpg(mpg_data)
    targets = hb_mpg["mpg"].values
    col_names = hb_mpg.columns.values
    data = hb_mpg[col_names[1:]].values
    message = "Running Combo Binary and Label encodings"
    run_model(data, targets, message, regression=True)
Ejemplo n.º 2
0
def test_one_hot(mpg_data):
    hb_mpg = one_hot_mpg(mpg_data)
    targets = hb_mpg["mpg"].values
    col_names = hb_mpg.columns.values
    data = hb_mpg[col_names[1:]].values
    message = "Running one hot"
    run_model(data, targets, message, regression=True)
Ejemplo n.º 3
0
def test_label_encoding(cars_data):
    fr_cars = label_encode_car(cars_data)
    targets = fr_cars["target"].values
    column_names = fr_cars.columns.values
    data = fr_cars[column_names[:-1]].values
    message = "Running label encoding"
    run_model(data, targets, message)
Ejemplo n.º 4
0
def test_label_encoding(ds):
    """
    Test's 
    :param ds: 
    :return: 
    """
    hb_math = label_encode_math(ds)
    targets = hb_math["G3"].values
    col_names = hb_math.columns.values
    data = hb_math[col_names[1:]].values
    message = "Running label encoding on math dataset"
    run_model(data, targets, message, regression=True)
Ejemplo n.º 5
0
def test_one_hot(dataset):
    """
    Tests the dataset with one hot encoding on category columns
    :param dataset: 
    :return: 
    """
    hb_math = one_hot_math(dataset)
    hb_math = replace_yes_no(hb_math)
    targets = hb_math["G3"].values
    col_names = hb_math.columns.values
    data = hb_math[col_names[1:]].values
    message = "running one hot on student math"
    run_model(data, targets, message, regression=True)
Ejemplo n.º 6
0
def test_one_hot(cars_data):
    hb_cars = one_hot_car(cars_data)
    clean_up_targets = {
        "target": {
            "unacc": 0,
            "acc": 1,
            "good": 2,
            "vgood": 3
        }
    }
    hb_cars.replace(clean_up_targets, inplace=True)
    targets = hb_cars["target"].values
    column_names = hb_cars.columns.values
    data = hb_cars[column_names[1:]].values
    message = "Running one hot"
    run_model(data, targets, message)