Commit c234ff23 authored by Christian Marius Lillelund's avatar Christian Marius Lillelund
Browse files

updated notebooks

parent 2af58327
...@@ -70,4 +70,4 @@ def main(): ...@@ -70,4 +70,4 @@ def main():
print(f"Processed data dictionary: {pt.PROCESSED_DATA_DIR}\n") print(f"Processed data dictionary: {pt.PROCESSED_DATA_DIR}\n")
if __name__ == "__main__": if __name__ == "__main__":
main() main()
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -35,4 +35,4 @@ class JWTBearer(HTTPBearer): ...@@ -35,4 +35,4 @@ class JWTBearer(HTTPBearer):
payload = None payload = None
if payload: if payload:
is_token_valid = True is_token_valid = True
return is_token_valid return is_token_valid
\ No newline at end of file
...@@ -114,4 +114,4 @@ def main(): ...@@ -114,4 +114,4 @@ def main():
write_csv(df, file_path, file_name) write_csv(df, file_path, file_name)
if __name__ == "__main__": if __name__ == "__main__":
main() main()
\ No newline at end of file
...@@ -58,4 +58,4 @@ def main(): ...@@ -58,4 +58,4 @@ def main():
write_csv(df, file_path, file_name) write_csv(df, file_path, file_name)
if __name__ == "__main__": if __name__ == "__main__":
main() main()
\ No newline at end of file
...@@ -160,4 +160,5 @@ def create_union_of_ids(*args: Tuple) -> List[str]: ...@@ -160,4 +160,5 @@ def create_union_of_ids(*args: Tuple) -> List[str]:
return ids return ids
if __name__ == "__main__": if __name__ == "__main__":
main() main()
\ No newline at end of file
\ No newline at end of file
...@@ -137,4 +137,4 @@ def read_csv(file_path, file_name, conveters=None, ...@@ -137,4 +137,4 @@ def read_csv(file_path, file_name, conveters=None,
skiprows=skiprows) skiprows=skiprows)
if __name__ == '__main__': if __name__ == '__main__':
main() main()
\ No newline at end of file
...@@ -25,4 +25,4 @@ RAW_DATA_DIR_TEST = Path.joinpath(ROOT_DIR, 'data/raw/test') ...@@ -25,4 +25,4 @@ RAW_DATA_DIR_TEST = Path.joinpath(ROOT_DIR, 'data/raw/test')
PROCESSED_DATA_DIR = Path.joinpath(ROOT_DIR, 'data/processed') PROCESSED_DATA_DIR = Path.joinpath(ROOT_DIR, 'data/processed')
PROCESSED_EMB_DATA_DIR = Path.joinpath(ROOT_DIR, 'data/processed/embeddings') PROCESSED_EMB_DATA_DIR = Path.joinpath(ROOT_DIR, 'data/processed/embeddings')
INTERIM_DATA_DIR = Path.joinpath(ROOT_DIR, 'data/interim') INTERIM_DATA_DIR = Path.joinpath(ROOT_DIR, 'data/interim')
EXTERNAL_DATA_DIR = Path.joinpath(ROOT_DIR, 'data/external') EXTERNAL_DATA_DIR = Path.joinpath(ROOT_DIR, 'data/external')
\ No newline at end of file
...@@ -83,4 +83,4 @@ class Cleaner2021(BaseCleaner): ...@@ -83,4 +83,4 @@ class Cleaner2021(BaseCleaner):
mask = (df['LendDate'] >= '1900-01-01') & (df['LendDate'] <= pd.Timestamp('today')) mask = (df['LendDate'] >= '1900-01-01') & (df['LendDate'] <= pd.Timestamp('today'))
df = df.loc[mask] df = df.loc[mask]
df = df[df['DevISOClass'].isin(iso_classes.DevISOClass)] df = df[df['DevISOClass'].isin(iso_classes.DevISOClass)]
return df return df
\ No newline at end of file
...@@ -176,4 +176,4 @@ class AlarmDataLoader(BaseDataLoader): ...@@ -176,4 +176,4 @@ class AlarmDataLoader(BaseDataLoader):
dtype=[('Status', 'bool'), ('Days_to_alarm', '>i4')]) dtype=[('Status', 'bool'), ('Days_to_alarm', '>i4')])
self.X = pd.DataFrame(X) self.X = pd.DataFrame(X)
self.y = np.array(y) self.y = np.array(y)
return self return self
\ No newline at end of file
...@@ -112,4 +112,4 @@ def write_cv_plot(means: List, stds: List, metric: str, ...@@ -112,4 +112,4 @@ def write_cv_plot(means: List, stds: List, metric: str,
fig.suptitle(f"{os.path.splitext(title)[0]} {subtitle}") fig.suptitle(f"{os.path.splitext(title)[0]} {subtitle}")
plt.setp(axs[-1, :], xlabel='Seed') plt.setp(axs[-1, :], xlabel='Seed')
plt.setp(axs[:, 0], ylabel=metric) plt.setp(axs[:, 0], ylabel=metric)
plt.savefig(outfile, format='pdf', bbox_inches="tight") plt.savefig(outfile, format='pdf', bbox_inches="tight")
\ No newline at end of file
...@@ -71,4 +71,4 @@ def test_clean_patient_data(): ...@@ -71,4 +71,4 @@ def test_clean_patient_data():
'0', '#VALUE!', '681']}) '0', '#VALUE!', '681']})
res = Cleaner2021().clean_patient_data(df_patient) res = Cleaner2021().clean_patient_data(df_patient)
assert not res.empty assert not res.empty
assert len(res) == 1 assert len(res) == 1
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment