Ejemplo n.º 1
0
    def __init__(self):
        SequentialDataSet.__init__(self, 1, 1)

        self.newSequence()
        self.addSample([-1], [-1])
        self.addSample([1], [1])
        self.addSample([1], [-1])

        self.newSequence()
        self.addSample([1], [1])
        self.addSample([1], [-1])

        self.newSequence()
        self.addSample([1], [1])
        self.addSample([1], [-1])
        self.addSample([1], [1])
        self.addSample([1], [-1])
        self.addSample([1], [1])
        self.addSample([1], [-1])
        self.addSample([1], [1])
        self.addSample([1], [-1])
        self.addSample([1], [1])
        self.addSample([1], [-1])

        self.newSequence()
        self.addSample([1], [1])
        self.addSample([1], [-1])
        self.addSample([-1], [-1])
        self.addSample([-1], [-1])
        self.addSample([-1], [-1])
        self.addSample([-1], [-1])
        self.addSample([-1], [-1])
        self.addSample([-1], [-1])
        self.addSample([-1], [-1])
        self.addSample([1], [1])
        self.addSample([-1], [1])
        self.addSample([-1], [1])
        self.addSample([-1], [1])
        self.addSample([-1], [1])
        self.addSample([-1], [1])

        self.newSequence()
        self.addSample([-1], [-1])
        self.addSample([-1], [-1])
        self.addSample([1], [1])
Ejemplo n.º 2
0
    def __init__(self):
        SequentialDataSet.__init__(self, 0, 1)

        self.newSequence()
        self.addSample([], [0])
        self.addSample([], [1])
        self.addSample([], [0])
        self.addSample([], [1])
        self.addSample([], [0])
        self.addSample([], [1])

        self.newSequence()
        self.addSample([], [0])
        self.addSample([], [1])
        self.addSample([], [0])
        self.addSample([], [1])
        self.addSample([], [0])
        self.addSample([], [1])