38512d92a8682a62e73c5b9e86366888be374532,dragonn/interpret/ism.py,,in_silico_mutagenesis,#,15

Before Change


    empty_onehot=np.zeros(output_dim[3])
    /Ǚ. Iterate through all tasks, positions                                                                                                                                                                 
    for task_index in range(output_dim[0]):
        for sample_index in range(output_dim[1]):
            print("task:"+str(task_index)+" sample:"+str(sample_index))
            //fill in wild type logit values into an array of dim (task,sequence_length,num_bases)                                                                                                                    
            wt_logit_for_task_sample=wild_type_logits[task_index][sample_index]

After Change


                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
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 9

Non-data size: 2

Instances


Project Name: kundajelab/dragonn
Commit Name: 38512d92a8682a62e73c5b9e86366888be374532
Time: 2019-05-29
Author: annashcherbina@gmail.com
File Name: dragonn/interpret/ism.py
Class Name:
Method Name: in_silico_mutagenesis


Project Name: utiasSTARS/liegroups
Commit Name: 784586f02d063d39360a287422a6384f30f10d12
Time: 2017-01-30
Author: clement.leopold@gmail.com
File Name: liegroups/se2.py
Class Name: SE2
Method Name: wedge


Project Name: NVIDIA/waveglow
Commit Name: 60674be9b02b46b9c089d49ef055501a2ad1b0d7
Time: 2019-03-15
Author: rafaelvalle@nvidia.com
File Name: inference.py
Class Name:
Method Name: main


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: d5b0cd8e7960c247bb7c5b7c832358f8831780fb
Time: 2018-04-29
Author: max.lapan@gmail.com
File Name: ch15/03_train_trpo.py
Class Name:
Method Name:


Project Name: PIQuIL/QuCumber
Commit Name: f1afb5df71893ff2770c7cc7ca83d2ac68f977d7
Time: 2019-12-28
Author: emerali@users.noreply.github.com
File Name: tests/test_models_misc.py
Class Name:
Method Name: test_positive_wavefunction_psi


Project Name: arnomoonens/yarll
Commit Name: e902f7e4b0cf9626cb5e3e5b0851d1b5fc90318b
Time: 2019-04-28
Author: arno.moonens@gmail.com
File Name: yarll/agents/ppo/ppo.py
Class Name: PPOContinuous
Method Name: train


Project Name: ikostrikov/pytorch-a2c-ppo-acktr
Commit Name: 4586366c1018257dd448d62f1fc7534e3f5a4338
Time: 2017-11-23
Author: ikostrikov@gmail.com
File Name: enjoy.py
Class Name:
Method Name:


Project Name: ylongqi/openrec
Commit Name: b5ceb67a336c432339c7f7cce078016cb78816ad
Time: 2018-09-20
Author: ylongqi@gmail.com
File Name: openrec/model_trainer.py
Class Name: ModelTrainer
Method Name: _default_eval_iter_func


Project Name: vinhkhuc/PyTorch-Mini-Tutorials
Commit Name: 73260e319a82fbc14e8984962f903838ffdf13dc
Time: 2018-10-03
Author: knvinh@gmail.com
File Name: 1_linear_regression.py
Class Name:
Method Name: train