c36de6cdea1f31a6a975d436b065475251f8caaf,deepchem/metrics/tests/test_genomics.py,TestGenomicMetrics,test_in_silico_mutagenesis,#TestGenomicMetrics#,49

Before Change


  def test_in_silico_mutagenesis(self):
    Test in-silico mutagenesis returns correct shape.
    // Construct and train SequenceDNN model
    X = np.random.rand(10, 1, 4, 50)
    y = np.random.randint(0, 2, size=(10, 1))
    dataset = dc.data.NumpyDataset(X, y)
    model = dc.models.SequenceDNN(
        50, "binary_crossentropy", num_filters=[1, 1], kernel_size=[15, 15])

After Change


    sequences = dc.utils.save.seq_one_hot_encode(sequences, letters=LETTERS)
    labels = np.array([1, 0, 0])
    labels = np.reshape(labels, (3, 1))
    self.assertEqual(sequences.shape, (3, 4, 5, 1))

    //X = np.random.rand(10, 1, 4, 50)
    //y = np.random.randint(0, 2, size=(10, 1))
    //dataset = dc.data.NumpyDataset(X, y)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: deepchem/deepchem
Commit Name: c36de6cdea1f31a6a975d436b065475251f8caaf
Time: 2018-07-20
Author: rbharath@stanford.edu
File Name: deepchem/metrics/tests/test_genomics.py
Class Name: TestGenomicMetrics
Method Name: test_in_silico_mutagenesis


Project Name: deepchem/deepchem
Commit Name: 2ef0e4b77a137e13d5cdfa635aef3d80959a47bd
Time: 2020-07-02
Author: bharath@Bharaths-MBP.zyxel.com
File Name: deepchem/hyper/tests/test_gaussian_hyperparam_opt.py
Class Name: TestGaussianHyperparamOpt
Method Name: test_rf_example


Project Name: deepchem/deepchem
Commit Name: c36de6cdea1f31a6a975d436b065475251f8caaf
Time: 2018-07-20
Author: rbharath@stanford.edu
File Name: deepchem/metrics/tests/test_genomics.py
Class Name: TestGenomicMetrics
Method Name: test_in_silico_mutagenesis


Project Name: nipy/dipy
Commit Name: 1f38858ddf7ac524f5430bdc237aa7658d664a24
Time: 2015-05-12
Author: garyfallidis@gmail.com
File Name: dipy/viz/tests/test_fvtk_widgets.py
Class Name:
Method Name: test_button_and_slider_widgets