def test_boston_data(): dm = BostonHousingData() assert dm.url_source == 'https://archive.ics.uci.edu/ml/machine-learning-databases/housing/housing.data' assert dm._save_dir.exists() # First one downloads the data x_train, y_train, x_valid, y_valid, x_test, y_test = dm.load() # second call should check the 'if exists' branch _ = dm.load() # train = 60%, valid = 20%, test = 20% assert 0 < len(x_test) == len(y_test) assert 0 < len(x_valid) == len(y_valid) assert len(y_valid) < len(x_train) == len(y_train)
def get_data(self): data_manager = BostonHousingData() return data_manager.load()
def get_data(self): dm = BostonHousingData() return dm.load()