Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 4 Transformations: Her iterasyonda en fazla biri gerceklesebilir
- # 4: reflection(Yansima)
- # en kotu noktayi en kotu olmaktan cikar ama en iyi noktadan iyi olmasin
- # points[-1] en kotu nokta, points[0] en kotu nokta
- xr = centroid + self.alpha * (centroid - points[-1]) # Yansima nokta guncelleme kurali
- score_r = fn(*list(xr)) # fonksiyon ciktisini guncelle
- print "R Score", score_r
- if results[0] < score_r <results[-1]: # en kotu noktadan iyi, en iyi noktadan kotu olmasi gerek
- points[-1] = xr # oyleyse noktayi guncelle
- print "Reflection sonrasi noktalar", points
- continue # en fazla bir donusum gerceklesebilir
Add Comment
Please, Sign In to add comment