def running_agglo_2(xTr,
                    patClassIdTr,
                    xVal,
                    patClassIdVal,
                    teta=0.26,
                    sigma=0.5,
                    simil='short'):
    accelClassifier = AccelBatchGFMM(gamma=1,
                                     teta=teta,
                                     bthres=sigma,
                                     simil=simil,
                                     sing='max',
                                     isDraw=False,
                                     oper='min',
                                     isNorm=False)
    accelClassifier.fit(xTr, xTr, patClassIdTr)

    result = accelClassifier.predict(xVal, xVal, patClassIdVal)
    err = 1
    if result != None:
        err = result.summis / len(patClassIdVal)

    return err
                                             teta=teta,
                                             bthres=simil_thres,
                                             simil='short',
                                             sing='max',
                                             isDraw=False,
                                             oper='min',
                                             isNorm=False)
            accelClassifier.fit(Xtr, Xtr, patClassIdTr)

            training_time_short_si_save = np.append(
                training_time_short_si_save,
                accelClassifier.elapsed_training_time)
            numhyperbox_short_si_save = np.append(numhyperbox_short_si_save,
                                                  len(accelClassifier.classId))

            result = accelClassifier.predict(Xtest, Xtest, patClassIdTest)
            if result != None:
                numTestSample = Xtest.shape[0]
                err = result.summis / numTestSample
                testing_error_short_si_save = np.append(
                    testing_error_short_si_save, err)

        for simil_thres in np.arange(0.02, 1, 0.02):
            accelClassifier = AccelBatchGFMM(gamma=1,
                                             teta=teta,
                                             bthres=simil_thres,
                                             simil='long',
                                             sing='max',
                                             isDraw=False,
                                             oper='min',
                                             isNorm=False)
     
     training_time_online_gfmm_save = np.append(training_time_online_gfmm_save, olnClassifier.elapsed_training_time + (end_t - start_t))
     numhyperbox_online_gfmm_save = np.append(numhyperbox_online_gfmm_save, len(olnClassifier.classId))            
         
     result = olnClassifier.predict(testingData, testingData, testingLabel)
     if result != None:
         err = np.round(result.summis / numTestSample * 100, 3)
         testing_error_online_gfmm_save = np.append(testing_error_online_gfmm_save, err)
     
     # agglo-2
     accelClassifier = AccelBatchGFMM(gamma = 1, teta = tetaAGGLO2, bthres = 0, simil = 'long', sing = 'min', isDraw = False, oper = 'min', isNorm = False)
     accelClassifier.fit(trainingData, trainingData, trainingLabel)
     
     numhyperbox_before_prun_accel_agglo_save = np.append(numhyperbox_before_prun_accel_agglo_save, len(accelClassifier.classId))
      
     result = accelClassifier.predict(testingData, testingData, testingLabel)
 
     if result != None:
         err = np.round(result.summis / numTestSample * 100, 3)
         testing_error_before_prun_accel_agglo_save = np.append(testing_error_before_prun_accel_agglo_save, err)                
     
     start_t = time.perf_counter()
     accelClassifier.pruning_val(validationData, validationData, validationLabel)
     end_t = time.perf_counter()
     
     training_time_accel_agglo_save = np.append(training_time_accel_agglo_save, accelClassifier.elapsed_training_time + (end_t - start_t))
     numhyperbox_accel_agglo_save = np.append(numhyperbox_accel_agglo_save, len(accelClassifier.classId))
         
     result = accelClassifier.predict(testingData, testingData, testingLabel)
 
     if result != None: