Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(8)  |  Derive(0)  |  Import(2)

src/b/i/biopython-1.63/Tests/test_NNGeneral.py   biopython(Download)
 
# local stuff
from Bio.NeuralNetwork.Training import TrainingExample, ExampleManager
from Bio.NeuralNetwork.StopTraining import ValidationIncreaseStop
 
    def test_adding_examples(self):
        """Make sure test examples are added properly.
        """
        manager = ExampleManager()
 
    def test_partioning_examples(self):
        """Test that we can change how to partition the test examples.
        """
        manager = ExampleManager(0, 0)
        manager.add_examples(self.examples)
        assert len(manager.test_examples) == self.num_examples, \
               "Did not partition correctly to test_examples."
 
        manager = ExampleManager(1.0, 0)
               "Did not partition correctly to train_examples."
 
        manager = ExampleManager(0, 1.0)
        manager.add_examples(self.examples)
        assert len(manager.validation_examples) == self.num_examples, \

src/b/i/biopython-HEAD/Tests/test_NNGeneral.py   biopython(Download)
 
# local stuff
from Bio.NeuralNetwork.Training import TrainingExample, ExampleManager
from Bio.NeuralNetwork.StopTraining import ValidationIncreaseStop
 
    def test_adding_examples(self):
        """Make sure test examples are added properly.
        """
        manager = ExampleManager()
 
    def test_partioning_examples(self):
        """Test that we can change how to partition the test examples.
        """
        manager = ExampleManager(0, 0)
        manager.add_examples(self.examples)
        assert len(manager.test_examples) == self.num_examples, \
               "Did not partition correctly to test_examples."
 
        manager = ExampleManager(1.0, 0)
               "Did not partition correctly to train_examples."
 
        manager = ExampleManager(0, 1.0)
        manager.add_examples(self.examples)
        assert len(manager.validation_examples) == self.num_examples, \