Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GA_Pygad #31

Closed
nstrn-z started this conversation in General
Feb 22, 2021 · 3 comments · 2 replies
Discussion options

Mr Gad,
I have a question about this error:
ValueError: Unable to coerce to Series, length must be 12: given 10000

When running a genetic algorithm with Pygad, and the Churn_Modelling dataset, I get the following error for this line of code:
output = np.sum(solution * function_inputs, axis = 1)

function_inputs = dataset.drop(['Exited'], axis = 1)
desired_output = dataset['Exited']

Help me please? What is the solution to the error?
Thank you for your attention

You must be logged in to vote

Replies: 3 comments 2 replies

Comment options

I think there is a mismatch between the length of these 2 variables:

  1. solution
  2. function_inputs

As I do not have the code, I may not be able to locate the error accurately. But for now, could you check the length of function_inputs and solution and make sure the lengths are equal?

You must be logged in to vote
0 replies
Comment options

What does PyGad stand for? And how is it pronounced?
...
On 2021年2月22日, 21:38 Ahmed Gad, ***@***.***> wrote: I think there is a mismatch between the length of these 2 variables: 1. solution 2. function_inputs As I do not have the code, I may not be able to locate the error accurately. But for now, could you check the length of function_inputs and solution and make sure the lengths are equal? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#31 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AQCYKBOVFLEI3CYZD2OSZBTTAKMTTANCNFSM4YAEJEPA> .
You must be logged in to vote
1 reply
Comment options

It is written as PyGAD not PyGad.

The name is described in the paper about PyGAD: Gad, Ahmed Fawzy. "PyGAD: An Intuitive Genetic Algorithm Python Library." arXiv preprint arXiv:2106.06158 (2021).

Here is the description of the name.
Capture

Note that it is not intentional to give it my last name. The first suggestion I had for the name is PyGA but I already found a library with that name at PyPI. I added the extra character D because it was supporting only decimal genetic algorithm. At that time, I figured out that this is my last name :)

For the pronunciation, check these videos:

Please let me know if I can help in any way.

Comment options

Thank you for your kind tips and for providing us with complete and useful information. I read all the articles and topics related to your genetic algorithm and neural networks and even used some of them in my dissertation.
...
On 2021年6月21日, 01:51 Ahmed Gad, ***@***.***> wrote: It is written as PyGAD not PyGad. The name is described in the paper about PyGAD: Gad, Ahmed Fawzy. "PyGAD: An Intuitive Genetic Algorithm Python Library." arXiv preprint arXiv:2106.06158 (2021). <https://arxiv.org/abs/2106.06158> Here is the description of the name. [image: Capture] <https://user-images.githubusercontent.com/16560492/122688517-a8d4c180-d1ea-11eb-851e-9413e021519b.PNG> Note that it is not intentional to give it my last name. The first suggestion I had for the name is *PyGA* but I already found a library with that name at PyPI. I added the extra character *D* because it was supporting only decimal genetic algorithm. At that time, I figured out that this is my last name :) For the pronunciation, check these videos: - 4:19 https://youtu.be/vXHzppq6hzU?t=259 - 1:18 https://youtu.be/QQKYrmF4QUY?t=78 Please let me know if I can help in any way. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#31 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AQCYKBOMKGEOMNGWQUGFCQTTTZLWJANCNFSM4YAEJEPA> .
You must be logged in to vote
1 reply
Comment options

Awesome! I hope things are clear in the documentation also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /