def compare_featurizer_class(featurizer,
scaled_size,
featurized_data,
downsample_size,
image_column_headers,
automatic_downsample,
csv_path,
image_list,
depth,
featurized=False):
"""Check the necessary assertions for a featurizer image."""
assert featurizer.scaled_size == scaled_size
assert np.allclose(featurizer.features, featurized_data, atol=ATOL)
assert featurizer.downsample_size == downsample_size
assert featurizer.image_column_headers == image_column_headers
assert featurizer.auto_sample == automatic_downsample
assert featurizer.csv_path == csv_path
assert featurizer.image_list == image_list
assert featurizer.depth == depth
if featurized:
assert filecmp.cmp('{}_full'.format(csv_path), CHECK_CSV.format(featurizer.model_name))
assert featurizer.full_dataframe == pd.read_csv(CHECK_CSV.format(featurizer.model_name))
评论列表
文章目录