Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if isinstance(excluded_dataset, (str, PurePath)):
excluded_dataset = [excluded_dataset]
if isinstance(prior_dataset, (str, PurePath)):
prior_dataset = [prior_dataset]
as_data = ASReviewData()
# Find the URL of the datasets if the dataset is an example dataset.
for data in dataset:
as_data.append(ASReviewData.from_file(find_data(data)))
if new:
as_data.labels = np.full((len(as_data),), LABEL_NA, dtype=int)
for data in included_dataset:
as_data.append(ASReviewData.from_file(
find_data(data), data_type="included"))
for data in excluded_dataset:
as_data.append(ASReviewData.from_file(
find_data(data), data_type="excluded"))
for data in prior_dataset:
as_data.append(ASReviewData.from_file(
find_data(data), data_type="prior"))
return as_data
if isinstance(prior_dataset, (str, PurePath)):
prior_dataset = [prior_dataset]
as_data = ASReviewData()
# Find the URL of the datasets if the dataset is an example dataset.
for data in dataset:
as_data.append(ASReviewData.from_file(find_data(data)))
if new:
as_data.labels = np.full((len(as_data),), LABEL_NA, dtype=int)
for data in included_dataset:
as_data.append(ASReviewData.from_file(
find_data(data), data_type="included"))
for data in excluded_dataset:
as_data.append(ASReviewData.from_file(
find_data(data), data_type="excluded"))
for data in prior_dataset:
as_data.append(ASReviewData.from_file(
find_data(data), data_type="prior"))
return as_data