├── LICENSE ├── agent.py ├── preprocess.py ├── bound.py ├── simulate.py ├── README.md ├── stat.py ├── conf.py ├── early_stop.py ├── utils.py ├── pretrain.py ├── train.py ├── bound_utils.py ├── layers.py ├── data └── dxy │ ├── test_set.json │ └── train_set.json └── data_utils.py /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 lemuria-wchen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /agent.py: -------------------------------------------------------------------------------- 1 | # this script is to reproduce the random agent and rule-based agent 2 | import numpy as np 3 | from conf import * 4 | from utils import load_data 5 | from data_utils import SymptomVocab, DiseaseVocab, compute_sscom, random_agent, rule_agent 6 | 7 | # load dataset 8 | train_samples, test_samples = load_data(train_path), load_data(test_path) 9 | 10 | 11 | exclude_exp = True 12 | 13 | # # ---------------------------------------------------------------------------------------------------------------------- 14 | # # random agent 15 | # sv = SymptomVocab(samples=train_samples, add_special_sxs=False) 16 | # recs = random_agent(test_samples, sv, max_turn, exclude_exp) 17 | # 18 | # print('rec of random agent: mean/std: {}/{}'.format( 19 | # np.round(np.mean(recs), digits), np.round(np.std(recs), digits))) 20 | 21 | # ---------------------------------------------------------------------------------------------------------------------- 22 | # rule-based agent 23 | sv = SymptomVocab(samples=train_samples, add_special_sxs=False) 24 | dv = DiseaseVocab(samples=train_samples) 25 | cm = compute_sscom(train_samples, sv) 26 | for max_turn in range(41): 27 | # max_turn = 20 28 | rec, pos_rec, neg_rec = rule_agent(test_samples, cm, sv, max_turn, exclude_exp) 29 | # print('rec of rule agent: {}/{}/{}'.format( 30 | # np.round(rec, digits), np.round(pos_rec, digits), np.round(neg_rec, digits))) 31 | print(rec) 32 | -------------------------------------------------------------------------------- /preprocess.py: -------------------------------------------------------------------------------- 1 | from utils import * 2 | 3 | 4 | # dxy 数据集有 423 个训练集 和 104 个测试集 5 | dxy_path = 'data/dxy/raw/dxy_dialog_data_dialog_v2.pickle' 6 | 7 | # mz4 数据集有多个版本 8 | # 第一个版本为 ACL 2018 年文章的版本,共 568 个训练集 和 142 个测试集合。 9 | # 第二个版本为 HRL 2020 年文章的版本,共 1214 个训练集,174 个验证集 和 345 个测试集。 10 | mz4_path = 'data/mz4/raw/acl2018-mds.p' 11 | mz4_1k_path = 'data/mz4-1k/raw/' 12 | 13 | # mz10 数据集有 1214 个训练集,174 个验证集 和 345 个测试集。 14 | mz10_path = 'data/mz10/raw/' 15 | 16 | 17 | # dxy 18 | data = pickle.load(open(dxy_path, 'rb')) 19 | 20 | train_samples, test_samples = convert_dxy(data['train'], prefix='train'), convert_dxy(data['test'], prefix='test') 21 | 22 | json_dump(train_samples, test_samples, 'dxy') 23 | 24 | # mz4 25 | data = pickle.load(open(os.path.join(mz4_path), 'rb')) 26 | 27 | train_samples = convert_mz4(data['train'], prefix='train') 28 | test_samples = convert_mz4(data['test'], prefix='test') 29 | 30 | json_dump(train_samples, test_samples, 'mz4') 31 | 32 | # mz4-1k 33 | train_data = pickle.load(open(os.path.join(mz4_1k_path, 'goal_set.p'), 'rb')) 34 | test_data = pickle.load(open(os.path.join(mz4_1k_path, 'goal_test_set.p'), 'rb')) 35 | 36 | train_samples = convert_mz4(train_data['train'] + train_data['dev'], prefix='train') 37 | test_samples = convert_mz4(test_data['test'], prefix='test') 38 | 39 | json_dump(train_samples, test_samples, 'mz4-1k') 40 | 41 | # mz10 42 | train_data = load_json(os.path.join(mz10_path, 'train.json')) 43 | dev_data = load_json(os.path.join(mz10_path, 'dev.json')) 44 | test_data = load_json(os.path.join(mz10_path, 'test.json')) 45 | 46 | train_samples = convert_mz10(train_data) + convert_mz10(dev_data) 47 | test_samples = convert_mz10(test_data) 48 | 49 | json_dump(train_samples, test_samples, 'mz10') 50 | -------------------------------------------------------------------------------- /bound.py: -------------------------------------------------------------------------------- 1 | # this script is to train a machine learning based disease classifier. 2 | # it is used to calculate the boundary of disease diagnosis accuracy. 3 | 4 | # symptom set: {symptom_1, symptom_2, ..., symptom_n} 5 | # attr set: {yes, no, not_sure} 6 | # disease set: {disease_1, ..., disease_m} 7 | # explicit symptoms: {symptom_1: attr_1, ..., symptom_k: attr_k} 8 | # implicit symptoms: {symptom_k+1: attr_k+1, ..., symptom_n: attr_n} 9 | # lower bound: train a disease classifier only use explicit symptoms 10 | # upper bound: train a disease classifier use explicit plus implicit symptoms 11 | 12 | from utils import load_data, make_dirs 13 | from bound_utils import run_classifier, run_classifiers 14 | from conf import digits 15 | 16 | 17 | # parameters for calculating empirical upper and lower bounds 18 | ds = 'mz4' 19 | classifier = 'svm' 20 | random_state = 123 21 | verbose = False 22 | 23 | 24 | # load dataset 25 | train_path, test_path = 'data/{}/train_set.json'.format(ds), 'data/{}/test_set.json'.format(ds) 26 | train_samples, test_samples = load_data(train_path), load_data(test_path) 27 | 28 | # ablation experiments of classifiers 29 | run_classifiers(train_samples, test_samples, classifier, random_state, verbose, digits) 30 | 31 | 32 | # train ub-classifier (with complete implicit symptoms) 33 | # path = 'saved/{}/{}.pkl'.format(ds, classifier) 34 | # make_dirs(path) 35 | # print('=' * 100 + '\n{} acc ub.\n'.format(classifier) + '=' * 100) 36 | # run_classifier(train_samples, test_samples, add_imp=[True, True, True], classifier=classifier, 37 | # random_state=random_state, verbose=verbose, digits=digits, path=path) 38 | 39 | # results 40 | # acc-lb acc-ub acc-pos acc-neg acc-pos+neg 41 | # dxy 0.644 0.856 0.808 0.663 0.856 42 | # mz4 0.648 0.697 0.704 0.676 0.697 43 | # mz4-1k 0.646 0.757 0.693 0.693 0.757 44 | # mz10 0.490 0.671 0.592 0.578 0.603 45 | # mz10-old 0.500 0.706 0.619 0.536 0.641 46 | -------------------------------------------------------------------------------- /simulate.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | import seaborn as sns 4 | import matplotlib.pyplot as plt 5 | from matplotlib.backends.backend_pdf import PdfPages 6 | 7 | from bound_utils import simulate 8 | from utils import load_data 9 | from conf import digits 10 | 11 | 12 | # parameters for simulating acc-rec 13 | ds = 'dxy' 14 | num_sims = 100 15 | classifier = 'svm' 16 | random_state = 123 17 | 18 | 19 | # load dataset 20 | train_path, test_path = 'data/{}/train_set.json'.format(ds), 'data/{}/test_set.json'.format(ds) 21 | train_samples, test_samples = load_data(train_path), load_data(test_path) 22 | 23 | # load trained svm model 24 | path = 'saved/{}/{}.pkl'.format(ds, classifier) 25 | 26 | # random generate a list of recall values 27 | recs = np.append([0.0, 1.0], np.random.uniform(low=0.0, high=1.0, size=num_sims)) 28 | 29 | # compute the accuracy score 30 | acc_scores = simulate(train_samples, test_samples, path, recs) 31 | 32 | print('acc. (rec equals to 0): {}'.format(round(acc_scores[0], digits))) 33 | print('acc. (rec equals to 1): {}'.format(round(acc_scores[1], digits))) 34 | 35 | # bound 36 | lb = {'dxy': 0.644, 'mz4': 0.646, 'mz10': 0.500}.get(ds) 37 | ub = {'dxy': 0.856, 'mz4': 0.757, 'mz10': 0.706}.get(ds) 38 | 39 | fig_path = 'saved/{}/{}-sim.pdf'.format(ds, classifier) 40 | with PdfPages(fig_path) as pdf: 41 | sns.set_context('paper', font_scale=4.0) 42 | sns.set_theme(color_codes=True) 43 | df = pd.DataFrame({'recalls': recs, 'acc_scores': acc_scores}) 44 | ax = sns.regplot(data=df, x='recalls', y='acc_scores') 45 | ax.axhline(lb, ls='--', c='green') 46 | ax.axhline(ub, ls='--', c='purple') 47 | plt.xlabel('Symptom Recall (simulate)') 48 | plt.ylabel('Disease Accuracy') 49 | plt.tight_layout() 50 | pdf.savefig() 51 | print('saving figures to {}'.format(fig_path)) 52 | 53 | 54 | # results 55 | # acc.(rec=0) acc.(rec=1) 56 | # dxy 0.635 0.856 57 | # mz4 0.626 0.757 58 | # mz10 0.442 0.706 59 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## DxFormer 2 | 3 | Code for our Bioinformatics 2022 paper: [DxFormer: A Decoupled Automatic Diagnostic System Based on Decoder-Encoder Transformer with Dense Symptom Representations](https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/btac744/6835407). 4 | ### Download data 5 | 6 | Download the datasets, then decompress them and put them in the corrsponding documents in `data/{dxy|mz4|mz10}/raw`. For example, download mz4 dataset and put the dataset to the `data/mz4/raw`. 7 | 8 | The dataset can be downloaded as following links: 9 | 10 | - [Dxy dataset](https://github.com/HCPLab-SYSU/Medical_DS) 11 | - [MZ-4 dataset](http://www.sdspeople.fudan.edu.cn/zywei/data/acl2018-mds.zip) 12 | - [MZ-10 dataset](https://github.com/lemuria-wchen/imcs21) 13 | 14 | ### Preprocess 15 | 16 | ```shell 17 | python preprocess.py 18 | ``` 19 | 20 | ### Accuracy Bound 21 | 22 | The default dataset is MZ-10, please modify the code to change dataset by just replace `mz10` to `dxy` or `mz4`. 23 | 24 | ```shell 25 | python bound.py 26 | ``` 27 | 28 | ### Pre-training 29 | 30 | ``` 31 | python pretrain.py 32 | ``` 33 | 34 | ### Training & Inference 35 | 36 | ``` 37 | python train.py 38 | ``` 39 | ## Citation 40 | 41 | If you use or extend this work, please cite [this paper](https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/btac744/6835407) where it is introcuded. 42 | 43 | ``` 44 | @article{10.1093/bioinformatics/btac744, 45 | author = {Chen, Wei and Zhong, Cheng and Peng, Jiajie and Wei, Zhongyu}, 46 | title = "{DxFormer: a decoupled automatic diagnostic system based on decoder–encoder transformer with dense symptom representations}", 47 | journal = {Bioinformatics}, 48 | year = {2022}, 49 | month = {11}, 50 | issn = {1367-4803}, 51 | doi = {10.1093/bioinformatics/btac744}, 52 | url = {https://doi.org/10.1093/bioinformatics/btac744}, 53 | note = {btac744}, 54 | eprint = {https://academic.oup.com/bioinformatics/advance-article-pdf/doi/10.1093/bioinformatics/btac744/47804760/btac744.pdf}, 55 | } 56 | ``` 57 | 58 | -------------------------------------------------------------------------------- /stat.py: -------------------------------------------------------------------------------- 1 | from utils import load_data 2 | import numpy as np 3 | from conf import * 4 | 5 | 6 | class STAT: 7 | def __init__(self): 8 | train_samples, test_samples = load_data(train_path), load_data(test_path) 9 | self.samples = train_samples + test_samples 10 | 11 | def count_num_samples(self): 12 | print('number of diseases: {}'.format(len(self.samples))) 13 | 14 | def compute_num_diseases(self): 15 | # num of diseases 16 | dis = set() 17 | for sample in self.samples: 18 | dis.add(sample['label']) 19 | print('number of diseases: {}'.format(len(dis))) 20 | return len(dis) 21 | 22 | def compute_num_symptoms(self): 23 | # num of unique symptoms 24 | sxs = set() 25 | for sample in self.samples: 26 | for sx in sample['exp_sxs']: 27 | sxs.add(sx) 28 | for sx in sample['imp_sxs']: 29 | sxs.add(sx) 30 | print('number of symptoms: {}'.format(len(sxs))) 31 | 32 | def count_symptom_lens(self): 33 | # statistics of num of symptoms 34 | exp_sxs_lens = np.array([len(sample['exp_sxs']) for sample in self.samples]) 35 | print('number of avg./max. exp: {}/{}'.format( 36 | np.round(np.mean(exp_sxs_lens), digits), np.max(exp_sxs_lens))) 37 | imp_sxs_lens = np.array([len(sample['imp_sxs']) for sample in self.samples]) 38 | print('number of avg./max. imp: {}/{}'.format( 39 | np.round(np.mean(imp_sxs_lens), digits), np.max(imp_sxs_lens))) 40 | 41 | def count_zero_symptom(self): 42 | # statistics of zero symptoms 43 | exp_0, imp_0, both = 0, 0, 0 44 | for sample in self.samples: 45 | exp_0 += len(sample['exp_sxs']) == 0 46 | imp_0 += len(sample['imp_sxs']) == 0 47 | both += len(sample['exp_sxs']) + len(sample['imp_sxs']) == 0 48 | print('number of zero exp/imp/both symptoms: {}/{}/{}'.format(exp_0, imp_0, both)) 49 | 50 | def count_duplicates(self): 51 | num_duplicates = 0 52 | total = 0 53 | for sample in self.samples: 54 | for imp_sx, _ in sample['imp_sxs'].items(): 55 | if imp_sx in sample['exp_sxs']: 56 | num_duplicates += 1 57 | total += 1 58 | print('duplicates of implicit symptoms from explicit symptoms: {}/{}'.format( 59 | num_duplicates, round(num_duplicates / total, digits))) 60 | 61 | 62 | stat = STAT() 63 | stat.count_num_samples() 64 | stat.compute_num_diseases() 65 | stat.compute_num_symptoms() 66 | stat.count_zero_symptom() 67 | stat.count_symptom_lens() 68 | stat.count_duplicates() 69 | 70 | 71 | # results 72 | # #samples #diseases #symptoms #avg/max exps #avg/max imps 73 | # dxy 527 5 41 3.07/7 1.67/6 74 | # mz4 1733 4 230 2.091/10 5.463/21 75 | # mz10 4116 10 331 1.73/12 6.6/25 76 | -------------------------------------------------------------------------------- /conf.py: -------------------------------------------------------------------------------- 1 | # this is all the parameters to train our decoder-encoder based agent 2 | import argparse 3 | 4 | # parameters (training) 5 | parser = argparse.ArgumentParser() 6 | parser.add_argument('-d1', '--train_dataset', default='mz4', help='choose the training dataset') 7 | parser.add_argument('-d2', '--test_dataset', default='mz4', help='choose the testing dataset') 8 | args = parser.parse_args() 9 | 10 | # dataset for training 11 | train_dataset = args.train_dataset 12 | 13 | # dataset for testing 14 | test_dataset = train_dataset if train_dataset != 'all' else args.test_dataset 15 | 16 | # check validity 17 | ds_range = ['all', 'dxy', 'mz4', 'mz10'] 18 | # train_ds_range = ds_range + ['all'] 19 | 20 | assert train_dataset in ds_range 21 | assert test_dataset in ds_range 22 | 23 | # gpu device number 24 | # device_num = {'dxy': 0, 'mz4': 1, 'mz10': 2}.get(train_dataset) 25 | device_num = 0 26 | 27 | # train/test data path 28 | train_path = [] 29 | if train_dataset != 'all': 30 | train_path.append('data/{}/train_set.json'.format(train_dataset)) 31 | else: 32 | for ds in ds_range[1:]: 33 | train_path.append('data/{}/train_set.json'.format(ds)) 34 | 35 | test_path = [] 36 | if test_dataset != 'all': 37 | test_path.append('data/{}/test_set.json'.format(test_dataset)) 38 | else: 39 | for ds in ds_range[1:]: 40 | test_path.append('data/{}/test_set.json'.format(ds)) 41 | # test_path = ['data/{}/test_set.json'.format(test_dataset)] 42 | 43 | best_pt_path = 'saved/{}/best_pt_model.pt'.format(train_dataset) 44 | last_pt_path = 'saved/{}/last_pt_model.pt'.format(train_dataset) 45 | 46 | 47 | # global settings 48 | # suffix = {'0': '-Negative', '1': '-Positive', '2': '-Not-Sure'} 49 | suffix = {'0': '-Negative', '1': '-Positive', '2': '-Negative'} 50 | min_sx_freq = None 51 | max_voc_size = None 52 | keep_unk = True 53 | digits = 4 54 | 55 | # model hyperparameter setting 56 | # group 1: position embeddings 57 | pos_dropout = 0.2 58 | pos_max_len = 80 59 | 60 | # group 2: transformer decoder 61 | sx_one_hot = False 62 | attr_one_hot = False 63 | num_attrs = 5 64 | 65 | dec_emb_dim = 128 if train_dataset == 'dxy' else 512 66 | # dec_emb_dim = 128 if train_dataset == 'dxy' else 256 67 | dec_dim_feedforward = 2 * dec_emb_dim 68 | 69 | dec_num_heads = 4 70 | dec_num_layers = 4 71 | dec_dropout = 0.2 72 | 73 | dec_add_pos = True 74 | exclude_exp = True if train_dataset != 'mz10' else False 75 | 76 | # group 3: transformer encoder 77 | enc_emb_dim = dec_emb_dim 78 | enc_dim_feedforward = 2 * enc_emb_dim 79 | 80 | enc_num_heads = 4 81 | enc_num_layers = 1 82 | enc_dropout = 0.2 if train_dataset == 'dxy' else 0.2 83 | 84 | # group 3: training 85 | num_workers = 0 86 | 87 | pt_learning_rate = 3e-4 if train_dataset == 'dxy' else 1e-4 88 | # pt_train_epochs = 100 if train_dataset == 'dxy' else 50 89 | pt_train_epochs = 200 90 | 91 | learning_rate = 1e-4 92 | train_epochs = {'all': 200, 'dxy': 40, 'mz4': 30, 'mz10': 20}.get(train_dataset) 93 | warm_epoch = train_epochs // 2 94 | 95 | train_bsz = 128 96 | test_bsz = 128 97 | 98 | alpha = 0.2 99 | exp_name = 'dense_all' 100 | num_turns = 10 101 | num_repeats = 1 102 | verbose = True 103 | -------------------------------------------------------------------------------- /early_stop.py: -------------------------------------------------------------------------------- 1 | from torch.utils.data import DataLoader 2 | from utils import load_data 3 | from layers import Agent 4 | from tqdm import tqdm 5 | import numpy as np 6 | 7 | from data_utils import * 8 | from conf import * 9 | 10 | 11 | # load dataset 12 | train_samples, test_samples = load_data(train_path), load_data(test_path) 13 | test_size = len(test_samples) 14 | 15 | # construct symptom & disease vocabulary 16 | sv = SymptomVocab(samples=train_samples, add_special_sxs=True, min_sx_freq=min_sx_freq, max_voc_size=max_voc_size) 17 | dv = DiseaseVocab(samples=train_samples) 18 | num_sxs, num_dis = sv.num_sxs, dv.num_dis 19 | 20 | test_ds = SymptomDataset(test_samples, sv, dv, keep_unk, add_tgt_start=True, add_tgt_end=True) 21 | test_ds_loader = DataLoader(test_ds, batch_size=1, num_workers=num_workers, shuffle=False, collate_fn=pg_collater) 22 | 23 | # compute disease-symptom co-occurrence matrix 24 | dscom = compute_dscom(train_samples, sv, dv) 25 | 26 | # init reward distributor 27 | rd = RewardDistributor(sv, dv, dscom) 28 | 29 | # init patient simulator 30 | ps = PatientSimulator(sv) 31 | 32 | # init agent 33 | model = Agent(num_sxs, num_dis).to(device) 34 | 35 | max_turn = 12 36 | metric_model_path = 'saved/{}/dense_once/metric_model_{}.pt'.format('mz10', max_turn) 37 | model.load(metric_model_path) 38 | 39 | 40 | # 当症状的不确定性很大,确定性很小 41 | # 疾病的确定性很大,确定性很大 42 | 43 | eps = [0.950, 0.955, 0.960, 0.965, 0.970, 0.975, 0.980, 0.985, 0.990, 0.995, 1.0] 44 | 45 | turns = [] 46 | accs = [] 47 | 48 | for e in tqdm(eps): 49 | test_num_hits = 0 50 | actual_turns = [] 51 | max_probs = [] 52 | model.eval() 53 | with torch.no_grad(): 54 | for batch in tqdm(test_ds_loader): 55 | actual_turn, is_success, max_prob = model.execute(batch, ps, sv, max_turn, e) 56 | test_num_hits += is_success 57 | actual_turns.append(actual_turn) 58 | max_probs.append(max_prob) 59 | test_acc = test_num_hits / test_size 60 | avg_turn = np.mean(actual_turns) 61 | turns.append(avg_turn) 62 | accs.append(test_acc) 63 | # print('eps: {}, avg turn: {}, acc: {}.'.format( 64 | # eps, np.round(np.mean(actual_turns), digits), np.round(test_acc, digits))) 65 | 66 | # eps: 1.0, avg turn: 10.0, acc: 0.7536. 67 | # eps: 0.99, avg turn: 8.0696, acc: 0.742. 68 | # eps: 1.0, avg turn: 20.0, acc: 0.6942. 69 | # eps: 0.99, avg turn: 14.966, acc: 0.6869. 70 | # eps: 0.95, avg turn: 10.3131, acc: 0.6408. 71 | 72 | 73 | # dec/enc eps: 1.0/0.0, avg turn: 20.0, acc: 0.6796, avg dec/enc entropy: 0.7219/0.173 74 | # dec/enc eps: 1.0/0.005, avg turn: 16.6748, acc: 0.6772, avg dec/enc entropy: 0.6711/0.173 75 | # dec/enc eps: 1.0/0.01, avg turn: 14.1092, acc: 0.6699, avg dec/enc entropy: 0.6711/0.173 76 | # dec/enc eps: 1.0/0.02, avg turn: 10.6942, acc: 0.6456, avg dec/enc entropy: 0.6711/0.173 77 | # dec/enc eps: 1.0/0.03, avg turn: 8.0825, acc: 0.6165, avg dec/enc entropy: 0.6294/0.173 78 | # dec/enc eps: 1.0/0.04, avg turn: 6.9442, acc: 0.6044, avg dec/enc entropy: 0.6294/0.173 79 | # dec/enc eps: 1.0/0.05, avg turn: 5.8374, acc: 0.585, avg dec/enc entropy: 0.6294/0.1667 80 | # dec/enc eps: 1.0/0.08, avg turn: 2.7718, acc: 0.5534, avg dec/enc entropy: 0.5923/0.1667 81 | # dec/enc eps: 1.0/0.1, avg turn: 1.4417, acc: 0.5291, avg dec/enc entropy: 0.5923/0.1667 82 | 83 | 84 | entropys = [] 85 | model.eval() 86 | with torch.no_grad(): 87 | for batch in tqdm(test_ds_loader): 88 | entropys.append(model.execute(batch, ps, sv, max_turn)) 89 | 90 | ess = [] 91 | for i in range(max_turn): 92 | es = sum([entropy[i] for entropy in entropys]) 93 | ess.append(es) 94 | 95 | -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- 1 | import json 2 | import os 3 | import pickle 4 | 5 | 6 | """ 7 | # symptom attribute mapping 8 | '0' -> negative 9 | '1' -> positive 10 | '2' -> not sure 11 | """ 12 | 13 | 14 | # pre-process 15 | def convert_dxy(samples, prefix): 16 | return [{ 17 | 'pid': prefix + '-' + str(pid + 1), 18 | 'exp_sxs': {sx: '1' if attr else '0' for sx, attr in sample['goal']['explicit_inform_slots'].items()}, 19 | 'imp_sxs': {sx: '1' if attr else '0' for sx, attr in sample['goal']['implicit_inform_slots'].items()}, 20 | 'label': sample['disease_tag'] 21 | } for pid, sample in enumerate(samples)] 22 | 23 | 24 | def convert_mz4(samples, prefix): 25 | return convert_dxy(samples, prefix) 26 | 27 | 28 | def convert_mz10(samples, keep_ns: bool = True): 29 | # keep_ns: map 'not sure (NS)' as 'negative (NEG)' or as a new category 30 | if keep_ns: 31 | attr_map = {'0': '0', '1': '1', '2': '2'} 32 | else: 33 | attr_map = {'0': '0', '1': '1', '2': '0'} 34 | return [{ 35 | 'pid': pid, 36 | 'exp_sxs': {sx: '1' for sx in sample['explicit_info']['Symptom']}, 37 | 'imp_sxs': {sx: attr_map.get(attr) for sx, attr in sample['implicit_info']['Symptom'].items()}, 38 | 'label': sample['diagnosis'] 39 | } for pid, sample in samples.items()] 40 | 41 | 42 | def filter_duplicate(samples): 43 | _samples = [] 44 | for sample in samples: 45 | exp_sxs, imp_sxs = sample['exp_sxs'], sample['imp_sxs'] 46 | for sx in exp_sxs: 47 | if sx in imp_sxs: 48 | imp_sxs.pop(sx) 49 | _samples.append({'exp_sxs': exp_sxs, 'imp_sxs': imp_sxs, 'label': sample['label']}) 50 | return _samples 51 | 52 | 53 | def load_data(paths) -> list: 54 | if not isinstance(paths, (tuple, list)): 55 | assert isinstance(paths, str) 56 | paths = [paths] 57 | data = [] 58 | for path in paths: 59 | with open(path, encoding='utf-8') as f: 60 | data.extend(json.load(f)) 61 | print('loading json object from {}.'.format(path)) 62 | return data 63 | 64 | 65 | def load_json(path): 66 | with open(path, encoding='utf-8') as f: 67 | data = json.load(f) 68 | return data 69 | 70 | 71 | def write_data(obj, path): 72 | with open(path, 'w', encoding='utf-8') as f: 73 | json.dump(obj, f, indent=2, ensure_ascii=False) 74 | print('dumping json object to {}.'.format(path)) 75 | 76 | 77 | def json_dump(train_samples, test_samples, ds): 78 | print('-' * 50) 79 | print('# num of total/train/test examples: {}/{}/{}'.format( 80 | len(train_samples) + len(test_samples), len(train_samples), len(test_samples))) 81 | write_data(train_samples, 'data/{}/train_set.json'.format(ds)) 82 | write_data(test_samples, 'data/{}/test_set.json'.format(ds)) 83 | 84 | 85 | def tokenizer(x): 86 | return x.split() 87 | 88 | 89 | def load_pickle(path): 90 | with open(path, 'rb') as f: 91 | obj = pickle.load(f) 92 | print('loading pickle formatted model from {}.'.format(path)) 93 | return obj 94 | 95 | 96 | def save_pickle(obj, path, verbose: bool = False): 97 | with open(path, 'wb') as f: 98 | pickle.dump(obj, f) 99 | if verbose: 100 | print('dumping pickle formatted model to {}.'.format(path)) 101 | 102 | 103 | def make_dirs(paths): 104 | if not isinstance(paths, (tuple, list)): 105 | assert isinstance(paths, str) 106 | paths = [paths] 107 | for path in paths: 108 | dir_path = os.path.dirname(path) 109 | if not os.path.exists(dir_path): 110 | print('making dir {} ...'.format(dir_path)) 111 | os.makedirs(dir_path, exist_ok=True) 112 | 113 | 114 | def set_path(name, dataset, exp_name, max_turn, num, num_repeats): 115 | if num_repeats == 1: 116 | path = 'saved/{}/{}/{}_{}.pt'.format(dataset, exp_name, name, max_turn) 117 | else: 118 | path = 'saved/{}/{}/{}_{}_{}.pt'.format(dataset, exp_name, name, max_turn, num + 1) 119 | return path 120 | -------------------------------------------------------------------------------- /pretrain.py: -------------------------------------------------------------------------------- 1 | from torch.utils.data import DataLoader 2 | 3 | from utils import load_data 4 | 5 | from layers import Agent 6 | from utils import make_dirs 7 | # from sklearn.metrics import accuracy_score 8 | 9 | from data_utils import * 10 | from conf import * 11 | 12 | train_samples, test_samples = load_data(train_path), load_data(test_path) 13 | train_size, test_size = len(train_samples), len(test_samples) 14 | 15 | sv = SymptomVocab(samples=train_samples, add_special_sxs=True, min_sx_freq=min_sx_freq, max_voc_size=max_voc_size) 16 | dv = DiseaseVocab(samples=train_samples) 17 | 18 | num_sxs, num_dis = sv.num_sxs, dv.num_dis 19 | 20 | train_ds = SymptomDataset(train_samples, sv, dv, keep_unk=False, add_tgt_start=True, add_tgt_end=True) 21 | train_ds_loader = DataLoader(train_ds, batch_size=train_bsz, num_workers=num_workers, shuffle=True, collate_fn=lm_collater) 22 | 23 | test_ds = SymptomDataset(test_samples, sv, dv, keep_unk, add_tgt_start=True, add_tgt_end=True) 24 | test_ds_loader = DataLoader(test_ds, batch_size=test_bsz, num_workers=num_workers, shuffle=False, collate_fn=lm_collater) 25 | 26 | model = Agent(num_sxs, num_dis).to(device) 27 | 28 | si_criterion = torch.nn.CrossEntropyLoss(ignore_index=sv.pad_idx).to(device) 29 | dc_criterion = torch.nn.CrossEntropyLoss().to(device) 30 | 31 | optimizer = torch.optim.Adam(model.parameters(), lr=pt_learning_rate) 32 | 33 | make_dirs([best_pt_path, last_pt_path]) 34 | 35 | best_acc = 0 36 | print('pre-training...') 37 | for epoch in range(pt_train_epochs): 38 | # break 39 | train_loss, train_si_loss, train_dc_loss = [], [], [] 40 | train_num_hits, test_num_hits = 0, 0 41 | model.train() 42 | for batch in train_ds_loader: 43 | # break 44 | sx_ids, attr_ids, labels = batch['sx_ids'], batch['attr_ids'], batch['labels'] 45 | seq_len, bsz = sx_ids.shape 46 | shift_sx_ids = torch.cat([sx_ids[1:], torch.zeros((1, bsz), dtype=torch.long, device=device)], dim=0) 47 | # symptom inquiry 48 | mask = torch.triu(torch.ones(seq_len, seq_len, device=device) * float('-inf'), diagonal=1) 49 | si_outputs = model.symptom_decoder.get_features(model.symptom_decoder(sx_ids, attr_ids, mask=mask)) 50 | si_loss = si_criterion(si_outputs.view(-1, num_sxs), shift_sx_ids.view(-1)) 51 | # disease classification 52 | if epoch > -1: 53 | si_sx_feats, si_attr_feats = make_features_xfmr( 54 | sv, batch, sx_ids.permute(1, 0), attr_ids.permute(1, 0), merge_act=False, merge_si=True) 55 | dc_outputs = model.symptom_encoder.get_mp_features(si_sx_feats, si_attr_feats, sv.pad_idx) 56 | dc_loss = dc_criterion(dc_outputs, batch['labels']) 57 | loss = si_loss + dc_loss 58 | # record 59 | train_loss.append(loss.item()) 60 | train_si_loss.append(si_loss.item()) 61 | train_dc_loss.append(dc_loss.item()) 62 | # optimize 63 | optimizer.zero_grad() 64 | loss.backward() 65 | optimizer.step() 66 | train_num_hits += torch.sum(batch['labels'].eq(dc_outputs.argmax(dim=-1))).item() 67 | else: 68 | loss = si_loss 69 | # record 70 | train_loss.append(loss.item()) 71 | train_si_loss.append(si_loss.item()) 72 | train_dc_loss.append(0) 73 | # optimize 74 | optimizer.zero_grad() 75 | loss.backward() 76 | optimizer.step() 77 | train_acc = train_num_hits / train_size 78 | model.eval() 79 | for batch in test_ds_loader: 80 | sx_ids, attr_ids, labels = batch['sx_ids'], batch['attr_ids'], batch['labels'] 81 | si_sx_feats, si_attr_feats = make_features_xfmr( 82 | sv, batch, sx_ids.permute(1, 0), attr_ids.permute(1, 0), merge_act=False, merge_si=True) 83 | dc_outputs = model.symptom_encoder.get_mp_features(si_sx_feats, si_attr_feats, sv.pad_idx) 84 | test_num_hits += torch.sum(batch['labels'].eq(dc_outputs.argmax(dim=-1))).item() 85 | test_acc = test_num_hits / test_size 86 | if test_acc > best_acc: 87 | best_acc = test_acc 88 | model.save(best_pt_path) 89 | print('epoch: {}, train total/si/dc loss: {}/{}/{}, train/test/best acc: {}/{}/{}'.format( 90 | epoch + 1, np.round(np.mean(train_loss), digits), np.round(np.mean(train_si_loss), digits), 91 | np.round(np.mean(train_dc_loss), digits), round(train_acc, digits), 92 | round(test_acc, digits), round(best_acc, digits))) 93 | model.save(last_pt_path) 94 | -------------------------------------------------------------------------------- /train.py: -------------------------------------------------------------------------------- 1 | from torch.utils.data import DataLoader 2 | 3 | from utils import load_data, set_path 4 | from layers import Agent 5 | 6 | from utils import save_pickle, make_dirs 7 | from data_utils import * 8 | from conf import * 9 | 10 | 11 | # load dataset 12 | train_samples, test_samples = load_data(train_path), load_data(test_path) 13 | train_size, test_size = len(train_samples), len(test_samples) 14 | 15 | # construct symptom & disease vocabulary 16 | sv = SymptomVocab(samples=train_samples, add_special_sxs=True, min_sx_freq=min_sx_freq, max_voc_size=max_voc_size) 17 | dv = DiseaseVocab(samples=train_samples) 18 | num_sxs, num_dis = sv.num_sxs, dv.num_dis 19 | 20 | # init dataloader 21 | train_ds = SymptomDataset(train_samples, sv, dv, keep_unk, add_tgt_start=True, add_tgt_end=True) 22 | train_ds_loader = DataLoader(train_ds, batch_size=train_bsz, num_workers=num_workers, shuffle=True, collate_fn=pg_collater) 23 | 24 | test_ds = SymptomDataset(test_samples, sv, dv, keep_unk, add_tgt_start=True, add_tgt_end=True) 25 | test_ds_loader = DataLoader(test_ds, batch_size=test_bsz, num_workers=num_workers, shuffle=False, collate_fn=pg_collater) 26 | 27 | # compute disease-symptom co-occurrence matrix 28 | dscom = compute_dscom(train_samples, sv, dv) 29 | 30 | # init reward distributor 31 | rd = RewardDistributor(sv, dv, dscom) 32 | 33 | # init patient simulator 34 | ps = PatientSimulator(sv) 35 | 36 | print('training...') 37 | 38 | mtra_path = 'saved/{}/tra_{}.pt'.format(train_dataset, exp_name) 39 | results = [] 40 | 41 | for max_turn in range(num_turns, -1, -1): 42 | # for max_turn in range(1, num_turns + 1): 43 | for num in range(num_repeats): 44 | # init epoch recorder 45 | train_sir = SIRecorder(num_samples=len(train_ds), num_imp_sxs=compute_num_sxs(train_samples), digits=digits) 46 | test_sir = SIRecorder(num_samples=len(test_ds), num_imp_sxs=compute_num_sxs(test_samples), digits=digits) 47 | # init agent 48 | model = Agent(num_sxs, num_dis).to(device) 49 | # load parameters from pre-trained models if exits 50 | model.load(best_pt_path) 51 | # init optimizer 52 | optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate) 53 | # compute loss of disease classification 54 | criterion = torch.nn.CrossEntropyLoss().to(device) 55 | # model path 56 | rec_model_path = set_path('rec_model', train_dataset, exp_name, max_turn, num, num_repeats) 57 | acc_model_path = set_path('acc_model', train_dataset, exp_name, max_turn, num, num_repeats) 58 | metric_model_path = set_path('metric_model', train_dataset, exp_name, max_turn, num, num_repeats) 59 | log_path = set_path('sir', train_dataset, exp_name, max_turn, num, num_repeats) 60 | make_dirs([rec_model_path, acc_model_path, metric_model_path, log_path]) 61 | # start 62 | epochs = train_epochs if max_turn > 0 else warm_epoch 63 | for epoch in range(epochs): 64 | num_hits_train, num_hits_test = 0, 0 65 | # training 66 | for batch in train_ds_loader: 67 | np_batch = to_numpy(batch) 68 | # symptom inquiry 69 | # simulate 70 | model.train() 71 | si_actions, si_log_probs, _, _ = model.symptom_decoder.simulate(batch, ps, sv, max_turn) 72 | # compute reward of each step of symptom recovery 73 | si_rewards = rd.compute_sr_reward(si_actions, np_batch, epoch, train_sir) 74 | # compute loss 75 | si_loss = - torch.sum(to_tensor_(si_rewards) * si_log_probs) 76 | # disease classification 77 | model.eval() 78 | with torch.no_grad(): 79 | _, _, si_sx_ids, si_attr_ids = model.symptom_decoder.inference(batch, ps, sv, max_turn) 80 | model.train() 81 | if epoch < warm_epoch and max_turn > 0: 82 | # 热身阶段(即前一半epochs)只训练 decoder 83 | loss = si_loss 84 | else: 85 | # 热身阶段完毕之后,decoder和encoder一起训练(原因是decoder更难训练) 86 | si_sx_feats, si_attr_feats = make_features_xfmr( 87 | sv, batch, si_sx_ids, si_attr_ids, merge_act=True, merge_si=True) 88 | dc_outputs = model.symptom_encoder.get_mp_features(si_sx_feats, si_attr_feats, sv.pad_idx) 89 | # 在训练疾病分类器时,将预测的数据和完整的数据混合作为输入 90 | double_labels = torch.cat([batch['labels'], batch['labels']]) 91 | dc_loss = criterion(dc_outputs, double_labels) 92 | num_hits_train += torch.sum(double_labels.eq(dc_outputs.argmax(dim=-1))).item() 93 | loss = si_loss + dc_loss 94 | # compute the gradient and optimize the parameters 95 | optimizer.zero_grad() 96 | loss.backward() 97 | optimizer.step() 98 | train_acc = num_hits_train / (2 * train_size) 99 | train_sir.update_acc(epoch, train_acc) 100 | if verbose: 101 | train_sir.epoch_summary(epoch) 102 | # evaluation 103 | model.eval() 104 | with torch.no_grad(): 105 | for batch in test_ds_loader: 106 | np_batch = to_numpy(batch) 107 | # symptom inquiry 108 | si_actions, _, si_sx_ids, si_attr_ids = model.symptom_decoder.inference(batch, ps, sv, max_turn) 109 | # compute reward of each step of symptom recovery 110 | _ = rd.compute_sr_reward(si_actions, np_batch, epoch, test_sir) 111 | # make features 112 | si_sx_feats, si_attr_feats = make_features_xfmr( 113 | sv, batch, si_sx_ids, si_attr_ids, merge_act=False, merge_si=True) 114 | # make diagnosis 115 | dc_outputs = model.symptom_encoder.get_mp_features(si_sx_feats, si_attr_feats, sv.pad_idx) 116 | num_hits_test += torch.sum(batch['labels'].eq(dc_outputs.argmax(dim=-1))).item() 117 | test_acc = num_hits_test / test_size 118 | test_sir.update_acc(epoch, test_acc) 119 | if verbose: 120 | test_sir.epoch_summary(epoch) 121 | cur_rec, best_rec, _, _, cur_acc, best_acc, _, _, cur_met, best_met, _, _, _ = test_sir.report(epoch, digits, alpha, verbose) 122 | if cur_rec >= best_rec: 123 | model.save(rec_model_path) # save the model with best recall 124 | if cur_acc >= best_acc: 125 | model.save(acc_model_path) # save the model with best accuracy 126 | if cur_met >= best_met: 127 | model.save(metric_model_path) # save the model with best metric 128 | if verbose: 129 | print('-' * 100) 130 | # end training 131 | _, best_rec, best_rec_epoch, best_rec_acc, _, best_acc, best_acc_epoch, best_acc_rec, _, _, best_met_epoch, best_met_rec, best_met_acc = test_sir.report(epochs - 1, digits, alpha, verbose) 132 | result = { 133 | 'max_turn': max_turn, 134 | 'num': num, 135 | 'best_rec_epoch': best_rec_epoch, 136 | 'best_rec': round(best_rec, digits), 137 | 'best_rec_acc': round(best_rec_acc, digits), 138 | 'best_acc_epoch': best_acc_epoch, 139 | 'best_acc_rec': round(best_acc_rec, digits), 140 | 'best_acc': round(best_acc, digits), 141 | 'best_met_epoch': best_met_epoch, 142 | 'best_met_rec': round(best_met_rec, digits), 143 | 'best_met_acc': round(best_met_acc, digits), 144 | } 145 | print(result) 146 | results.append(result) 147 | save_pickle((train_sir, test_sir), log_path) 148 | save_pickle(results, mtra_path) 149 | -------------------------------------------------------------------------------- /bound_utils.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | from sklearn.feature_extraction.text import CountVectorizer 4 | 5 | from sklearn.svm import SVC 6 | from sklearn.tree import DecisionTreeClassifier 7 | from sklearn.ensemble import RandomForestClassifier, GradientBoostingClassifier 8 | 9 | from sklearn.model_selection import GridSearchCV 10 | from sklearn.metrics import f1_score, classification_report, accuracy_score 11 | 12 | from data_utils import DiseaseVocab 13 | from utils import tokenizer, save_pickle, load_pickle 14 | 15 | 16 | def make_features(samples: list, dv: DiseaseVocab, add_imp: list, rec: float = 1.0): 17 | from conf import suffix 18 | # add_imp: a bool triple 19 | features, labels = [], [] 20 | for sample in samples: 21 | feature = [] 22 | for sx, attr in sample['exp_sxs'].items(): 23 | feature.append(sx + suffix.get(attr)) 24 | for sx, attr in sample['imp_sxs'].items(): 25 | if np.random.rand() < rec: 26 | if add_imp[int(attr)]: 27 | feature.append(sx + suffix.get(attr)) 28 | features.append(' '.join(feature)) 29 | labels.append(dv.encode(sample['label'])) 30 | return features, labels 31 | 32 | 33 | def run_svm_classifier(x_train, y_train, random_state: int, verbose: bool, tune: bool = True): 34 | if tune: 35 | param_grid = [ 36 | {'kernel': ['rbf'], 'gamma': [1e-3, 1e-4], 'C': [1e-2, 1e-1, 1, 1e1, 1e2, 1e3]}, 37 | {'kernel': ['linear'], 'C': [1e-2, 1e-1, 1, 1e1, 1e2, 1e3]} 38 | ] 39 | clf = GridSearchCV(SVC(random_state=random_state), param_grid, n_jobs=-1, verbose=verbose, scoring='accuracy') 40 | clf.fit(x_train, y_train) 41 | else: 42 | clf = SVC(random_state=random_state) 43 | clf.fit(x_train, y_train) 44 | return clf 45 | 46 | 47 | def run_dt_classifier(x_train, y_train, random_state: int, verbose: bool, tune: bool = True): 48 | if tune: 49 | param_grid = { 50 | 'max_depth': [2, 3, 5, 8, 10, 20], 51 | 'min_samples_leaf': [5, 10, 20, 50, 100], 52 | 'criterion': ["gini", "entropy"] 53 | } 54 | clf = GridSearchCV( 55 | DecisionTreeClassifier(random_state=random_state), param_grid, n_jobs=-1, verbose=verbose, 56 | scoring='accuracy') 57 | clf.fit(x_train, y_train) 58 | else: 59 | clf = DecisionTreeClassifier(random_state=random_state) 60 | clf.fit(x_train, y_train) 61 | return clf 62 | 63 | 64 | def run_rf_classifier(x_train, y_train, random_state: int, verbose: bool, tune: bool = True): 65 | if tune: 66 | param_grid = { 67 | 'max_features': ['auto', 'sqrt'], 68 | 'max_depth': [2, 3, 5, 8, 10, 15, 20], 69 | 'min_samples_split': [2, 5, 10], 70 | 'min_samples_leaf': [1, 2, 4], 71 | 'bootstrap': [True, False] 72 | } 73 | clf = GridSearchCV( 74 | RandomForestClassifier(random_state=random_state), param_grid, n_jobs=-1, verbose=verbose, 75 | scoring='accuracy') 76 | clf.fit(x_train, y_train) 77 | else: 78 | clf = DecisionTreeClassifier(random_state=random_state) 79 | clf.fit(x_train, y_train) 80 | return clf 81 | 82 | 83 | def run_gbdt_classifier(x_train, y_train, random_state: int, verbose: bool, tune: bool = True): 84 | if tune: 85 | param_grid = { 86 | "max_features": ['sqrt'], 87 | "max_depth": [5, 8, 10, 12], 88 | 'min_samples_split': [5, 10, 15], 89 | 'min_samples_leaf': [1, 2, 3], 90 | } 91 | clf = GridSearchCV( 92 | GradientBoostingClassifier(random_state=random_state), param_grid, n_jobs=-1, verbose=verbose, 93 | scoring='accuracy') 94 | clf.fit(x_train, y_train) 95 | else: 96 | clf = GradientBoostingClassifier(random_state=random_state) 97 | clf.fit(x_train, y_train) 98 | return clf 99 | 100 | 101 | def train_classifier(x_train, y_train, classifier: str, random_state: int, verbose: bool, tune: bool = True): 102 | classifiers = { 103 | 'svm': run_svm_classifier, 104 | 'dt': run_dt_classifier, 105 | 'rf': run_rf_classifier, 106 | 'gbdt': run_gbdt_classifier, 107 | } 108 | assert classifier in classifiers, 'The specified classifier () is not supported.'.format(classifier) 109 | clf = classifiers.get(classifier)(x_train, y_train, random_state, verbose, tune) 110 | return clf 111 | 112 | 113 | def acc_f1_report(y_test, y_pred, digits: int): 114 | acc = accuracy_score(y_test, y_pred) 115 | ma_f1 = f1_score(y_test, y_pred, average='macro') 116 | wa_f1 = f1_score(y_test, y_pred, average='weighted') 117 | print('The accuracy/macro average f1/weighted average f1 on test set: {}/{}/{}'.format( 118 | round(acc, digits), round(ma_f1, digits), round(wa_f1, digits))) 119 | return acc, ma_f1, wa_f1 120 | 121 | 122 | def cv_report(clf, y_test, y_pred, digits: int): 123 | print('Best parameters set found on development set:') 124 | print(clf.best_params_) 125 | print('Grid scores on development set:') 126 | means = clf.cv_results_['mean_test_score'] 127 | stds = clf.cv_results_['std_test_score'] 128 | for mean, std, params in zip(means, stds, clf.cv_results_['params']): 129 | print('%0.3f (+/-%0.03f) for %r' % (mean, std * 2, params)) 130 | print('Detailed classification report:') 131 | print('The model is trained on the train/dev set.') 132 | print('The scores are computed on the test set.') 133 | print(classification_report(y_test, y_pred, digits=digits)) 134 | 135 | 136 | def evaluate(clf, y_test, y_pred, verbose: bool, digits: int): 137 | if verbose: 138 | cv_report(clf, y_test, y_pred, digits) 139 | else: 140 | acc_f1_report(y_test, y_pred, digits) 141 | 142 | 143 | def build_classifier(x_train, y_train, x_test, y_test, classifier: str, random_state: int, verbose: bool, digits: int): 144 | # vectorizer 145 | cv = CountVectorizer(tokenizer=tokenizer) 146 | _x_train = cv.fit_transform(x_train) 147 | _x_test = cv.transform(x_test) 148 | # training 149 | clf = train_classifier(_x_train, y_train, classifier, random_state, verbose) 150 | # inference 151 | y_pred = clf.predict(_x_test) 152 | # evaluate 153 | evaluate(clf, y_test, y_pred, verbose, digits) 154 | return clf, cv 155 | 156 | 157 | def run_classifier(train_samples: list, test_samples: list, add_imp: list, classifier: str, 158 | random_state: int, verbose: bool, digits: int, path: str = None): 159 | # build disease vocabulary 160 | dv = DiseaseVocab(samples=train_samples) 161 | # make features 162 | x_train, y_train = make_features(train_samples, dv, add_imp) 163 | x_test, y_test = make_features(test_samples, dv, add_imp) 164 | clf, cv = build_classifier(x_train, y_train, x_test, y_test, classifier, random_state, verbose, digits) 165 | # dump classifier 166 | if path is not None: 167 | save_pickle((clf, cv), path) 168 | 169 | 170 | def run_classifiers(train_samples: list, test_samples: list, classifier: str, 171 | random_state: int, verbose: bool, digits: int): 172 | 173 | def _run_classifier(add_imp): 174 | return run_classifier(train_samples, test_samples, add_imp, classifier, random_state, verbose, digits) 175 | 176 | print('=' * 100 + '\n{} acc lb.\n'.format(classifier) + '=' * 100) 177 | _run_classifier(add_imp=[False, False, False]) 178 | print('=' * 100 + '\n{} acc ub.\n'.format(classifier) + '=' * 100) 179 | _run_classifier(add_imp=[True, True, True]) 180 | print('=' * 100 + '\n{} acc ub (pos).\n'.format(classifier) + '=' * 100) 181 | _run_classifier(add_imp=[False, True, False]) 182 | print('=' * 100 + '\n{} acc ub (neg).\n'.format(classifier) + '=' * 100) 183 | _run_classifier(add_imp=[True, False, True]) 184 | print('=' * 100 + '\n{} acc ub (pos + neg).\n'.format(classifier) + '=' * 100) 185 | _run_classifier(add_imp=[True, True, False]) 186 | 187 | 188 | def simulate(train_samples, test_samples, path, recs): 189 | dv = DiseaseVocab(samples=train_samples) 190 | clf, cv = load_pickle(path) 191 | acc_scores = [] 192 | for rec in recs: 193 | x_test, y_test = make_features(test_samples, dv, add_imp=[True, True, True], rec=rec) 194 | y_pred = clf.predict(cv.transform(x_test)) 195 | acc_scores.append(accuracy_score(y_test, y_pred)) 196 | return acc_scores 197 | -------------------------------------------------------------------------------- /layers.py: -------------------------------------------------------------------------------- 1 | # this script is the definition for neural layers 2 | import os 3 | import torch 4 | import torch.nn as nn 5 | from torch.nn import functional 6 | from torch.distributions import Categorical 7 | from tqdm import tqdm 8 | 9 | import math 10 | 11 | from data_utils import SymptomVocab, PatientSimulator, device 12 | from conf import * 13 | 14 | 15 | # sinusoid position embedding 16 | class PositionalEncoding(nn.Module): 17 | 18 | def __init__(self, emb_dim: int): 19 | super().__init__() 20 | self.dropout = nn.Dropout(p=pos_dropout) 21 | 22 | position = torch.arange(pos_max_len).unsqueeze(1) 23 | div_term = torch.exp(torch.arange(0, emb_dim, 2) * (-math.log(10000.0) / emb_dim)) 24 | pe = torch.zeros(pos_max_len, 1, emb_dim) 25 | pe[:, 0, 0::2] = torch.sin(position * div_term) 26 | pe[:, 0, 1::2] = torch.cos(position * div_term) 27 | self.register_buffer('pe', pe) 28 | 29 | def forward(self, x): 30 | x = x + self.pe[:x.size(0)] 31 | return self.dropout(x) 32 | 33 | 34 | # transformer-based decoder 35 | class SymptomDecoderXFMR(nn.Module): 36 | 37 | def __init__(self, sx_embedding, attr_embedding, pos_embedding, num_sxs: int, emb_dim: int): 38 | super().__init__() 39 | 40 | self.num_sxs = num_sxs 41 | 42 | self.sx_embedding = sx_embedding 43 | self.attr_embedding = attr_embedding 44 | self.pos_embedding = pos_embedding 45 | 46 | self.decoder = nn.TransformerEncoder( 47 | encoder_layer=nn.TransformerEncoderLayer( 48 | d_model=emb_dim, 49 | nhead=dec_num_heads, 50 | dim_feedforward=dec_dim_feedforward, 51 | dropout=dec_dropout, 52 | activation='relu'), 53 | num_layers=dec_num_layers) 54 | 55 | self.sx_fc = nn.Linear(emb_dim, num_sxs) 56 | 57 | def forward(self, sx_ids, attr_ids, mask=None, src_key_padding_mask=None): 58 | if not sx_one_hot and not attr_one_hot: 59 | inputs = self.sx_embedding(sx_ids) + self.attr_embedding(attr_ids) 60 | else: 61 | inputs = torch.cat([self.sx_embedding(sx_ids), self.attr_embedding(attr_ids)], dim=-1) 62 | if dec_add_pos: 63 | inputs = self.pos_embedding(inputs) 64 | outputs = self.decoder(inputs, mask, src_key_padding_mask) 65 | return outputs 66 | 67 | def get_features(self, outputs): 68 | features = self.sx_fc(outputs) 69 | return features 70 | 71 | def compute_entropy(self, features): 72 | return torch.distributions.Categorical(functional.softmax(features, dim=-1)).entropy().item() / math.log(self.num_sxs) 73 | 74 | def init_repeat_score(self, bsz: int, sv: SymptomVocab, batch: dict = None): 75 | prob = torch.zeros(bsz, self.num_sxs, device=device) 76 | prob[:, :sv.num_special] = float('-inf') 77 | prob[:, sv.end_idx] = 0 78 | if exclude_exp: 79 | assert batch is not None 80 | for idx in range(bsz): 81 | for sx in batch['exp_sx_ids'][:, idx]: 82 | if sx != sv.pad_idx: 83 | prob[idx, sx] = float('-inf') 84 | return prob 85 | 86 | @staticmethod 87 | def update_repeat_score(action, score): 88 | for act, sc in zip(action, score): 89 | sc[act.item()] = float('-inf') 90 | 91 | def simulate(self, batch: dict, ps: PatientSimulator, sv: SymptomVocab, max_turn: int, inference: bool = False): 92 | # 初始化输入 93 | _, bsz = batch['exp_sx_ids'].shape 94 | sx_ids = torch.cat([batch['exp_sx_ids'], ps.init_sx_ids(bsz)]) 95 | attr_ids = torch.cat([batch['exp_attr_ids'], ps.init_attr_ids(bsz)]) 96 | # 初始化重复分数,手动将选择特殊symptom的action的概率设置为无穷小 97 | repeat_score = self.init_repeat_score(bsz, sv, batch) 98 | actions, log_probs = [], [] 99 | # 采样 trajectory 100 | if max_turn > 0: 101 | for step in range(max_turn): 102 | # 前向传播计算选择每个action的概率 103 | src_key_padding_mask = sx_ids.eq(sv.pad_idx).transpose(1, 0).contiguous() 104 | outputs = self.forward(sx_ids, attr_ids, src_key_padding_mask=src_key_padding_mask) 105 | features = self.get_features(outputs[-1]) 106 | if inference: 107 | # greedy decoding 108 | action = (features + repeat_score).argmax(dim=-1) 109 | else: 110 | # 根据policy网络当前的参数抽样 111 | policy = Categorical(functional.softmax(features + repeat_score, dim=-1)) 112 | action = policy.sample() 113 | log_probs.append(policy.log_prob(action)) 114 | # 让已经选择的action再次被解码出的概率为无穷小 115 | self.update_repeat_score(action, repeat_score) 116 | # 与病人模拟器进行交互,病人模拟器告知agent病人是否具有该症状 117 | _, q_attr_ids = ps.answer(action, batch) 118 | # 更新 transformer 的输入 119 | sx_ids = torch.cat([sx_ids, action.unsqueeze(dim=0)]) 120 | attr_ids = torch.cat([attr_ids, q_attr_ids.unsqueeze(dim=0)]) 121 | # 记录选择的动作和对数概率(便于之后计算回报和优化) 122 | actions.append(action) 123 | else: 124 | actions.append(torch.tensor([sv.end_idx] * bsz, device=device)) 125 | log_probs.append(torch.tensor([0] * bsz, device=device)) 126 | # 返回整个batch的 trajectory 和对数概率 127 | si_actions = torch.stack(actions, dim=1) 128 | si_log_probs = None if inference else torch.stack(log_probs, dim=1) 129 | si_sx_ids = sx_ids.permute((1, 0)) 130 | si_attr_ids = attr_ids.permute((1, 0)) 131 | return si_actions, si_log_probs, si_sx_ids, si_attr_ids 132 | 133 | def inference(self, batch: dict, ps: PatientSimulator, sv: SymptomVocab, max_turn: int): 134 | return self.simulate(batch, ps, sv, max_turn, inference=True) 135 | 136 | def generate(self, ds_loader, ps: PatientSimulator, sv: SymptomVocab, max_turn: int): 137 | from data_utils import to_list 138 | ds_sx_ids, ds_attr_ids, ds_labels = [], [], [] 139 | self.eval() 140 | with torch.no_grad(): 141 | for batch in tqdm(ds_loader): 142 | _, _, sx_ids, attr_ids = self.inference(batch, ps, sv, max_turn) 143 | ds_sx_ids.extend(to_list(sx_ids)) 144 | ds_attr_ids.extend(to_list(attr_ids)) 145 | ds_labels.extend(to_list(batch['labels'])) 146 | return ds_sx_ids, ds_attr_ids, ds_labels 147 | 148 | 149 | class SymptomEncoderXFMR(nn.Module): 150 | 151 | def __init__(self, sx_embedding, attr_embedding, num_dis): 152 | super().__init__() 153 | 154 | self.num_dis = num_dis 155 | self.sx_embedding = sx_embedding 156 | self.attr_embedding = attr_embedding 157 | 158 | self.encoder = nn.TransformerEncoder( 159 | encoder_layer=nn.TransformerEncoderLayer( 160 | d_model=enc_emb_dim, 161 | nhead=enc_num_heads, 162 | dim_feedforward=enc_num_layers, 163 | dropout=enc_dropout, 164 | activation='relu'), 165 | num_layers=enc_num_layers) 166 | 167 | self.dis_fc = nn.Linear(enc_emb_dim, num_dis, bias=True) 168 | 169 | def forward(self, sx_ids, attr_ids, mask=None, src_key_padding_mask=None): 170 | if not sx_one_hot and not attr_one_hot: 171 | inputs = self.sx_embedding(sx_ids) + self.attr_embedding(attr_ids) 172 | else: 173 | inputs = torch.cat([self.sx_embedding(sx_ids), self.attr_embedding(attr_ids)], dim=-1) 174 | outputs = self.encoder(inputs, mask, src_key_padding_mask) 175 | return outputs 176 | 177 | # mean pooling feature 178 | def get_mp_features(self, sx_ids, attr_ids, pad_idx): 179 | src_key_padding_mask = sx_ids.eq(pad_idx).transpose(1, 0).contiguous() 180 | outputs = self.forward(sx_ids, attr_ids, src_key_padding_mask=src_key_padding_mask) 181 | seq_len, batch_size, emb_dim = outputs.shape 182 | mp_mask = (1 - sx_ids.eq(pad_idx).int()) 183 | mp_mask_ = mp_mask.unsqueeze(-1).expand(seq_len, batch_size, emb_dim) 184 | avg_outputs = torch.sum(outputs * mp_mask_, dim=0) / torch.sum(mp_mask, dim=0).unsqueeze(-1) 185 | features = self.dis_fc(avg_outputs) 186 | return features 187 | 188 | def predict(self, sx_ids, attr_ids, pad_idx): 189 | outputs = self.get_mp_features(sx_ids, attr_ids, pad_idx) 190 | labels = outputs.argmax(dim=-1) 191 | return labels 192 | 193 | def inference(self, sx_ids, attr_ids, pad_idx): 194 | return self.simulate(sx_ids, attr_ids, pad_idx, inference=True) 195 | 196 | def compute_entropy(self, features): 197 | return torch.distributions.Categorical(functional.softmax(features, dim=-1)).entropy().item() / self.num_dis 198 | 199 | @staticmethod 200 | def compute_max_prob(features): 201 | return torch.max(functional.softmax(features, dim=-1)) 202 | 203 | 204 | class Agent(nn.Module): 205 | 206 | def __init__(self, num_sxs: int, num_dis: int): 207 | 208 | super().__init__() 209 | 210 | if sx_one_hot: 211 | sx_embedding = nn.Embedding(num_sxs, num_sxs) 212 | sx_embedding.weight.data = torch.eye(num_sxs) 213 | sx_embedding.weight.requires_grad = False 214 | self.sx_embedding = sx_embedding 215 | else: 216 | self.sx_embedding = nn.Embedding(num_sxs, dec_emb_dim, padding_idx=0) 217 | 218 | if attr_one_hot: 219 | attr_embedding = nn.Embedding(num_attrs, num_attrs) 220 | attr_embedding.weight.data = torch.eye(num_attrs) 221 | attr_embedding.weight.requires_grad = False 222 | self.attr_embedding = attr_embedding 223 | else: 224 | self.attr_embedding = nn.Embedding(num_attrs, dec_emb_dim, padding_idx=0) 225 | 226 | if self.sx_embedding.weight.data.shape[-1] != self.attr_embedding.weight.data.shape[-1]: 227 | emb_dim = self.sx_embedding.weight.data.shape[-1] + self.attr_embedding.weight.data.shape[-1] 228 | else: 229 | emb_dim = dec_emb_dim 230 | 231 | self.pos_embedding = PositionalEncoding(emb_dim) 232 | 233 | self.symptom_decoder = SymptomDecoderXFMR( 234 | self.sx_embedding, self.attr_embedding, self.pos_embedding, num_sxs, emb_dim) 235 | 236 | self.symptom_encoder = SymptomEncoderXFMR( 237 | self.sx_embedding, self.attr_embedding, num_dis 238 | ) 239 | 240 | def forward(self): 241 | pass 242 | 243 | def load(self, path): 244 | if os.path.exists(path): 245 | self.load_state_dict(torch.load(path)) 246 | if verbose: 247 | print('loading pre-trained parameters from {} ...'.format(path)) 248 | 249 | def save(self, path): 250 | torch.save(self.state_dict(), path) 251 | if verbose: 252 | print('saving best model to {}'.format(path)) 253 | 254 | def execute(self, batch: dict, ps: PatientSimulator, sv: SymptomVocab, max_turn: int, eps: float): 255 | from data_utils import make_features_xfmr 256 | _, bsz = batch['exp_sx_ids'].shape 257 | sx_ids = torch.cat([batch['exp_sx_ids'], ps.init_sx_ids(bsz)]) 258 | attr_ids = torch.cat([batch['exp_attr_ids'], ps.init_attr_ids(bsz)]) 259 | repeat_score = self.symptom_decoder.init_repeat_score(bsz, sv, batch) 260 | for step in range(max_turn + 1): 261 | # 每一个step,先观察 encoder 的 entropy 是否已经有足够的 confidence 给出诊断结果 262 | si_sx_ids = sx_ids.clone().permute((1, 0)) 263 | si_attr_ids = attr_ids.clone().permute((1, 0)) 264 | si_sx_feats, si_attr_feats = make_features_xfmr( 265 | sv, batch, si_sx_ids, si_attr_ids, merge_act=False, merge_si=True) 266 | dc_outputs = self.symptom_encoder.get_mp_features(si_sx_feats, si_attr_feats, sv.pad_idx) 267 | prob = self.symptom_encoder.compute_max_prob(dc_outputs).item() 268 | if prob > eps or step == max_turn: 269 | is_success = batch['labels'].eq(dc_outputs.argmax(dim=-1)).item() 270 | max_prob = prob 271 | return step, is_success, max_prob 272 | # 再观察 decoder 的 entropy 是否已经有足够的 confidence 给出诊断结果 273 | src_key_padding_mask = sx_ids.eq(sv.pad_idx).transpose(1, 0).contiguous() 274 | outputs = self.symptom_decoder.forward(sx_ids, attr_ids, src_key_padding_mask=src_key_padding_mask) 275 | features = self.symptom_decoder.get_features(outputs[-1]) 276 | action = (features + repeat_score).argmax(dim=-1) 277 | self.symptom_decoder.update_repeat_score(action, repeat_score) 278 | _, q_attr_ids = ps.answer(action, batch) 279 | sx_ids = torch.cat([sx_ids, action.unsqueeze(dim=0)]) 280 | attr_ids = torch.cat([attr_ids, q_attr_ids.unsqueeze(dim=0)]) 281 | 282 | # def execute(self, batch: dict, ps: PatientSimulator, sv: SymptomVocab, max_turn: int, dec_eps: float, enc_eps: float): 283 | # from data_utils import make_features_xfmr 284 | # _, bsz = batch['exp_sx_ids'].shape 285 | # sx_ids = torch.cat([batch['exp_sx_ids'], ps.init_sx_ids(bsz)]) 286 | # attr_ids = torch.cat([batch['exp_attr_ids'], ps.init_attr_ids(bsz)]) 287 | # repeat_score = self.symptom_decoder.init_repeat_score(bsz, sv, batch) 288 | # actual_turn, is_success, dec_ent, enc_ent = None, None, None, None 289 | # for step in range(max_turn + 1): 290 | # # 每一个step,先观察 encoder 的 entropy 是否已经有足够的 confidence 给出诊断结果 291 | # si_sx_ids = sx_ids.clone().permute((1, 0)) 292 | # si_attr_ids = attr_ids.clone().permute((1, 0)) 293 | # si_sx_feats, si_attr_feats = make_features_xfmr( 294 | # sv, batch, si_sx_ids, si_attr_ids, merge_act=False, merge_si=True) 295 | # dc_outputs = self.symptom_encoder.get_mp_features(si_sx_feats, si_attr_feats, sv.pad_idx) 296 | # enc_entropy = self.symptom_encoder.compute_entropy(dc_outputs) 297 | # # 再观察 decoder 的 entropy 是否已经有足够的 confidence 给出诊断结果 298 | # src_key_padding_mask = sx_ids.eq(sv.pad_idx).transpose(1, 0).contiguous() 299 | # outputs = self.symptom_decoder.forward(sx_ids, attr_ids, src_key_padding_mask=src_key_padding_mask) 300 | # features = self.symptom_decoder.get_features(outputs[-1]) 301 | # dec_entropy = self.symptom_decoder.compute_entropy(features + repeat_score) 302 | # # 当症状的不确定性很大,确定性很小 303 | # # 疾病的确定性很大,确定性很大 304 | # if enc_entropy < enc_eps or (step > 5 and dec_entropy > dec_eps) or step == max_turn: 305 | # actual_turn = step 306 | # is_success = batch['labels'].eq(dc_outputs.argmax(dim=-1)).item() 307 | # dec_ent, enc_ent = dec_entropy, enc_entropy 308 | # break 309 | # action = (features + repeat_score).argmax(dim=-1) 310 | # self.symptom_decoder.update_repeat_score(action, repeat_score) 311 | # _, q_attr_ids = ps.answer(action, batch) 312 | # sx_ids = torch.cat([sx_ids, action.unsqueeze(dim=0)]) 313 | # attr_ids = torch.cat([attr_ids, q_attr_ids.unsqueeze(dim=0)]) 314 | # return actual_turn, is_success, dec_ent, enc_ent 315 | 316 | # def execute(self, batch: dict, ps: PatientSimulator, sv: SymptomVocab, max_turn: int): 317 | # from data_utils import make_features_xfmr 318 | # _, bsz = batch['exp_sx_ids'].shape 319 | # sx_ids = torch.cat([batch['exp_sx_ids'], ps.init_sx_ids(bsz)]) 320 | # attr_ids = torch.cat([batch['exp_attr_ids'], ps.init_attr_ids(bsz)]) 321 | # repeat_score = self.symptom_decoder.init_repeat_score(bsz, sv, batch) 322 | # enc_entropys = [] 323 | # for step in range(max_turn): 324 | # src_key_padding_mask = sx_ids.eq(sv.pad_idx).transpose(1, 0).contiguous() 325 | # outputs = self.symptom_decoder.forward(sx_ids, attr_ids, src_key_padding_mask=src_key_padding_mask) 326 | # features = self.symptom_decoder.get_features(outputs[-1]) 327 | # action = (features + repeat_score).argmax(dim=-1) 328 | # self.symptom_decoder.update_repeat_score(action, repeat_score) 329 | # _, q_attr_ids = ps.answer(action, batch) 330 | # sx_ids = torch.cat([sx_ids, action.unsqueeze(dim=0)]) 331 | # attr_ids = torch.cat([attr_ids, q_attr_ids.unsqueeze(dim=0)]) 332 | # si_sx_ids = sx_ids.clone().permute((1, 0)) 333 | # si_attr_ids = attr_ids.clone().permute((1, 0)) 334 | # si_sx_feats, si_attr_feats = make_features_xfmr( 335 | # sv, batch, si_sx_ids, si_attr_ids, merge_act=False, merge_si=True) 336 | # dc_outputs = self.symptom_encoder.get_mp_features(si_sx_feats, si_attr_feats, sv.pad_idx) 337 | # enc_entropy = self.symptom_encoder.compute_entropy(dc_outputs) 338 | # enc_entropys.append(enc_entropy) 339 | # return enc_entropys 340 | -------------------------------------------------------------------------------- /data/dxy/test_set.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "pid": "test-1", 4 | "exp_sxs": { 5 | "烦躁不安": "1", 6 | "发烧": "1", 7 | "皮疹": "1" 8 | }, 9 | "imp_sxs": { 10 | "疱疹": "1", 11 | "精神萎靡": "1", 12 | "咳嗽": "0", 13 | "呕吐": "0", 14 | "厌食": "0" 15 | }, 16 | "label": "小儿手足口病" 17 | }, 18 | { 19 | "pid": "test-2", 20 | "exp_sxs": { 21 | "烦躁不安": "1", 22 | "发烧": "1", 23 | "稀便": "1" 24 | }, 25 | "imp_sxs": { 26 | "厌食": "1" 27 | }, 28 | "label": "小儿腹泻" 29 | }, 30 | { 31 | "pid": "test-3", 32 | "exp_sxs": { 33 | "鼻塞": "1", 34 | "打喷嚏": "1", 35 | "呼吸困难": "1" 36 | }, 37 | "imp_sxs": { 38 | "揉鼻子": "1" 39 | }, 40 | "label": "过敏性鼻炎" 41 | }, 42 | { 43 | "pid": "test-4", 44 | "exp_sxs": { 45 | "疱疹": "1", 46 | "皮疹": "1" 47 | }, 48 | "imp_sxs": {}, 49 | "label": "小儿手足口病" 50 | }, 51 | { 52 | "pid": "test-5", 53 | "exp_sxs": { 54 | "疱疹": "1", 55 | "咳嗽": "1", 56 | "烦躁不安": "1" 57 | }, 58 | "imp_sxs": { 59 | "发烧": "0" 60 | }, 61 | "label": "小儿手足口病" 62 | }, 63 | { 64 | "pid": "test-6", 65 | "exp_sxs": { 66 | "稀便": "1", 67 | "揉眼睛": "1", 68 | "发烧": "1", 69 | "皮疹": "1" 70 | }, 71 | "imp_sxs": { 72 | "精神萎靡": "0" 73 | }, 74 | "label": "小儿腹泻" 75 | }, 76 | { 77 | "pid": "test-7", 78 | "exp_sxs": { 79 | "蛋花样便": "1", 80 | "稀便": "1" 81 | }, 82 | "imp_sxs": { 83 | "精神萎靡": "0", 84 | "尿少": "0" 85 | }, 86 | "label": "小儿腹泻" 87 | }, 88 | { 89 | "pid": "test-8", 90 | "exp_sxs": { 91 | "吐泡泡": "1", 92 | "咳嗽": "1", 93 | "鼻塞": "1", 94 | "咳痰": "1" 95 | }, 96 | "imp_sxs": {}, 97 | "label": "上呼吸道感染" 98 | }, 99 | { 100 | "pid": "test-9", 101 | "exp_sxs": { 102 | "蛋花样便": "1", 103 | "呕吐": "1", 104 | "稀便": "1", 105 | "发烧": "1" 106 | }, 107 | "imp_sxs": { 108 | "精神萎靡": "0", 109 | "尿少": "1", 110 | "烦躁不安": "1" 111 | }, 112 | "label": "小儿腹泻" 113 | }, 114 | { 115 | "pid": "test-10", 116 | "exp_sxs": { 117 | "咳嗽": "1", 118 | "发烧": "1" 119 | }, 120 | "imp_sxs": { 121 | "精神萎靡": "0", 122 | "呼吸困难": "0" 123 | }, 124 | "label": "上呼吸道感染" 125 | }, 126 | { 127 | "pid": "test-11", 128 | "exp_sxs": { 129 | "疱疹": "1", 130 | "呕吐": "1", 131 | "发烧": "1", 132 | "皮疹": "1" 133 | }, 134 | "imp_sxs": { 135 | "厌食": "1" 136 | }, 137 | "label": "小儿手足口病" 138 | }, 139 | { 140 | "pid": "test-12", 141 | "exp_sxs": { 142 | "腹痛": "1", 143 | "呕吐": "1", 144 | "发烧": "1" 145 | }, 146 | "imp_sxs": { 147 | "腹胀": "1" 148 | }, 149 | "label": "小儿腹泻" 150 | }, 151 | { 152 | "pid": "test-13", 153 | "exp_sxs": { 154 | "咳嗽": "1", 155 | "抽搐": "1", 156 | "流涕": "1" 157 | }, 158 | "imp_sxs": { 159 | "过敏": "1" 160 | }, 161 | "label": "过敏性鼻炎" 162 | }, 163 | { 164 | "pid": "test-14", 165 | "exp_sxs": { 166 | "鼻塞": "1", 167 | "打喷嚏": "1" 168 | }, 169 | "imp_sxs": { 170 | "过敏": "1" 171 | }, 172 | "label": "过敏性鼻炎" 173 | }, 174 | { 175 | "pid": "test-15", 176 | "exp_sxs": { 177 | "疱疹": "1", 178 | "咳嗽": "1", 179 | "鼻塞": "1", 180 | "打喷嚏": "1", 181 | "咳痰": "1" 182 | }, 183 | "imp_sxs": { 184 | "发烧": "1" 185 | }, 186 | "label": "肺炎" 187 | }, 188 | { 189 | "pid": "test-16", 190 | "exp_sxs": { 191 | "呕吐": "1", 192 | "肚子咕噜叫": "1", 193 | "发烧": "1", 194 | "稀便": "1" 195 | }, 196 | "imp_sxs": { 197 | "厌食": "1" 198 | }, 199 | "label": "小儿腹泻" 200 | }, 201 | { 202 | "pid": "test-17", 203 | "exp_sxs": { 204 | "咳嗽": "1", 205 | "流涕": "1", 206 | "吐泡泡": "1", 207 | "打喷嚏": "1", 208 | "呼吸困难": "1" 209 | }, 210 | "imp_sxs": { 211 | "呕吐": "1", 212 | "鼻塞": "1" 213 | }, 214 | "label": "肺炎" 215 | }, 216 | { 217 | "pid": "test-18", 218 | "exp_sxs": { 219 | "精神萎靡": "1", 220 | "发烧": "1", 221 | "厌食": "1" 222 | }, 223 | "imp_sxs": { 224 | "疱疹": "1", 225 | "淋巴结肿大": "1", 226 | "皮疹": "0" 227 | }, 228 | "label": "小儿手足口病" 229 | }, 230 | { 231 | "pid": "test-19", 232 | "exp_sxs": { 233 | "烦躁不安": "1", 234 | "呕吐": "1", 235 | "流涕": "1" 236 | }, 237 | "imp_sxs": { 238 | "鼻塞": "1", 239 | "发烧": "0", 240 | "肺部湿啰音": "0" 241 | }, 242 | "label": "上呼吸道感染" 243 | }, 244 | { 245 | "pid": "test-20", 246 | "exp_sxs": { 247 | "咳嗽": "1", 248 | "咳痰": "1" 249 | }, 250 | "imp_sxs": { 251 | "肺部湿啰音": "1", 252 | "呼吸困难": "1" 253 | }, 254 | "label": "肺炎" 255 | }, 256 | { 257 | "pid": "test-21", 258 | "exp_sxs": { 259 | "烦躁不安": "1", 260 | "发烧": "1", 261 | "流口水": "1", 262 | "稀便": "1" 263 | }, 264 | "imp_sxs": { 265 | "精神萎靡": "1", 266 | "皮疹": "1", 267 | "厌食": "1" 268 | }, 269 | "label": "小儿手足口病" 270 | }, 271 | { 272 | "pid": "test-22", 273 | "exp_sxs": { 274 | "疱疹": "1", 275 | "发烧": "1", 276 | "皮疹": "1" 277 | }, 278 | "imp_sxs": { 279 | "精神萎靡": "0", 280 | "厌食": "0", 281 | "流口水": "1" 282 | }, 283 | "label": "小儿手足口病" 284 | }, 285 | { 286 | "pid": "test-23", 287 | "exp_sxs": { 288 | "咽部不适": "1", 289 | "咳嗽": "1", 290 | "过敏": "1", 291 | "流涕": "1" 292 | }, 293 | "imp_sxs": { 294 | "揉鼻子": "1" 295 | }, 296 | "label": "过敏性鼻炎" 297 | }, 298 | { 299 | "pid": "test-24", 300 | "exp_sxs": { 301 | "咽部不适": "1", 302 | "咳嗽": "1", 303 | "呕吐": "1", 304 | "发烧": "1", 305 | "咳痰": "1" 306 | }, 307 | "imp_sxs": { 308 | "精神萎靡": "0", 309 | "肺部阴影": "1" 310 | }, 311 | "label": "肺炎" 312 | }, 313 | { 314 | "pid": "test-25", 315 | "exp_sxs": { 316 | "稀便": "1", 317 | "绿便": "1" 318 | }, 319 | "imp_sxs": { 320 | "蛋花样便": "1", 321 | "精神萎靡": "0", 322 | "呕吐": "1", 323 | "发烧": "0", 324 | "抽搐": "1" 325 | }, 326 | "label": "小儿腹泻" 327 | }, 328 | { 329 | "pid": "test-26", 330 | "exp_sxs": { 331 | "咳嗽": "1", 332 | "呕吐": "1", 333 | "鼻塞": "1", 334 | "打喷嚏": "1", 335 | "咳痰": "1" 336 | }, 337 | "imp_sxs": { 338 | "呼吸困难": "1" 339 | }, 340 | "label": "肺炎" 341 | }, 342 | { 343 | "pid": "test-27", 344 | "exp_sxs": { 345 | "咳嗽": "1", 346 | "鼻塞": "1", 347 | "发烧": "1" 348 | }, 349 | "imp_sxs": { 350 | "流涕": "0", 351 | "呼吸困难": "1" 352 | }, 353 | "label": "上呼吸道感染" 354 | }, 355 | { 356 | "pid": "test-28", 357 | "exp_sxs": { 358 | "稀便": "1", 359 | "发烧": "1", 360 | "皮疹": "1" 361 | }, 362 | "imp_sxs": {}, 363 | "label": "小儿腹泻" 364 | }, 365 | { 366 | "pid": "test-29", 367 | "exp_sxs": { 368 | "精神萎靡": "1", 369 | "呕吐": "1", 370 | "稀便": "1", 371 | "厌食": "1" 372 | }, 373 | "imp_sxs": {}, 374 | "label": "小儿腹泻" 375 | }, 376 | { 377 | "pid": "test-30", 378 | "exp_sxs": {}, 379 | "imp_sxs": {}, 380 | "label": "上呼吸道感染" 381 | }, 382 | { 383 | "pid": "test-31", 384 | "exp_sxs": { 385 | "咳嗽": "1", 386 | "打喷嚏": "1", 387 | "流涕": "1" 388 | }, 389 | "imp_sxs": { 390 | "呕吐": "1", 391 | "发烧": "0", 392 | "咳痰": "1" 393 | }, 394 | "label": "上呼吸道感染" 395 | }, 396 | { 397 | "pid": "test-32", 398 | "exp_sxs": { 399 | "咳嗽": "1", 400 | "流涕": "1", 401 | "发烧": "1", 402 | "打喷嚏": "1" 403 | }, 404 | "imp_sxs": {}, 405 | "label": "上呼吸道感染" 406 | }, 407 | { 408 | "pid": "test-33", 409 | "exp_sxs": { 410 | "打喷嚏": "1", 411 | "稀便": "1", 412 | "流涕": "1" 413 | }, 414 | "imp_sxs": { 415 | "咳嗽": "1", 416 | "呕吐": "1", 417 | "烦躁不安": "1" 418 | }, 419 | "label": "小儿腹泻" 420 | }, 421 | { 422 | "pid": "test-34", 423 | "exp_sxs": { 424 | "咳嗽": "1", 425 | "咳痰": "1", 426 | "流涕": "1" 427 | }, 428 | "imp_sxs": { 429 | "精神萎靡": "0", 430 | "鼻塞": "1", 431 | "发烧": "0", 432 | "厌食": "0" 433 | }, 434 | "label": "过敏性鼻炎" 435 | }, 436 | { 437 | "pid": "test-35", 438 | "exp_sxs": { 439 | "咳嗽": "1", 440 | "发烧": "1", 441 | "咳痰": "1" 442 | }, 443 | "imp_sxs": { 444 | "烦躁不安": "1", 445 | "鼻塞": "1", 446 | "肺部湿啰音": "1", 447 | "呕吐": "1", 448 | "稀便": "1", 449 | "打喷嚏": "1" 450 | }, 451 | "label": "肺炎" 452 | }, 453 | { 454 | "pid": "test-36", 455 | "exp_sxs": { 456 | "咳嗽": "1" 457 | }, 458 | "imp_sxs": { 459 | "呕吐": "1" 460 | }, 461 | "label": "上呼吸道感染" 462 | }, 463 | { 464 | "pid": "test-37", 465 | "exp_sxs": { 466 | "鼻塞": "1", 467 | "发烧": "1", 468 | "流涕": "1", 469 | "咳嗽": "1", 470 | "打喷嚏": "1", 471 | "咳痰": "1" 472 | }, 473 | "imp_sxs": { 474 | "烦躁不安": "1", 475 | "呼吸困难": "1" 476 | }, 477 | "label": "肺炎" 478 | }, 479 | { 480 | "pid": "test-38", 481 | "exp_sxs": { 482 | "咽部不适": "1", 483 | "咳嗽": "1" 484 | }, 485 | "imp_sxs": { 486 | "流涕": "1", 487 | "呕吐": "0", 488 | "鼻塞": "1", 489 | "咳痰": "1", 490 | "揉鼻子": "1" 491 | }, 492 | "label": "过敏性鼻炎" 493 | }, 494 | { 495 | "pid": "test-39", 496 | "exp_sxs": { 497 | "绿便": "1", 498 | "肚子咕噜叫": "1", 499 | "稀便": "1", 500 | "厌食": "1", 501 | "放屁": "1" 502 | }, 503 | "imp_sxs": { 504 | "烦躁不安": "1", 505 | "腹胀": "1" 506 | }, 507 | "label": "小儿腹泻" 508 | }, 509 | { 510 | "pid": "test-40", 511 | "exp_sxs": { 512 | "咳嗽": "1", 513 | "呕吐": "1", 514 | "鼻塞": "1", 515 | "烦躁不安": "1", 516 | "流涕": "1" 517 | }, 518 | "imp_sxs": { 519 | "精神萎靡": "0", 520 | "流口水": "1", 521 | "呼吸困难": "1" 522 | }, 523 | "label": "肺炎" 524 | }, 525 | { 526 | "pid": "test-41", 527 | "exp_sxs": { 528 | "咳嗽": "1", 529 | "鼻塞": "1", 530 | "发烧": "1" 531 | }, 532 | "imp_sxs": { 533 | "流涕": "1" 534 | }, 535 | "label": "上呼吸道感染" 536 | }, 537 | { 538 | "pid": "test-42", 539 | "exp_sxs": { 540 | "咳嗽": "1", 541 | "打喷嚏": "1", 542 | "咳痰": "1", 543 | "流涕": "1" 544 | }, 545 | "imp_sxs": { 546 | "精神萎靡": "1", 547 | "发烧": "1" 548 | }, 549 | "label": "肺炎" 550 | }, 551 | { 552 | "pid": "test-43", 553 | "exp_sxs": { 554 | "疱疹": "1", 555 | "咽部不适": "1", 556 | "发烧": "1", 557 | "皮疹": "1" 558 | }, 559 | "imp_sxs": { 560 | "打喷嚏": "1", 561 | "流涕": "1" 562 | }, 563 | "label": "小儿手足口病" 564 | }, 565 | { 566 | "pid": "test-44", 567 | "exp_sxs": { 568 | "咳嗽": "1", 569 | "发烧": "1", 570 | "流涕": "1" 571 | }, 572 | "imp_sxs": {}, 573 | "label": "肺炎" 574 | }, 575 | { 576 | "pid": "test-45", 577 | "exp_sxs": { 578 | "咳嗽": "1", 579 | "鼻塞": "1" 580 | }, 581 | "imp_sxs": { 582 | "精神萎靡": "0", 583 | "过敏": "1", 584 | "皮疹": "0" 585 | }, 586 | "label": "过敏性鼻炎" 587 | }, 588 | { 589 | "pid": "test-46", 590 | "exp_sxs": { 591 | "精神萎靡": "1", 592 | "呕吐": "1", 593 | "发烧": "1" 594 | }, 595 | "imp_sxs": {}, 596 | "label": "小儿腹泻" 597 | }, 598 | { 599 | "pid": "test-47", 600 | "exp_sxs": { 601 | "咳嗽": "1" 602 | }, 603 | "imp_sxs": { 604 | "鼻塞": "1", 605 | "呼吸困难": "1" 606 | }, 607 | "label": "过敏性鼻炎" 608 | }, 609 | { 610 | "pid": "test-48", 611 | "exp_sxs": { 612 | "疱疹": "1", 613 | "发烧": "1", 614 | "皮疹": "1" 615 | }, 616 | "imp_sxs": { 617 | "厌食": "1" 618 | }, 619 | "label": "小儿手足口病" 620 | }, 621 | { 622 | "pid": "test-49", 623 | "exp_sxs": { 624 | "皮疹": "1", 625 | "厌食": "1" 626 | }, 627 | "imp_sxs": { 628 | "精神萎靡": "0", 629 | "流口水": "1" 630 | }, 631 | "label": "小儿手足口病" 632 | }, 633 | { 634 | "pid": "test-50", 635 | "exp_sxs": { 636 | "咳嗽": "1", 637 | "烦躁不安": "1", 638 | "流涕": "1" 639 | }, 640 | "imp_sxs": { 641 | "厌食": "1", 642 | "呼吸困难": "1" 643 | }, 644 | "label": "肺炎" 645 | }, 646 | { 647 | "pid": "test-51", 648 | "exp_sxs": { 649 | "咳嗽": "1", 650 | "发烧": "1" 651 | }, 652 | "imp_sxs": { 653 | "揉眼睛": "1" 654 | }, 655 | "label": "上呼吸道感染" 656 | }, 657 | { 658 | "pid": "test-52", 659 | "exp_sxs": { 660 | "疱疹": "1", 661 | "皮疹": "1" 662 | }, 663 | "imp_sxs": { 664 | "发烧": "1" 665 | }, 666 | "label": "小儿手足口病" 667 | }, 668 | { 669 | "pid": "test-53", 670 | "exp_sxs": { 671 | "呕吐": "1", 672 | "发烧": "1", 673 | "咳痰": "1", 674 | "流涕": "1" 675 | }, 676 | "imp_sxs": { 677 | "呼吸困难": "1" 678 | }, 679 | "label": "上呼吸道感染" 680 | }, 681 | { 682 | "pid": "test-54", 683 | "exp_sxs": { 684 | "咳嗽": "1", 685 | "鼻塞": "1", 686 | "过敏": "1", 687 | "流涕": "1" 688 | }, 689 | "imp_sxs": { 690 | "打喷嚏": "1" 691 | }, 692 | "label": "过敏性鼻炎" 693 | }, 694 | { 695 | "pid": "test-55", 696 | "exp_sxs": { 697 | "咳嗽": "1", 698 | "肺部湿啰音": "1", 699 | "流涕": "1" 700 | }, 701 | "imp_sxs": { 702 | "发烧": "1" 703 | }, 704 | "label": "肺炎" 705 | }, 706 | { 707 | "pid": "test-56", 708 | "exp_sxs": { 709 | "疱疹": "1", 710 | "烦躁不安": "1", 711 | "皮疹": "1", 712 | "流涕": "1", 713 | "流口水": "1", 714 | "发烧": "1" 715 | }, 716 | "imp_sxs": { 717 | "流鼻血": "1", 718 | "呼吸困难": "1" 719 | }, 720 | "label": "小儿手足口病" 721 | }, 722 | { 723 | "pid": "test-57", 724 | "exp_sxs": { 725 | "发烧": "1" 726 | }, 727 | "imp_sxs": { 728 | "咳嗽": "1", 729 | "咳痰": "1", 730 | "肺部阴影": "1", 731 | "厌食": "0" 732 | }, 733 | "label": "肺炎" 734 | }, 735 | { 736 | "pid": "test-58", 737 | "exp_sxs": { 738 | "打喷嚏": "1", 739 | "揉鼻子": "1" 740 | }, 741 | "imp_sxs": { 742 | "过敏": "1", 743 | "皮疹": "1" 744 | }, 745 | "label": "过敏性鼻炎" 746 | }, 747 | { 748 | "pid": "test-59", 749 | "exp_sxs": { 750 | "鼻塞": "1", 751 | "流涕": "1" 752 | }, 753 | "imp_sxs": { 754 | "揉眼睛": "1", 755 | "咳嗽": "1", 756 | "呼吸困难": "1" 757 | }, 758 | "label": "过敏性鼻炎" 759 | }, 760 | { 761 | "pid": "test-60", 762 | "exp_sxs": { 763 | "揉眼睛": "1", 764 | "流涕": "1", 765 | "咽部不适": "1" 766 | }, 767 | "imp_sxs": { 768 | "过敏": "1" 769 | }, 770 | "label": "过敏性鼻炎" 771 | }, 772 | { 773 | "pid": "test-61", 774 | "exp_sxs": { 775 | "体重减轻": "1", 776 | "稀便": "1" 777 | }, 778 | "imp_sxs": {}, 779 | "label": "小儿腹泻" 780 | }, 781 | { 782 | "pid": "test-62", 783 | "exp_sxs": { 784 | "呕吐": "1", 785 | "发烧": "1", 786 | "稀便": "1" 787 | }, 788 | "imp_sxs": { 789 | "精神萎靡": "1" 790 | }, 791 | "label": "小儿腹泻" 792 | }, 793 | { 794 | "pid": "test-63", 795 | "exp_sxs": { 796 | "咳嗽": "1", 797 | "咳痰": "1" 798 | }, 799 | "imp_sxs": { 800 | "过敏": "1", 801 | "流涕": "1" 802 | }, 803 | "label": "过敏性鼻炎" 804 | }, 805 | { 806 | "pid": "test-64", 807 | "exp_sxs": { 808 | "咳嗽": "1", 809 | "咳痰": "1" 810 | }, 811 | "imp_sxs": {}, 812 | "label": "上呼吸道感染" 813 | }, 814 | { 815 | "pid": "test-65", 816 | "exp_sxs": { 817 | "咳嗽": "1", 818 | "咳痰": "1" 819 | }, 820 | "imp_sxs": { 821 | "咽部不适": "1", 822 | "鼻塞": "1" 823 | }, 824 | "label": "肺炎" 825 | }, 826 | { 827 | "pid": "test-66", 828 | "exp_sxs": { 829 | "揉眼睛": "1", 830 | "发烧": "1", 831 | "稀便": "1" 832 | }, 833 | "imp_sxs": {}, 834 | "label": "小儿腹泻" 835 | }, 836 | { 837 | "pid": "test-67", 838 | "exp_sxs": { 839 | "疱疹": "1", 840 | "发烧": "1" 841 | }, 842 | "imp_sxs": { 843 | "皮疹": "1" 844 | }, 845 | "label": "小儿手足口病" 846 | }, 847 | { 848 | "pid": "test-68", 849 | "exp_sxs": { 850 | "烦躁不安": "1", 851 | "鼻塞": "1", 852 | "咳痰": "1" 853 | }, 854 | "imp_sxs": { 855 | "精神萎靡": "0", 856 | "呕吐": "1", 857 | "吐泡泡": "1", 858 | "厌食": "1" 859 | }, 860 | "label": "肺炎" 861 | }, 862 | { 863 | "pid": "test-69", 864 | "exp_sxs": { 865 | "咳嗽": "1", 866 | "烦躁不安": "1", 867 | "厌食": "1", 868 | "流涕": "1" 869 | }, 870 | "imp_sxs": { 871 | "发烧": "1" 872 | }, 873 | "label": "上呼吸道感染" 874 | }, 875 | { 876 | "pid": "test-70", 877 | "exp_sxs": { 878 | "疱疹": "1", 879 | "腹痛": "1", 880 | "发烧": "1", 881 | "流口水": "1", 882 | "皮疹": "1" 883 | }, 884 | "imp_sxs": {}, 885 | "label": "小儿手足口病" 886 | }, 887 | { 888 | "pid": "test-71", 889 | "exp_sxs": { 890 | "咳嗽": "1", 891 | "呕吐": "1", 892 | "发烧": "1", 893 | "流涕": "1" 894 | }, 895 | "imp_sxs": { 896 | "咽部不适": "1", 897 | "稀便": "1" 898 | }, 899 | "label": "小儿手足口病" 900 | }, 901 | { 902 | "pid": "test-72", 903 | "exp_sxs": { 904 | "精神萎靡": "1", 905 | "呕吐": "1", 906 | "反胃": "1", 907 | "厌食": "1" 908 | }, 909 | "imp_sxs": { 910 | "稀便": "1" 911 | }, 912 | "label": "小儿腹泻" 913 | }, 914 | { 915 | "pid": "test-73", 916 | "exp_sxs": { 917 | "鼻塞": "1" 918 | }, 919 | "imp_sxs": { 920 | "精神萎靡": "0", 921 | "皮疹": "1" 922 | }, 923 | "label": "过敏性鼻炎" 924 | }, 925 | { 926 | "pid": "test-74", 927 | "exp_sxs": { 928 | "咳嗽": "1", 929 | "流涕": "1" 930 | }, 931 | "imp_sxs": { 932 | "揉鼻子": "1" 933 | }, 934 | "label": "过敏性鼻炎" 935 | }, 936 | { 937 | "pid": "test-75", 938 | "exp_sxs": { 939 | "咳嗽": "1", 940 | "咳痰": "1" 941 | }, 942 | "imp_sxs": { 943 | "吐泡泡": "1", 944 | "发烧": "0", 945 | "流涕": "0" 946 | }, 947 | "label": "上呼吸道感染" 948 | }, 949 | { 950 | "pid": "test-76", 951 | "exp_sxs": { 952 | "发烧": "1", 953 | "流涕": "1" 954 | }, 955 | "imp_sxs": { 956 | "咽部不适": "1", 957 | "皮疹": "1", 958 | "咳嗽": "0", 959 | "呕吐": "0", 960 | "稀便": "1", 961 | "厌食": "1" 962 | }, 963 | "label": "小儿手足口病" 964 | }, 965 | { 966 | "pid": "test-77", 967 | "exp_sxs": { 968 | "咳嗽": "1" 969 | }, 970 | "imp_sxs": { 971 | "鼻塞": "0", 972 | "揉鼻子": "1" 973 | }, 974 | "label": "过敏性鼻炎" 975 | }, 976 | { 977 | "pid": "test-78", 978 | "exp_sxs": { 979 | "咳嗽": "1", 980 | "流涕": "1" 981 | }, 982 | "imp_sxs": { 983 | "盗汗": "1", 984 | "厌食": "0" 985 | }, 986 | "label": "上呼吸道感染" 987 | }, 988 | { 989 | "pid": "test-79", 990 | "exp_sxs": { 991 | "疱疹": "1", 992 | "皮疹": "1" 993 | }, 994 | "imp_sxs": { 995 | "精神萎靡": "0", 996 | "呕吐": "0", 997 | "发烧": "0" 998 | }, 999 | "label": "小儿手足口病" 1000 | }, 1001 | { 1002 | "pid": "test-80", 1003 | "exp_sxs": { 1004 | "稀便": "1", 1005 | "盗汗": "1" 1006 | }, 1007 | "imp_sxs": { 1008 | "精神萎靡": "1", 1009 | "烦躁不安": "1", 1010 | "发烧": "0" 1011 | }, 1012 | "label": "小儿腹泻" 1013 | }, 1014 | { 1015 | "pid": "test-81", 1016 | "exp_sxs": { 1017 | "咳嗽": "1", 1018 | "发烧": "1" 1019 | }, 1020 | "imp_sxs": { 1021 | "咽部不适": "1", 1022 | "呼吸困难": "1" 1023 | }, 1024 | "label": "上呼吸道感染" 1025 | }, 1026 | { 1027 | "pid": "test-82", 1028 | "exp_sxs": { 1029 | "咳嗽": "1", 1030 | "流涕": "1" 1031 | }, 1032 | "imp_sxs": { 1033 | "精神萎靡": "0", 1034 | "发烧": "0", 1035 | "咳痰": "0" 1036 | }, 1037 | "label": "上呼吸道感染" 1038 | }, 1039 | { 1040 | "pid": "test-83", 1041 | "exp_sxs": { 1042 | "呕吐": "1", 1043 | "反胃": "1", 1044 | "发烧": "1" 1045 | }, 1046 | "imp_sxs": { 1047 | "精神萎靡": "0", 1048 | "厌食": "0" 1049 | }, 1050 | "label": "小儿腹泻" 1051 | }, 1052 | { 1053 | "pid": "test-84", 1054 | "exp_sxs": { 1055 | "精神萎靡": "1", 1056 | "咳嗽": "1", 1057 | "发烧": "1", 1058 | "流涕": "1" 1059 | }, 1060 | "imp_sxs": { 1061 | "揉眼睛": "1", 1062 | "烦躁不安": "1" 1063 | }, 1064 | "label": "上呼吸道感染" 1065 | }, 1066 | { 1067 | "pid": "test-85", 1068 | "exp_sxs": { 1069 | "烦躁不安": "1", 1070 | "呕吐": "1", 1071 | "反胃": "1", 1072 | "稀便": "1", 1073 | "厌食": "1" 1074 | }, 1075 | "imp_sxs": {}, 1076 | "label": "小儿腹泻" 1077 | }, 1078 | { 1079 | "pid": "test-86", 1080 | "exp_sxs": { 1081 | "疱疹": "1", 1082 | "烦躁不安": "1", 1083 | "发烧": "1", 1084 | "抽搐": "1" 1085 | }, 1086 | "imp_sxs": { 1087 | "厌食": "1" 1088 | }, 1089 | "label": "小儿手足口病" 1090 | }, 1091 | { 1092 | "pid": "test-87", 1093 | "exp_sxs": { 1094 | "精神萎靡": "1", 1095 | "肚子咕噜叫": "1", 1096 | "发烧": "1", 1097 | "稀便": "1" 1098 | }, 1099 | "imp_sxs": {}, 1100 | "label": "小儿腹泻" 1101 | }, 1102 | { 1103 | "pid": "test-88", 1104 | "exp_sxs": { 1105 | "咽部不适": "1", 1106 | "咳嗽": "1", 1107 | "发烧": "0" 1108 | }, 1109 | "imp_sxs": { 1110 | "肺部湿啰音": "1" 1111 | }, 1112 | "label": "肺炎" 1113 | }, 1114 | { 1115 | "pid": "test-89", 1116 | "exp_sxs": { 1117 | "鼻塞": "1", 1118 | "打喷嚏": "1" 1119 | }, 1120 | "imp_sxs": { 1121 | "揉鼻子": "1", 1122 | "呼吸困难": "1" 1123 | }, 1124 | "label": "过敏性鼻炎" 1125 | }, 1126 | { 1127 | "pid": "test-90", 1128 | "exp_sxs": { 1129 | "咳嗽": "1", 1130 | "呕吐": "1", 1131 | "发烧": "1", 1132 | "流涕": "1" 1133 | }, 1134 | "imp_sxs": {}, 1135 | "label": "上呼吸道感染" 1136 | }, 1137 | { 1138 | "pid": "test-91", 1139 | "exp_sxs": { 1140 | "烦躁不安": "1", 1141 | "鼻塞": "1", 1142 | "打喷嚏": "1", 1143 | "揉鼻子": "1" 1144 | }, 1145 | "imp_sxs": { 1146 | "揉眼睛": "1", 1147 | "皮疹": "1", 1148 | "流鼻血": "1" 1149 | }, 1150 | "label": "过敏性鼻炎" 1151 | }, 1152 | { 1153 | "pid": "test-92", 1154 | "exp_sxs": { 1155 | "流涕": "1" 1156 | }, 1157 | "imp_sxs": { 1158 | "咳嗽": "0", 1159 | "打喷嚏": "1", 1160 | "发烧": "0" 1161 | }, 1162 | "label": "过敏性鼻炎" 1163 | }, 1164 | { 1165 | "pid": "test-93", 1166 | "exp_sxs": { 1167 | "疱疹": "1", 1168 | "发烧": "1" 1169 | }, 1170 | "imp_sxs": { 1171 | "精神萎靡": "0", 1172 | "皮疹": "1" 1173 | }, 1174 | "label": "小儿手足口病" 1175 | }, 1176 | { 1177 | "pid": "test-94", 1178 | "exp_sxs": { 1179 | "发烧": "1", 1180 | "厌食": "1" 1181 | }, 1182 | "imp_sxs": { 1183 | "肺部湿啰音": "1" 1184 | }, 1185 | "label": "肺炎" 1186 | }, 1187 | { 1188 | "pid": "test-95", 1189 | "exp_sxs": { 1190 | "咳嗽": "1", 1191 | "呕吐": "1", 1192 | "发烧": "1" 1193 | }, 1194 | "imp_sxs": { 1195 | "呼吸困难": "1" 1196 | }, 1197 | "label": "肺炎" 1198 | }, 1199 | { 1200 | "pid": "test-96", 1201 | "exp_sxs": { 1202 | "咳嗽": "1", 1203 | "喘气": "1", 1204 | "咳痰": "1" 1205 | }, 1206 | "imp_sxs": { 1207 | "咽部不适": "1" 1208 | }, 1209 | "label": "上呼吸道感染" 1210 | }, 1211 | { 1212 | "pid": "test-97", 1213 | "exp_sxs": { 1214 | "咳嗽": "1", 1215 | "烦躁不安": "1", 1216 | "咳痰": "1", 1217 | "流涕": "1" 1218 | }, 1219 | "imp_sxs": { 1220 | "精神萎靡": "0", 1221 | "呼吸困难": "1" 1222 | }, 1223 | "label": "肺炎" 1224 | }, 1225 | { 1226 | "pid": "test-98", 1227 | "exp_sxs": { 1228 | "咳嗽": "1", 1229 | "咳痰": "1", 1230 | "流涕": "1" 1231 | }, 1232 | "imp_sxs": { 1233 | "咽部不适": "1" 1234 | }, 1235 | "label": "上呼吸道感染" 1236 | }, 1237 | { 1238 | "pid": "test-99", 1239 | "exp_sxs": { 1240 | "咳嗽": "1", 1241 | "呼吸困难": "1" 1242 | }, 1243 | "imp_sxs": { 1244 | "呕吐": "1", 1245 | "发烧": "0" 1246 | }, 1247 | "label": "上呼吸道感染" 1248 | }, 1249 | { 1250 | "pid": "test-100", 1251 | "exp_sxs": { 1252 | "咳嗽": "1", 1253 | "鼻塞": "1", 1254 | "打喷嚏": "1", 1255 | "流涕": "1" 1256 | }, 1257 | "imp_sxs": { 1258 | "发烧": "0", 1259 | "咳痰": "0" 1260 | }, 1261 | "label": "上呼吸道感染" 1262 | }, 1263 | { 1264 | "pid": "test-101", 1265 | "exp_sxs": { 1266 | "咳嗽": "1", 1267 | "鼻塞": "1", 1268 | "咳痰": "1", 1269 | "流涕": "1" 1270 | }, 1271 | "imp_sxs": { 1272 | "烦躁不安": "1" 1273 | }, 1274 | "label": "过敏性鼻炎" 1275 | }, 1276 | { 1277 | "pid": "test-102", 1278 | "exp_sxs": { 1279 | "发烧": "1", 1280 | "皮疹": "1" 1281 | }, 1282 | "imp_sxs": { 1283 | "精神萎靡": "0", 1284 | "厌食": "0" 1285 | }, 1286 | "label": "小儿手足口病" 1287 | }, 1288 | { 1289 | "pid": "test-103", 1290 | "exp_sxs": { 1291 | "咳嗽": "1", 1292 | "吐泡泡": "1" 1293 | }, 1294 | "imp_sxs": { 1295 | "烦躁不安": "1", 1296 | "稀便": "0" 1297 | }, 1298 | "label": "肺炎" 1299 | }, 1300 | { 1301 | "pid": "test-104", 1302 | "exp_sxs": { 1303 | "咳嗽": "1", 1304 | "发烧": "1", 1305 | "咳痰": "1", 1306 | "流涕": "1" 1307 | }, 1308 | "imp_sxs": { 1309 | "烦躁不安": "1" 1310 | }, 1311 | "label": "上呼吸道感染" 1312 | } 1313 | ] -------------------------------------------------------------------------------- /data_utils.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import torch 3 | from torch.utils.data import Dataset 4 | from torch.nn.utils.rnn import pad_sequence 5 | from nltk.translate.bleu_score import sentence_bleu 6 | from nltk.translate.bleu_score import SmoothingFunction 7 | from collections import defaultdict 8 | from scipy.stats import truncnorm 9 | 10 | from conf import device_num 11 | 12 | device = torch.device('cuda:{}'.format(device_num) if torch.cuda.is_available() else 'cpu') 13 | 14 | 15 | class SymptomVocab: 16 | 17 | def __init__(self, samples: list = None, add_special_sxs: bool = False, 18 | min_sx_freq: int = None, max_voc_size: int = None): 19 | 20 | # sx is short for symptom 21 | self.sx2idx = {} # map from symptom to symptom id 22 | self.idx2sx = {} # map from symptom id to symptom 23 | self.sx2count = {} # map from symptom to symptom count 24 | self.num_sxs = 0 # number of symptoms 25 | 26 | # symptom attrs 27 | self.SX_ATTR_PAD_IDX = 0 # symptom attribute id for PAD 28 | self.SX_ATTR_POS_IDX = 1 # symptom attribute id for YES 29 | self.SX_ATTR_NEG_IDX = 2 # symptom attribute id for NO 30 | self.SX_ATTR_NS_IDX = 3 # symptom attribute id for NOT SURE 31 | self.SX_ATTR_NM_IDX = 4 # symptom attribute id for NOT MENTIONED 32 | 33 | self.SX_ATTR_MAP = { # map from symptom attribute to symptom attribute id 34 | '0': self.SX_ATTR_NEG_IDX, 35 | '1': self.SX_ATTR_POS_IDX, 36 | '2': self.SX_ATTR_NS_IDX, 37 | } 38 | 39 | self.SX_ATTR_MAP_INV = { 40 | self.SX_ATTR_NEG_IDX: '0', 41 | self.SX_ATTR_POS_IDX: '1', 42 | self.SX_ATTR_NS_IDX: '2', 43 | } 44 | 45 | # special symptoms 46 | self.num_special = 0 # number of special symptoms 47 | self.special_sxs = [] 48 | 49 | # vocabulary 50 | self.min_sx_freq = min_sx_freq # minimal symptom frequency 51 | self.max_voc_size = max_voc_size # maximal symptom size 52 | 53 | # add special symptoms 54 | if add_special_sxs: # special symptoms 55 | self.SX_PAD = '[PAD]' 56 | self.SX_START = '[START]' 57 | self.SX_END = '[END]' 58 | self.SX_UNK = '[UNKNOWN]' 59 | self.SX_CLS = '[CLS]' 60 | self.SX_MASK = '[MASK]' 61 | self.special_sxs.extend([self.SX_PAD, self.SX_START, self.SX_END, self.SX_UNK, self.SX_CLS, self.SX_MASK]) 62 | self.sx2idx = {sx: idx for idx, sx in enumerate(self.special_sxs)} 63 | self.idx2sx = {idx: sx for idx, sx in enumerate(self.special_sxs)} 64 | self.num_special = len(self.special_sxs) 65 | self.num_sxs += self.num_special 66 | 67 | # update vocabulary 68 | if samples is not None: 69 | if not isinstance(samples, tuple): 70 | samples = (samples,) 71 | num_samples = 0 72 | for split in samples: 73 | num_samples += self.update_voc(split) 74 | print('symptom vocabulary constructed using {} split and {} samples ' 75 | '({} symptoms with {} special symptoms)'. 76 | format(len(samples), num_samples, self.num_sxs - self.num_special, self.num_special)) 77 | 78 | # trim vocabulary 79 | self.trim_voc() 80 | 81 | assert self.num_sxs == len(self.sx2idx) == len(self.idx2sx) 82 | 83 | def add_symptom(self, sx: str) -> None: 84 | if sx not in self.sx2idx: 85 | self.sx2idx[sx] = self.num_sxs 86 | self.sx2count[sx] = 1 87 | self.idx2sx[self.num_sxs] = sx 88 | self.num_sxs += 1 89 | else: 90 | self.sx2count[sx] += 1 91 | 92 | def update_voc(self, samples: list) -> int: 93 | for sample in samples: 94 | for sx in sample['exp_sxs']: 95 | self.add_symptom(sx) 96 | for sx in sample['imp_sxs']: 97 | self.add_symptom(sx) 98 | return len(samples) 99 | 100 | def trim_voc(self): 101 | sxs = [sx for sx in sorted(self.sx2count, key=self.sx2count.get, reverse=True)] 102 | if self.min_sx_freq is not None: 103 | sxs = [sx for sx in sxs if self.sx2count.get(sx) >= self.min_sx_freq] 104 | if self.max_voc_size is not None: 105 | sxs = sxs[: self.max_voc_size] 106 | sxs = self.special_sxs + sxs 107 | self.sx2idx = {sx: idx for idx, sx in enumerate(sxs)} 108 | self.idx2sx = {idx: sx for idx, sx in enumerate(sxs)} 109 | self.sx2count = {sx: self.sx2count.get(sx) for sx in sxs if sx in self.sx2count} 110 | self.num_sxs = len(self.sx2idx) 111 | print('trimmed to {} symptoms with {} special symptoms'. 112 | format(self.num_sxs - self.num_special, self.num_special)) 113 | 114 | def encode(self, sxs: dict, keep_unk=True, add_start=False, add_end=False): 115 | sx_ids, attr_ids = [], [] 116 | if add_start: 117 | sx_ids.append(self.start_idx) 118 | attr_ids.append(self.SX_ATTR_PAD_IDX) 119 | for sx, attr in sxs.items(): 120 | if sx in self.sx2idx: 121 | sx_ids.append(self.sx2idx.get(sx)) 122 | attr_ids.append(self.SX_ATTR_MAP.get(attr)) 123 | else: 124 | if keep_unk: 125 | sx_ids.append(self.unk_idx) 126 | attr_ids.append(self.SX_ATTR_MAP.get(attr)) 127 | if add_end: 128 | sx_ids.append(self.end_idx) 129 | attr_ids.append(self.SX_ATTR_PAD_IDX) 130 | return sx_ids, attr_ids 131 | 132 | def decoder(self, sx_ids, attr_ids): 133 | sx_attr = {} 134 | for sx_id, attr_id in zip(sx_ids, attr_ids): 135 | if attr_id not in [self.SX_ATTR_PAD_IDX, self.SX_ATTR_NM_IDX]: 136 | sx_attr.update({self.idx2sx.get(sx_id): self.SX_ATTR_MAP_INV.get(attr_id)}) 137 | return sx_attr 138 | 139 | def __len__(self) -> int: 140 | return self.num_sxs 141 | 142 | @property 143 | def pad_idx(self) -> int: 144 | return self.sx2idx.get(self.SX_PAD) 145 | 146 | @property 147 | def start_idx(self) -> int: 148 | return self.sx2idx.get(self.SX_START) 149 | 150 | @property 151 | def end_idx(self) -> int: 152 | return self.sx2idx.get(self.SX_END) 153 | 154 | @property 155 | def unk_idx(self) -> int: 156 | return self.sx2idx.get(self.SX_UNK) 157 | 158 | @property 159 | def cls_idx(self) -> int: 160 | return self.sx2idx.get(self.SX_CLS) 161 | 162 | @property 163 | def mask_idx(self) -> int: 164 | return self.sx2idx.get(self.SX_MASK) 165 | 166 | @property 167 | def pad_sx(self) -> str: 168 | return self.SX_PAD 169 | 170 | @property 171 | def start_sx(self) -> str: 172 | return self.SX_START 173 | 174 | @property 175 | def end_sx(self) -> str: 176 | return self.SX_END 177 | 178 | @property 179 | def unk_sx(self) -> str: 180 | return self.SX_UNK 181 | 182 | @property 183 | def cls_sx(self) -> str: 184 | return self.SX_CLS 185 | 186 | @property 187 | def mask_sx(self) -> str: 188 | return self.SX_MASK 189 | 190 | 191 | class DiseaseVocab: 192 | 193 | def __init__(self, samples: list = None): 194 | 195 | # dis is short for disease 196 | self.dis2idx = {} 197 | self.idx2dis = {} 198 | self.dis2count = {} 199 | self.num_dis = 0 200 | 201 | # update vocabulary 202 | if samples is not None: 203 | if not isinstance(samples, tuple): 204 | samples = (samples,) 205 | num_samples = 0 206 | for split in samples: 207 | num_samples += self.update_voc(split) 208 | print('disease vocabulary constructed using {} split and {} samples\nnum of unique diseases: {}'. 209 | format(len(samples), num_samples, self.num_dis)) 210 | 211 | def add_disease(self, dis: str) -> None: 212 | if dis not in self.dis2idx: 213 | self.dis2idx[dis] = self.num_dis 214 | self.dis2count[dis] = 1 215 | self.idx2dis[self.num_dis] = dis 216 | self.num_dis += 1 217 | else: 218 | self.dis2count[dis] += 1 219 | 220 | def update_voc(self, samples: list) -> int: 221 | for sample in samples: 222 | self.add_disease(sample['label']) 223 | return len(samples) 224 | 225 | def __len__(self) -> int: 226 | return self.num_dis 227 | 228 | def encode(self, dis): 229 | return self.dis2idx.get(dis) 230 | 231 | 232 | class SymptomDataset(Dataset): 233 | 234 | def __init__(self, samples, sv: SymptomVocab, dv: DiseaseVocab, keep_unk: bool, 235 | add_src_start: bool = False, add_tgt_start: bool = False, add_tgt_end: bool = False): 236 | self.samples = samples 237 | self.sv = sv 238 | self.dv = dv 239 | self.keep_unk = keep_unk 240 | self.size = len(self.sv) 241 | self.add_src_start = add_src_start 242 | self.add_tgt_start = add_tgt_start 243 | self.add_tgt_end = add_tgt_end 244 | 245 | def __len__(self): 246 | return len(self.samples) 247 | 248 | def __getitem__(self, index): 249 | sample = self.samples[index] 250 | exp_sx_ids, exp_attr_ids = self.sv.encode( 251 | sample['exp_sxs'], keep_unk=self.keep_unk, add_start=self.add_src_start) 252 | imp_sx_ids, imp_attr_ids = self.sv.encode( 253 | sample['imp_sxs'], keep_unk=self.keep_unk, add_start=self.add_tgt_start, add_end=self.add_tgt_end) 254 | exp_sx_ids, exp_attr_ids, imp_sx_ids, imp_attr_ids, label = to_tensor_vla( 255 | exp_sx_ids, exp_attr_ids, imp_sx_ids, imp_attr_ids, self.dv.encode(sample['label']), dtype=torch.long) 256 | item = { 257 | 'exp_sx_ids': exp_sx_ids, 258 | 'exp_attr_ids': exp_attr_ids, 259 | 'imp_sx_ids': imp_sx_ids, 260 | 'imp_attr_ids': imp_attr_ids, 261 | 'label': label 262 | } 263 | return item 264 | 265 | 266 | # language model 267 | def lm_collater(samples): 268 | sx_ids = pad_sequence( 269 | [torch.cat([sample['exp_sx_ids'], sample['imp_sx_ids']]) for sample in samples], padding_value=0) 270 | attr_ids = pad_sequence( 271 | [torch.cat([sample['exp_attr_ids'], sample['imp_attr_ids']]) for sample in samples], padding_value=0) 272 | labels = torch.stack([sample['label'] for sample in samples]) 273 | items = { 274 | 'sx_ids': sx_ids, 275 | 'attr_ids': attr_ids, 276 | 'labels': labels 277 | } 278 | return items 279 | 280 | 281 | # policy gradient 282 | def pg_collater(samples): 283 | exp_sx_ids = pad_sequence([sample['exp_sx_ids'] for sample in samples], padding_value=0) 284 | exp_attr_ids = pad_sequence([sample['exp_attr_ids'] for sample in samples], padding_value=0) 285 | imp_sx_ids = pad_sequence([sample['imp_sx_ids'] for sample in samples], padding_value=0) 286 | imp_attr_ids = pad_sequence([sample['imp_attr_ids'] for sample in samples], padding_value=0) 287 | labels = torch.stack([sample['label'] for sample in samples]) 288 | items = { 289 | 'exp_sx_ids': exp_sx_ids, 290 | 'exp_attr_ids': exp_attr_ids, 291 | 'imp_sx_ids': imp_sx_ids, 292 | 'imp_attr_ids': imp_attr_ids, 293 | 'labels': labels 294 | } 295 | return items 296 | 297 | 298 | class PatientSimulator: 299 | 300 | def __init__(self, sv: SymptomVocab): 301 | self.sv = sv 302 | 303 | def init_sx_ids(self, bsz): 304 | return torch.full((1, bsz), self.sv.start_idx, dtype=torch.long, device=device) 305 | 306 | def init_attr_ids(self, bsz): 307 | return torch.full((1, bsz), self.sv.SX_ATTR_PAD_IDX, dtype=torch.long, device=device) 308 | 309 | def answer(self, action, batch): 310 | d_action, attr_ids = [], [] 311 | for idx, act in enumerate(action): 312 | if act.item() < self.sv.num_special: 313 | attr_ids.append(self.sv.SX_ATTR_PAD_IDX) 314 | d_action.append(self.sv.pad_idx) 315 | else: 316 | indices = batch['imp_sx_ids'][:, idx].eq(act.item()).nonzero(as_tuple=False) 317 | if len(indices) > 0: 318 | attr_ids.append(batch['imp_attr_ids'][indices[0].item(), idx].item()) 319 | d_action.append(act) 320 | else: 321 | attr_ids.append(self.sv.SX_ATTR_NM_IDX) 322 | d_action.append(self.sv.pad_idx) 323 | return to_tensor_vla(d_action, attr_ids) 324 | 325 | 326 | # symptom inquiry epoch recorder 327 | class SIRecorder: 328 | 329 | def __init__(self, num_samples, num_imp_sxs, digits): 330 | self.epoch_rewards = defaultdict(list) # 模拟的每一个序列的每一个查询的症状的奖励 331 | self.epoch_num_turns = defaultdict(list) # 模拟的每一个序列的询问的轮数 332 | 333 | self.epoch_num_hits = defaultdict(list) # 模拟的每一个序列的症状命中总个数 334 | self.epoch_num_pos_hits = defaultdict(list) # 模拟的每一个序列的症状(yes)命中个数 335 | self.epoch_num_neg_hits = defaultdict(list) # 模拟的每一个序列的症状(no)命中个数 336 | self.epoch_num_ns_hits = defaultdict(list) # 模拟的每一个序列的症状(not sure)命中个数 337 | 338 | self.epoch_num_repeats = defaultdict(list) # 模拟的每一个序列的询问的重复症状的个数 339 | self.epoch_distances = defaultdict(list) # 模拟的每一个序列的杰卡德距离(不考虑顺序) 340 | self.epoch_bleus = defaultdict(list) # 模拟的每一个序列的BLEU(考虑顺序) 341 | 342 | self.num_samples = num_samples 343 | 344 | num_pos_imp_sxs, num_neg_imp_sxs, num_ns_imp_sxs = num_imp_sxs 345 | self.num_pos_imp_sxs = num_pos_imp_sxs 346 | self.num_neg_imp_sxs = num_neg_imp_sxs 347 | self.num_ns_imp_sxs = num_ns_imp_sxs 348 | self.num_imp_sxs = sum(num_imp_sxs) 349 | self.digits = digits 350 | 351 | self.epoch_acc = defaultdict(float) 352 | 353 | def update(self, batch_rewards, batch_num_turns, batch_num_hits, batch_num_pos_hits, 354 | batch_num_neg_hits, batch_num_ns_hits, batch_num_repeats, batch_distances, batch_bleus, epoch): 355 | self.epoch_rewards[epoch].extend(batch_rewards) 356 | self.epoch_num_turns[epoch].extend(batch_num_turns) 357 | 358 | self.epoch_num_hits[epoch].extend(batch_num_hits) 359 | self.epoch_num_pos_hits[epoch].extend(batch_num_pos_hits) 360 | self.epoch_num_neg_hits[epoch].extend(batch_num_neg_hits) 361 | self.epoch_num_ns_hits[epoch].extend(batch_num_ns_hits) 362 | 363 | self.epoch_num_repeats[epoch].extend(batch_num_repeats) 364 | self.epoch_distances[epoch].extend(batch_distances) 365 | self.epoch_bleus[epoch].extend(batch_bleus) 366 | 367 | def update_acc(self, epoch, acc): 368 | self.epoch_acc[epoch] = acc 369 | 370 | def epoch_summary(self, epoch): 371 | avg_epoch_rewards = average(self.epoch_rewards[epoch], self.num_imp_sxs) 372 | avg_epoch_turns = average(self.epoch_num_turns[epoch], self.num_samples) 373 | 374 | avg_epoch_num_hits = average(self.epoch_num_hits[epoch], self.num_imp_sxs) 375 | avg_epoch_num_pos_hits = average(self.epoch_num_pos_hits[epoch], self.num_pos_imp_sxs) 376 | avg_epoch_num_neg_hits = average(self.epoch_num_neg_hits[epoch], self.num_neg_imp_sxs) 377 | avg_epoch_num_ns_hits = average(self.epoch_num_ns_hits[epoch], self.num_ns_imp_sxs) 378 | 379 | avg_epoch_num_repeats = average(self.epoch_num_repeats[epoch], self.num_samples) 380 | avg_epoch_distances = average(self.epoch_distances[epoch], self.num_samples) 381 | avg_epoch_bleus = average(self.epoch_bleus[epoch], self.num_samples) 382 | 383 | epoch_acc = self.epoch_acc[epoch] if epoch in self.epoch_acc else 0 384 | 385 | print( 386 | 'epoch: {} -> rewards: {}, all/pos/neg/ns hits: {}/{}/{}/{}, acc: {}, repeats: {}, turns: {}, distances: {}, bleus: {}'. 387 | format(epoch + 1, 388 | round(avg_epoch_rewards, self.digits), 389 | round(avg_epoch_num_hits, self.digits), 390 | round(avg_epoch_num_pos_hits, self.digits), 391 | round(avg_epoch_num_neg_hits, self.digits), 392 | round(avg_epoch_num_ns_hits, self.digits), 393 | round(epoch_acc, self.digits), 394 | round(avg_epoch_num_repeats, self.digits), 395 | round(avg_epoch_turns, self.digits), 396 | round(avg_epoch_distances, self.digits), 397 | round(avg_epoch_bleus, self.digits))) 398 | 399 | @staticmethod 400 | def lmax(arrays: list): 401 | cur_val = arrays[-1] 402 | max_val = max(arrays) 403 | max_index = len(arrays) - arrays[::-1].index(max_val) - 1 404 | return cur_val, max_val, max_index 405 | 406 | def report(self, max_epoch: int, digits: int, alpha: float = 0.2, verbose: bool = False): 407 | recs = [average(self.epoch_num_hits[epoch], self.num_imp_sxs) for epoch in range(max_epoch + 1)] 408 | cur_rec, best_rec, best_rec_epoch = self.lmax(recs) 409 | accs = [self.epoch_acc[epoch] for epoch in range(max_epoch + 1)] 410 | cur_acc, best_acc, best_acc_epoch = self.lmax(accs) 411 | mets = [alpha * rec + (1 - alpha) * acc for rec, acc in zip(recs, accs)] 412 | cur_met, best_met, best_met_epoch = self.lmax(mets) 413 | best_rec_acc, best_acc_rec, best_met_rec, best_met_acc = \ 414 | accs[best_rec_epoch], recs[best_acc_epoch], recs[best_met_epoch], accs[best_met_epoch] 415 | if verbose: 416 | print('best recall -> epoch: {}, recall: {}, accuracy: {}\nbest accuracy -> epoch: {}, recall: {}, accuracy: {}\nbest metric -> epoch: {}, recall: {}, accuracy: {}'.format( 417 | best_rec_epoch, round(best_rec, digits), round(best_rec_acc, digits), 418 | best_acc_epoch, round(best_acc_rec, digits), round(best_acc, digits), 419 | best_rec_epoch, round(best_met_rec, digits), round(best_met_acc, digits) 420 | )) 421 | return cur_rec, best_rec, best_rec_epoch, best_rec_acc, cur_acc, best_acc, best_acc_epoch, best_acc_rec, cur_met, best_met, best_met_epoch, best_met_rec, best_met_acc 422 | 423 | 424 | def recursive_sum(item): 425 | if isinstance(item, list): 426 | try: 427 | return sum(item) 428 | except TypeError: 429 | return recursive_sum(sum(item, [])) 430 | else: 431 | return item 432 | 433 | 434 | def average(numerator, denominator): 435 | return 0 if recursive_sum(denominator) == 0 else recursive_sum(numerator) / recursive_sum(denominator) 436 | 437 | 438 | def to_numpy(tensors): 439 | arrays = {} 440 | for key, tensor in tensors.items(): 441 | arrays[key] = tensor.cpu().numpy() 442 | return arrays 443 | 444 | 445 | def to_numpy_(tensor): 446 | return tensor.cpu().numpy() 447 | 448 | 449 | def to_list(tensor): 450 | return to_numpy_(tensor).tolist() 451 | 452 | 453 | def to_numpy_vla(*tensors): 454 | arrays = [] 455 | for tensor in tensors: 456 | arrays.append(to_numpy_(tensor)) 457 | return arrays 458 | 459 | 460 | def to_tensor_(array, dtype=None): 461 | if dtype is None: 462 | return torch.tensor(array, device=device) 463 | else: 464 | return torch.tensor(array, dtype=dtype, device=device) 465 | 466 | 467 | def to_tensor_vla(*arrays, dtype=None): 468 | tensors = [] 469 | for array in arrays: 470 | tensors.append(to_tensor_(array, dtype)) 471 | return tensors 472 | 473 | 474 | def compute_num_sxs(samples): 475 | num_yes_imp_sxs = 0 476 | num_no_imp_sxs = 0 477 | num_not_sure_imp_sxs = 0 478 | for sample in samples: 479 | for sx, attr in sample['imp_sxs'].items(): 480 | if attr == '0': 481 | num_no_imp_sxs += 1 482 | elif attr == '1': 483 | num_yes_imp_sxs += 1 484 | else: 485 | num_not_sure_imp_sxs += 1 486 | return num_yes_imp_sxs, num_no_imp_sxs, num_not_sure_imp_sxs 487 | 488 | 489 | def combinations(iterable, r): 490 | pool = tuple(iterable) 491 | n = len(pool) 492 | if r > n: 493 | return 494 | indices = list(range(r)) 495 | yield tuple(pool[i] for i in indices) 496 | while True: 497 | for i in reversed(range(r)): 498 | if indices[i] != i + n - r: 499 | break 500 | else: 501 | return 502 | indices[i] += 1 503 | for j in range(i + 1, r): 504 | indices[j] = indices[j - 1] + 1 505 | yield tuple(pool[i] for i in indices) 506 | 507 | 508 | # compute co-occurrence matrix 509 | def compute_dscom(samples, sv: SymptomVocab, dv: DiseaseVocab): 510 | cm = np.zeros((dv.num_dis, sv.num_sxs)) 511 | if not isinstance(samples, tuple): 512 | samples = (samples,) 513 | for split in samples: 514 | for sample in split: 515 | exp_sx_ids, _ = sv.encode(sample['exp_sxs']) 516 | imp_sx_ids, _ = sv.encode(sample['imp_sxs']) 517 | dis_id = dv.encode(sample['label']) 518 | for sx_id in exp_sx_ids + imp_sx_ids: 519 | cm[dis_id][sx_id] += 1 520 | return cm 521 | 522 | 523 | def compute_sscom(samples, sv: SymptomVocab, smooth: bool = True, normalize: bool = True): 524 | cm = np.zeros((sv.num_sxs, sv.num_sxs)) 525 | for sample in samples: 526 | exp_sx_ids, _ = sv.encode(sample['exp_sxs']) 527 | imp_sx_ids, _ = sv.encode(sample['imp_sxs']) 528 | sxs = exp_sx_ids + imp_sx_ids 529 | for (i, j) in combinations(sxs, 2): 530 | cm[i][j] += 1 531 | cm[j][i] += 1 532 | if smooth: 533 | min_val, max_val = .1, .5 534 | for i in range(sv.num_sxs): 535 | for j in range(sv.num_sxs): 536 | if cm[i][j] == 0: 537 | cm[i][j] = truncnorm.rvs(min_val, max_val, size=1)[0] 538 | if normalize: 539 | cm = cm / cm.sum(axis=1).reshape(-1, 1) 540 | return cm 541 | 542 | 543 | def random_agent(samples, sv: SymptomVocab, max_turn: int, exclude_exp: bool = True, times: int = 100): 544 | recs = [] 545 | for _ in range(times): 546 | num_imp_sxs, num_hits = 0, 0 547 | for sample in samples: 548 | exp_sx_ids, _ = sv.encode(sample['exp_sxs'], keep_unk=False) 549 | imp_sx_ids, _ = sv.encode(sample['imp_sxs'], keep_unk=False) 550 | if exclude_exp: 551 | action_space = [sx_id for sx_id, _ in sv.idx2sx.items() if sx_id not in exp_sx_ids] 552 | else: 553 | action_space = [sx_id for sx_id, _ in sv.idx2sx.items()] 554 | actions = np.random.choice(action_space, size=max_turn, replace=False) 555 | num_imp_sxs += len(imp_sx_ids) 556 | num_hits += len([action for action in actions if action in imp_sx_ids]) 557 | recs.append(num_hits / num_imp_sxs) 558 | return recs 559 | 560 | 561 | def rule_agent(samples, cm, sv: SymptomVocab, max_turn: int, exclude_exp: bool = True): 562 | num_imp_sxs, num_pos_imp_sxs, num_neg_imp_sxs = 0, 0, 0 563 | num_hits, num_pos_hits, num_neg_hits = 0, 0, 0 564 | for sample in samples: 565 | exp_sx_ids, _ = sv.encode(sample['exp_sxs'], keep_unk=False) 566 | imp_sx_ids, imp_attr_ids = sv.encode(sample['imp_sxs'], keep_unk=False) 567 | imp_pos_sx_ids = [sx_id for sx_id, attr_id in zip(imp_sx_ids, imp_attr_ids) if attr_id == sv.SX_ATTR_POS_IDX] 568 | imp_neg_sx_ids = [sx_id for sx_id, attr_id in zip(imp_sx_ids, imp_attr_ids) if attr_id == sv.SX_ATTR_NEG_IDX] 569 | num_imp_sxs += len(imp_sx_ids) 570 | num_pos_imp_sxs += len(imp_pos_sx_ids) 571 | num_neg_imp_sxs += len(imp_neg_sx_ids) 572 | actions = [] 573 | current = set(exp_sx_ids) 574 | previous = set() 575 | for step in range(max_turn): 576 | # similarity score 577 | sim = np.zeros(sv.num_sxs) 578 | for sx in current: 579 | sim += cm[sx] 580 | index = -1 581 | if exclude_exp: 582 | for index in np.flip(np.argsort(sim)): 583 | if index not in current.union(previous): 584 | break 585 | else: 586 | for index in np.flip(np.argsort(sim)): 587 | if index not in previous: 588 | break 589 | # if index in imp_sx_ids and imp_attr_ids[imp_sx_ids.index(index)] == sv.SX_ATTR_POS_IDX: 590 | # current.add(index) 591 | # if index in imp_sx_ids: 592 | # current.add(index) 593 | previous.add(index) 594 | actions.append(index) 595 | num_hits += len([sx_id for sx_id in actions if sx_id in imp_sx_ids]) 596 | num_pos_hits += len([sx_id for sx_id in actions if sx_id in imp_pos_sx_ids]) 597 | num_neg_hits += len([sx_id for sx_id in actions if sx_id in imp_neg_sx_ids]) 598 | rec = num_hits / num_imp_sxs 599 | pos_rec = num_pos_hits / num_pos_imp_sxs 600 | neg_rec = num_neg_hits / num_neg_imp_sxs 601 | return rec, pos_rec, neg_rec 602 | 603 | 604 | class RewardDistributor: 605 | 606 | def __init__(self, sv: SymptomVocab, dv: DiseaseVocab, dscom): 607 | 608 | self.sv = sv 609 | self.dv = dv 610 | 611 | # 症状恢复奖励 612 | self.pos_priori_reward = 1.0 613 | self.neg_priori_reward = -1.0 614 | self.hit_reward = {1: 10.0, 2: 5.0, 3: 5.0} 615 | self.decline_rate = 0.1 616 | self.repeat_reward = 0.0 617 | self.end_reward = 0.0 618 | self.missed_reward = -0.2 619 | 620 | self.dscom = dscom 621 | 622 | def compute_sr_priori_reward(self, action, dis_id, eps=0.0): 623 | # 先验奖励,push智能体不生成无关的症状(由语料库中的疾病-症状共现矩阵决定) 624 | reward = [] 625 | for act in action: 626 | if self.dscom[dis_id, act] > eps: 627 | reward.append(self.pos_priori_reward) 628 | else: 629 | reward.append(self.neg_priori_reward) 630 | return reward 631 | 632 | def compute_sr_ground_reward(self, action, imp_sx, imp_attr, num_hit): 633 | # 真实奖励,push智能体生成ground truth中的症状 634 | # 1. 如果智能体生成了隐形症状中包含的症状,给予正向奖励 635 | # 2. 如果智能体生成了结束症状,给予奖励等于当前已经命中的症状数减去隐形症状中包含的症状数(该参数设置与智能体的询问轮数由直接关系) 636 | # 3. 如果智能体生成了隐形症状中不包含的症状,给予负向奖励 637 | # 4. 如果智能体生成了已询问过的症状,给予负向奖励 638 | reward = [] 639 | history_acts, num_repeat = set(), 0 640 | for i, act in enumerate(action): 641 | if act in history_acts: 642 | num_repeat += 1 643 | reward.append(self.repeat_reward) 644 | else: 645 | history_acts.add(act) 646 | if act == self.sv.end_idx: 647 | reward.append(num_hit - len(imp_sx) + self.end_reward) 648 | else: 649 | if act in imp_sx: 650 | idx = imp_sx.index(act) 651 | attr = imp_attr[idx] 652 | reward.append(self.hit_reward[attr] - i * self.decline_rate) 653 | # reward.append(self.hit_reward[attr]) 654 | else: 655 | reward.append(self.missed_reward) 656 | return reward, num_repeat 657 | 658 | @staticmethod 659 | def compute_sr_global_reward(action, imp_sx, num_hit, eps=1e-3): 660 | # 全局奖励,push智能体生成与真实情况下,顺序尽可能类似的序列 661 | # 1.非序列相关奖励(杰卡德距离) 662 | set(action).intersection() 663 | distance = (num_hit + eps) / (len(set(action).union(set(imp_sx))) + eps) 664 | # 2.序列相关奖励(BLEU,其中denoise action是action和隐形症状序列中的公共子序列) 665 | denoise_action = [act for act in action if act in imp_sx] 666 | bleu = sentence_bleu([imp_sx], denoise_action, smoothing_function=SmoothingFunction().method1) 667 | # 这些奖励仅分配到命中的那些症状() 668 | distance = [distance if act in imp_sx else 0 for act in action] 669 | bleu = [bleu if act in imp_sx else 0 for act in action] 670 | return distance, bleu, denoise_action 671 | 672 | # 计算症状恢复奖励(symptom recovery) 673 | def compute_sr_reward(self, actions, np_batch, epoch, sir: SIRecorder): 674 | batch_size, seq_len = actions.shape 675 | # 将 actions 转化为 numpy array 676 | actions = to_numpy_(actions) 677 | # 初始化奖励,询问轮数,症状命中数(yes/no/not sure) 678 | rewards, num_turns, num_hits, num_pos_hits, num_neg_hits, num_ns_hits = [], [], [], [], [], [] 679 | # 初始化重复次数,去噪的动作序列 680 | num_repeats, denoise_actions, distances, bleus = [], [], [], [] 681 | # 计算每一个序列的回报 682 | for idx in range(batch_size): 683 | # break 684 | # 得到隐形症状序列的yes/no/not sure子序列 685 | imp_sx, imp_attr, imp_pos_sx, imp_neg_sx, imp_ns_sx = self.truncate_imp_sx(idx, np_batch) 686 | # 得到动作序列(通过结束症状id进行截断) 687 | action = self.truncate_action(idx, actions) 688 | # 计算询问轮数,症状命中数等 689 | num_turns.append(len(action)) 690 | num_hit = len(set(action).intersection(set(imp_sx))) 691 | num_hits.append(num_hit) 692 | num_pos_hits.append(len(set(action).intersection(set(imp_pos_sx)))) 693 | num_neg_hits.append(len(set(action).intersection(set(imp_neg_sx)))) 694 | num_ns_hits.append(len(set(action).intersection(set(imp_ns_sx)))) 695 | # 计算先验奖励 696 | priori_reward = self.compute_sr_priori_reward(action, dis_id=np_batch['labels'][idx]) 697 | # 计算真实奖励 698 | ground_reward, num_repeat = self.compute_sr_ground_reward(action, imp_sx, imp_attr, num_hit) 699 | num_repeats.append(num_repeat) 700 | # 计算全局奖励 701 | distance, bleu, denoise_action = self.compute_sr_global_reward(action, imp_sx, num_hit) 702 | distances.append(0 if len(distance) == 0 else max(distance)) 703 | bleus.append(0 if len(bleu) == 0 else max(bleu)) 704 | denoise_actions.append(denoise_action) 705 | # 计算最终奖励(每一步的奖励) 706 | reward = [pr + gr + dr + br for pr, gr, dr, br in zip(priori_reward, ground_reward, distance, bleu)] 707 | reward += [0] * (seq_len - len(action)) 708 | rewards.append(reward) 709 | sir.update(rewards, num_turns, num_hits, num_pos_hits, num_neg_hits, 710 | num_ns_hits, num_repeats, distances, bleus, epoch=epoch) 711 | return rewards 712 | 713 | def truncate_action(self, idx: int, actions: list) -> list: 714 | action = actions[idx].tolist() 715 | return action[: action.index(self.sv.end_idx)] if self.sv.end_idx in action else action 716 | 717 | def truncate_imp_sx(self, idx: int, np_batch: dict): 718 | imp_sx, imp_attr, imp_pos_sx, imp_neg_sx, imp_ns_sx = [], [], [], [], [] 719 | for sx_id, attr_id in zip(np_batch['imp_sx_ids'][1:, idx], np_batch['imp_attr_ids'][1:, idx]): 720 | if sx_id == self.sv.end_idx: 721 | break 722 | else: 723 | imp_sx.append(sx_id) 724 | imp_attr.append(attr_id) 725 | if attr_id == self.sv.SX_ATTR_POS_IDX: 726 | imp_pos_sx.append(sx_id) 727 | elif attr_id == self.sv.SX_ATTR_NEG_IDX: 728 | imp_neg_sx.append(sx_id) 729 | elif attr_id == self.sv.SX_ATTR_NS_IDX: 730 | imp_ns_sx.append(sx_id) 731 | return imp_sx, imp_attr, imp_pos_sx, imp_neg_sx, imp_ns_sx 732 | 733 | 734 | def make_features_neural(sx_ids, attr_ids, labels, sv: SymptomVocab): 735 | from conf import suffix 736 | feats = [] 737 | for sx_id, attr_id in zip(sx_ids, attr_ids): 738 | feature = [] 739 | sample = sv.decoder(sx_id, attr_id) 740 | for sx, attr in sample.items(): 741 | feature.append(sx + suffix.get(attr)) 742 | feats.append(' '.join(feature)) 743 | return feats, labels 744 | 745 | 746 | def extract_features(sx_ids, attr_ids, sv: SymptomVocab): 747 | sx_feats, attr_feats = [], [] 748 | for idx in range(len(sx_ids)): 749 | sx_feat, attr_feat = [sv.start_idx], [sv.SX_ATTR_PAD_IDX] 750 | for sx_id, attr_id in zip(sx_ids[idx], attr_ids[idx]): 751 | if attr_id not in [sv.SX_ATTR_PAD_IDX, sv.SX_ATTR_NM_IDX]: 752 | # 去除无效的症状和属性pairs 753 | sx_feat.append(sx_id) 754 | attr_feat.append(attr_id) 755 | sx_feats.append(to_tensor_(sx_feat)) 756 | attr_feats.append(to_tensor_(attr_feat)) 757 | return sx_feats, attr_feats 758 | 759 | 760 | def make_features_xfmr(sv: SymptomVocab, batch, si_sx_ids=None, si_attr_ids=None, merge_act: bool = False, 761 | merge_si: bool = False): 762 | # convert to numpy 763 | assert merge_act or merge_si 764 | sx_feats, attr_feats = [], [] 765 | if merge_act: 766 | act_sx_ids = torch.cat([batch['exp_sx_ids'], batch['imp_sx_ids']]).permute([1, 0]) 767 | act_attr_ids = torch.cat([batch['exp_attr_ids'], batch['imp_attr_ids']]).permute([1, 0]) 768 | act_sx_ids, act_attr_ids = to_numpy_vla(act_sx_ids, act_attr_ids) 769 | act_sx_feats, act_attr_feats = extract_features(act_sx_ids, act_attr_ids, sv) 770 | sx_feats += act_sx_feats 771 | attr_feats += act_attr_feats 772 | if merge_si: 773 | si_sx_ids, si_attr_ids = to_numpy_vla(si_sx_ids, si_attr_ids) 774 | si_sx_feats, si_attr_feats = extract_features(si_sx_ids, si_attr_ids, sv) 775 | sx_feats += si_sx_feats 776 | attr_feats += si_attr_feats 777 | sx_feats = pad_sequence(sx_feats, padding_value=sv.pad_idx).long() 778 | attr_feats = pad_sequence(attr_feats, padding_value=sv.SX_ATTR_PAD_IDX).long() 779 | return sx_feats, attr_feats 780 | -------------------------------------------------------------------------------- /data/dxy/train_set.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "pid": "train-1", 4 | "exp_sxs": { 5 | "咳嗽": "1", 6 | "流涕": "1" 7 | }, 8 | "imp_sxs": { 9 | "过敏": "1", 10 | "打喷嚏": "0" 11 | }, 12 | "label": "过敏性鼻炎" 13 | }, 14 | { 15 | "pid": "train-2", 16 | "exp_sxs": { 17 | "烦躁不安": "1", 18 | "喘气": "1", 19 | "发烧": "1" 20 | }, 21 | "imp_sxs": { 22 | "咳嗽": "1", 23 | "肺部湿啰音": "0" 24 | }, 25 | "label": "上呼吸道感染" 26 | }, 27 | { 28 | "pid": "train-3", 29 | "exp_sxs": { 30 | "咳嗽": "1", 31 | "咳痰": "1", 32 | "流涕": "1" 33 | }, 34 | "imp_sxs": { 35 | "精神萎靡": "0", 36 | "咽部不适": "1" 37 | }, 38 | "label": "肺炎" 39 | }, 40 | { 41 | "pid": "train-4", 42 | "exp_sxs": { 43 | "疱疹": "1", 44 | "发烧": "1" 45 | }, 46 | "imp_sxs": { 47 | "皮疹": "1" 48 | }, 49 | "label": "小儿手足口病" 50 | }, 51 | { 52 | "pid": "train-5", 53 | "exp_sxs": { 54 | "呕吐": "1", 55 | "腹胀": "1", 56 | "流涕": "1" 57 | }, 58 | "imp_sxs": { 59 | "咽部不适": "0" 60 | }, 61 | "label": "小儿腹泻" 62 | }, 63 | { 64 | "pid": "train-6", 65 | "exp_sxs": { 66 | "精神萎靡": "1", 67 | "发烧": "1", 68 | "稀便": "1" 69 | }, 70 | "imp_sxs": { 71 | "尿少": "1" 72 | }, 73 | "label": "小儿腹泻" 74 | }, 75 | { 76 | "pid": "train-7", 77 | "exp_sxs": { 78 | "精神萎靡": "1", 79 | "烦躁不安": "1", 80 | "发烧": "1", 81 | "厌食": "1", 82 | "稀便": "1" 83 | }, 84 | "imp_sxs": { 85 | "蛋花样便": "1", 86 | "呕吐": "1" 87 | }, 88 | "label": "小儿腹泻" 89 | }, 90 | { 91 | "pid": "train-8", 92 | "exp_sxs": { 93 | "疱疹": "1", 94 | "发烧": "1" 95 | }, 96 | "imp_sxs": { 97 | "精神萎靡": "0", 98 | "反胃": "1" 99 | }, 100 | "label": "小儿手足口病" 101 | }, 102 | { 103 | "pid": "train-9", 104 | "exp_sxs": { 105 | "鼻塞": "1", 106 | "打喷嚏": "1", 107 | "呼吸困难": "1" 108 | }, 109 | "imp_sxs": { 110 | "咳嗽": "0", 111 | "抽搐": "1", 112 | "流涕": "0" 113 | }, 114 | "label": "过敏性鼻炎" 115 | }, 116 | { 117 | "pid": "train-10", 118 | "exp_sxs": { 119 | "疱疹": "1", 120 | "咳嗽": "1", 121 | "盗汗": "1" 122 | }, 123 | "imp_sxs": { 124 | "揉眼睛": "1", 125 | "呼吸困难": "1" 126 | }, 127 | "label": "肺炎" 128 | }, 129 | { 130 | "pid": "train-11", 131 | "exp_sxs": { 132 | "咳嗽": "1", 133 | "稀便": "1", 134 | "发烧": "1" 135 | }, 136 | "imp_sxs": { 137 | "肺部阴影": "1" 138 | }, 139 | "label": "肺炎" 140 | }, 141 | { 142 | "pid": "train-12", 143 | "exp_sxs": { 144 | "烦躁不安": "1", 145 | "打喷嚏": "1", 146 | "呼吸困难": "1" 147 | }, 148 | "imp_sxs": { 149 | "呕吐": "1", 150 | "稀便": "1", 151 | "绿便": "1" 152 | }, 153 | "label": "小儿腹泻" 154 | }, 155 | { 156 | "pid": "train-13", 157 | "exp_sxs": { 158 | "咳嗽": "1", 159 | "流涕": "1", 160 | "发烧": "1", 161 | "打喷嚏": "1" 162 | }, 163 | "imp_sxs": { 164 | "精神萎靡": "1", 165 | "咽部不适": "1", 166 | "烦躁不安": "1", 167 | "呼吸困难": "1" 168 | }, 169 | "label": "小儿手足口病" 170 | }, 171 | { 172 | "pid": "train-14", 173 | "exp_sxs": { 174 | "皮疹": "1", 175 | "流涕": "1" 176 | }, 177 | "imp_sxs": { 178 | "鼻塞": "1", 179 | "过敏": "1", 180 | "呼吸困难": "1" 181 | }, 182 | "label": "过敏性鼻炎" 183 | }, 184 | { 185 | "pid": "train-15", 186 | "exp_sxs": { 187 | "揉眼睛": "1", 188 | "咳嗽": "1", 189 | "皮疹": "1", 190 | "抽搐": "1", 191 | "揉鼻子": "1" 192 | }, 193 | "imp_sxs": {}, 194 | "label": "过敏性鼻炎" 195 | }, 196 | { 197 | "pid": "train-16", 198 | "exp_sxs": { 199 | "疱疹": "1", 200 | "烦躁不安": "1", 201 | "发烧": "1" 202 | }, 203 | "imp_sxs": { 204 | "咽部不适": "1", 205 | "厌食": "1" 206 | }, 207 | "label": "小儿手足口病" 208 | }, 209 | { 210 | "pid": "train-17", 211 | "exp_sxs": { 212 | "疱疹": "1", 213 | "发烧": "1", 214 | "皮疹": "1" 215 | }, 216 | "imp_sxs": { 217 | "烦躁不安": "1" 218 | }, 219 | "label": "小儿手足口病" 220 | }, 221 | { 222 | "pid": "train-18", 223 | "exp_sxs": { 224 | "咳嗽": "1", 225 | "鼻塞": "1", 226 | "咳痰": "1", 227 | "流涕": "1" 228 | }, 229 | "imp_sxs": {}, 230 | "label": "肺炎" 231 | }, 232 | { 233 | "pid": "train-19", 234 | "exp_sxs": { 235 | "鼻塞": "1", 236 | "呼吸困难": "1" 237 | }, 238 | "imp_sxs": { 239 | "皮疹": "1" 240 | }, 241 | "label": "过敏性鼻炎" 242 | }, 243 | { 244 | "pid": "train-20", 245 | "exp_sxs": { 246 | "疱疹": "1", 247 | "发烧": "1" 248 | }, 249 | "imp_sxs": { 250 | "皮疹": "1" 251 | }, 252 | "label": "小儿手足口病" 253 | }, 254 | { 255 | "pid": "train-21", 256 | "exp_sxs": { 257 | "流涕": "1" 258 | }, 259 | "imp_sxs": { 260 | "鼻塞": "1" 261 | }, 262 | "label": "过敏性鼻炎" 263 | }, 264 | { 265 | "pid": "train-22", 266 | "exp_sxs": { 267 | "咳嗽": "1", 268 | "咳痰": "1", 269 | "流涕": "1" 270 | }, 271 | "imp_sxs": { 272 | "发烧": "0" 273 | }, 274 | "label": "上呼吸道感染" 275 | }, 276 | { 277 | "pid": "train-23", 278 | "exp_sxs": { 279 | "咳嗽": "1", 280 | "呕吐": "1", 281 | "烦躁不安": "1" 282 | }, 283 | "imp_sxs": { 284 | "咳痰": "1", 285 | "呼吸困难": "1" 286 | }, 287 | "label": "肺炎" 288 | }, 289 | { 290 | "pid": "train-24", 291 | "exp_sxs": { 292 | "咳嗽": "1", 293 | "鼻塞": "1", 294 | "发烧": "1", 295 | "流涕": "1" 296 | }, 297 | "imp_sxs": {}, 298 | "label": "上呼吸道感染" 299 | }, 300 | { 301 | "pid": "train-25", 302 | "exp_sxs": { 303 | "发烧": "1", 304 | "稀便": "1" 305 | }, 306 | "imp_sxs": { 307 | "精神萎靡": "0" 308 | }, 309 | "label": "小儿腹泻" 310 | }, 311 | { 312 | "pid": "train-26", 313 | "exp_sxs": { 314 | "蛋花样便": "1", 315 | "精神萎靡": "1", 316 | "呕吐": "1" 317 | }, 318 | "imp_sxs": { 319 | "稀便": "1" 320 | }, 321 | "label": "小儿腹泻" 322 | }, 323 | { 324 | "pid": "train-27", 325 | "exp_sxs": { 326 | "绿便": "1" 327 | }, 328 | "imp_sxs": { 329 | "烦躁不安": "1", 330 | "呼吸困难": "1" 331 | }, 332 | "label": "小儿腹泻" 333 | }, 334 | { 335 | "pid": "train-28", 336 | "exp_sxs": { 337 | "咳嗽": "1", 338 | "流涕": "1", 339 | "鼻塞": "1", 340 | "呼吸困难": "1" 341 | }, 342 | "imp_sxs": { 343 | "咽部不适": "1" 344 | }, 345 | "label": "上呼吸道感染" 346 | }, 347 | { 348 | "pid": "train-29", 349 | "exp_sxs": { 350 | "精神萎靡": "1", 351 | "发烧": "1", 352 | "皮疹": "1" 353 | }, 354 | "imp_sxs": { 355 | "呕吐": "0", 356 | "抽搐": "0", 357 | "流口水": "1" 358 | }, 359 | "label": "小儿手足口病" 360 | }, 361 | { 362 | "pid": "train-30", 363 | "exp_sxs": { 364 | "烦躁不安": "1", 365 | "发烧": "1" 366 | }, 367 | "imp_sxs": { 368 | "鼻塞": "1" 369 | }, 370 | "label": "上呼吸道感染" 371 | }, 372 | { 373 | "pid": "train-31", 374 | "exp_sxs": { 375 | "咳嗽": "1", 376 | "鼻塞": "1", 377 | "流涕": "1" 378 | }, 379 | "imp_sxs": { 380 | "发烧": "0" 381 | }, 382 | "label": "上呼吸道感染" 383 | }, 384 | { 385 | "pid": "train-32", 386 | "exp_sxs": { 387 | "呕吐": "1", 388 | "打喷嚏": "1", 389 | "稀便": "1", 390 | "厌食": "1", 391 | "流涕": "1" 392 | }, 393 | "imp_sxs": { 394 | "精神萎靡": "0", 395 | "尿少": "0" 396 | }, 397 | "label": "小儿腹泻" 398 | }, 399 | { 400 | "pid": "train-33", 401 | "exp_sxs": { 402 | "咽部不适": "1", 403 | "烦躁不安": "1", 404 | "鼻塞": "1", 405 | "吐泡泡": "1", 406 | "咳嗽": "1", 407 | "咳痰": "1" 408 | }, 409 | "imp_sxs": { 410 | "呕吐": "1", 411 | "反胃": "1", 412 | "厌食": "1", 413 | "肺部湿啰音": "1" 414 | }, 415 | "label": "肺炎" 416 | }, 417 | { 418 | "pid": "train-34", 419 | "exp_sxs": { 420 | "鼻塞": "1", 421 | "皮疹": "1" 422 | }, 423 | "imp_sxs": { 424 | "揉眼睛": "1", 425 | "过敏": "1", 426 | "呼吸困难": "1" 427 | }, 428 | "label": "过敏性鼻炎" 429 | }, 430 | { 431 | "pid": "train-35", 432 | "exp_sxs": { 433 | "腹痛": "1", 434 | "咳嗽": "1", 435 | "发烧": "1", 436 | "流涕": "1" 437 | }, 438 | "imp_sxs": { 439 | "精神萎靡": "1", 440 | "厌食": "1" 441 | }, 442 | "label": "上呼吸道感染" 443 | }, 444 | { 445 | "pid": "train-36", 446 | "exp_sxs": { 447 | "咳嗽": "1", 448 | "发烧": "1", 449 | "咳痰": "1", 450 | "流涕": "1" 451 | }, 452 | "imp_sxs": {}, 453 | "label": "上呼吸道感染" 454 | }, 455 | { 456 | "pid": "train-37", 457 | "exp_sxs": { 458 | "咳嗽": "1", 459 | "鼻塞": "1", 460 | "咳痰": "1", 461 | "流涕": "1" 462 | }, 463 | "imp_sxs": { 464 | "呕吐": "1", 465 | "稀便": "1", 466 | "呼吸困难": "1" 467 | }, 468 | "label": "肺炎" 469 | }, 470 | { 471 | "pid": "train-38", 472 | "exp_sxs": { 473 | "呕吐": "1", 474 | "发烧": "1", 475 | "稀便": "1" 476 | }, 477 | "imp_sxs": {}, 478 | "label": "小儿腹泻" 479 | }, 480 | { 481 | "pid": "train-39", 482 | "exp_sxs": { 483 | "咳嗽": "1", 484 | "打喷嚏": "1", 485 | "流涕": "1" 486 | }, 487 | "imp_sxs": { 488 | "鼻塞": "1" 489 | }, 490 | "label": "上呼吸道感染" 491 | }, 492 | { 493 | "pid": "train-40", 494 | "exp_sxs": { 495 | "咳嗽": "1", 496 | "呕吐": "1", 497 | "咳痰": "1" 498 | }, 499 | "imp_sxs": { 500 | "咽部不适": "1" 501 | }, 502 | "label": "肺炎" 503 | }, 504 | { 505 | "pid": "train-41", 506 | "exp_sxs": { 507 | "咳嗽": "1", 508 | "呕吐": "1", 509 | "鼻塞": "1", 510 | "咳痰": "1" 511 | }, 512 | "imp_sxs": { 513 | "吐泡泡": "1", 514 | "流涕": "0" 515 | }, 516 | "label": "上呼吸道感染" 517 | }, 518 | { 519 | "pid": "train-42", 520 | "exp_sxs": { 521 | "打喷嚏": "1", 522 | "流鼻血": "1", 523 | "抽搐": "1", 524 | "揉鼻子": "1" 525 | }, 526 | "imp_sxs": { 527 | "过敏": "1" 528 | }, 529 | "label": "过敏性鼻炎" 530 | }, 531 | { 532 | "pid": "train-43", 533 | "exp_sxs": { 534 | "蛋花样便": "1", 535 | "体重减轻": "1", 536 | "稀便": "1", 537 | "绿便": "1" 538 | }, 539 | "imp_sxs": { 540 | "精神萎靡": "1", 541 | "发烧": "0", 542 | "厌食": "1" 543 | }, 544 | "label": "小儿腹泻" 545 | }, 546 | { 547 | "pid": "train-44", 548 | "exp_sxs": { 549 | "疱疹": "1", 550 | "发烧": "1", 551 | "皮疹": "1" 552 | }, 553 | "imp_sxs": { 554 | "精神萎靡": "0", 555 | "咳嗽": "1", 556 | "咳痰": "1", 557 | "流涕": "1" 558 | }, 559 | "label": "小儿手足口病" 560 | }, 561 | { 562 | "pid": "train-45", 563 | "exp_sxs": { 564 | "咳嗽": "1", 565 | "发烧": "1" 566 | }, 567 | "imp_sxs": { 568 | "精神萎靡": "0", 569 | "呕吐": "1", 570 | "厌食": "1" 571 | }, 572 | "label": "上呼吸道感染" 573 | }, 574 | { 575 | "pid": "train-46", 576 | "exp_sxs": { 577 | "烦躁不安": "1", 578 | "呕吐": "1", 579 | "发烧": "1", 580 | "稀便": "1" 581 | }, 582 | "imp_sxs": { 583 | "尿少": "0", 584 | "厌食": "1" 585 | }, 586 | "label": "小儿腹泻" 587 | }, 588 | { 589 | "pid": "train-47", 590 | "exp_sxs": { 591 | "流涕": "1", 592 | "打喷嚏": "1", 593 | "皮疹": "1", 594 | "过敏": "1", 595 | "揉鼻子": "1" 596 | }, 597 | "imp_sxs": { 598 | "鼻塞": "1", 599 | "流鼻血": "1", 600 | "抽搐": "1" 601 | }, 602 | "label": "过敏性鼻炎" 603 | }, 604 | { 605 | "pid": "train-48", 606 | "exp_sxs": { 607 | "精神萎靡": "1", 608 | "腹痛": "1", 609 | "发烧": "1", 610 | "流涕": "1", 611 | "咳嗽": "1", 612 | "厌食": "1" 613 | }, 614 | "imp_sxs": { 615 | "肺部湿啰音": "0" 616 | }, 617 | "label": "肺炎" 618 | }, 619 | { 620 | "pid": "train-49", 621 | "exp_sxs": { 622 | "呕吐": "1", 623 | "发烧": "1", 624 | "稀便": "1" 625 | }, 626 | "imp_sxs": {}, 627 | "label": "小儿腹泻" 628 | }, 629 | { 630 | "pid": "train-50", 631 | "exp_sxs": { 632 | "疱疹": "1" 633 | }, 634 | "imp_sxs": { 635 | "精神萎靡": "1", 636 | "烦躁不安": "1" 637 | }, 638 | "label": "小儿手足口病" 639 | }, 640 | { 641 | "pid": "train-51", 642 | "exp_sxs": { 643 | "疱疹": "1", 644 | "发烧": "1", 645 | "皮疹": "1" 646 | }, 647 | "imp_sxs": { 648 | "咳嗽": "0", 649 | "流涕": "0" 650 | }, 651 | "label": "小儿手足口病" 652 | }, 653 | { 654 | "pid": "train-52", 655 | "exp_sxs": { 656 | "疱疹": "1", 657 | "呕吐": "1", 658 | "发烧": "1", 659 | "皮疹": "1" 660 | }, 661 | "imp_sxs": { 662 | "厌食": "0" 663 | }, 664 | "label": "小儿手足口病" 665 | }, 666 | { 667 | "pid": "train-53", 668 | "exp_sxs": { 669 | "咳嗽": "1", 670 | "流涕": "1" 671 | }, 672 | "imp_sxs": { 673 | "呕吐": "0", 674 | "呼吸困难": "1" 675 | }, 676 | "label": "上呼吸道感染" 677 | }, 678 | { 679 | "pid": "train-54", 680 | "exp_sxs": { 681 | "疱疹": "1", 682 | "皮疹": "1", 683 | "流涕": "1", 684 | "咳嗽": "1", 685 | "流口水": "1", 686 | "发烧": "1" 687 | }, 688 | "imp_sxs": { 689 | "精神萎靡": "1" 690 | }, 691 | "label": "小儿手足口病" 692 | }, 693 | { 694 | "pid": "train-55", 695 | "exp_sxs": { 696 | "烦躁不安": "1", 697 | "发烧": "1", 698 | "厌食": "1", 699 | "皮疹": "1" 700 | }, 701 | "imp_sxs": { 702 | "精神萎靡": "0" 703 | }, 704 | "label": "小儿手足口病" 705 | }, 706 | { 707 | "pid": "train-56", 708 | "exp_sxs": { 709 | "咳嗽": "1", 710 | "流涕": "1" 711 | }, 712 | "imp_sxs": { 713 | "咳痰": "0", 714 | "呼吸困难": "1" 715 | }, 716 | "label": "上呼吸道感染" 717 | }, 718 | { 719 | "pid": "train-57", 720 | "exp_sxs": { 721 | "流涕": "1" 722 | }, 723 | "imp_sxs": { 724 | "皮疹": "1", 725 | "流口水": "1", 726 | "呼吸困难": "1" 727 | }, 728 | "label": "过敏性鼻炎" 729 | }, 730 | { 731 | "pid": "train-58", 732 | "exp_sxs": { 733 | "烦躁不安": "1", 734 | "咳嗽": "1", 735 | "发烧": "1" 736 | }, 737 | "imp_sxs": { 738 | "咳痰": "1" 739 | }, 740 | "label": "肺炎" 741 | }, 742 | { 743 | "pid": "train-59", 744 | "exp_sxs": { 745 | "流涕": "1", 746 | "呼吸困难": "1" 747 | }, 748 | "imp_sxs": { 749 | "过敏": "1" 750 | }, 751 | "label": "过敏性鼻炎" 752 | }, 753 | { 754 | "pid": "train-60", 755 | "exp_sxs": { 756 | "喘气": "1", 757 | "咳痰": "1" 758 | }, 759 | "imp_sxs": { 760 | "揉鼻子": "1" 761 | }, 762 | "label": "过敏性鼻炎" 763 | }, 764 | { 765 | "pid": "train-61", 766 | "exp_sxs": { 767 | "咳嗽": "1", 768 | "发烧": "1" 769 | }, 770 | "imp_sxs": { 771 | "皮疹": "1" 772 | }, 773 | "label": "小儿手足口病" 774 | }, 775 | { 776 | "pid": "train-62", 777 | "exp_sxs": { 778 | "咳嗽": "1", 779 | "稀便": "1", 780 | "盗汗": "1", 781 | "绿便": "1" 782 | }, 783 | "imp_sxs": { 784 | "烦躁不安": "1", 785 | "呕吐": "1" 786 | }, 787 | "label": "小儿腹泻" 788 | }, 789 | { 790 | "pid": "train-63", 791 | "exp_sxs": { 792 | "鼻塞": "1", 793 | "咳痰": "1" 794 | }, 795 | "imp_sxs": { 796 | "咳嗽": "0", 797 | "发烧": "0", 798 | "皮疹": "1" 799 | }, 800 | "label": "过敏性鼻炎" 801 | }, 802 | { 803 | "pid": "train-64", 804 | "exp_sxs": { 805 | "鼻塞": "1", 806 | "揉鼻子": "1" 807 | }, 808 | "imp_sxs": { 809 | "过敏": "1" 810 | }, 811 | "label": "过敏性鼻炎" 812 | }, 813 | { 814 | "pid": "train-65", 815 | "exp_sxs": { 816 | "咳嗽": "1", 817 | "鼻塞": "1", 818 | "发烧": "1" 819 | }, 820 | "imp_sxs": {}, 821 | "label": "上呼吸道感染" 822 | }, 823 | { 824 | "pid": "train-66", 825 | "exp_sxs": { 826 | "咳嗽": "1", 827 | "发烧": "1", 828 | "厌食": "1", 829 | "流涕": "1" 830 | }, 831 | "imp_sxs": { 832 | "喘气": "1", 833 | "肺部阴影": "1", 834 | "咳痰": "1" 835 | }, 836 | "label": "肺炎" 837 | }, 838 | { 839 | "pid": "train-67", 840 | "exp_sxs": { 841 | "腹痛": "1", 842 | "呕吐": "1", 843 | "头痛": "1", 844 | "发烧": "1" 845 | }, 846 | "imp_sxs": { 847 | "精神萎靡": "1" 848 | }, 849 | "label": "小儿腹泻" 850 | }, 851 | { 852 | "pid": "train-68", 853 | "exp_sxs": { 854 | "呕吐": "1", 855 | "稀便": "1" 856 | }, 857 | "imp_sxs": { 858 | "精神萎靡": "1", 859 | "发烧": "1", 860 | "厌食": "1", 861 | "绿便": "1" 862 | }, 863 | "label": "小儿腹泻" 864 | }, 865 | { 866 | "pid": "train-69", 867 | "exp_sxs": { 868 | "烦躁不安": "1", 869 | "发烧": "1", 870 | "皮疹": "1" 871 | }, 872 | "imp_sxs": { 873 | "精神萎靡": "1", 874 | "厌食": "1" 875 | }, 876 | "label": "小儿手足口病" 877 | }, 878 | { 879 | "pid": "train-70", 880 | "exp_sxs": { 881 | "呕吐": "1", 882 | "稀便": "1" 883 | }, 884 | "imp_sxs": { 885 | "精神萎靡": "0" 886 | }, 887 | "label": "小儿腹泻" 888 | }, 889 | { 890 | "pid": "train-71", 891 | "exp_sxs": { 892 | "烦躁不安": "1", 893 | "呕吐": "1", 894 | "发烧": "1", 895 | "厌食": "1", 896 | "稀便": "1" 897 | }, 898 | "imp_sxs": { 899 | "精神萎靡": "0", 900 | "咳嗽": "0", 901 | "流涕": "0" 902 | }, 903 | "label": "小儿腹泻" 904 | }, 905 | { 906 | "pid": "train-72", 907 | "exp_sxs": { 908 | "咳嗽": "1", 909 | "流涕": "1", 910 | "肺部阴影": "1", 911 | "发烧": "1" 912 | }, 913 | "imp_sxs": {}, 914 | "label": "肺炎" 915 | }, 916 | { 917 | "pid": "train-73", 918 | "exp_sxs": { 919 | "疱疹": "1", 920 | "皮疹": "1" 921 | }, 922 | "imp_sxs": {}, 923 | "label": "小儿手足口病" 924 | }, 925 | { 926 | "pid": "train-74", 927 | "exp_sxs": { 928 | "揉眼睛": "1", 929 | "流涕": "1" 930 | }, 931 | "imp_sxs": { 932 | "咳嗽": "1", 933 | "过敏": "1", 934 | "呼吸困难": "1" 935 | }, 936 | "label": "过敏性鼻炎" 937 | }, 938 | { 939 | "pid": "train-75", 940 | "exp_sxs": { 941 | "咳嗽": "1", 942 | "发烧": "1" 943 | }, 944 | "imp_sxs": { 945 | "咳痰": "1", 946 | "流涕": "1" 947 | }, 948 | "label": "肺炎" 949 | }, 950 | { 951 | "pid": "train-76", 952 | "exp_sxs": { 953 | "咳嗽": "1", 954 | "打喷嚏": "1", 955 | "咳痰": "1", 956 | "流涕": "1" 957 | }, 958 | "imp_sxs": { 959 | "发烧": "0" 960 | }, 961 | "label": "上呼吸道感染" 962 | }, 963 | { 964 | "pid": "train-77", 965 | "exp_sxs": { 966 | "疱疹": "1", 967 | "发烧": "1" 968 | }, 969 | "imp_sxs": { 970 | "咽部不适": "1", 971 | "厌食": "1" 972 | }, 973 | "label": "小儿手足口病" 974 | }, 975 | { 976 | "pid": "train-78", 977 | "exp_sxs": { 978 | "精神萎靡": "1", 979 | "发烧": "1", 980 | "皮疹": "1" 981 | }, 982 | "imp_sxs": { 983 | "肺部湿啰音": "1", 984 | "咳痰": "1" 985 | }, 986 | "label": "肺炎" 987 | }, 988 | { 989 | "pid": "train-79", 990 | "exp_sxs": { 991 | "打喷嚏": "1", 992 | "流涕": "1" 993 | }, 994 | "imp_sxs": { 995 | "过敏": "1", 996 | "皮疹": "1" 997 | }, 998 | "label": "过敏性鼻炎" 999 | }, 1000 | { 1001 | "pid": "train-80", 1002 | "exp_sxs": { 1003 | "打喷嚏": "1", 1004 | "皮疹": "1", 1005 | "流涕": "1" 1006 | }, 1007 | "imp_sxs": { 1008 | "咳嗽": "1", 1009 | "鼻塞": "1", 1010 | "抽搐": "1", 1011 | "呼吸困难": "1" 1012 | }, 1013 | "label": "过敏性鼻炎" 1014 | }, 1015 | { 1016 | "pid": "train-81", 1017 | "exp_sxs": { 1018 | "蛋花样便": "1", 1019 | "烦躁不安": "1", 1020 | "反胃": "1", 1021 | "皮疹": "1", 1022 | "腹胀": "1" 1023 | }, 1024 | "imp_sxs": { 1025 | "精神萎靡": "0", 1026 | "过敏": "1" 1027 | }, 1028 | "label": "小儿腹泻" 1029 | }, 1030 | { 1031 | "pid": "train-82", 1032 | "exp_sxs": { 1033 | "发烧": "1", 1034 | "咳痰": "1" 1035 | }, 1036 | "imp_sxs": { 1037 | "精神萎靡": "0", 1038 | "流涕": "1" 1039 | }, 1040 | "label": "肺炎" 1041 | }, 1042 | { 1043 | "pid": "train-83", 1044 | "exp_sxs": { 1045 | "疱疹": "1", 1046 | "发烧": "1", 1047 | "流口水": "1", 1048 | "皮疹": "1" 1049 | }, 1050 | "imp_sxs": { 1051 | "咳嗽": "1", 1052 | "呕吐": "1" 1053 | }, 1054 | "label": "小儿手足口病" 1055 | }, 1056 | { 1057 | "pid": "train-84", 1058 | "exp_sxs": { 1059 | "尿少": "1", 1060 | "烦躁不安": "1", 1061 | "呕吐": "1", 1062 | "腹胀": "1", 1063 | "盗汗": "1" 1064 | }, 1065 | "imp_sxs": { 1066 | "稀便": "1", 1067 | "厌食": "1" 1068 | }, 1069 | "label": "小儿腹泻" 1070 | }, 1071 | { 1072 | "pid": "train-85", 1073 | "exp_sxs": { 1074 | "稀便": "1" 1075 | }, 1076 | "imp_sxs": { 1077 | "精神萎靡": "0", 1078 | "尿少": "0", 1079 | "厌食": "0" 1080 | }, 1081 | "label": "小儿腹泻" 1082 | }, 1083 | { 1084 | "pid": "train-86", 1085 | "exp_sxs": { 1086 | "咳嗽": "1", 1087 | "吐泡泡": "1", 1088 | "打喷嚏": "1" 1089 | }, 1090 | "imp_sxs": { 1091 | "发烧": "0", 1092 | "流涕": "0" 1093 | }, 1094 | "label": "上呼吸道感染" 1095 | }, 1096 | { 1097 | "pid": "train-87", 1098 | "exp_sxs": { 1099 | "反胃": "1", 1100 | "咳嗽": "1", 1101 | "吐泡泡": "1", 1102 | "发烧": "1" 1103 | }, 1104 | "imp_sxs": { 1105 | "流涕": "1" 1106 | }, 1107 | "label": "上呼吸道感染" 1108 | }, 1109 | { 1110 | "pid": "train-88", 1111 | "exp_sxs": { 1112 | "咳嗽": "1", 1113 | "打喷嚏": "1", 1114 | "咳痰": "1", 1115 | "流涕": "1" 1116 | }, 1117 | "imp_sxs": { 1118 | "肺部湿啰音": "1" 1119 | }, 1120 | "label": "肺炎" 1121 | }, 1122 | { 1123 | "pid": "train-89", 1124 | "exp_sxs": { 1125 | "咳嗽": "1", 1126 | "吐泡泡": "1", 1127 | "咳痰": "1", 1128 | "呼吸困难": "1" 1129 | }, 1130 | "imp_sxs": {}, 1131 | "label": "肺炎" 1132 | }, 1133 | { 1134 | "pid": "train-90", 1135 | "exp_sxs": { 1136 | "咳嗽": "1", 1137 | "发烧": "1", 1138 | "咳痰": "1", 1139 | "流涕": "1" 1140 | }, 1141 | "imp_sxs": { 1142 | "盗汗": "1" 1143 | }, 1144 | "label": "上呼吸道感染" 1145 | }, 1146 | { 1147 | "pid": "train-91", 1148 | "exp_sxs": { 1149 | "流涕": "1", 1150 | "过敏": "1", 1151 | "流鼻血": "1" 1152 | }, 1153 | "imp_sxs": {}, 1154 | "label": "过敏性鼻炎" 1155 | }, 1156 | { 1157 | "pid": "train-92", 1158 | "exp_sxs": { 1159 | "发烧": "1", 1160 | "流涕": "1" 1161 | }, 1162 | "imp_sxs": { 1163 | "精神萎靡": "0", 1164 | "咳嗽": "0", 1165 | "头痛": "0", 1166 | "肺部阴影": "1" 1167 | }, 1168 | "label": "肺炎" 1169 | }, 1170 | { 1171 | "pid": "train-93", 1172 | "exp_sxs": { 1173 | "咳嗽": "1", 1174 | "鼻塞": "1", 1175 | "流涕": "1" 1176 | }, 1177 | "imp_sxs": { 1178 | "过敏": "1" 1179 | }, 1180 | "label": "过敏性鼻炎" 1181 | }, 1182 | { 1183 | "pid": "train-94", 1184 | "exp_sxs": { 1185 | "疱疹": "1", 1186 | "呕吐": "1", 1187 | "发烧": "1", 1188 | "皮疹": "1" 1189 | }, 1190 | "imp_sxs": { 1191 | "精神萎靡": "0", 1192 | "烦躁不安": "1", 1193 | "抽搐": "1" 1194 | }, 1195 | "label": "小儿手足口病" 1196 | }, 1197 | { 1198 | "pid": "train-95", 1199 | "exp_sxs": { 1200 | "咳嗽": "1", 1201 | "喘气": "1", 1202 | "发烧": "1", 1203 | "流涕": "1" 1204 | }, 1205 | "imp_sxs": { 1206 | "精神萎靡": "1", 1207 | "厌食": "1" 1208 | }, 1209 | "label": "肺炎" 1210 | }, 1211 | { 1212 | "pid": "train-96", 1213 | "exp_sxs": { 1214 | "烦躁不安": "1", 1215 | "呕吐": "1", 1216 | "吐泡泡": "1", 1217 | "稀便": "1", 1218 | "咳痰": "1" 1219 | }, 1220 | "imp_sxs": { 1221 | "咽部不适": "1", 1222 | "肺部阴影": "1", 1223 | "抽搐": "1" 1224 | }, 1225 | "label": "肺炎" 1226 | }, 1227 | { 1228 | "pid": "train-97", 1229 | "exp_sxs": { 1230 | "咳嗽": "1", 1231 | "流涕": "1", 1232 | "揉鼻子": "1" 1233 | }, 1234 | "imp_sxs": { 1235 | "咽部不适": "1", 1236 | "过敏": "1" 1237 | }, 1238 | "label": "过敏性鼻炎" 1239 | }, 1240 | { 1241 | "pid": "train-98", 1242 | "exp_sxs": { 1243 | "反胃": "1", 1244 | "鼻塞": "1", 1245 | "抽搐": "1", 1246 | "咳痰": "1", 1247 | "流涕": "1" 1248 | }, 1249 | "imp_sxs": { 1250 | "揉眼睛": "1", 1251 | "揉鼻子": "1" 1252 | }, 1253 | "label": "过敏性鼻炎" 1254 | }, 1255 | { 1256 | "pid": "train-99", 1257 | "exp_sxs": { 1258 | "皮疹": "1" 1259 | }, 1260 | "imp_sxs": { 1261 | "发烧": "0" 1262 | }, 1263 | "label": "小儿手足口病" 1264 | }, 1265 | { 1266 | "pid": "train-100", 1267 | "exp_sxs": { 1268 | "鼻塞": "1", 1269 | "皮疹": "1", 1270 | "流涕": "1" 1271 | }, 1272 | "imp_sxs": { 1273 | "盗汗": "1" 1274 | }, 1275 | "label": "过敏性鼻炎" 1276 | }, 1277 | { 1278 | "pid": "train-101", 1279 | "exp_sxs": { 1280 | "稀便": "1", 1281 | "放屁": "1" 1282 | }, 1283 | "imp_sxs": { 1284 | "尿少": "1", 1285 | "呕吐": "1", 1286 | "厌食": "1" 1287 | }, 1288 | "label": "小儿腹泻" 1289 | }, 1290 | { 1291 | "pid": "train-102", 1292 | "exp_sxs": { 1293 | "揉眼睛": "1", 1294 | "流涕": "1", 1295 | "发烧": "1", 1296 | "稀便": "1" 1297 | }, 1298 | "imp_sxs": { 1299 | "鼻塞": "1" 1300 | }, 1301 | "label": "小儿腹泻" 1302 | }, 1303 | { 1304 | "pid": "train-103", 1305 | "exp_sxs": { 1306 | "呕吐": "1", 1307 | "发烧": "1", 1308 | "稀便": "1" 1309 | }, 1310 | "imp_sxs": { 1311 | "尿少": "1", 1312 | "厌食": "1" 1313 | }, 1314 | "label": "小儿腹泻" 1315 | }, 1316 | { 1317 | "pid": "train-104", 1318 | "exp_sxs": { 1319 | "疱疹": "1", 1320 | "发烧": "1", 1321 | "稀便": "1" 1322 | }, 1323 | "imp_sxs": { 1324 | "抽搐": "1" 1325 | }, 1326 | "label": "小儿手足口病" 1327 | }, 1328 | { 1329 | "pid": "train-105", 1330 | "exp_sxs": { 1331 | "咳嗽": "1", 1332 | "打喷嚏": "1", 1333 | "流涕": "1" 1334 | }, 1335 | "imp_sxs": { 1336 | "鼻塞": "1", 1337 | "咳痰": "1" 1338 | }, 1339 | "label": "上呼吸道感染" 1340 | }, 1341 | { 1342 | "pid": "train-106", 1343 | "exp_sxs": { 1344 | "咳嗽": "1", 1345 | "皮疹": "1", 1346 | "流涕": "1" 1347 | }, 1348 | "imp_sxs": { 1349 | "发烧": "1" 1350 | }, 1351 | "label": "小儿手足口病" 1352 | }, 1353 | { 1354 | "pid": "train-107", 1355 | "exp_sxs": { 1356 | "皮疹": "1", 1357 | "流涕": "1" 1358 | }, 1359 | "imp_sxs": { 1360 | "鼻塞": "1" 1361 | }, 1362 | "label": "过敏性鼻炎" 1363 | }, 1364 | { 1365 | "pid": "train-108", 1366 | "exp_sxs": { 1367 | "蛋花样便": "1", 1368 | "烦躁不安": "1", 1369 | "体重减轻": "1", 1370 | "发烧": "1", 1371 | "呕吐": "1", 1372 | "肚子咕噜叫": "1" 1373 | }, 1374 | "imp_sxs": { 1375 | "厌食": "1" 1376 | }, 1377 | "label": "小儿腹泻" 1378 | }, 1379 | { 1380 | "pid": "train-109", 1381 | "exp_sxs": { 1382 | "咳嗽": "1", 1383 | "呕吐": "1", 1384 | "厌食": "1", 1385 | "流涕": "1" 1386 | }, 1387 | "imp_sxs": { 1388 | "咳痰": "1", 1389 | "呼吸困难": "1" 1390 | }, 1391 | "label": "肺炎" 1392 | }, 1393 | { 1394 | "pid": "train-110", 1395 | "exp_sxs": { 1396 | "蛋花样便": "1", 1397 | "稀便": "1", 1398 | "绿便": "1" 1399 | }, 1400 | "imp_sxs": { 1401 | "打嗝": "1", 1402 | "尿少": "1", 1403 | "烦躁不安": "1", 1404 | "精神萎靡": "1" 1405 | }, 1406 | "label": "小儿腹泻" 1407 | }, 1408 | { 1409 | "pid": "train-111", 1410 | "exp_sxs": { 1411 | "咳嗽": "1", 1412 | "发烧": "1" 1413 | }, 1414 | "imp_sxs": { 1415 | "烦躁不安": "1", 1416 | "厌食": "1", 1417 | "咳痰": "1", 1418 | "呼吸困难": "0" 1419 | }, 1420 | "label": "肺炎" 1421 | }, 1422 | { 1423 | "pid": "train-112", 1424 | "exp_sxs": { 1425 | "咳嗽": "1" 1426 | }, 1427 | "imp_sxs": { 1428 | "流涕": "1", 1429 | "鼻塞": "1", 1430 | "呼吸困难": "1" 1431 | }, 1432 | "label": "过敏性鼻炎" 1433 | }, 1434 | { 1435 | "pid": "train-113", 1436 | "exp_sxs": { 1437 | "咳嗽": "1", 1438 | "呕吐": "1", 1439 | "烦躁不安": "1", 1440 | "打喷嚏": "1" 1441 | }, 1442 | "imp_sxs": { 1443 | "精神萎靡": "1", 1444 | "发烧": "1", 1445 | "咳痰": "1" 1446 | }, 1447 | "label": "上呼吸道感染" 1448 | }, 1449 | { 1450 | "pid": "train-114", 1451 | "exp_sxs": { 1452 | "咽部不适": "1", 1453 | "咳嗽": "1", 1454 | "呼吸困难": "1" 1455 | }, 1456 | "imp_sxs": { 1457 | "过敏": "1", 1458 | "咳痰": "0" 1459 | }, 1460 | "label": "过敏性鼻炎" 1461 | }, 1462 | { 1463 | "pid": "train-115", 1464 | "exp_sxs": { 1465 | "咳嗽": "1", 1466 | "发烧": "1", 1467 | "流涕": "1" 1468 | }, 1469 | "imp_sxs": { 1470 | "精神萎靡": "0", 1471 | "咽部不适": "0", 1472 | "呼吸困难": "1" 1473 | }, 1474 | "label": "肺炎" 1475 | }, 1476 | { 1477 | "pid": "train-116", 1478 | "exp_sxs": { 1479 | "咳嗽": "1", 1480 | "发烧": "1" 1481 | }, 1482 | "imp_sxs": { 1483 | "肺部阴影": "1" 1484 | }, 1485 | "label": "肺炎" 1486 | }, 1487 | { 1488 | "pid": "train-117", 1489 | "exp_sxs": { 1490 | "喘气": "1", 1491 | "皮疹": "1", 1492 | "过敏": "1", 1493 | "抽搐": "1", 1494 | "揉鼻子": "1" 1495 | }, 1496 | "imp_sxs": { 1497 | "咳痰": "1" 1498 | }, 1499 | "label": "过敏性鼻炎" 1500 | }, 1501 | { 1502 | "pid": "train-118", 1503 | "exp_sxs": { 1504 | "稀便": "1" 1505 | }, 1506 | "imp_sxs": { 1507 | "发烧": "1", 1508 | "呼吸困难": "1" 1509 | }, 1510 | "label": "小儿腹泻" 1511 | }, 1512 | { 1513 | "pid": "train-119", 1514 | "exp_sxs": { 1515 | "咳嗽": "1", 1516 | "呕吐": "1", 1517 | "咳痰": "1" 1518 | }, 1519 | "imp_sxs": {}, 1520 | "label": "上呼吸道感染" 1521 | }, 1522 | { 1523 | "pid": "train-120", 1524 | "exp_sxs": { 1525 | "疱疹": "1", 1526 | "发烧": "1", 1527 | "皮疹": "1" 1528 | }, 1529 | "imp_sxs": { 1530 | "烦躁不安": "1", 1531 | "流涕": "1" 1532 | }, 1533 | "label": "小儿手足口病" 1534 | }, 1535 | { 1536 | "pid": "train-121", 1537 | "exp_sxs": { 1538 | "疱疹": "1", 1539 | "发烧": "1", 1540 | "皮疹": "1" 1541 | }, 1542 | "imp_sxs": { 1543 | "精神萎靡": "0", 1544 | "厌食": "0" 1545 | }, 1546 | "label": "小儿手足口病" 1547 | }, 1548 | { 1549 | "pid": "train-122", 1550 | "exp_sxs": { 1551 | "咳嗽": "1", 1552 | "过敏": "1" 1553 | }, 1554 | "imp_sxs": { 1555 | "抽搐": "1", 1556 | "揉鼻子": "1" 1557 | }, 1558 | "label": "过敏性鼻炎" 1559 | }, 1560 | { 1561 | "pid": "train-123", 1562 | "exp_sxs": { 1563 | "稀便": "1", 1564 | "发烧": "1", 1565 | "绿便": "1" 1566 | }, 1567 | "imp_sxs": { 1568 | "咳嗽": "1", 1569 | "反胃": "1", 1570 | "烦躁不安": "1" 1571 | }, 1572 | "label": "小儿腹泻" 1573 | }, 1574 | { 1575 | "pid": "train-124", 1576 | "exp_sxs": { 1577 | "咳嗽": "1", 1578 | "呕吐": "1", 1579 | "流涕": "1" 1580 | }, 1581 | "imp_sxs": { 1582 | "打喷嚏": "1", 1583 | "咳痰": "1" 1584 | }, 1585 | "label": "上呼吸道感染" 1586 | }, 1587 | { 1588 | "pid": "train-125", 1589 | "exp_sxs": { 1590 | "流涕": "1", 1591 | "鼻塞": "1", 1592 | "过敏": "1", 1593 | "皮疹": "1" 1594 | }, 1595 | "imp_sxs": { 1596 | "发烧": "0" 1597 | }, 1598 | "label": "过敏性鼻炎" 1599 | }, 1600 | { 1601 | "pid": "train-126", 1602 | "exp_sxs": { 1603 | "咳嗽": "1", 1604 | "发烧": "1", 1605 | "咳痰": "1", 1606 | "流涕": "1" 1607 | }, 1608 | "imp_sxs": { 1609 | "精神萎靡": "1" 1610 | }, 1611 | "label": "上呼吸道感染" 1612 | }, 1613 | { 1614 | "pid": "train-127", 1615 | "exp_sxs": { 1616 | "咳嗽": "1", 1617 | "发烧": "1", 1618 | "呼吸困难": "1" 1619 | }, 1620 | "imp_sxs": { 1621 | "咳痰": "1" 1622 | }, 1623 | "label": "肺炎" 1624 | }, 1625 | { 1626 | "pid": "train-128", 1627 | "exp_sxs": { 1628 | "疱疹": "1", 1629 | "发烧": "1", 1630 | "皮疹": "1" 1631 | }, 1632 | "imp_sxs": { 1633 | "精神萎靡": "0" 1634 | }, 1635 | "label": "小儿手足口病" 1636 | }, 1637 | { 1638 | "pid": "train-129", 1639 | "exp_sxs": { 1640 | "咳嗽": "1", 1641 | "流涕": "1" 1642 | }, 1643 | "imp_sxs": { 1644 | "发烧": "0", 1645 | "厌食": "1" 1646 | }, 1647 | "label": "上呼吸道感染" 1648 | }, 1649 | { 1650 | "pid": "train-130", 1651 | "exp_sxs": { 1652 | "咳嗽": "1", 1653 | "鼻塞": "1", 1654 | "咳痰": "1" 1655 | }, 1656 | "imp_sxs": { 1657 | "精神萎靡": "0", 1658 | "流涕": "0" 1659 | }, 1660 | "label": "上呼吸道感染" 1661 | }, 1662 | { 1663 | "pid": "train-131", 1664 | "exp_sxs": { 1665 | "疱疹": "1", 1666 | "呕吐": "1", 1667 | "发烧": "1" 1668 | }, 1669 | "imp_sxs": { 1670 | "精神萎靡": "0", 1671 | "打喷嚏": "1", 1672 | "厌食": "0" 1673 | }, 1674 | "label": "小儿手足口病" 1675 | }, 1676 | { 1677 | "pid": "train-132", 1678 | "exp_sxs": { 1679 | "呕吐": "1", 1680 | "发烧": "1", 1681 | "皮疹": "1" 1682 | }, 1683 | "imp_sxs": { 1684 | "精神萎靡": "0", 1685 | "厌食": "0" 1686 | }, 1687 | "label": "小儿手足口病" 1688 | }, 1689 | { 1690 | "pid": "train-133", 1691 | "exp_sxs": { 1692 | "咳嗽": "1", 1693 | "流涕": "1", 1694 | "稀便": "1", 1695 | "呼吸困难": "1" 1696 | }, 1697 | "imp_sxs": { 1698 | "咳痰": "1" 1699 | }, 1700 | "label": "肺炎" 1701 | }, 1702 | { 1703 | "pid": "train-134", 1704 | "exp_sxs": { 1705 | "精神萎靡": "1", 1706 | "咽部不适": "1", 1707 | "发烧": "1" 1708 | }, 1709 | "imp_sxs": { 1710 | "咳嗽": "1", 1711 | "头痛": "1", 1712 | "厌食": "1", 1713 | "流涕": "1" 1714 | }, 1715 | "label": "上呼吸道感染" 1716 | }, 1717 | { 1718 | "pid": "train-135", 1719 | "exp_sxs": { 1720 | "咳嗽": "1", 1721 | "鼻塞": "1", 1722 | "打喷嚏": "1", 1723 | "流涕": "1" 1724 | }, 1725 | "imp_sxs": { 1726 | "皮疹": "1" 1727 | }, 1728 | "label": "过敏性鼻炎" 1729 | }, 1730 | { 1731 | "pid": "train-136", 1732 | "exp_sxs": { 1733 | "皮疹": "1", 1734 | "流口水": "1" 1735 | }, 1736 | "imp_sxs": { 1737 | "精神萎靡": "0", 1738 | "厌食": "1" 1739 | }, 1740 | "label": "小儿手足口病" 1741 | }, 1742 | { 1743 | "pid": "train-137", 1744 | "exp_sxs": { 1745 | "咳嗽": "1", 1746 | "鼻塞": "1", 1747 | "打喷嚏": "1", 1748 | "流涕": "1" 1749 | }, 1750 | "imp_sxs": { 1751 | "流鼻血": "1" 1752 | }, 1753 | "label": "上呼吸道感染" 1754 | }, 1755 | { 1756 | "pid": "train-138", 1757 | "exp_sxs": { 1758 | "咳嗽": "1", 1759 | "稀便": "1" 1760 | }, 1761 | "imp_sxs": { 1762 | "盗汗": "1", 1763 | "流涕": "0", 1764 | "发烧": "0", 1765 | "咳痰": "0", 1766 | "呼吸困难": "1" 1767 | }, 1768 | "label": "上呼吸道感染" 1769 | }, 1770 | { 1771 | "pid": "train-139", 1772 | "exp_sxs": { 1773 | "咳嗽": "1" 1774 | }, 1775 | "imp_sxs": { 1776 | "流涕": "1", 1777 | "过敏": "1", 1778 | "打喷嚏": "1" 1779 | }, 1780 | "label": "过敏性鼻炎" 1781 | }, 1782 | { 1783 | "pid": "train-140", 1784 | "exp_sxs": { 1785 | "咳嗽": "1", 1786 | "打喷嚏": "1" 1787 | }, 1788 | "imp_sxs": { 1789 | "呼吸困难": "1" 1790 | }, 1791 | "label": "上呼吸道感染" 1792 | }, 1793 | { 1794 | "pid": "train-141", 1795 | "exp_sxs": { 1796 | "疱疹": "1", 1797 | "皮疹": "1" 1798 | }, 1799 | "imp_sxs": { 1800 | "呕吐": "1", 1801 | "发烧": "1" 1802 | }, 1803 | "label": "小儿手足口病" 1804 | }, 1805 | { 1806 | "pid": "train-142", 1807 | "exp_sxs": { 1808 | "咳嗽": "1", 1809 | "流涕": "1", 1810 | "鼻塞": "1", 1811 | "打喷嚏": "1", 1812 | "呼吸困难": "1" 1813 | }, 1814 | "imp_sxs": { 1815 | "咳痰": "1" 1816 | }, 1817 | "label": "过敏性鼻炎" 1818 | }, 1819 | { 1820 | "pid": "train-143", 1821 | "exp_sxs": { 1822 | "喘气": "1", 1823 | "咳嗽": "1", 1824 | "鼻塞": "1", 1825 | "咳痰": "1" 1826 | }, 1827 | "imp_sxs": { 1828 | "吐泡泡": "1", 1829 | "呼吸困难": "1" 1830 | }, 1831 | "label": "肺炎" 1832 | }, 1833 | { 1834 | "pid": "train-144", 1835 | "exp_sxs": { 1836 | "咳嗽": "1", 1837 | "呕吐": "1", 1838 | "鼻塞": "1" 1839 | }, 1840 | "imp_sxs": { 1841 | "烦躁不安": "1", 1842 | "呼吸困难": "1" 1843 | }, 1844 | "label": "肺炎" 1845 | }, 1846 | { 1847 | "pid": "train-145", 1848 | "exp_sxs": { 1849 | "稀便": "1", 1850 | "放屁": "1" 1851 | }, 1852 | "imp_sxs": { 1853 | "烦躁不安": "1", 1854 | "呕吐": "1", 1855 | "肚子咕噜叫": "1", 1856 | "皮疹": "1" 1857 | }, 1858 | "label": "小儿腹泻" 1859 | }, 1860 | { 1861 | "pid": "train-146", 1862 | "exp_sxs": { 1863 | "发烧": "1", 1864 | "皮疹": "1" 1865 | }, 1866 | "imp_sxs": {}, 1867 | "label": "小儿手足口病" 1868 | }, 1869 | { 1870 | "pid": "train-147", 1871 | "exp_sxs": { 1872 | "皮疹": "1" 1873 | }, 1874 | "imp_sxs": { 1875 | "疱疹": "1", 1876 | "精神萎靡": "0", 1877 | "发烧": "0" 1878 | }, 1879 | "label": "小儿手足口病" 1880 | }, 1881 | { 1882 | "pid": "train-148", 1883 | "exp_sxs": { 1884 | "咳嗽": "1", 1885 | "鼻塞": "1", 1886 | "流涕": "1" 1887 | }, 1888 | "imp_sxs": { 1889 | "呕吐": "1" 1890 | }, 1891 | "label": "上呼吸道感染" 1892 | }, 1893 | { 1894 | "pid": "train-149", 1895 | "exp_sxs": { 1896 | "咳嗽": "1", 1897 | "鼻塞": "1" 1898 | }, 1899 | "imp_sxs": { 1900 | "呼吸困难": "1", 1901 | "过敏": "1", 1902 | "揉鼻子": "1" 1903 | }, 1904 | "label": "过敏性鼻炎" 1905 | }, 1906 | { 1907 | "pid": "train-150", 1908 | "exp_sxs": { 1909 | "咳嗽": "1", 1910 | "呕吐": "1", 1911 | "发烧": "1", 1912 | "厌食": "1" 1913 | }, 1914 | "imp_sxs": { 1915 | "腹痛": "1" 1916 | }, 1917 | "label": "上呼吸道感染" 1918 | }, 1919 | { 1920 | "pid": "train-151", 1921 | "exp_sxs": { 1922 | "咳嗽": "1", 1923 | "呕吐": "1", 1924 | "厌食": "1", 1925 | "肺部湿啰音": "1", 1926 | "发烧": "1" 1927 | }, 1928 | "imp_sxs": { 1929 | "呼吸困难": "1" 1930 | }, 1931 | "label": "肺炎" 1932 | }, 1933 | { 1934 | "pid": "train-152", 1935 | "exp_sxs": { 1936 | "咳嗽": "1", 1937 | "咳痰": "1", 1938 | "流涕": "1" 1939 | }, 1940 | "imp_sxs": { 1941 | "鼻塞": "1" 1942 | }, 1943 | "label": "上呼吸道感染" 1944 | }, 1945 | { 1946 | "pid": "train-153", 1947 | "exp_sxs": { 1948 | "腹痛": "1", 1949 | "大便酸臭": "1", 1950 | "呕吐": "1", 1951 | "肚子咕噜叫": "1", 1952 | "稀便": "1", 1953 | "厌食": "1" 1954 | }, 1955 | "imp_sxs": { 1956 | "蛋花样便": "1" 1957 | }, 1958 | "label": "小儿腹泻" 1959 | }, 1960 | { 1961 | "pid": "train-154", 1962 | "exp_sxs": { 1963 | "发烧": "1", 1964 | "皮疹": "1" 1965 | }, 1966 | "imp_sxs": {}, 1967 | "label": "小儿手足口病" 1968 | }, 1969 | { 1970 | "pid": "train-155", 1971 | "exp_sxs": { 1972 | "发烧": "1", 1973 | "厌食": "1", 1974 | "皮疹": "1" 1975 | }, 1976 | "imp_sxs": { 1977 | "疱疹": "1" 1978 | }, 1979 | "label": "小儿手足口病" 1980 | }, 1981 | { 1982 | "pid": "train-156", 1983 | "exp_sxs": { 1984 | "揉眼睛": "1", 1985 | "咳嗽": "1", 1986 | "发烧": "1", 1987 | "流涕": "1" 1988 | }, 1989 | "imp_sxs": { 1990 | "腹痛": "1" 1991 | }, 1992 | "label": "肺炎" 1993 | }, 1994 | { 1995 | "pid": "train-157", 1996 | "exp_sxs": { 1997 | "鼻塞": "1", 1998 | "流涕": "1" 1999 | }, 2000 | "imp_sxs": { 2001 | "咳嗽": "0" 2002 | }, 2003 | "label": "上呼吸道感染" 2004 | }, 2005 | { 2006 | "pid": "train-158", 2007 | "exp_sxs": { 2008 | "咳嗽": "1", 2009 | "呕吐": "1", 2010 | "喘气": "1", 2011 | "咳痰": "1" 2012 | }, 2013 | "imp_sxs": { 2014 | "精神萎靡": "0", 2015 | "烦躁不安": "0", 2016 | "肺部阴影": "1", 2017 | "厌食": "0", 2018 | "呼吸困难": "1" 2019 | }, 2020 | "label": "肺炎" 2021 | }, 2022 | { 2023 | "pid": "train-159", 2024 | "exp_sxs": { 2025 | "咳嗽": "1", 2026 | "吐泡泡": "1", 2027 | "稀便": "1", 2028 | "发烧": "1", 2029 | "绿便": "1" 2030 | }, 2031 | "imp_sxs": { 2032 | "咽部不适": "1", 2033 | "鼻塞": "1", 2034 | "肺部湿啰音": "1" 2035 | }, 2036 | "label": "肺炎" 2037 | }, 2038 | { 2039 | "pid": "train-160", 2040 | "exp_sxs": { 2041 | "发烧": "1", 2042 | "皮疹": "1" 2043 | }, 2044 | "imp_sxs": {}, 2045 | "label": "小儿手足口病" 2046 | }, 2047 | { 2048 | "pid": "train-161", 2049 | "exp_sxs": { 2050 | "咳嗽": "1", 2051 | "鼻塞": "1", 2052 | "发烧": "1" 2053 | }, 2054 | "imp_sxs": { 2055 | "咽部不适": "1" 2056 | }, 2057 | "label": "上呼吸道感染" 2058 | }, 2059 | { 2060 | "pid": "train-162", 2061 | "exp_sxs": { 2062 | "疱疹": "1", 2063 | "烦躁不安": "1", 2064 | "皮疹": "1" 2065 | }, 2066 | "imp_sxs": { 2067 | "厌食": "1" 2068 | }, 2069 | "label": "小儿手足口病" 2070 | }, 2071 | { 2072 | "pid": "train-163", 2073 | "exp_sxs": { 2074 | "咳嗽": "1", 2075 | "呕吐": "1" 2076 | }, 2077 | "imp_sxs": { 2078 | "发烧": "0", 2079 | "流涕": "1" 2080 | }, 2081 | "label": "上呼吸道感染" 2082 | }, 2083 | { 2084 | "pid": "train-164", 2085 | "exp_sxs": { 2086 | "发烧": "1", 2087 | "皮疹": "1" 2088 | }, 2089 | "imp_sxs": { 2090 | "疱疹": "0", 2091 | "厌食": "0" 2092 | }, 2093 | "label": "小儿手足口病" 2094 | }, 2095 | { 2096 | "pid": "train-165", 2097 | "exp_sxs": { 2098 | "咳嗽": "1", 2099 | "发烧": "1", 2100 | "厌食": "1" 2101 | }, 2102 | "imp_sxs": { 2103 | "咳痰": "1" 2104 | }, 2105 | "label": "肺炎" 2106 | }, 2107 | { 2108 | "pid": "train-166", 2109 | "exp_sxs": { 2110 | "皮疹": "1", 2111 | "稀便": "1", 2112 | "腹胀": "1" 2113 | }, 2114 | "imp_sxs": { 2115 | "腹痛": "1" 2116 | }, 2117 | "label": "小儿腹泻" 2118 | }, 2119 | { 2120 | "pid": "train-167", 2121 | "exp_sxs": { 2122 | "鼻塞": "1", 2123 | "流涕": "1" 2124 | }, 2125 | "imp_sxs": { 2126 | "过敏": "1" 2127 | }, 2128 | "label": "过敏性鼻炎" 2129 | }, 2130 | { 2131 | "pid": "train-168", 2132 | "exp_sxs": { 2133 | "咳嗽": "1", 2134 | "鼻塞": "1", 2135 | "打喷嚏": "1", 2136 | "咳痰": "1", 2137 | "流涕": "1" 2138 | }, 2139 | "imp_sxs": { 2140 | "发烧": "1" 2141 | }, 2142 | "label": "上呼吸道感染" 2143 | }, 2144 | { 2145 | "pid": "train-169", 2146 | "exp_sxs": { 2147 | "咳嗽": "1", 2148 | "流涕": "1", 2149 | "发烧": "1", 2150 | "打喷嚏": "1" 2151 | }, 2152 | "imp_sxs": { 2153 | "咳痰": "1" 2154 | }, 2155 | "label": "上呼吸道感染" 2156 | }, 2157 | { 2158 | "pid": "train-170", 2159 | "exp_sxs": { 2160 | "鼻塞": "1", 2161 | "咳嗽": "1", 2162 | "呕吐": "1", 2163 | "吐泡泡": "1", 2164 | "咳痰": "1" 2165 | }, 2166 | "imp_sxs": { 2167 | "精神萎靡": "1" 2168 | }, 2169 | "label": "肺炎" 2170 | }, 2171 | { 2172 | "pid": "train-171", 2173 | "exp_sxs": { 2174 | "发烧": "1", 2175 | "皮疹": "1" 2176 | }, 2177 | "imp_sxs": { 2178 | "疱疹": "0", 2179 | "咳嗽": "0" 2180 | }, 2181 | "label": "小儿手足口病" 2182 | }, 2183 | { 2184 | "pid": "train-172", 2185 | "exp_sxs": { 2186 | "发烧": "1", 2187 | "皮疹": "1" 2188 | }, 2189 | "imp_sxs": { 2190 | "疱疹": "0", 2191 | "流口水": "0" 2192 | }, 2193 | "label": "小儿手足口病" 2194 | }, 2195 | { 2196 | "pid": "train-173", 2197 | "exp_sxs": { 2198 | "疱疹": "1", 2199 | "皮疹": "1", 2200 | "流口水": "1" 2201 | }, 2202 | "imp_sxs": { 2203 | "精神萎靡": "0", 2204 | "发烧": "0", 2205 | "厌食": "0" 2206 | }, 2207 | "label": "小儿手足口病" 2208 | }, 2209 | { 2210 | "pid": "train-174", 2211 | "exp_sxs": { 2212 | "疱疹": "1", 2213 | "发烧": "1" 2214 | }, 2215 | "imp_sxs": { 2216 | "皮疹": "1" 2217 | }, 2218 | "label": "小儿手足口病" 2219 | }, 2220 | { 2221 | "pid": "train-175", 2222 | "exp_sxs": { 2223 | "烦躁不安": "1", 2224 | "发烧": "1", 2225 | "流涕": "1", 2226 | "呕吐": "1", 2227 | "反胃": "1", 2228 | "稀便": "1" 2229 | }, 2230 | "imp_sxs": {}, 2231 | "label": "小儿腹泻" 2232 | }, 2233 | { 2234 | "pid": "train-176", 2235 | "exp_sxs": { 2236 | "呕吐": "1", 2237 | "打喷嚏": "1", 2238 | "发烧": "1", 2239 | "稀便": "1" 2240 | }, 2241 | "imp_sxs": { 2242 | "精神萎靡": "1", 2243 | "咳嗽": "1" 2244 | }, 2245 | "label": "肺炎" 2246 | }, 2247 | { 2248 | "pid": "train-177", 2249 | "exp_sxs": { 2250 | "揉鼻子": "1" 2251 | }, 2252 | "imp_sxs": { 2253 | "抽搐": "1" 2254 | }, 2255 | "label": "过敏性鼻炎" 2256 | }, 2257 | { 2258 | "pid": "train-178", 2259 | "exp_sxs": { 2260 | "咳嗽": "1", 2261 | "咳痰": "1", 2262 | "呼吸困难": "1" 2263 | }, 2264 | "imp_sxs": { 2265 | "鼻塞": "0" 2266 | }, 2267 | "label": "上呼吸道感染" 2268 | }, 2269 | { 2270 | "pid": "train-179", 2271 | "exp_sxs": { 2272 | "咳嗽": "1", 2273 | "流涕": "1", 2274 | "打喷嚏": "1", 2275 | "烦躁不安": "1" 2276 | }, 2277 | "imp_sxs": { 2278 | "呕吐": "1" 2279 | }, 2280 | "label": "肺炎" 2281 | }, 2282 | { 2283 | "pid": "train-180", 2284 | "exp_sxs": { 2285 | "烦躁不安": "1", 2286 | "稀便": "1" 2287 | }, 2288 | "imp_sxs": { 2289 | "精神萎靡": "0", 2290 | "尿少": "0" 2291 | }, 2292 | "label": "小儿腹泻" 2293 | }, 2294 | { 2295 | "pid": "train-181", 2296 | "exp_sxs": { 2297 | "咳嗽": "1" 2298 | }, 2299 | "imp_sxs": { 2300 | "过敏": "1", 2301 | "呼吸困难": "1" 2302 | }, 2303 | "label": "过敏性鼻炎" 2304 | }, 2305 | { 2306 | "pid": "train-182", 2307 | "exp_sxs": { 2308 | "鼻塞": "1", 2309 | "流涕": "1" 2310 | }, 2311 | "imp_sxs": { 2312 | "精神萎靡": "0", 2313 | "过敏": "1" 2314 | }, 2315 | "label": "过敏性鼻炎" 2316 | }, 2317 | { 2318 | "pid": "train-183", 2319 | "exp_sxs": { 2320 | "咳嗽": "1" 2321 | }, 2322 | "imp_sxs": { 2323 | "烦躁不安": "1", 2324 | "呕吐": "1", 2325 | "吐泡泡": "1" 2326 | }, 2327 | "label": "上呼吸道感染" 2328 | }, 2329 | { 2330 | "pid": "train-184", 2331 | "exp_sxs": { 2332 | "皮疹": "1" 2333 | }, 2334 | "imp_sxs": { 2335 | "发烧": "0" 2336 | }, 2337 | "label": "小儿手足口病" 2338 | }, 2339 | { 2340 | "pid": "train-185", 2341 | "exp_sxs": { 2342 | "发烧": "1", 2343 | "流涕": "1" 2344 | }, 2345 | "imp_sxs": { 2346 | "咽部不适": "1", 2347 | "呕吐": "1" 2348 | }, 2349 | "label": "上呼吸道感染" 2350 | }, 2351 | { 2352 | "pid": "train-186", 2353 | "exp_sxs": { 2354 | "咳嗽": "1", 2355 | "发烧": "1", 2356 | "咳痰": "1", 2357 | "流涕": "1" 2358 | }, 2359 | "imp_sxs": { 2360 | "肺部阴影": "1" 2361 | }, 2362 | "label": "肺炎" 2363 | }, 2364 | { 2365 | "pid": "train-187", 2366 | "exp_sxs": { 2367 | "腹痛": "1", 2368 | "呕吐": "1", 2369 | "头痛": "1" 2370 | }, 2371 | "imp_sxs": { 2372 | "稀便": "1" 2373 | }, 2374 | "label": "小儿腹泻" 2375 | }, 2376 | { 2377 | "pid": "train-188", 2378 | "exp_sxs": { 2379 | "腹痛": "1", 2380 | "呕吐": "1" 2381 | }, 2382 | "imp_sxs": { 2383 | "精神萎靡": "0", 2384 | "尿少": "0", 2385 | "发烧": "0" 2386 | }, 2387 | "label": "小儿腹泻" 2388 | }, 2389 | { 2390 | "pid": "train-189", 2391 | "exp_sxs": { 2392 | "发烧": "1", 2393 | "皮疹": "1" 2394 | }, 2395 | "imp_sxs": { 2396 | "咳嗽": "0", 2397 | "呕吐": "0", 2398 | "抽搐": "0" 2399 | }, 2400 | "label": "小儿手足口病" 2401 | }, 2402 | { 2403 | "pid": "train-190", 2404 | "exp_sxs": { 2405 | "咳嗽": "1", 2406 | "咳痰": "1", 2407 | "流涕": "1" 2408 | }, 2409 | "imp_sxs": { 2410 | "烦躁不安": "1" 2411 | }, 2412 | "label": "上呼吸道感染" 2413 | }, 2414 | { 2415 | "pid": "train-191", 2416 | "exp_sxs": { 2417 | "咳嗽": "1", 2418 | "流涕": "1", 2419 | "鼻塞": "1", 2420 | "揉鼻子": "1" 2421 | }, 2422 | "imp_sxs": { 2423 | "烦躁不安": "1" 2424 | }, 2425 | "label": "过敏性鼻炎" 2426 | }, 2427 | { 2428 | "pid": "train-192", 2429 | "exp_sxs": { 2430 | "咳嗽": "1", 2431 | "发烧": "1" 2432 | }, 2433 | "imp_sxs": { 2434 | "咽部不适": "1", 2435 | "皮疹": "1" 2436 | }, 2437 | "label": "小儿手足口病" 2438 | }, 2439 | { 2440 | "pid": "train-193", 2441 | "exp_sxs": { 2442 | "烦躁不安": "1", 2443 | "流涕": "1", 2444 | "咳嗽": "1", 2445 | "打喷嚏": "1", 2446 | "咳痰": "1", 2447 | "揉鼻子": "1" 2448 | }, 2449 | "imp_sxs": { 2450 | "过敏": "1" 2451 | }, 2452 | "label": "过敏性鼻炎" 2453 | }, 2454 | { 2455 | "pid": "train-194", 2456 | "exp_sxs": { 2457 | "疱疹": "1", 2458 | "发烧": "1", 2459 | "皮疹": "1" 2460 | }, 2461 | "imp_sxs": {}, 2462 | "label": "小儿手足口病" 2463 | }, 2464 | { 2465 | "pid": "train-195", 2466 | "exp_sxs": { 2467 | "舌苔发白": "1", 2468 | "咳痰": "1" 2469 | }, 2470 | "imp_sxs": {}, 2471 | "label": "过敏性鼻炎" 2472 | }, 2473 | { 2474 | "pid": "train-196", 2475 | "exp_sxs": { 2476 | "咽部不适": "1", 2477 | "烦躁不安": "1", 2478 | "发烧": "1", 2479 | "皮疹": "1" 2480 | }, 2481 | "imp_sxs": { 2482 | "疱疹": "1", 2483 | "精神萎靡": "0" 2484 | }, 2485 | "label": "小儿手足口病" 2486 | }, 2487 | { 2488 | "pid": "train-197", 2489 | "exp_sxs": { 2490 | "烦躁不安": "1", 2491 | "皮疹": "1", 2492 | "稀便": "1", 2493 | "大便酸臭": "1", 2494 | "放屁": "1" 2495 | }, 2496 | "imp_sxs": { 2497 | "精神萎靡": "0" 2498 | }, 2499 | "label": "小儿腹泻" 2500 | }, 2501 | { 2502 | "pid": "train-198", 2503 | "exp_sxs": { 2504 | "盗汗": "1", 2505 | "发烧": "1", 2506 | "咽部不适": "1", 2507 | "咳嗽": "1", 2508 | "呕吐": "1", 2509 | "咳痰": "1" 2510 | }, 2511 | "imp_sxs": {}, 2512 | "label": "上呼吸道感染" 2513 | }, 2514 | { 2515 | "pid": "train-199", 2516 | "exp_sxs": { 2517 | "流涕": "1" 2518 | }, 2519 | "imp_sxs": { 2520 | "鼻塞": "1", 2521 | "过敏": "1" 2522 | }, 2523 | "label": "过敏性鼻炎" 2524 | }, 2525 | { 2526 | "pid": "train-200", 2527 | "exp_sxs": { 2528 | "鼻塞": "1", 2529 | "发烧": "1" 2530 | }, 2531 | "imp_sxs": { 2532 | "皮疹": "1", 2533 | "流鼻血": "1" 2534 | }, 2535 | "label": "过敏性鼻炎" 2536 | }, 2537 | { 2538 | "pid": "train-201", 2539 | "exp_sxs": { 2540 | "呕吐": "1", 2541 | "发烧": "1", 2542 | "厌食": "1", 2543 | "稀便": "1" 2544 | }, 2545 | "imp_sxs": {}, 2546 | "label": "小儿腹泻" 2547 | }, 2548 | { 2549 | "pid": "train-202", 2550 | "exp_sxs": { 2551 | "腹痛": "1", 2552 | "发烧": "1" 2553 | }, 2554 | "imp_sxs": { 2555 | "咳嗽": "0", 2556 | "呕吐": "1" 2557 | }, 2558 | "label": "肺炎" 2559 | }, 2560 | { 2561 | "pid": "train-203", 2562 | "exp_sxs": { 2563 | "疱疹": "1", 2564 | "发烧": "1", 2565 | "厌食": "1" 2566 | }, 2567 | "imp_sxs": { 2568 | "精神萎靡": "1", 2569 | "咽部不适": "1", 2570 | "呕吐": "1", 2571 | "抽搐": "1" 2572 | }, 2573 | "label": "小儿手足口病" 2574 | }, 2575 | { 2576 | "pid": "train-204", 2577 | "exp_sxs": { 2578 | "打嗝": "1", 2579 | "烦躁不安": "1", 2580 | "稀便": "1" 2581 | }, 2582 | "imp_sxs": { 2583 | "呕吐": "1" 2584 | }, 2585 | "label": "小儿腹泻" 2586 | }, 2587 | { 2588 | "pid": "train-205", 2589 | "exp_sxs": { 2590 | "腹痛": "1", 2591 | "呕吐": "1" 2592 | }, 2593 | "imp_sxs": {}, 2594 | "label": "小儿腹泻" 2595 | }, 2596 | { 2597 | "pid": "train-206", 2598 | "exp_sxs": { 2599 | "鼻塞": "1", 2600 | "淋巴结肿大": "1" 2601 | }, 2602 | "imp_sxs": { 2603 | "精神萎靡": "0", 2604 | "咳嗽": "0", 2605 | "揉鼻子": "1" 2606 | }, 2607 | "label": "过敏性鼻炎" 2608 | }, 2609 | { 2610 | "pid": "train-207", 2611 | "exp_sxs": { 2612 | "咳嗽": "1", 2613 | "发烧": "1", 2614 | "咳痰": "1" 2615 | }, 2616 | "imp_sxs": { 2617 | "鼻塞": "1", 2618 | "流涕": "1" 2619 | }, 2620 | "label": "肺炎" 2621 | }, 2622 | { 2623 | "pid": "train-208", 2624 | "exp_sxs": { 2625 | "流涕": "1" 2626 | }, 2627 | "imp_sxs": { 2628 | "过敏": "1", 2629 | "流鼻血": "1" 2630 | }, 2631 | "label": "过敏性鼻炎" 2632 | }, 2633 | { 2634 | "pid": "train-209", 2635 | "exp_sxs": { 2636 | "咳嗽": "1" 2637 | }, 2638 | "imp_sxs": { 2639 | "精神萎靡": "0", 2640 | "过敏": "1" 2641 | }, 2642 | "label": "过敏性鼻炎" 2643 | }, 2644 | { 2645 | "pid": "train-210", 2646 | "exp_sxs": { 2647 | "咳嗽": "1", 2648 | "稀便": "1", 2649 | "咳痰": "1", 2650 | "发烧": "1" 2651 | }, 2652 | "imp_sxs": { 2653 | "鼻塞": "1" 2654 | }, 2655 | "label": "上呼吸道感染" 2656 | }, 2657 | { 2658 | "pid": "train-211", 2659 | "exp_sxs": { 2660 | "咳嗽": "1", 2661 | "呕吐": "1" 2662 | }, 2663 | "imp_sxs": { 2664 | "咽部不适": "1", 2665 | "烦躁不安": "0", 2666 | "呼吸困难": "1" 2667 | }, 2668 | "label": "肺炎" 2669 | }, 2670 | { 2671 | "pid": "train-212", 2672 | "exp_sxs": { 2673 | "鼻塞": "1", 2674 | "皮疹": "1", 2675 | "咳嗽": "1", 2676 | "呕吐": "1", 2677 | "打喷嚏": "1", 2678 | "咳痰": "1" 2679 | }, 2680 | "imp_sxs": { 2681 | "发烧": "0", 2682 | "揉鼻子": "1" 2683 | }, 2684 | "label": "过敏性鼻炎" 2685 | }, 2686 | { 2687 | "pid": "train-213", 2688 | "exp_sxs": { 2689 | "烦躁不安": "1", 2690 | "鼻塞": "1", 2691 | "肺部湿啰音": "1", 2692 | "流涕": "1", 2693 | "呕吐": "1", 2694 | "喘气": "1" 2695 | }, 2696 | "imp_sxs": { 2697 | "咳痰": "1" 2698 | }, 2699 | "label": "肺炎" 2700 | }, 2701 | { 2702 | "pid": "train-214", 2703 | "exp_sxs": { 2704 | "过敏": "1", 2705 | "抽搐": "1", 2706 | "稀便": "1" 2707 | }, 2708 | "imp_sxs": {}, 2709 | "label": "小儿腹泻" 2710 | }, 2711 | { 2712 | "pid": "train-215", 2713 | "exp_sxs": { 2714 | "咳嗽": "1", 2715 | "鼻塞": "1", 2716 | "打喷嚏": "1", 2717 | "流涕": "1" 2718 | }, 2719 | "imp_sxs": { 2720 | "精神萎靡": "1", 2721 | "烦躁不安": "1", 2722 | "发烧": "0" 2723 | }, 2724 | "label": "上呼吸道感染" 2725 | }, 2726 | { 2727 | "pid": "train-216", 2728 | "exp_sxs": {}, 2729 | "imp_sxs": {}, 2730 | "label": "肺炎" 2731 | }, 2732 | { 2733 | "pid": "train-217", 2734 | "exp_sxs": { 2735 | "打喷嚏": "1", 2736 | "稀便": "1", 2737 | "流涕": "1" 2738 | }, 2739 | "imp_sxs": { 2740 | "精神萎靡": "0", 2741 | "尿少": "0", 2742 | "腹胀": "1" 2743 | }, 2744 | "label": "小儿腹泻" 2745 | }, 2746 | { 2747 | "pid": "train-218", 2748 | "exp_sxs": { 2749 | "皮疹": "1" 2750 | }, 2751 | "imp_sxs": { 2752 | "咽部不适": "1", 2753 | "咳嗽": "0", 2754 | "呕吐": "0", 2755 | "稀便": "1" 2756 | }, 2757 | "label": "小儿手足口病" 2758 | }, 2759 | { 2760 | "pid": "train-219", 2761 | "exp_sxs": { 2762 | "咳嗽": "1", 2763 | "鼻塞": "1", 2764 | "咳痰": "1", 2765 | "流涕": "1" 2766 | }, 2767 | "imp_sxs": { 2768 | "精神萎靡": "0", 2769 | "发烧": "0", 2770 | "厌食": "0", 2771 | "揉鼻子": "1" 2772 | }, 2773 | "label": "过敏性鼻炎" 2774 | }, 2775 | { 2776 | "pid": "train-220", 2777 | "exp_sxs": { 2778 | "咳嗽": "1", 2779 | "发烧": "1", 2780 | "流涕": "1" 2781 | }, 2782 | "imp_sxs": { 2783 | "精神萎靡": "0", 2784 | "厌食": "0" 2785 | }, 2786 | "label": "上呼吸道感染" 2787 | }, 2788 | { 2789 | "pid": "train-221", 2790 | "exp_sxs": { 2791 | "呕吐": "1", 2792 | "稀便": "1" 2793 | }, 2794 | "imp_sxs": { 2795 | "精神萎靡": "1" 2796 | }, 2797 | "label": "小儿腹泻" 2798 | }, 2799 | { 2800 | "pid": "train-222", 2801 | "exp_sxs": { 2802 | "咳嗽": "1", 2803 | "发烧": "1", 2804 | "咳痰": "1" 2805 | }, 2806 | "imp_sxs": { 2807 | "肺部阴影": "1", 2808 | "肺部湿啰音": "1" 2809 | }, 2810 | "label": "肺炎" 2811 | }, 2812 | { 2813 | "pid": "train-223", 2814 | "exp_sxs": { 2815 | "咳嗽": "1", 2816 | "咳痰": "1", 2817 | "厌食": "1" 2818 | }, 2819 | "imp_sxs": { 2820 | "流涕": "0", 2821 | "发烧": "0", 2822 | "皮疹": "1" 2823 | }, 2824 | "label": "上呼吸道感染" 2825 | }, 2826 | { 2827 | "pid": "train-224", 2828 | "exp_sxs": { 2829 | "发烧": "1", 2830 | "肺部湿啰音": "1", 2831 | "流涕": "1", 2832 | "咳嗽": "1", 2833 | "呕吐": "1", 2834 | "咳痰": "1" 2835 | }, 2836 | "imp_sxs": { 2837 | "精神萎靡": "0", 2838 | "肺部阴影": "1" 2839 | }, 2840 | "label": "肺炎" 2841 | }, 2842 | { 2843 | "pid": "train-225", 2844 | "exp_sxs": { 2845 | "咳嗽": "1", 2846 | "流涕": "1" 2847 | }, 2848 | "imp_sxs": { 2849 | "咳痰": "1" 2850 | }, 2851 | "label": "上呼吸道感染" 2852 | }, 2853 | { 2854 | "pid": "train-226", 2855 | "exp_sxs": { 2856 | "反胃": "1", 2857 | "稀便": "1", 2858 | "厌食": "1" 2859 | }, 2860 | "imp_sxs": {}, 2861 | "label": "小儿腹泻" 2862 | }, 2863 | { 2864 | "pid": "train-227", 2865 | "exp_sxs": { 2866 | "咳嗽": "1", 2867 | "打喷嚏": "1", 2868 | "发烧": "1", 2869 | "流涕": "1" 2870 | }, 2871 | "imp_sxs": { 2872 | "咳痰": "1" 2873 | }, 2874 | "label": "上呼吸道感染" 2875 | }, 2876 | { 2877 | "pid": "train-228", 2878 | "exp_sxs": { 2879 | "烦躁不安": "1", 2880 | "发烧": "1", 2881 | "流涕": "1" 2882 | }, 2883 | "imp_sxs": { 2884 | "咳嗽": "0", 2885 | "呕吐": "1", 2886 | "稀便": "0", 2887 | "打喷嚏": "0" 2888 | }, 2889 | "label": "上呼吸道感染" 2890 | }, 2891 | { 2892 | "pid": "train-229", 2893 | "exp_sxs": { 2894 | "咳嗽": "1", 2895 | "打喷嚏": "1", 2896 | "流涕": "1" 2897 | }, 2898 | "imp_sxs": { 2899 | "烦躁不安": "1", 2900 | "鼻塞": "0", 2901 | "厌食": "1", 2902 | "咳痰": "0" 2903 | }, 2904 | "label": "上呼吸道感染" 2905 | }, 2906 | { 2907 | "pid": "train-230", 2908 | "exp_sxs": { 2909 | "咳嗽": "1", 2910 | "发烧": "1" 2911 | }, 2912 | "imp_sxs": { 2913 | "肺部阴影": "1", 2914 | "咳痰": "1" 2915 | }, 2916 | "label": "肺炎" 2917 | }, 2918 | { 2919 | "pid": "train-231", 2920 | "exp_sxs": { 2921 | "咳嗽": "1", 2922 | "鼻塞": "1", 2923 | "稀便": "1", 2924 | "咳痰": "1", 2925 | "烦躁不安": "1" 2926 | }, 2927 | "imp_sxs": {}, 2928 | "label": "小儿腹泻" 2929 | }, 2930 | { 2931 | "pid": "train-232", 2932 | "exp_sxs": { 2933 | "疱疹": "1" 2934 | }, 2935 | "imp_sxs": { 2936 | "精神萎靡": "0", 2937 | "发烧": "0" 2938 | }, 2939 | "label": "小儿手足口病" 2940 | }, 2941 | { 2942 | "pid": "train-233", 2943 | "exp_sxs": { 2944 | "疱疹": "1", 2945 | "发烧": "1", 2946 | "皮疹": "1" 2947 | }, 2948 | "imp_sxs": { 2949 | "呕吐": "0", 2950 | "稀便": "0" 2951 | }, 2952 | "label": "小儿手足口病" 2953 | }, 2954 | { 2955 | "pid": "train-234", 2956 | "exp_sxs": { 2957 | "疱疹": "1" 2958 | }, 2959 | "imp_sxs": { 2960 | "发烧": "1", 2961 | "呼吸困难": "1" 2962 | }, 2963 | "label": "小儿手足口病" 2964 | }, 2965 | { 2966 | "pid": "train-235", 2967 | "exp_sxs": { 2968 | "咳嗽": "1" 2969 | }, 2970 | "imp_sxs": { 2971 | "流涕": "0", 2972 | "抽搐": "1", 2973 | "咳痰": "1", 2974 | "揉鼻子": "1" 2975 | }, 2976 | "label": "过敏性鼻炎" 2977 | }, 2978 | { 2979 | "pid": "train-236", 2980 | "exp_sxs": { 2981 | "发烧": "1", 2982 | "稀便": "1" 2983 | }, 2984 | "imp_sxs": { 2985 | "精神萎靡": "0", 2986 | "尿少": "0", 2987 | "腹胀": "1" 2988 | }, 2989 | "label": "小儿腹泻" 2990 | }, 2991 | { 2992 | "pid": "train-237", 2993 | "exp_sxs": { 2994 | "咳嗽": "1", 2995 | "流涕": "1", 2996 | "发烧": "1", 2997 | "咳痰": "1", 2998 | "打喷嚏": "1" 2999 | }, 3000 | "imp_sxs": { 3001 | "咽部不适": "1" 3002 | }, 3003 | "label": "上呼吸道感染" 3004 | }, 3005 | { 3006 | "pid": "train-238", 3007 | "exp_sxs": { 3008 | "咳嗽": "1", 3009 | "发烧": "1", 3010 | "咳痰": "1" 3011 | }, 3012 | "imp_sxs": { 3013 | "鼻塞": "1", 3014 | "肺部湿啰音": "1" 3015 | }, 3016 | "label": "肺炎" 3017 | }, 3018 | { 3019 | "pid": "train-239", 3020 | "exp_sxs": { 3021 | "疱疹": "1", 3022 | "精神萎靡": "1", 3023 | "发烧": "1", 3024 | "皮疹": "1" 3025 | }, 3026 | "imp_sxs": { 3027 | "呕吐": "1", 3028 | "厌食": "1" 3029 | }, 3030 | "label": "小儿手足口病" 3031 | }, 3032 | { 3033 | "pid": "train-240", 3034 | "exp_sxs": { 3035 | "咳嗽": "1", 3036 | "打喷嚏": "1", 3037 | "皮疹": "1", 3038 | "流涕": "1" 3039 | }, 3040 | "imp_sxs": { 3041 | "过敏": "1", 3042 | "咳痰": "0" 3043 | }, 3044 | "label": "过敏性鼻炎" 3045 | }, 3046 | { 3047 | "pid": "train-241", 3048 | "exp_sxs": { 3049 | "咳嗽": "1", 3050 | "发烧": "1" 3051 | }, 3052 | "imp_sxs": { 3053 | "精神萎靡": "1", 3054 | "烦躁不安": "1" 3055 | }, 3056 | "label": "上呼吸道感染" 3057 | }, 3058 | { 3059 | "pid": "train-242", 3060 | "exp_sxs": { 3061 | "腹痛": "1", 3062 | "发烧": "1", 3063 | "流涕": "1", 3064 | "咳嗽": "1", 3065 | "呕吐": "1", 3066 | "稀便": "1" 3067 | }, 3068 | "imp_sxs": {}, 3069 | "label": "小儿腹泻" 3070 | }, 3071 | { 3072 | "pid": "train-243", 3073 | "exp_sxs": { 3074 | "鼻塞": "1", 3075 | "流涕": "1" 3076 | }, 3077 | "imp_sxs": { 3078 | "呼吸困难": "1" 3079 | }, 3080 | "label": "上呼吸道感染" 3081 | }, 3082 | { 3083 | "pid": "train-244", 3084 | "exp_sxs": { 3085 | "揉眼睛": "1", 3086 | "咳嗽": "1", 3087 | "揉鼻子": "1" 3088 | }, 3089 | "imp_sxs": { 3090 | "咽部不适": "1", 3091 | "鼻塞": "1", 3092 | "咳痰": "1" 3093 | }, 3094 | "label": "过敏性鼻炎" 3095 | }, 3096 | { 3097 | "pid": "train-245", 3098 | "exp_sxs": { 3099 | "咳嗽": "1", 3100 | "咳痰": "1" 3101 | }, 3102 | "imp_sxs": { 3103 | "过敏": "1", 3104 | "流涕": "0" 3105 | }, 3106 | "label": "过敏性鼻炎" 3107 | }, 3108 | { 3109 | "pid": "train-246", 3110 | "exp_sxs": { 3111 | "呕吐": "1", 3112 | "发烧": "1", 3113 | "厌食": "1", 3114 | "稀便": "1" 3115 | }, 3116 | "imp_sxs": { 3117 | "大便酸臭": "1" 3118 | }, 3119 | "label": "小儿腹泻" 3120 | }, 3121 | { 3122 | "pid": "train-247", 3123 | "exp_sxs": { 3124 | "咳嗽": "1", 3125 | "呕吐": "1", 3126 | "流涕": "1" 3127 | }, 3128 | "imp_sxs": { 3129 | "发烧": "0", 3130 | "咳痰": "1" 3131 | }, 3132 | "label": "上呼吸道感染" 3133 | }, 3134 | { 3135 | "pid": "train-248", 3136 | "exp_sxs": { 3137 | "发烧": "1", 3138 | "皮疹": "1" 3139 | }, 3140 | "imp_sxs": { 3141 | "厌食": "1" 3142 | }, 3143 | "label": "小儿手足口病" 3144 | }, 3145 | { 3146 | "pid": "train-249", 3147 | "exp_sxs": {}, 3148 | "imp_sxs": {}, 3149 | "label": "上呼吸道感染" 3150 | }, 3151 | { 3152 | "pid": "train-250", 3153 | "exp_sxs": { 3154 | "咳嗽": "1", 3155 | "呕吐": "1", 3156 | "厌食": "1", 3157 | "流涕": "1" 3158 | }, 3159 | "imp_sxs": { 3160 | "精神萎靡": "1", 3161 | "尿少": "1" 3162 | }, 3163 | "label": "小儿腹泻" 3164 | }, 3165 | { 3166 | "pid": "train-251", 3167 | "exp_sxs": { 3168 | "咳嗽": "1", 3169 | "打喷嚏": "1", 3170 | "咳痰": "1", 3171 | "流涕": "1" 3172 | }, 3173 | "imp_sxs": { 3174 | "尿少": "1", 3175 | "咽部不适": "1" 3176 | }, 3177 | "label": "上呼吸道感染" 3178 | }, 3179 | { 3180 | "pid": "train-252", 3181 | "exp_sxs": { 3182 | "咳嗽": "1", 3183 | "呕吐": "1", 3184 | "吐泡泡": "1", 3185 | "咳痰": "1" 3186 | }, 3187 | "imp_sxs": { 3188 | "精神萎靡": "0", 3189 | "肺部阴影": "1", 3190 | "厌食": "0" 3191 | }, 3192 | "label": "肺炎" 3193 | }, 3194 | { 3195 | "pid": "train-253", 3196 | "exp_sxs": { 3197 | "稀便": "1", 3198 | "绿便": "1" 3199 | }, 3200 | "imp_sxs": {}, 3201 | "label": "小儿腹泻" 3202 | }, 3203 | { 3204 | "pid": "train-254", 3205 | "exp_sxs": { 3206 | "烦躁不安": "1", 3207 | "腹痛": "1", 3208 | "发烧": "1", 3209 | "呕吐": "1", 3210 | "稀便": "1", 3211 | "厌食": "1" 3212 | }, 3213 | "imp_sxs": { 3214 | "放屁": "1" 3215 | }, 3216 | "label": "小儿腹泻" 3217 | }, 3218 | { 3219 | "pid": "train-255", 3220 | "exp_sxs": { 3221 | "疱疹": "1", 3222 | "发烧": "1", 3223 | "厌食": "1", 3224 | "皮疹": "1" 3225 | }, 3226 | "imp_sxs": { 3227 | "烦躁不安": "1", 3228 | "抽搐": "1" 3229 | }, 3230 | "label": "小儿手足口病" 3231 | }, 3232 | { 3233 | "pid": "train-256", 3234 | "exp_sxs": { 3235 | "咽部不适": "1", 3236 | "咳嗽": "1", 3237 | "反胃": "1", 3238 | "流涕": "1" 3239 | }, 3240 | "imp_sxs": { 3241 | "过敏": "1" 3242 | }, 3243 | "label": "过敏性鼻炎" 3244 | }, 3245 | { 3246 | "pid": "train-257", 3247 | "exp_sxs": { 3248 | "鼻塞": "1", 3249 | "流涕": "1", 3250 | "咳嗽": "1", 3251 | "喘气": "1", 3252 | "打喷嚏": "1", 3253 | "揉鼻子": "1" 3254 | }, 3255 | "imp_sxs": { 3256 | "肺部阴影": "1", 3257 | "呼吸困难": "1" 3258 | }, 3259 | "label": "肺炎" 3260 | }, 3261 | { 3262 | "pid": "train-258", 3263 | "exp_sxs": { 3264 | "咳嗽": "1", 3265 | "稀便": "1", 3266 | "绿便": "1" 3267 | }, 3268 | "imp_sxs": {}, 3269 | "label": "肺炎" 3270 | }, 3271 | { 3272 | "pid": "train-259", 3273 | "exp_sxs": { 3274 | "烦躁不安": "1", 3275 | "发烧": "1", 3276 | "流涕": "1", 3277 | "咳嗽": "1", 3278 | "呕吐": "1", 3279 | "咳痰": "1" 3280 | }, 3281 | "imp_sxs": { 3282 | "精神萎靡": "1" 3283 | }, 3284 | "label": "上呼吸道感染" 3285 | }, 3286 | { 3287 | "pid": "train-260", 3288 | "exp_sxs": { 3289 | "鼻塞": "1", 3290 | "流涕": "1" 3291 | }, 3292 | "imp_sxs": { 3293 | "发烧": "0" 3294 | }, 3295 | "label": "上呼吸道感染" 3296 | }, 3297 | { 3298 | "pid": "train-261", 3299 | "exp_sxs": { 3300 | "呕吐": "1", 3301 | "咳痰": "1" 3302 | }, 3303 | "imp_sxs": { 3304 | "喘气": "1", 3305 | "肺部湿啰音": "1" 3306 | }, 3307 | "label": "肺炎" 3308 | }, 3309 | { 3310 | "pid": "train-262", 3311 | "exp_sxs": { 3312 | "咳嗽": "1", 3313 | "发烧": "1", 3314 | "咳痰": "1", 3315 | "流涕": "1" 3316 | }, 3317 | "imp_sxs": { 3318 | "厌食": "0" 3319 | }, 3320 | "label": "上呼吸道感染" 3321 | }, 3322 | { 3323 | "pid": "train-263", 3324 | "exp_sxs": { 3325 | "咳嗽": "1", 3326 | "发烧": "1" 3327 | }, 3328 | "imp_sxs": { 3329 | "咳痰": "1" 3330 | }, 3331 | "label": "上呼吸道感染" 3332 | }, 3333 | { 3334 | "pid": "train-264", 3335 | "exp_sxs": { 3336 | "流涕": "1", 3337 | "呼吸困难": "1" 3338 | }, 3339 | "imp_sxs": { 3340 | "打喷嚏": "0", 3341 | "咳痰": "1" 3342 | }, 3343 | "label": "过敏性鼻炎" 3344 | }, 3345 | { 3346 | "pid": "train-265", 3347 | "exp_sxs": { 3348 | "稀便": "1", 3349 | "口渴": "1" 3350 | }, 3351 | "imp_sxs": { 3352 | "精神萎靡": "0", 3353 | "厌食": "0", 3354 | "呼吸困难": "0" 3355 | }, 3356 | "label": "小儿腹泻" 3357 | }, 3358 | { 3359 | "pid": "train-266", 3360 | "exp_sxs": { 3361 | "烦躁不安": "1", 3362 | "呕吐": "1", 3363 | "咳痰": "1", 3364 | "呼吸困难": "1" 3365 | }, 3366 | "imp_sxs": { 3367 | "精神萎靡": "0", 3368 | "稀便": "1" 3369 | }, 3370 | "label": "小儿腹泻" 3371 | }, 3372 | { 3373 | "pid": "train-267", 3374 | "exp_sxs": { 3375 | "发烧": "1", 3376 | "咳痰": "1" 3377 | }, 3378 | "imp_sxs": { 3379 | "精神萎靡": "0", 3380 | "烦躁不安": "0", 3381 | "呕吐": "1", 3382 | "吐泡泡": "1", 3383 | "呼吸困难": "1" 3384 | }, 3385 | "label": "肺炎" 3386 | }, 3387 | { 3388 | "pid": "train-268", 3389 | "exp_sxs": { 3390 | "蛋花样便": "1", 3391 | "稀便": "1" 3392 | }, 3393 | "imp_sxs": { 3394 | "咳嗽": "0" 3395 | }, 3396 | "label": "小儿腹泻" 3397 | }, 3398 | { 3399 | "pid": "train-269", 3400 | "exp_sxs": { 3401 | "咳嗽": "1", 3402 | "流涕": "1", 3403 | "发烧": "1", 3404 | "打喷嚏": "1" 3405 | }, 3406 | "imp_sxs": { 3407 | "咳痰": "1" 3408 | }, 3409 | "label": "上呼吸道感染" 3410 | }, 3411 | { 3412 | "pid": "train-270", 3413 | "exp_sxs": { 3414 | "咳嗽": "1", 3415 | "发烧": "1", 3416 | "盗汗": "1", 3417 | "流涕": "1" 3418 | }, 3419 | "imp_sxs": { 3420 | "呼吸困难": "1" 3421 | }, 3422 | "label": "肺炎" 3423 | }, 3424 | { 3425 | "pid": "train-271", 3426 | "exp_sxs": { 3427 | "咳嗽": "1", 3428 | "流涕": "1" 3429 | }, 3430 | "imp_sxs": { 3431 | "稀便": "1" 3432 | }, 3433 | "label": "上呼吸道感染" 3434 | }, 3435 | { 3436 | "pid": "train-272", 3437 | "exp_sxs": { 3438 | "疱疹": "1" 3439 | }, 3440 | "imp_sxs": { 3441 | "皮疹": "1" 3442 | }, 3443 | "label": "小儿手足口病" 3444 | }, 3445 | { 3446 | "pid": "train-273", 3447 | "exp_sxs": { 3448 | "咳嗽": "1", 3449 | "咳痰": "1", 3450 | "流涕": "1" 3451 | }, 3452 | "imp_sxs": { 3453 | "鼻塞": "1", 3454 | "皮疹": "1" 3455 | }, 3456 | "label": "过敏性鼻炎" 3457 | }, 3458 | { 3459 | "pid": "train-274", 3460 | "exp_sxs": { 3461 | "咳嗽": "1", 3462 | "咳痰": "1", 3463 | "流涕": "1" 3464 | }, 3465 | "imp_sxs": { 3466 | "咽部不适": "1", 3467 | "发烧": "1" 3468 | }, 3469 | "label": "上呼吸道感染" 3470 | }, 3471 | { 3472 | "pid": "train-275", 3473 | "exp_sxs": { 3474 | "发烧": "1", 3475 | "流涕": "1" 3476 | }, 3477 | "imp_sxs": { 3478 | "精神萎靡": "1", 3479 | "呕吐": "1", 3480 | "厌食": "1" 3481 | }, 3482 | "label": "小儿手足口病" 3483 | }, 3484 | { 3485 | "pid": "train-276", 3486 | "exp_sxs": { 3487 | "咳嗽": "1", 3488 | "鼻塞": "1", 3489 | "皮疹": "1", 3490 | "流涕": "1" 3491 | }, 3492 | "imp_sxs": { 3493 | "过敏": "1" 3494 | }, 3495 | "label": "过敏性鼻炎" 3496 | }, 3497 | { 3498 | "pid": "train-277", 3499 | "exp_sxs": { 3500 | "呕吐": "1", 3501 | "头痛": "1", 3502 | "发烧": "1" 3503 | }, 3504 | "imp_sxs": { 3505 | "皮疹": "1" 3506 | }, 3507 | "label": "上呼吸道感染" 3508 | }, 3509 | { 3510 | "pid": "train-278", 3511 | "exp_sxs": { 3512 | "呕吐": "1", 3513 | "反胃": "1", 3514 | "稀便": "1", 3515 | "厌食": "1" 3516 | }, 3517 | "imp_sxs": { 3518 | "精神萎靡": "0", 3519 | "发烧": "0" 3520 | }, 3521 | "label": "小儿腹泻" 3522 | }, 3523 | { 3524 | "pid": "train-279", 3525 | "exp_sxs": { 3526 | "咳嗽": "1", 3527 | "咳痰": "1", 3528 | "流涕": "1" 3529 | }, 3530 | "imp_sxs": {}, 3531 | "label": "上呼吸道感染" 3532 | }, 3533 | { 3534 | "pid": "train-280", 3535 | "exp_sxs": { 3536 | "鼻塞": "1" 3537 | }, 3538 | "imp_sxs": { 3539 | "精神萎靡": "0", 3540 | "咳嗽": "0", 3541 | "淋巴结肿大": "1", 3542 | "厌食": "0", 3543 | "揉鼻子": "1" 3544 | }, 3545 | "label": "过敏性鼻炎" 3546 | }, 3547 | { 3548 | "pid": "train-281", 3549 | "exp_sxs": { 3550 | "疱疹": "1", 3551 | "精神萎靡": "1", 3552 | "发烧": "1" 3553 | }, 3554 | "imp_sxs": { 3555 | "皮疹": "0", 3556 | "厌食": "1" 3557 | }, 3558 | "label": "小儿手足口病" 3559 | }, 3560 | { 3561 | "pid": "train-282", 3562 | "exp_sxs": { 3563 | "发烧": "1", 3564 | "流涕": "1" 3565 | }, 3566 | "imp_sxs": { 3567 | "精神萎靡": "1" 3568 | }, 3569 | "label": "肺炎" 3570 | }, 3571 | { 3572 | "pid": "train-283", 3573 | "exp_sxs": { 3574 | "咳嗽": "1", 3575 | "呕吐": "1", 3576 | "鼻塞": "1", 3577 | "咳痰": "1", 3578 | "呼吸困难": "1" 3579 | }, 3580 | "imp_sxs": {}, 3581 | "label": "肺炎" 3582 | }, 3583 | { 3584 | "pid": "train-284", 3585 | "exp_sxs": { 3586 | "疱疹": "1", 3587 | "发烧": "1", 3588 | "皮疹": "1" 3589 | }, 3590 | "imp_sxs": {}, 3591 | "label": "小儿手足口病" 3592 | }, 3593 | { 3594 | "pid": "train-285", 3595 | "exp_sxs": { 3596 | "鼻塞": "1", 3597 | "流涕": "1", 3598 | "揉眼睛": "1", 3599 | "咳嗽": "1", 3600 | "打喷嚏": "1", 3601 | "揉鼻子": "1" 3602 | }, 3603 | "imp_sxs": { 3604 | "烦躁不安": "1" 3605 | }, 3606 | "label": "过敏性鼻炎" 3607 | }, 3608 | { 3609 | "pid": "train-286", 3610 | "exp_sxs": { 3611 | "咳嗽": "1", 3612 | "咳痰": "1", 3613 | "流涕": "1" 3614 | }, 3615 | "imp_sxs": { 3616 | "皮疹": "1", 3617 | "呼吸困难": "1" 3618 | }, 3619 | "label": "过敏性鼻炎" 3620 | }, 3621 | { 3622 | "pid": "train-287", 3623 | "exp_sxs": { 3624 | "咳嗽": "1", 3625 | "流涕": "1" 3626 | }, 3627 | "imp_sxs": { 3628 | "咳痰": "1" 3629 | }, 3630 | "label": "肺炎" 3631 | }, 3632 | { 3633 | "pid": "train-288", 3634 | "exp_sxs": { 3635 | "鼻塞": "1", 3636 | "咳嗽": "1", 3637 | "头痛": "1", 3638 | "发烧": "1", 3639 | "流涕": "1" 3640 | }, 3641 | "imp_sxs": { 3642 | "精神萎靡": "0", 3643 | "烦躁不安": "1", 3644 | "厌食": "0" 3645 | }, 3646 | "label": "肺炎" 3647 | }, 3648 | { 3649 | "pid": "train-289", 3650 | "exp_sxs": { 3651 | "咽部不适": "1", 3652 | "发烧": "1", 3653 | "呼吸困难": "1" 3654 | }, 3655 | "imp_sxs": { 3656 | "咳嗽": "1", 3657 | "流涕": "0" 3658 | }, 3659 | "label": "上呼吸道感染" 3660 | }, 3661 | { 3662 | "pid": "train-290", 3663 | "exp_sxs": { 3664 | "发烧": "1", 3665 | "皮疹": "1" 3666 | }, 3667 | "imp_sxs": { 3668 | "精神萎靡": "0" 3669 | }, 3670 | "label": "小儿手足口病" 3671 | }, 3672 | { 3673 | "pid": "train-291", 3674 | "exp_sxs": { 3675 | "咳嗽": "1", 3676 | "头痛": "1", 3677 | "咳痰": "1" 3678 | }, 3679 | "imp_sxs": { 3680 | "精神萎靡": "1", 3681 | "发烧": "1" 3682 | }, 3683 | "label": "上呼吸道感染" 3684 | }, 3685 | { 3686 | "pid": "train-292", 3687 | "exp_sxs": { 3688 | "发烧": "1", 3689 | "盗汗": "1" 3690 | }, 3691 | "imp_sxs": { 3692 | "咳嗽": "1", 3693 | "流涕": "1" 3694 | }, 3695 | "label": "上呼吸道感染" 3696 | }, 3697 | { 3698 | "pid": "train-293", 3699 | "exp_sxs": { 3700 | "尿少": "1", 3701 | "稀便": "1", 3702 | "厌食": "1" 3703 | }, 3704 | "imp_sxs": {}, 3705 | "label": "小儿腹泻" 3706 | }, 3707 | { 3708 | "pid": "train-294", 3709 | "exp_sxs": { 3710 | "发烧": "1", 3711 | "流涕": "1" 3712 | }, 3713 | "imp_sxs": { 3714 | "打喷嚏": "1", 3715 | "咳痰": "1", 3716 | "呼吸困难": "1" 3717 | }, 3718 | "label": "上呼吸道感染" 3719 | }, 3720 | { 3721 | "pid": "train-295", 3722 | "exp_sxs": { 3723 | "咳嗽": "1", 3724 | "鼻塞": "1", 3725 | "流涕": "1" 3726 | }, 3727 | "imp_sxs": { 3728 | "咽部不适": "1", 3729 | "厌食": "1" 3730 | }, 3731 | "label": "上呼吸道感染" 3732 | }, 3733 | { 3734 | "pid": "train-296", 3735 | "exp_sxs": { 3736 | "咳痰": "1", 3737 | "呼吸困难": "1" 3738 | }, 3739 | "imp_sxs": { 3740 | "精神萎靡": "0", 3741 | "发烧": "0", 3742 | "厌食": "0", 3743 | "流涕": "1" 3744 | }, 3745 | "label": "肺炎" 3746 | }, 3747 | { 3748 | "pid": "train-297", 3749 | "exp_sxs": { 3750 | "舌苔发白": "1", 3751 | "稀便": "1", 3752 | "绿便": "1" 3753 | }, 3754 | "imp_sxs": {}, 3755 | "label": "小儿腹泻" 3756 | }, 3757 | { 3758 | "pid": "train-298", 3759 | "exp_sxs": { 3760 | "咽部不适": "1", 3761 | "舌苔发白": "1", 3762 | "流涕": "1" 3763 | }, 3764 | "imp_sxs": { 3765 | "头痛": "1", 3766 | "呼吸困难": "1" 3767 | }, 3768 | "label": "过敏性鼻炎" 3769 | }, 3770 | { 3771 | "pid": "train-299", 3772 | "exp_sxs": { 3773 | "呕吐": "1", 3774 | "发烧": "1" 3775 | }, 3776 | "imp_sxs": { 3777 | "咽部不适": "1" 3778 | }, 3779 | "label": "小儿手足口病" 3780 | }, 3781 | { 3782 | "pid": "train-300", 3783 | "exp_sxs": { 3784 | "咳嗽": "1", 3785 | "发烧": "1", 3786 | "咳痰": "1" 3787 | }, 3788 | "imp_sxs": { 3789 | "精神萎靡": "1", 3790 | "流涕": "1" 3791 | }, 3792 | "label": "上呼吸道感染" 3793 | }, 3794 | { 3795 | "pid": "train-301", 3796 | "exp_sxs": { 3797 | "咽部不适": "1", 3798 | "烦躁不安": "1", 3799 | "鼻塞": "1", 3800 | "发烧": "1", 3801 | "流涕": "1", 3802 | "咳嗽": "1" 3803 | }, 3804 | "imp_sxs": { 3805 | "呼吸困难": "1" 3806 | }, 3807 | "label": "过敏性鼻炎" 3808 | }, 3809 | { 3810 | "pid": "train-302", 3811 | "exp_sxs": { 3812 | "咳嗽": "1", 3813 | "流涕": "1", 3814 | "发烧": "1", 3815 | "咳痰": "1", 3816 | "流口水": "1" 3817 | }, 3818 | "imp_sxs": { 3819 | "精神萎靡": "0", 3820 | "厌食": "0" 3821 | }, 3822 | "label": "肺炎" 3823 | }, 3824 | { 3825 | "pid": "train-303", 3826 | "exp_sxs": { 3827 | "咳嗽": "1", 3828 | "发烧": "1" 3829 | }, 3830 | "imp_sxs": { 3831 | "精神萎靡": "1", 3832 | "咳痰": "1", 3833 | "流涕": "1" 3834 | }, 3835 | "label": "上呼吸道感染" 3836 | }, 3837 | { 3838 | "pid": "train-304", 3839 | "exp_sxs": { 3840 | "流涕": "1", 3841 | "发烧": "1", 3842 | "打喷嚏": "1" 3843 | }, 3844 | "imp_sxs": { 3845 | "过敏": "1" 3846 | }, 3847 | "label": "过敏性鼻炎" 3848 | }, 3849 | { 3850 | "pid": "train-305", 3851 | "exp_sxs": { 3852 | "咳嗽": "1", 3853 | "鼻塞": "1", 3854 | "发烧": "1" 3855 | }, 3856 | "imp_sxs": {}, 3857 | "label": "上呼吸道感染" 3858 | }, 3859 | { 3860 | "pid": "train-306", 3861 | "exp_sxs": { 3862 | "咳嗽": "1" 3863 | }, 3864 | "imp_sxs": { 3865 | "发烧": "0" 3866 | }, 3867 | "label": "上呼吸道感染" 3868 | }, 3869 | { 3870 | "pid": "train-307", 3871 | "exp_sxs": { 3872 | "咳嗽": "1", 3873 | "发烧": "1", 3874 | "咳痰": "1" 3875 | }, 3876 | "imp_sxs": {}, 3877 | "label": "上呼吸道感染" 3878 | }, 3879 | { 3880 | "pid": "train-308", 3881 | "exp_sxs": { 3882 | "蛋花样便": "1", 3883 | "精神萎靡": "1", 3884 | "呕吐": "1", 3885 | "发烧": "1" 3886 | }, 3887 | "imp_sxs": {}, 3888 | "label": "小儿腹泻" 3889 | }, 3890 | { 3891 | "pid": "train-309", 3892 | "exp_sxs": { 3893 | "咳嗽": "1", 3894 | "鼻塞": "1", 3895 | "过敏": "1", 3896 | "流涕": "1" 3897 | }, 3898 | "imp_sxs": { 3899 | "皮疹": "1" 3900 | }, 3901 | "label": "过敏性鼻炎" 3902 | }, 3903 | { 3904 | "pid": "train-310", 3905 | "exp_sxs": { 3906 | "咳嗽": "1", 3907 | "流涕": "1" 3908 | }, 3909 | "imp_sxs": { 3910 | "鼻塞": "1", 3911 | "皮疹": "1" 3912 | }, 3913 | "label": "过敏性鼻炎" 3914 | }, 3915 | { 3916 | "pid": "train-311", 3917 | "exp_sxs": { 3918 | "疱疹": "1", 3919 | "发烧": "1", 3920 | "皮疹": "1" 3921 | }, 3922 | "imp_sxs": { 3923 | "咽部不适": "1", 3924 | "厌食": "1" 3925 | }, 3926 | "label": "小儿手足口病" 3927 | }, 3928 | { 3929 | "pid": "train-312", 3930 | "exp_sxs": { 3931 | "咳嗽": "1", 3932 | "呕吐": "1", 3933 | "吐泡泡": "1", 3934 | "打喷嚏": "1" 3935 | }, 3936 | "imp_sxs": { 3937 | "烦躁不安": "1" 3938 | }, 3939 | "label": "上呼吸道感染" 3940 | }, 3941 | { 3942 | "pid": "train-313", 3943 | "exp_sxs": { 3944 | "咳嗽": "1", 3945 | "呕吐": "1", 3946 | "腹痛": "1", 3947 | "发烧": "1" 3948 | }, 3949 | "imp_sxs": { 3950 | "稀便": "1" 3951 | }, 3952 | "label": "上呼吸道感染" 3953 | }, 3954 | { 3955 | "pid": "train-314", 3956 | "exp_sxs": { 3957 | "稀便": "1" 3958 | }, 3959 | "imp_sxs": { 3960 | "咳嗽": "1", 3961 | "流涕": "1" 3962 | }, 3963 | "label": "小儿腹泻" 3964 | }, 3965 | { 3966 | "pid": "train-315", 3967 | "exp_sxs": { 3968 | "发烧": "1" 3969 | }, 3970 | "imp_sxs": { 3971 | "精神萎靡": "1", 3972 | "咳嗽": "1", 3973 | "厌食": "1" 3974 | }, 3975 | "label": "肺炎" 3976 | }, 3977 | { 3978 | "pid": "train-316", 3979 | "exp_sxs": { 3980 | "咳嗽": "1", 3981 | "咳痰": "1" 3982 | }, 3983 | "imp_sxs": { 3984 | "精神萎靡": "0", 3985 | "发烧": "0" 3986 | }, 3987 | "label": "肺炎" 3988 | }, 3989 | { 3990 | "pid": "train-317", 3991 | "exp_sxs": { 3992 | "蛋花样便": "1", 3993 | "烦躁不安": "1", 3994 | "喘气": "1", 3995 | "咳嗽": "1" 3996 | }, 3997 | "imp_sxs": { 3998 | "吐泡泡": "1" 3999 | }, 4000 | "label": "肺炎" 4001 | }, 4002 | { 4003 | "pid": "train-318", 4004 | "exp_sxs": { 4005 | "烦躁不安": "1", 4006 | "稀便": "1" 4007 | }, 4008 | "imp_sxs": { 4009 | "反胃": "1" 4010 | }, 4011 | "label": "小儿腹泻" 4012 | }, 4013 | { 4014 | "pid": "train-319", 4015 | "exp_sxs": { 4016 | "疱疹": "1", 4017 | "发烧": "1", 4018 | "皮疹": "1" 4019 | }, 4020 | "imp_sxs": {}, 4021 | "label": "小儿手足口病" 4022 | }, 4023 | { 4024 | "pid": "train-320", 4025 | "exp_sxs": { 4026 | "流涕": "1", 4027 | "鼻塞": "1", 4028 | "打喷嚏": "1", 4029 | "抽搐": "1", 4030 | "揉鼻子": "1" 4031 | }, 4032 | "imp_sxs": { 4033 | "咳嗽": "1" 4034 | }, 4035 | "label": "过敏性鼻炎" 4036 | }, 4037 | { 4038 | "pid": "train-321", 4039 | "exp_sxs": { 4040 | "烦躁不安": "1", 4041 | "发烧": "1", 4042 | "皮疹": "1" 4043 | }, 4044 | "imp_sxs": { 4045 | "咳嗽": "1" 4046 | }, 4047 | "label": "小儿手足口病" 4048 | }, 4049 | { 4050 | "pid": "train-322", 4051 | "exp_sxs": { 4052 | "发烧": "1", 4053 | "皮疹": "1" 4054 | }, 4055 | "imp_sxs": {}, 4056 | "label": "小儿手足口病" 4057 | }, 4058 | { 4059 | "pid": "train-323", 4060 | "exp_sxs": { 4061 | "咳痰": "1", 4062 | "呼吸困难": "1" 4063 | }, 4064 | "imp_sxs": { 4065 | "咳嗽": "1", 4066 | "鼻塞": "1" 4067 | }, 4068 | "label": "过敏性鼻炎" 4069 | }, 4070 | { 4071 | "pid": "train-324", 4072 | "exp_sxs": { 4073 | "咳嗽": "1", 4074 | "咳痰": "1", 4075 | "流涕": "1" 4076 | }, 4077 | "imp_sxs": { 4078 | "过敏": "1" 4079 | }, 4080 | "label": "过敏性鼻炎" 4081 | }, 4082 | { 4083 | "pid": "train-325", 4084 | "exp_sxs": { 4085 | "发烧": "1", 4086 | "皮疹": "1" 4087 | }, 4088 | "imp_sxs": { 4089 | "疱疹": "1" 4090 | }, 4091 | "label": "小儿手足口病" 4092 | }, 4093 | { 4094 | "pid": "train-326", 4095 | "exp_sxs": { 4096 | "稀便": "1", 4097 | "精神萎靡": "1", 4098 | "呕吐": "1", 4099 | "皮疹": "1", 4100 | "绿便": "1" 4101 | }, 4102 | "imp_sxs": { 4103 | "发烧": "0" 4104 | }, 4105 | "label": "小儿腹泻" 4106 | }, 4107 | { 4108 | "pid": "train-327", 4109 | "exp_sxs": { 4110 | "咳嗽": "1", 4111 | "鼻塞": "1", 4112 | "烦躁不安": "1", 4113 | "流涕": "1" 4114 | }, 4115 | "imp_sxs": { 4116 | "精神萎靡": "0", 4117 | "呕吐": "1", 4118 | "咳痰": "1", 4119 | "呼吸困难": "1" 4120 | }, 4121 | "label": "肺炎" 4122 | }, 4123 | { 4124 | "pid": "train-328", 4125 | "exp_sxs": { 4126 | "咳嗽": "1", 4127 | "鼻塞": "1", 4128 | "打喷嚏": "1", 4129 | "流涕": "1" 4130 | }, 4131 | "imp_sxs": { 4132 | "抽搐": "1", 4133 | "揉鼻子": "1" 4134 | }, 4135 | "label": "过敏性鼻炎" 4136 | }, 4137 | { 4138 | "pid": "train-329", 4139 | "exp_sxs": { 4140 | "咳嗽": "1", 4141 | "流涕": "1" 4142 | }, 4143 | "imp_sxs": { 4144 | "吐泡泡": "0", 4145 | "咳痰": "0" 4146 | }, 4147 | "label": "上呼吸道感染" 4148 | }, 4149 | { 4150 | "pid": "train-330", 4151 | "exp_sxs": { 4152 | "皮疹": "1", 4153 | "发烧": "1", 4154 | "稀便": "1" 4155 | }, 4156 | "imp_sxs": { 4157 | "蛋花样便": "1" 4158 | }, 4159 | "label": "小儿腹泻" 4160 | }, 4161 | { 4162 | "pid": "train-331", 4163 | "exp_sxs": { 4164 | "咳嗽": "1", 4165 | "发烧": "1", 4166 | "咳痰": "1" 4167 | }, 4168 | "imp_sxs": { 4169 | "咽部不适": "1" 4170 | }, 4171 | "label": "上呼吸道感染" 4172 | }, 4173 | { 4174 | "pid": "train-332", 4175 | "exp_sxs": { 4176 | "流涕": "1", 4177 | "皮疹": "1", 4178 | "打喷嚏": "1" 4179 | }, 4180 | "imp_sxs": {}, 4181 | "label": "过敏性鼻炎" 4182 | }, 4183 | { 4184 | "pid": "train-333", 4185 | "exp_sxs": { 4186 | "肚子咕噜叫": "1", 4187 | "稀便": "1" 4188 | }, 4189 | "imp_sxs": { 4190 | "精神萎靡": "0", 4191 | "尿少": "0" 4192 | }, 4193 | "label": "小儿腹泻" 4194 | }, 4195 | { 4196 | "pid": "train-334", 4197 | "exp_sxs": { 4198 | "咽部不适": "1", 4199 | "咳嗽": "1" 4200 | }, 4201 | "imp_sxs": { 4202 | "发烧": "0", 4203 | "厌食": "1", 4204 | "流涕": "1" 4205 | }, 4206 | "label": "上呼吸道感染" 4207 | }, 4208 | { 4209 | "pid": "train-335", 4210 | "exp_sxs": { 4211 | "咳嗽": "1", 4212 | "流涕": "1", 4213 | "发烧": "1", 4214 | "呼吸困难": "1" 4215 | }, 4216 | "imp_sxs": { 4217 | "精神萎靡": "0", 4218 | "呕吐": "1", 4219 | "厌食": "1" 4220 | }, 4221 | "label": "肺炎" 4222 | }, 4223 | { 4224 | "pid": "train-336", 4225 | "exp_sxs": { 4226 | "呕吐": "1", 4227 | "绿便": "1" 4228 | }, 4229 | "imp_sxs": { 4230 | "稀便": "1" 4231 | }, 4232 | "label": "小儿腹泻" 4233 | }, 4234 | { 4235 | "pid": "train-337", 4236 | "exp_sxs": { 4237 | "发烧": "1", 4238 | "流口水": "1", 4239 | "皮疹": "1" 4240 | }, 4241 | "imp_sxs": { 4242 | "疱疹": "1", 4243 | "精神萎靡": "1", 4244 | "厌食": "1" 4245 | }, 4246 | "label": "小儿手足口病" 4247 | }, 4248 | { 4249 | "pid": "train-338", 4250 | "exp_sxs": { 4251 | "烦躁不安": "1", 4252 | "发烧": "1", 4253 | "皮疹": "1" 4254 | }, 4255 | "imp_sxs": { 4256 | "咽部不适": "0", 4257 | "厌食": "0" 4258 | }, 4259 | "label": "小儿手足口病" 4260 | }, 4261 | { 4262 | "pid": "train-339", 4263 | "exp_sxs": { 4264 | "蛋花样便": "1", 4265 | "流涕": "1", 4266 | "打喷嚏": "1", 4267 | "稀便": "1", 4268 | "绿便": "1" 4269 | }, 4270 | "imp_sxs": {}, 4271 | "label": "小儿腹泻" 4272 | }, 4273 | { 4274 | "pid": "train-340", 4275 | "exp_sxs": { 4276 | "精神萎靡": "1", 4277 | "腹痛": "1", 4278 | "呕吐": "1", 4279 | "稀便": "1" 4280 | }, 4281 | "imp_sxs": { 4282 | "抽搐": "1" 4283 | }, 4284 | "label": "小儿腹泻" 4285 | }, 4286 | { 4287 | "pid": "train-341", 4288 | "exp_sxs": { 4289 | "精神萎靡": "1", 4290 | "发烧": "1", 4291 | "稀便": "1" 4292 | }, 4293 | "imp_sxs": { 4294 | "咽部不适": "1" 4295 | }, 4296 | "label": "小儿腹泻" 4297 | }, 4298 | { 4299 | "pid": "train-342", 4300 | "exp_sxs": { 4301 | "咳嗽": "1", 4302 | "鼻塞": "1", 4303 | "烦躁不安": "1" 4304 | }, 4305 | "imp_sxs": { 4306 | "呼吸困难": "1", 4307 | "咳痰": "1", 4308 | "抽搐": "1", 4309 | "揉鼻子": "1" 4310 | }, 4311 | "label": "过敏性鼻炎" 4312 | }, 4313 | { 4314 | "pid": "train-343", 4315 | "exp_sxs": { 4316 | "咳嗽": "1", 4317 | "咳痰": "1", 4318 | "流涕": "1" 4319 | }, 4320 | "imp_sxs": { 4321 | "呕吐": "1" 4322 | }, 4323 | "label": "上呼吸道感染" 4324 | }, 4325 | { 4326 | "pid": "train-344", 4327 | "exp_sxs": { 4328 | "咳嗽": "1", 4329 | "呕吐": "1", 4330 | "打喷嚏": "1", 4331 | "流涕": "1" 4332 | }, 4333 | "imp_sxs": { 4334 | "鼻塞": "1", 4335 | "呼吸困难": "0" 4336 | }, 4337 | "label": "上呼吸道感染" 4338 | }, 4339 | { 4340 | "pid": "train-345", 4341 | "exp_sxs": { 4342 | "发烧": "1", 4343 | "皮疹": "1" 4344 | }, 4345 | "imp_sxs": { 4346 | "疱疹": "1", 4347 | "呕吐": "0" 4348 | }, 4349 | "label": "小儿手足口病" 4350 | }, 4351 | { 4352 | "pid": "train-346", 4353 | "exp_sxs": { 4354 | "咳嗽": "1", 4355 | "呕吐": "1", 4356 | "流涕": "1" 4357 | }, 4358 | "imp_sxs": { 4359 | "发烧": "1" 4360 | }, 4361 | "label": "上呼吸道感染" 4362 | }, 4363 | { 4364 | "pid": "train-347", 4365 | "exp_sxs": { 4366 | "喘气": "1", 4367 | "咳嗽": "1", 4368 | "鼻塞": "1", 4369 | "呼吸困难": "1" 4370 | }, 4371 | "imp_sxs": {}, 4372 | "label": "肺炎" 4373 | }, 4374 | { 4375 | "pid": "train-348", 4376 | "exp_sxs": { 4377 | "咳嗽": "1", 4378 | "打喷嚏": "1", 4379 | "发烧": "1" 4380 | }, 4381 | "imp_sxs": { 4382 | "呕吐": "1", 4383 | "吐泡泡": "1", 4384 | "咳痰": "1", 4385 | "揉鼻子": "1" 4386 | }, 4387 | "label": "肺炎" 4388 | }, 4389 | { 4390 | "pid": "train-349", 4391 | "exp_sxs": { 4392 | "腹痛": "1", 4393 | "呕吐": "1", 4394 | "皮疹": "1", 4395 | "稀便": "1" 4396 | }, 4397 | "imp_sxs": { 4398 | "精神萎靡": "1" 4399 | }, 4400 | "label": "小儿腹泻" 4401 | }, 4402 | { 4403 | "pid": "train-350", 4404 | "exp_sxs": { 4405 | "咳嗽": "1", 4406 | "流涕": "1", 4407 | "发烧": "1", 4408 | "呼吸困难": "1" 4409 | }, 4410 | "imp_sxs": { 4411 | "肺部阴影": "1" 4412 | }, 4413 | "label": "肺炎" 4414 | }, 4415 | { 4416 | "pid": "train-351", 4417 | "exp_sxs": { 4418 | "流涕": "1", 4419 | "稀便": "1", 4420 | "流鼻血": "1", 4421 | "打喷嚏": "1" 4422 | }, 4423 | "imp_sxs": {}, 4424 | "label": "小儿腹泻" 4425 | }, 4426 | { 4427 | "pid": "train-352", 4428 | "exp_sxs": { 4429 | "咳嗽": "1", 4430 | "发烧": "1" 4431 | }, 4432 | "imp_sxs": { 4433 | "打喷嚏": "1", 4434 | "厌食": "1", 4435 | "流涕": "1" 4436 | }, 4437 | "label": "上呼吸道感染" 4438 | }, 4439 | { 4440 | "pid": "train-353", 4441 | "exp_sxs": { 4442 | "疱疹": "1", 4443 | "烦躁不安": "1", 4444 | "厌食": "1" 4445 | }, 4446 | "imp_sxs": { 4447 | "发烧": "0" 4448 | }, 4449 | "label": "小儿手足口病" 4450 | }, 4451 | { 4452 | "pid": "train-354", 4453 | "exp_sxs": { 4454 | "精神萎靡": "1", 4455 | "咽部不适": "1", 4456 | "鼻塞": "1", 4457 | "发烧": "1", 4458 | "咳嗽": "1", 4459 | "打喷嚏": "1" 4460 | }, 4461 | "imp_sxs": { 4462 | "烦躁不安": "1", 4463 | "厌食": "1", 4464 | "绿便": "1" 4465 | }, 4466 | "label": "肺炎" 4467 | }, 4468 | { 4469 | "pid": "train-355", 4470 | "exp_sxs": { 4471 | "咳嗽": "1", 4472 | "烦躁不安": "1", 4473 | "流涕": "1" 4474 | }, 4475 | "imp_sxs": { 4476 | "咳痰": "1" 4477 | }, 4478 | "label": "上呼吸道感染" 4479 | }, 4480 | { 4481 | "pid": "train-356", 4482 | "exp_sxs": { 4483 | "咳嗽": "1", 4484 | "发烧": "1", 4485 | "咳痰": "1" 4486 | }, 4487 | "imp_sxs": { 4488 | "精神萎靡": "0", 4489 | "厌食": "0" 4490 | }, 4491 | "label": "上呼吸道感染" 4492 | }, 4493 | { 4494 | "pid": "train-357", 4495 | "exp_sxs": { 4496 | "蛋花样便": "1", 4497 | "大便酸臭": "1", 4498 | "打嗝": "1", 4499 | "呕吐": "1", 4500 | "稀便": "1", 4501 | "放屁": "1" 4502 | }, 4503 | "imp_sxs": { 4504 | "肚子咕噜叫": "1", 4505 | "皮疹": "1" 4506 | }, 4507 | "label": "小儿腹泻" 4508 | }, 4509 | { 4510 | "pid": "train-358", 4511 | "exp_sxs": { 4512 | "烦躁不安": "1", 4513 | "流涕": "1", 4514 | "鼻塞": "1", 4515 | "呼吸困难": "1" 4516 | }, 4517 | "imp_sxs": { 4518 | "厌食": "1" 4519 | }, 4520 | "label": "过敏性鼻炎" 4521 | }, 4522 | { 4523 | "pid": "train-359", 4524 | "exp_sxs": { 4525 | "咳嗽": "1", 4526 | "咳痰": "1", 4527 | "烦躁不安": "1", 4528 | "发烧": "1", 4529 | "流涕": "1" 4530 | }, 4531 | "imp_sxs": { 4532 | "精神萎靡": "0" 4533 | }, 4534 | "label": "肺炎" 4535 | }, 4536 | { 4537 | "pid": "train-360", 4538 | "exp_sxs": { 4539 | "咳嗽": "1", 4540 | "鼻塞": "1", 4541 | "打喷嚏": "1", 4542 | "呼吸困难": "1" 4543 | }, 4544 | "imp_sxs": { 4545 | "呕吐": "1" 4546 | }, 4547 | "label": "上呼吸道感染" 4548 | }, 4549 | { 4550 | "pid": "train-361", 4551 | "exp_sxs": { 4552 | "鼻塞": "1", 4553 | "发烧": "1", 4554 | "流涕": "1" 4555 | }, 4556 | "imp_sxs": { 4557 | "肺部湿啰音": "1" 4558 | }, 4559 | "label": "肺炎" 4560 | }, 4561 | { 4562 | "pid": "train-362", 4563 | "exp_sxs": { 4564 | "咳痰": "1", 4565 | "流涕": "1" 4566 | }, 4567 | "imp_sxs": { 4568 | "精神萎靡": "0", 4569 | "发烧": "0" 4570 | }, 4571 | "label": "上呼吸道感染" 4572 | }, 4573 | { 4574 | "pid": "train-363", 4575 | "exp_sxs": { 4576 | "肚子咕噜叫": "1", 4577 | "稀便": "1" 4578 | }, 4579 | "imp_sxs": {}, 4580 | "label": "小儿腹泻" 4581 | }, 4582 | { 4583 | "pid": "train-364", 4584 | "exp_sxs": { 4585 | "发烧": "1", 4586 | "流涕": "1", 4587 | "咳嗽": "1", 4588 | "稀便": "1", 4589 | "咳痰": "1", 4590 | "打喷嚏": "1" 4591 | }, 4592 | "imp_sxs": { 4593 | "肺部阴影": "1" 4594 | }, 4595 | "label": "肺炎" 4596 | }, 4597 | { 4598 | "pid": "train-365", 4599 | "exp_sxs": { 4600 | "鼻塞": "1", 4601 | "皮疹": "1", 4602 | "流涕": "1" 4603 | }, 4604 | "imp_sxs": { 4605 | "过敏": "1" 4606 | }, 4607 | "label": "过敏性鼻炎" 4608 | }, 4609 | { 4610 | "pid": "train-366", 4611 | "exp_sxs": { 4612 | "咳嗽": "1", 4613 | "流涕": "1" 4614 | }, 4615 | "imp_sxs": {}, 4616 | "label": "上呼吸道感染" 4617 | }, 4618 | { 4619 | "pid": "train-367", 4620 | "exp_sxs": { 4621 | "呕吐": "1", 4622 | "稀便": "1" 4623 | }, 4624 | "imp_sxs": { 4625 | "发烧": "0", 4626 | "厌食": "1" 4627 | }, 4628 | "label": "小儿腹泻" 4629 | }, 4630 | { 4631 | "pid": "train-368", 4632 | "exp_sxs": { 4633 | "咳嗽": "1", 4634 | "呕吐": "1", 4635 | "咳痰": "1" 4636 | }, 4637 | "imp_sxs": { 4638 | "发烧": "1", 4639 | "呼吸困难": "1" 4640 | }, 4641 | "label": "肺炎" 4642 | }, 4643 | { 4644 | "pid": "train-369", 4645 | "exp_sxs": { 4646 | "咳嗽": "1", 4647 | "皮疹": "1" 4648 | }, 4649 | "imp_sxs": { 4650 | "疱疹": "0", 4651 | "发烧": "1" 4652 | }, 4653 | "label": "小儿手足口病" 4654 | }, 4655 | { 4656 | "pid": "train-370", 4657 | "exp_sxs": { 4658 | "烦躁不安": "1", 4659 | "体重减轻": "1", 4660 | "稀便": "1" 4661 | }, 4662 | "imp_sxs": {}, 4663 | "label": "小儿腹泻" 4664 | }, 4665 | { 4666 | "pid": "train-371", 4667 | "exp_sxs": { 4668 | "稀便": "1", 4669 | "厌食": "1", 4670 | "皮疹": "1" 4671 | }, 4672 | "imp_sxs": { 4673 | "尿少": "1", 4674 | "体重减轻": "1" 4675 | }, 4676 | "label": "小儿腹泻" 4677 | }, 4678 | { 4679 | "pid": "train-372", 4680 | "exp_sxs": { 4681 | "疱疹": "1", 4682 | "皮疹": "1" 4683 | }, 4684 | "imp_sxs": {}, 4685 | "label": "小儿手足口病" 4686 | }, 4687 | { 4688 | "pid": "train-373", 4689 | "exp_sxs": { 4690 | "咳嗽": "1", 4691 | "打喷嚏": "1", 4692 | "流涕": "1" 4693 | }, 4694 | "imp_sxs": { 4695 | "呕吐": "1", 4696 | "过敏": "1" 4697 | }, 4698 | "label": "过敏性鼻炎" 4699 | }, 4700 | { 4701 | "pid": "train-374", 4702 | "exp_sxs": { 4703 | "稀便": "1" 4704 | }, 4705 | "imp_sxs": { 4706 | "呕吐": "1", 4707 | "腹胀": "1" 4708 | }, 4709 | "label": "小儿腹泻" 4710 | }, 4711 | { 4712 | "pid": "train-375", 4713 | "exp_sxs": { 4714 | "咳嗽": "1", 4715 | "呕吐": "1", 4716 | "咳痰": "1" 4717 | }, 4718 | "imp_sxs": { 4719 | "吐泡泡": "1", 4720 | "发烧": "0", 4721 | "呼吸困难": "1" 4722 | }, 4723 | "label": "肺炎" 4724 | }, 4725 | { 4726 | "pid": "train-376", 4727 | "exp_sxs": { 4728 | "咳嗽": "1", 4729 | "流涕": "1", 4730 | "稀便": "1", 4731 | "厌食": "1", 4732 | "烦躁不安": "1" 4733 | }, 4734 | "imp_sxs": { 4735 | "精神萎靡": "0", 4736 | "鼻塞": "0", 4737 | "发烧": "0" 4738 | }, 4739 | "label": "小儿腹泻" 4740 | }, 4741 | { 4742 | "pid": "train-377", 4743 | "exp_sxs": { 4744 | "咽部不适": "1", 4745 | "咳嗽": "1", 4746 | "发烧": "1", 4747 | "流涕": "1" 4748 | }, 4749 | "imp_sxs": { 4750 | "呕吐": "1" 4751 | }, 4752 | "label": "上呼吸道感染" 4753 | }, 4754 | { 4755 | "pid": "train-378", 4756 | "exp_sxs": { 4757 | "咳嗽": "1", 4758 | "烦躁不安": "1", 4759 | "咳痰": "1", 4760 | "流涕": "1" 4761 | }, 4762 | "imp_sxs": { 4763 | "肺部湿啰音": "1", 4764 | "呼吸困难": "1" 4765 | }, 4766 | "label": "肺炎" 4767 | }, 4768 | { 4769 | "pid": "train-379", 4770 | "exp_sxs": { 4771 | "打喷嚏": "1", 4772 | "流涕": "1" 4773 | }, 4774 | "imp_sxs": { 4775 | "过敏": "1" 4776 | }, 4777 | "label": "过敏性鼻炎" 4778 | }, 4779 | { 4780 | "pid": "train-380", 4781 | "exp_sxs": { 4782 | "咳嗽": "1", 4783 | "发烧": "1", 4784 | "咳痰": "1", 4785 | "流涕": "1" 4786 | }, 4787 | "imp_sxs": { 4788 | "呕吐": "1", 4789 | "厌食": "1" 4790 | }, 4791 | "label": "肺炎" 4792 | }, 4793 | { 4794 | "pid": "train-381", 4795 | "exp_sxs": { 4796 | "发烧": "1", 4797 | "稀便": "1" 4798 | }, 4799 | "imp_sxs": {}, 4800 | "label": "小儿腹泻" 4801 | }, 4802 | { 4803 | "pid": "train-382", 4804 | "exp_sxs": { 4805 | "咳嗽": "1", 4806 | "厌食": "1", 4807 | "咳痰": "1", 4808 | "流涕": "1" 4809 | }, 4810 | "imp_sxs": { 4811 | "发烧": "0" 4812 | }, 4813 | "label": "上呼吸道感染" 4814 | }, 4815 | { 4816 | "pid": "train-383", 4817 | "exp_sxs": { 4818 | "咳嗽": "1", 4819 | "过敏": "1", 4820 | "流涕": "1" 4821 | }, 4822 | "imp_sxs": { 4823 | "精神萎靡": "0", 4824 | "鼻塞": "0" 4825 | }, 4826 | "label": "过敏性鼻炎" 4827 | }, 4828 | { 4829 | "pid": "train-384", 4830 | "exp_sxs": { 4831 | "咳嗽": "1", 4832 | "鼻塞": "1", 4833 | "呼吸困难": "1" 4834 | }, 4835 | "imp_sxs": { 4836 | "过敏": "1" 4837 | }, 4838 | "label": "过敏性鼻炎" 4839 | }, 4840 | { 4841 | "pid": "train-385", 4842 | "exp_sxs": { 4843 | "咳嗽": "1", 4844 | "发烧": "1" 4845 | }, 4846 | "imp_sxs": { 4847 | "肺部阴影": "1" 4848 | }, 4849 | "label": "肺炎" 4850 | }, 4851 | { 4852 | "pid": "train-386", 4853 | "exp_sxs": { 4854 | "烦躁不安": "1", 4855 | "腹痛": "1", 4856 | "皮疹": "1", 4857 | "肚子咕噜叫": "1", 4858 | "稀便": "1", 4859 | "绿便": "1" 4860 | }, 4861 | "imp_sxs": { 4862 | "精神萎靡": "0" 4863 | }, 4864 | "label": "小儿腹泻" 4865 | }, 4866 | { 4867 | "pid": "train-387", 4868 | "exp_sxs": { 4869 | "咳嗽": "1", 4870 | "发烧": "1", 4871 | "流涕": "1" 4872 | }, 4873 | "imp_sxs": { 4874 | "尿少": "0", 4875 | "稀便": "0", 4876 | "咳痰": "1", 4877 | "呼吸困难": "1" 4878 | }, 4879 | "label": "肺炎" 4880 | }, 4881 | { 4882 | "pid": "train-388", 4883 | "exp_sxs": { 4884 | "腹痛": "1", 4885 | "呕吐": "1", 4886 | "发烧": "1" 4887 | }, 4888 | "imp_sxs": { 4889 | "精神萎靡": "0", 4890 | "咳嗽": "0", 4891 | "稀便": "0" 4892 | }, 4893 | "label": "小儿手足口病" 4894 | }, 4895 | { 4896 | "pid": "train-389", 4897 | "exp_sxs": { 4898 | "疱疹": "1", 4899 | "呕吐": "1", 4900 | "发烧": "1", 4901 | "皮疹": "1" 4902 | }, 4903 | "imp_sxs": { 4904 | "厌食": "1" 4905 | }, 4906 | "label": "小儿手足口病" 4907 | }, 4908 | { 4909 | "pid": "train-390", 4910 | "exp_sxs": { 4911 | "精神萎靡": "1", 4912 | "呕吐": "1", 4913 | "稀便": "1", 4914 | "发烧": "1", 4915 | "绿便": "1" 4916 | }, 4917 | "imp_sxs": {}, 4918 | "label": "小儿腹泻" 4919 | }, 4920 | { 4921 | "pid": "train-391", 4922 | "exp_sxs": { 4923 | "疱疹": "1", 4924 | "发烧": "1", 4925 | "皮疹": "1" 4926 | }, 4927 | "imp_sxs": { 4928 | "烦躁不安": "1", 4929 | "流口水": "1" 4930 | }, 4931 | "label": "小儿手足口病" 4932 | }, 4933 | { 4934 | "pid": "train-392", 4935 | "exp_sxs": { 4936 | "咳嗽": "1", 4937 | "呕吐": "1", 4938 | "发烧": "1", 4939 | "厌食": "1" 4940 | }, 4941 | "imp_sxs": { 4942 | "咽部不适": "1" 4943 | }, 4944 | "label": "小儿手足口病" 4945 | }, 4946 | { 4947 | "pid": "train-393", 4948 | "exp_sxs": { 4949 | "烦躁不安": "1", 4950 | "发烧": "1", 4951 | "皮疹": "1" 4952 | }, 4953 | "imp_sxs": { 4954 | "疱疹": "1" 4955 | }, 4956 | "label": "小儿手足口病" 4957 | }, 4958 | { 4959 | "pid": "train-394", 4960 | "exp_sxs": { 4961 | "发烧": "1", 4962 | "皮疹": "1" 4963 | }, 4964 | "imp_sxs": { 4965 | "疱疹": "0" 4966 | }, 4967 | "label": "小儿手足口病" 4968 | }, 4969 | { 4970 | "pid": "train-395", 4971 | "exp_sxs": { 4972 | "咳嗽": "1", 4973 | "鼻塞": "1", 4974 | "流涕": "1" 4975 | }, 4976 | "imp_sxs": { 4977 | "精神萎靡": "0", 4978 | "烦躁不安": "0", 4979 | "吐泡泡": "0", 4980 | "发烧": "0", 4981 | "肺部湿啰音": "1", 4982 | "咳痰": "1" 4983 | }, 4984 | "label": "肺炎" 4985 | }, 4986 | { 4987 | "pid": "train-396", 4988 | "exp_sxs": { 4989 | "咳嗽": "1", 4990 | "发烧": "1" 4991 | }, 4992 | "imp_sxs": { 4993 | "厌食": "1", 4994 | "咳痰": "1", 4995 | "肺部阴影": "1" 4996 | }, 4997 | "label": "肺炎" 4998 | }, 4999 | { 5000 | "pid": "train-397", 5001 | "exp_sxs": { 5002 | "咳嗽": "1", 5003 | "发烧": "1", 5004 | "流涕": "1" 5005 | }, 5006 | "imp_sxs": {}, 5007 | "label": "上呼吸道感染" 5008 | }, 5009 | { 5010 | "pid": "train-398", 5011 | "exp_sxs": { 5012 | "疱疹": "1", 5013 | "发烧": "1" 5014 | }, 5015 | "imp_sxs": { 5016 | "精神萎靡": "1", 5017 | "咽部不适": "1" 5018 | }, 5019 | "label": "小儿手足口病" 5020 | }, 5021 | { 5022 | "pid": "train-399", 5023 | "exp_sxs": { 5024 | "咳嗽": "1" 5025 | }, 5026 | "imp_sxs": { 5027 | "发烧": "0", 5028 | "皮疹": "1", 5029 | "咳痰": "0", 5030 | "呼吸困难": "1" 5031 | }, 5032 | "label": "过敏性鼻炎" 5033 | }, 5034 | { 5035 | "pid": "train-400", 5036 | "exp_sxs": { 5037 | "精神萎靡": "1", 5038 | "烦躁不安": "1", 5039 | "流涕": "1", 5040 | "头痛": "1", 5041 | "呕吐": "1", 5042 | "反胃": "1", 5043 | "稀便": "1" 5044 | }, 5045 | "imp_sxs": { 5046 | "厌食": "1" 5047 | }, 5048 | "label": "小儿腹泻" 5049 | }, 5050 | { 5051 | "pid": "train-401", 5052 | "exp_sxs": { 5053 | "鼻塞": "1", 5054 | "咳嗽": "1", 5055 | "呕吐": "1", 5056 | "吐泡泡": "1", 5057 | "打喷嚏": "1" 5058 | }, 5059 | "imp_sxs": { 5060 | "发烧": "0", 5061 | "呼吸困难": "1" 5062 | }, 5063 | "label": "上呼吸道感染" 5064 | }, 5065 | { 5066 | "pid": "train-402", 5067 | "exp_sxs": { 5068 | "咳嗽": "1", 5069 | "呕吐": "1", 5070 | "咳痰": "1" 5071 | }, 5072 | "imp_sxs": { 5073 | "过敏": "1" 5074 | }, 5075 | "label": "过敏性鼻炎" 5076 | }, 5077 | { 5078 | "pid": "train-403", 5079 | "exp_sxs": { 5080 | "咳嗽": "1", 5081 | "发烧": "1", 5082 | "流涕": "1" 5083 | }, 5084 | "imp_sxs": { 5085 | "烦躁不安": "1" 5086 | }, 5087 | "label": "上呼吸道感染" 5088 | }, 5089 | { 5090 | "pid": "train-404", 5091 | "exp_sxs": { 5092 | "呼吸困难": "1" 5093 | }, 5094 | "imp_sxs": { 5095 | "咳嗽": "1", 5096 | "鼻塞": "0", 5097 | "流涕": "0" 5098 | }, 5099 | "label": "过敏性鼻炎" 5100 | }, 5101 | { 5102 | "pid": "train-405", 5103 | "exp_sxs": { 5104 | "咳嗽": "1", 5105 | "流涕": "1", 5106 | "打喷嚏": "1", 5107 | "咳痰": "1", 5108 | "呼吸困难": "1" 5109 | }, 5110 | "imp_sxs": {}, 5111 | "label": "上呼吸道感染" 5112 | }, 5113 | { 5114 | "pid": "train-406", 5115 | "exp_sxs": { 5116 | "揉眼睛": "1", 5117 | "咳嗽": "1", 5118 | "发烧": "1", 5119 | "咳痰": "1", 5120 | "流涕": "1" 5121 | }, 5122 | "imp_sxs": { 5123 | "精神萎靡": "1" 5124 | }, 5125 | "label": "肺炎" 5126 | }, 5127 | { 5128 | "pid": "train-407", 5129 | "exp_sxs": { 5130 | "鼻塞": "1", 5131 | "皮疹": "1", 5132 | "打喷嚏": "1" 5133 | }, 5134 | "imp_sxs": { 5135 | "过敏": "1" 5136 | }, 5137 | "label": "过敏性鼻炎" 5138 | }, 5139 | { 5140 | "pid": "train-408", 5141 | "exp_sxs": { 5142 | "盗汗": "1", 5143 | "发烧": "1", 5144 | "流口水": "1" 5145 | }, 5146 | "imp_sxs": { 5147 | "疱疹": "1", 5148 | "皮疹": "1" 5149 | }, 5150 | "label": "小儿手足口病" 5151 | }, 5152 | { 5153 | "pid": "train-409", 5154 | "exp_sxs": { 5155 | "烦躁不安": "1", 5156 | "鼻塞": "1", 5157 | "发烧": "1", 5158 | "流涕": "1" 5159 | }, 5160 | "imp_sxs": { 5161 | "咳嗽": "1" 5162 | }, 5163 | "label": "上呼吸道感染" 5164 | }, 5165 | { 5166 | "pid": "train-410", 5167 | "exp_sxs": { 5168 | "咳嗽": "1", 5169 | "流涕": "1", 5170 | "吐泡泡": "1", 5171 | "打喷嚏": "1", 5172 | "烦躁不安": "1" 5173 | }, 5174 | "imp_sxs": {}, 5175 | "label": "肺炎" 5176 | }, 5177 | { 5178 | "pid": "train-411", 5179 | "exp_sxs": { 5180 | "咳嗽": "1", 5181 | "喘气": "1" 5182 | }, 5183 | "imp_sxs": { 5184 | "发烧": "0", 5185 | "流涕": "1" 5186 | }, 5187 | "label": "上呼吸道感染" 5188 | }, 5189 | { 5190 | "pid": "train-412", 5191 | "exp_sxs": { 5192 | "咳痰": "1", 5193 | "呼吸困难": "1" 5194 | }, 5195 | "imp_sxs": { 5196 | "咳嗽": "0", 5197 | "发烧": "0", 5198 | "流涕": "1" 5199 | }, 5200 | "label": "过敏性鼻炎" 5201 | }, 5202 | { 5203 | "pid": "train-413", 5204 | "exp_sxs": { 5205 | "流涕": "1", 5206 | "鼻塞": "1", 5207 | "发烧": "1", 5208 | "稀便": "1" 5209 | }, 5210 | "imp_sxs": { 5211 | "精神萎靡": "1", 5212 | "烦躁不安": "1" 5213 | }, 5214 | "label": "小儿腹泻" 5215 | }, 5216 | { 5217 | "pid": "train-414", 5218 | "exp_sxs": { 5219 | "咳嗽": "1" 5220 | }, 5221 | "imp_sxs": { 5222 | "烦躁不安": "0", 5223 | "呼吸困难": "0" 5224 | }, 5225 | "label": "上呼吸道感染" 5226 | }, 5227 | { 5228 | "pid": "train-415", 5229 | "exp_sxs": { 5230 | "咳嗽": "1" 5231 | }, 5232 | "imp_sxs": { 5233 | "鼻塞": "1", 5234 | "过敏": "1" 5235 | }, 5236 | "label": "过敏性鼻炎" 5237 | }, 5238 | { 5239 | "pid": "train-416", 5240 | "exp_sxs": { 5241 | "发烧": "1", 5242 | "皮疹": "1" 5243 | }, 5244 | "imp_sxs": { 5245 | "疱疹": "1", 5246 | "烦躁不安": "1" 5247 | }, 5248 | "label": "小儿手足口病" 5249 | }, 5250 | { 5251 | "pid": "train-417", 5252 | "exp_sxs": { 5253 | "呕吐": "1", 5254 | "肚子咕噜叫": "1", 5255 | "腹胀": "1", 5256 | "稀便": "1" 5257 | }, 5258 | "imp_sxs": { 5259 | "精神萎靡": "1", 5260 | "厌食": "1" 5261 | }, 5262 | "label": "小儿腹泻" 5263 | }, 5264 | { 5265 | "pid": "train-418", 5266 | "exp_sxs": { 5267 | "咳嗽": "1", 5268 | "流涕": "1", 5269 | "打喷嚏": "1", 5270 | "抽搐": "1", 5271 | "呼吸困难": "1" 5272 | }, 5273 | "imp_sxs": {}, 5274 | "label": "过敏性鼻炎" 5275 | }, 5276 | { 5277 | "pid": "train-419", 5278 | "exp_sxs": { 5279 | "烦躁不安": "1", 5280 | "鼻塞": "1", 5281 | "打喷嚏": "1", 5282 | "流涕": "1" 5283 | }, 5284 | "imp_sxs": { 5285 | "呼吸困难": "1" 5286 | }, 5287 | "label": "过敏性鼻炎" 5288 | }, 5289 | { 5290 | "pid": "train-420", 5291 | "exp_sxs": { 5292 | "咳嗽": "1", 5293 | "稀便": "1", 5294 | "流涕": "1" 5295 | }, 5296 | "imp_sxs": {}, 5297 | "label": "小儿腹泻" 5298 | }, 5299 | { 5300 | "pid": "train-421", 5301 | "exp_sxs": { 5302 | "发烧": "1", 5303 | "皮疹": "1" 5304 | }, 5305 | "imp_sxs": { 5306 | "稀便": "1", 5307 | "绿便": "1" 5308 | }, 5309 | "label": "小儿手足口病" 5310 | }, 5311 | { 5312 | "pid": "train-422", 5313 | "exp_sxs": { 5314 | "精神萎靡": "1", 5315 | "腹痛": "1", 5316 | "呕吐": "1" 5317 | }, 5318 | "imp_sxs": { 5319 | "发烧": "1" 5320 | }, 5321 | "label": "小儿腹泻" 5322 | }, 5323 | { 5324 | "pid": "train-423", 5325 | "exp_sxs": { 5326 | "疱疹": "1", 5327 | "发烧": "1", 5328 | "皮疹": "1" 5329 | }, 5330 | "imp_sxs": {}, 5331 | "label": "小儿手足口病" 5332 | } 5333 | ] --------------------------------------------------------------------------------