Git Product home page Git Product logo

genetic-algorithm-with-python's Introduction

Hello, I am Jiarui Feng !

Linkedin Badge Gmail Badge

I am from China and am a third-year Ph.D. candidate in the Computer Science and Engineering Department, Washington University in St.Louis.

👯 Research

  • Graph Neural Network
  • Machine learning
  • Deep learning
  • Data Mining
  • Healthcare and bioinformatics
  • Natural Language Processing

⚡ Coding

  • Python
  • Pytorch
  • Java
  • R
  • Shiny

Hello World!! 🤔

  • Crazy computer gamer: Overwatch, APEX, World of Warcraft, PUBG, CS:GO...
  • 📫 My personal website: Jiarui Feng.

Jiarui's github stats

visitors

genetic-algorithm-with-python's People

Contributors

jiaruifeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

genetic-algorithm-with-python's Issues

一些小改进给博客过来的

计算适应度

def fitness(population,aimFunction):
    value=[]
    for i in range(len(population)):
        value.append(aimFunction(decode(population[i])))
        #weed out negative value
        if value[i]<8:
            value[i]=0
        else:
            value[i]-=8 # 因为最大值是13,所以把适应度都减个8(5也行),这样优秀种群更突出一些,更容易被随机到
    return value

还有最后画图时:

plt.figure()
plt.plot(x,y)
# np.argmax
max_y=max(y)
max_x=x[y.index(max(y))]
print((max_x,max_y))
plt.scatter(max_x,max_y,color='r')

plt.figure()
plt.plot(t)
plt.axhline(max(y), linewidth=1, color='r')
plt.axhline(max(t), linewidth=1, color='g') # 红线和绿线重叠表明达到了最优解
plt.show()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.