Ejemplo n.º 1
0
def autompg():
    X, y = autompg_data()
    X = X[:, :7]
    y /= 100.0
    for i in range(7):
        X[:, i] /= max(X[:, i])

    X_train, X_test = np.split(X, [300])
    y_train, y_test = np.split(y, [300])
    return X_train, y_train, X_test, y_test
Ejemplo n.º 2
0
def test_import_autompg_data():
    X, y = autompg_data()
    assert (X.shape[0] == 392)
    assert (X.shape[1] == 8)
    assert (y.shape[0] == 392)
Ejemplo n.º 3
0
def test_import_autompg_data():
    X, y = autompg_data()
    assert(X.shape[0] == 392)
    assert(X.shape[1] == 8)
    print(y.shape)
    assert(y.shape[0] == 392)