pso2keras pypi 패키지 생성
iris xor 검증 자료 수정
This commit is contained in:
jung-geun
2023-07-12 19:31:54 +09:00
parent 7d22ededc7
commit 5494df2bc3
25 changed files with 1718 additions and 60 deletions

View File

@@ -98,7 +98,7 @@ pso_xor = Optimizer(
mutation_swarm=0.2,
particle_min=-3,
particle_max=3,
)
)
best_score = pso_xor.fit(
x_test,
@@ -110,7 +110,8 @@ best_score = pso_xor.fit(
empirical_balance=False,
Dispersion=False,
check_point=25,
)
)
```
위의 파라미터 기준 10 세대 근처부터 정확도가 100%가 나오는 것을 확인하였습니다
@@ -125,15 +126,15 @@ pso_iris = Optimizer(
model,
loss=loss,
n_particles=100,
c0=0.4,
c1=0.8,
w_min=0.7,
w_max=1.0,
c0=0.35,
c1=0.7,
w_min=0.5,
w_max=0.9,
negative_swarm=0.1,
mutation_swarm=0.2,
particle_min=-3,
particle_max=3,
)
)
best_score = pso_iris.fit(
x_train,
@@ -145,11 +146,13 @@ best_score = pso_iris.fit(
empirical_balance=False,
Dispersion=False,
check_point=25
)
)
```
위의 파라미터 기준 2 세대에 94%의 정확도를, 7 세대에 96%, 106 세대에 99.16%의 정확도를 보였습니다
![iris](./history_plt/iris_0624_1.png)
위의 파라미터 기준 7 세대에 97%, 35 세대에 99.16%의 정확도를 보였습니다
![iris](./history_plt/iris_99.17.png)
위의 그래프를 보면 epochs 이 늘어나도 정확도와 loss 가 수렴하지 않는것을 보면 파라미터의 이동 속도가 너무 빠르다고 생각합니다
3. mnist 문제