code: def pretrained_run(self, d, x, ntrain=0.5, epochs=1):
          
          Ntrain = int(len(d)*ntrain)
          # train
          for epoch in range(epochs):
              self.run(d[:Ntrain], x[:Ntrain])
          # test
          y, e, w = self.run(d[Ntrain:], x[Ntrain:])
          return y, e, w
docs: This function sacrifices part of the data for few epochs of learning.
          
          **Args:**
  
          * `d` : desired value (1 dimensional array)
  
          * `x` : input matrix (2-dimensional array). Rows are samples,
            columns are input arrays.
         
          **Kwargs:**
  
          * `ntrain` : train to test ratio (float), default value is 0.5
            (that means 50% of data is used for training)
            
          * `epochs` : number of training epochs (int), default value is 1.
            This number describes how many times the training will be repeated
            on dedicated part of data.
  
          **Returns:**
          
          * `y` : output value (1 dimensional array).
            The size corresponds with the desired value.
  
          * `e` : filter error for every sample (1 dimensional array).
            The size corresponds with the desired value.
  
          * `w` : vector of final weights (1 dimensional array).