530367b89414bf6570a2e1a70bc9fa71035274bc,dragonn/interpret/ism.py,,in_silico_mutagenesis,#,11

Before Change


            for base_letter in range(output_dim[3]):
                cur_base=np.array(empty_onehot)
                cur_base[base_letter]=1
                Xtmp=np.array(np.expand_dims(X[sample_index],axis=0))
                Xtmp[0][0][base_pos]=cur_base
                //get the logit of Xtmp
                Xtmp_logit=np.squeeze(preact_function(Xtmp),axis=0)
                mutants_expanded[sample_index][0][base_pos][base_letter]=Xtmp_logit[task_index]
    //subtract wt_expanded from mutants_expanded
    ism_vals=mutants_expanded-wt_expanded
    //For each position subtract the mean ISM score for that position from each of the 4 values
    ism_vals_mean=np.expand_dims(np.mean(ism_vals,axis=3),axis=3)

After Change


        wt_logit_for_task_sample=wild_type_logits[sample_index]
        wt_expanded[sample_index]=np.tile(wt_logit_for_task_sample,(output_dim[2],output_dim[3]))
        //mutagenize each position
        temp_batch = []
        tempbatch_baseposandletter = []
        for base_pos in range(start_pos,end_pos):
            //for each position, iterate through the 4 bases
            for base_letter in range(output_dim[3]):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: kundajelab/dragonn
Commit Name: 530367b89414bf6570a2e1a70bc9fa71035274bc
Time: 2019-07-10
Author: annashcherbina@gmail.com
File Name: dragonn/interpret/ism.py
Class Name:
Method Name: in_silico_mutagenesis


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: b5e848af46b4a6fc21e718803dbf3d7c72afd72a
Time: 2018-04-27
Author: max.lapan@gmail.com
File Name: ch08/lib/validation.py
Class Name:
Method Name: validation_run


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: b5e848af46b4a6fc21e718803dbf3d7c72afd72a
Time: 2018-04-27
Author: max.lapan@gmail.com
File Name: ch08/run_model.py
Class Name:
Method Name: