-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from fadynakhla/arthur/numpy
added transformer for knowledge data -> numpy matrix
- Loading branch information
Showing
3 changed files
with
281 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,41 @@ | ||
class MCTS: | ||
def __init__(self) -> None: | ||
pass | ||
from typing import List, Optional | ||
from dr_claude import datamodels | ||
import math | ||
import random | ||
|
||
|
||
if __name__ == "__main__": | ||
db = datamodels.DiseaseSymptomKnowledgeBase( | ||
condition_symptoms={ | ||
datamodels.Condition(name="COVID-19", umls_code="C0000001"): [ | ||
datamodels.WeightedSymptom( | ||
name="Fever", | ||
umls_code="C0000002", | ||
weight=0.5, | ||
noise_rate=0.2, | ||
), | ||
datamodels.WeightedSymptom( | ||
name="Cough", | ||
umls_code="C0000003", | ||
weight=0.5, | ||
noise_rate=0.1, | ||
), | ||
], | ||
datamodels.Condition(name="Common Cold", umls_code="C0000004"): [ | ||
datamodels.WeightedSymptom( | ||
name="Fever", | ||
umls_code="C0000002", | ||
weight=0.5, | ||
noise_rate=0.05, | ||
), | ||
datamodels.WeightedSymptom( | ||
name="Runny nose", | ||
umls_code="C0000004", | ||
weight=0.5, | ||
noise_rate=0.01, | ||
), | ||
], | ||
} | ||
) | ||
|
||
dataframe, index = datamodels.DiseaseSymptomKnowledgeBaseTransformer.to_numpy(db) |
Oops, something went wrong.