mirror of
https://github.com/jung-geun/PSO.git
synced 2025-12-20 04:50:45 +09:00
23-07-12
xor iris 수치 교정 파티클의 분포 조정 가능하게 수정 random 시드 추출
This commit is contained in:
11
xor.py
11
xor.py
@@ -1,5 +1,6 @@
|
||||
# %%
|
||||
import os
|
||||
import sys
|
||||
|
||||
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "2"
|
||||
|
||||
@@ -49,13 +50,15 @@ loss = [
|
||||
pso_xor = Optimizer(
|
||||
model,
|
||||
loss=loss[0],
|
||||
n_particles=75,
|
||||
n_particles=50,
|
||||
c0=0.35,
|
||||
c1=0.8,
|
||||
w_min=0.6,
|
||||
w_max=1.2,
|
||||
negative_swarm=0.25,
|
||||
mutation_swarm=0.25,
|
||||
negative_swarm=0.1,
|
||||
mutation_swarm=0.2,
|
||||
particle_min=-3,
|
||||
particle_max=3,
|
||||
)
|
||||
best_score = pso_xor.fit(
|
||||
x_test,
|
||||
@@ -69,4 +72,6 @@ best_score = pso_xor.fit(
|
||||
check_point=25,
|
||||
)
|
||||
|
||||
print("Done!")
|
||||
sys.exit(0)
|
||||
# %%
|
||||
|
||||
Reference in New Issue
Block a user