コード例 #1
0
    cipde0A = []
    for i in range(replications):
        initialPop = np.random.randn(8, 4)
        mpJadea = oaMempJadeadaptive.OptAlgoMemeticpJADEadaptive(
            initialPop, max_fe, min_err)
        cipde0A.append(pde0A.CiPde0A(mpJadea, gakernel, nb2, nc2))

    initialPop = np.random.randn(8, 4)
    mpJadea = oaMempJadeadaptive.OptAlgoMemeticpJADEadaptive(
        initialPop, max_fe, min_err)
    remove_outlier = pde0A.CiPde0A(mpJadea, gakernel, nb2, nc2)
    remove_outlier.solve()

    for i in range(replications):
        cipde0A[i].solve()
        pp.saveExpObject(cipde0A[i],
                         save_path + "cipde0a_rep_" + str(i) + ".json")
        print(save_path + "cipde0a_rep_" + str(i) + ".json" + " -> saved")

    ##########################
    #   testbed problem 0B   #
    ##########################
    cipde0B = []
    for i in range(replications):
        initialPop = np.random.randn(8, 4)
        mpJadea = oaMempJadeadaptive.OptAlgoMemeticpJADEadaptive(
            initialPop, max_fe, min_err)
        cipde0B.append(pde0B.CiPde0B(mpJadea, gakernel, nb2, nc2))

    for i in range(replications):
        cipde0B[i].solve()
        pp.saveExpObject(cipde0B[i],
コード例 #2
0
                                                          -0.1), np.zeros(10)))
    for i in range(40):
        nb1.append((nbx[i], nby[i]))

    ####################################
    #  testbed problem 0A for mpJADEa  #
    ####################################
    cipde0A = []
    for i in range(replications):
        initialPop = np.random.randn(60, 30)
        mpJADE = oapMJ.OptAlgoMemeticpJADE(initialPop, max_fe, min_err)
        cipde0A.append(pde0A.CiPde0A(mpJADE, gskernel, nb2, nc2))

    for i in range(replications):
        cipde0A[i].solve()
        pp.saveExpObject(cipde0A[i],
                         "../../cipde0a_mpjgsk_rep_" + str(i) + ".json")
        print("../../cipde0a_mpjgsk_rep_" + str(i) + ".json" + " -> saved")

    ####################################
    #  testbed problem 0B for mpJADEa  #
    ####################################
    cipde0B = []
    for i in range(replications):
        initialPop = np.random.randn(60, 30)
        mpJADE = oapMJ.OptAlgoMemeticpJADE(initialPop, max_fe, min_err)
        cipde0B.append(pde0B.CiPde0B(mpJADE, gskernel, nb2, nc2))

    for i in range(replications):
        cipde0B[i].solve()
        pp.saveExpObject(cipde0B[i],
                         "../../cipde0b_mpjgsk_rep_" + str(i) + ".json")
コード例 #3
0
    #   testbed problem 0A for mJADE   #
    ####################################
    cipde0A = []
    for i in range(replications):
        initialPop = np.random.randn(40, 20)
        mJADE = oaMJ.OptAlgoMemeticJADE(initialPop, max_fe, min_err)
        cipde0A.append(pde0A.CiPde0A(mJADE, gakernel, nb2, nc2))

    pool = Pool(processes=20)
    parallelResults = []
    for i in range(replications):
        parallelResults.append(pool.apply_async(solveObj, args=(cipde0A, i)))

    for i in range(replications):
        obj = parallelResults[i].get()
        pp.saveExpObject(obj, "../../cipde0a_mj_rep_" + str(i) + ".json")
        print("../../cipde0a_mj_rep_" + str(i) + ".json" + " -> saved")

    pool.close()
    pool.join()

    ####################################
    #   testbed problem 0B for mJADE   #
    ####################################
    cipde0B = []
    for i in range(replications):
        initialPop = np.random.randn(40, 20)
        mJADE = oaMJ.OptAlgoMemeticJADE(initialPop, max_fe, min_err)
        cipde0B.append(pde0B.CiPde0B(mJADE, gakernel, nb2, nc2))

    pool = Pool(processes=20)
コード例 #4
0
    #        cipde0A[i].solve()
    #        pp.saveExpObject(cipde0A[i], save_path + "cipde0a_mpjgsk_rep_" + str(i) + ".json")
    #        print(save_path + "cipde0a_mpjgsk_rep_" + str(i) + ".json" + " -> saved")

    ##########################
    #   testbed problem 0B   #
    ##########################
    cipde0B = []
    for i in range(replications):
        initialPop = np.random.randn(60, 30)
        mpJade = oapMJ.OptAlgoMemeticpJADE(initialPop, max_fe, min_err)
        cipde0B.append(pde0B.CiPde0B(mpJade, gskernel, nb2, nc2))

    for i in range(replications):
        cipde0B[i].solve()
        pp.saveExpObject(cipde0B[i],
                         save_path + "cipde0b_mpjgsk_rep_" + str(i) + ".json")
        print(save_path + "cipde0b_mpjgsk_rep_" + str(i) + ".json" +
              " -> saved")

#    ##########################
#    #   testbed problem 1    #
#    ##########################
#    cipde1 = []
#    for i in range(replications):
#        initialPop = np.random.randn(60,30)
#        mpJade = oapMJ.OptAlgoMemeticpJADE(initialPop, max_fe, min_err)
#        cipde1.append(pde1.CiPde1(mpJade, gskernel, nb1, nc1))
#
#    for i in range(replications):
#        cipde1[i].solve()
#        pp.saveExpObject(cipde1[i], save_path + "cipde1_mpjgsk_rep_" + str(i) + ".json")
コード例 #5
0
    ##########################
    cipde0A = []
    for i in range(replications):
        initialPop = np.random.randn(40, 20)
        mpJade = oaMempJade.OptAlgoMemeticpJADE(initialPop, max_fe, min_err)
        cipde0A.append(pde0A.CiPde0A(mpJade, gkernel, nb2, nc2))

    initialPop = np.random.randn(40, 20)
    mpJade = oaMempJade.OptAlgoMemeticpJADE(initialPop, max_fe, min_err)
    remove_outlier = pde0A.CiPde0A(mpJade, gkernel, nb2, nc2)
    remove_outlier.solve()

    for i in range(replications):
        cipde0A[i].solve()
        pp.saveExpObject(
            cipde0A[i], "D:/Nicolai/MA_Data/time_experiment_1/cipde0a_rep_" +
            str(i) + ".json")
        print("D:/Nicolai/MA_Data/time_experiment_1/cipde0a_rep_" + str(i) +
              ".json" + " -> saved")

    ##########################
    #   testbed problem 0B   #
    ##########################
    cipde0B = []
    for i in range(replications):
        initialPop = np.random.randn(40, 20)
        mpJade = oaMempJade.OptAlgoMemeticpJADE(initialPop, max_fe, min_err)
        cipde0B.append(pde0B.CiPde0B(mpJade, gkernel, nb2, nc2))

    for i in range(replications):
        cipde0B[i].solve()