aarongarrett / inspyred

Python library for bio-inspired computational intelligence
MIT License
187 stars 58 forks source link

Typos in documentation and benchmarking function 'Kursawe' #13

Closed NikoZHAI closed 8 months ago

NikoZHAI commented 6 years ago

Description

Hi,

I just noticed a small typo:

In inspyred.benchmarks.Kursawe:

The objective function 2:  
f2 = sum([math.pow(abs(x), 0.8) + 5 * math.sin(x)**3 for x in c])

The power 3 should be on x instead of sin(x), in order to reproduce the same results presented in F. Kursawe 1991:  
f2 = sum([math.pow(abs(x), 0.8) + 5 * math.sin(x**3) for x in c])

Keep the good work!

Cheers

Hannnk commented 8 months ago
  • inspyred version: 1.01
  • Python version: 3.6
  • Operating System: Ubuntu 18.04

Description

Hi,

I just noticed a small typo:

In inspyred.benchmarks.Kursawe:

The objective function 2:  
f2 = sum([math.pow(abs(x), 0.8) + 5 * math.sin(x)**3 for x in c])

The power 3 should be on x instead of sin(x), in order to reproduce the same results presented in F. Kursawe 1991:  
f2 = sum([math.pow(abs(x), 0.8) + 5 * math.sin(x**3) for x in c])

Keep the good work!

Cheers

I also noticed it recently and it is still there... (2023.11.16)

sanjayankur31 commented 8 months ago

Hi @Hannnk , @NikoZHAI , could you please review #35 ?

Hannnk commented 8 months ago

Sure. It‘s a small typo and you can also directly corrected it without us just by rewriting the sinxi^3 as sin(xi^3) by the way. Nothing else needed to be modified. I’ve corrected it in my laptop and the version is 1.0.1. I would probably make it slower since I am a newbie of GitHub with insufficient knowledge to do it in GitHub.😅

--------------原始邮件-------------- 发件人:"Ankur Sinha @.>; 发送时间:2023年11月21日(星期二) 下午2:49 收件人:"aarongarrett/inspyred" @.>; 抄送:"张航 @.>;"Mention @.>; 主题:Re: [aarongarrett/inspyred] Typos in documentation and benchmarking function 'Kursawe' (#13)

Hi @Hannnk , @NikoZHAI , could you please review #35 ?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>