Code Monkey home page Code Monkey logo

lara's People

Contributors

4pygmalion avatar wjeong53 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

lara's Issues

SSL with augmentation

개요

  • 이전 타일러 작성코드는 환자 데이터를 직접사용하는 것이라 SSL은 아님
  • OMIM 에서 직접 샘플링한 데이터로 SSL 하도록 변경
args = parse_args()

disease_data = load_pickle(os.path.join(DATA_DIR, "diseases.pickle"))
patient_data = load_pickle(os.path.join(DATA_DIR, "patients.pickle"))
disease_data, patient_data = cleanse_data(disease_data, patient_data)
all_symptom_vectors = torch.tensor(
    disease_data.all_symptom_vectors, dtype=torch.float32
)

train_val_patients_list, test_patients_list = train_test_split( 
    patient_data.data, random_state=args.random_state  # SSL인데 환자데이터가 갑자기 왠?
)
train_patients_list, val_patients_list = train_test_split(
    train_val_patients_list, random_state=args.random_state
)
train_patients = Patients(train_patients_list)
val_patients = Patients(val_patients_list)
test_patients = Patients(test_patients_list)

mlf_logger = MLFlowLogger(
    experiment_name=EXP_SYMPTOM,
    run_name=args.run_name,
    tracking_uri=TRACKING_URI,
)

train_dataset = StochasticPairwiseDataset(
    train_patients,
    disease_data,
    augmentation_factor=args.augmentation_factor,
    max_len=args.max_len,
    initial_fraction=args.initial_fraction,
    fraction_decay_rate=args.fraction_decay_rate,
    augmentator=[
        SampleSymptoms(),
        AddNoiseSymptoms(all_symptom_vectors),
        TruncateOrPad(args.max_len, stochastic=True, weighted_sampling=False),
    ],
).train()

val_dataset = StochasticPairwiseDataset(
    val_patients,
    disease_data,
    max_len=args.max_len,
).validate()

논문화 작업

LLM enhanced semantic similarity 논문의 우수성을 증명하기 위한 근거는 아래와 같습니다.

필요 모델

필요한 결과물

  • : Figure1. LaRA. Method overview(https://github.com/4pygmalion/LaRa/blob/main/data/images/LaRa.png) @4pygmalion

  • : Table1. Demographic characteristics (In-house dataset의 환자의 내용) @wjeong53

    • 아래와 같은 표
      | Variable                 | Eligible participant (N=***) |
      |--------------------------|------------------------------|
      | Gender (n, (%))          |                              |
      |   Male                   |                              |
      |   Female                 |                              |
      | N phenotypes (mean [SD]) |                              |
      | Phenotypes               |                              |
      |   Nervous system         |                              |
      |   Musculoskeletal system |                              |
      |   Head or neck           |                              |
      |   Eye                    |                              |
      |   Cardiovascular system  |                              |
      |   Others                 |                              |
      |--------------------------|------------------------------|
      

    => 의미: 본문내에 큰 의미는 없고, 우리의 환자데이터셋이 엄청 특이케이스로 뽑힌 환자들이 아니며 일반적인 rare disease patients로 분석했다라는 것의 근거만 마련하면 될 것 같습니다. 보통 의학 논문에서 Result1으로 환자의 인구학적 통계들을 많이 제시하는데, 저희도 ML문제이지만, 그 분석대상은 희귀질환환자(의료계)니까, 넣어도 괜찮을 것 같습니다. 이건 의견잇으면 알려주세요.
    => 기타: 3ASC에서도 비슷하게 논문에 테이블 넣었어요. 아래의 manuscript에 table1을 참고해보셔도 좋을 듯합니다.

  • : Figure2. Disease prioritization performance in In-house dataset @wjeong53

    • dataset: inhouse dataset
    • figure type: boxplot 또는 lineplot을 그려주시면 됩니다.
    • figure configuration: X-axis:k, Y-axis: Top-k recall, hue: method(LaRA, Pheno2disease, Informatics content(Resnik기반))
    • Expected figure
      image
      => 의미: 쓰리빌리언이 희귀질환환자 정말많고 RDW(Real world dataset)인데, 이 방법으로 평가했을때, 우리 방법론이 우수했다. RDW라고 주장해야하는게, 실제로 의사들이 증상넣을떄 23개정도밖에안넣습니다... 아래의 온라인 데이터셋도 RDW라고는하는데요. 환자의 phenotype수가 2030개로 매우 많았어요.
    • 고려사항: 사전학습을 저희 데이터셋에 미세조정한 모델로 비교, 사전학습만 넣은 모델도 포함하여 비교
  • : Figure 3: Disease prioritization performance in publicitly available dataset @wjeong53

    • dataset: pheno2disease의 cohort 1 [3]
    • 의미: 이 데이터셋 RDW이긴하지만, phenotype수가 매우많아, 현실적인 데이터셋은 아닙니다. 그리고 여러 논문에서 이 데이터셋을 이용하여 벤치마크로 삼는데, 저희 모델 성능이 우수했습니다.
      figure configuration: X-axis:k, Y-axis: Top-k recall, hue: method(LaRA, Pheno2disease, Informatics content(Resnik기반))
    • Expected figure
      image
  • : Figure 4: Individual case review (posthoc interpretation) @wjeong53

    • Attention을 이용한 posthoc interpretation
    • Still's disease 케이스가 좋았던 것 같아요.
    • method: @100jy 방법론을 이 이슈페이지에 자세히 작성해주실 수 있으세요?
    • JSON 상하차 및 환자 phenotype vector 생성: @4pygmalion , factory pattern으로 JSON으로부터 환자 만들 수 있도록 데이터클레스 메서드 추가

고려사항

  • Table 1 내에 Inhouse-dataset(d1), Online available dataset(d2)로 할지, d2은 따로언급안할지 고민이 필요할듯
  • Causal gene level prioritization 할지 말지여부 (추가 실험에 대한 공수가 들것 같아요. 있으면 좋긴한데, causal gene을 기준으로 synthetic patient만들고 다시 학습하는 작업이 필요하긴 해요)

Authorship

  • 1안: Benny, heon (first coauthor), tyler (second) Kyle(Corresponding) : Kyle이 여기 들어는게 맞을까요?
  • 2안: Benny (first author), tyler (second), Heon(Corresponding)
  • 3안: Beeny, tyler (first coauthor), Heon(Corresponding)

References

[1] 3ASC_v2.docx
[2] Pheno2disease: Bioinformatics에서 SOTA라고 주장하는 방법론의 논문입니다. https://academic.oup.com/bib/article/24/4/bbad172/7185480?login=false
[3] (https://zenodo.org/records/3905420)

mlflow model load

Summary

  • pth 파일시스템내에 저장되고 있던 체크포인트를 mlflow 관리로 변경하고 실험을 다시 재 실행

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.