@@ -320,6 +320,65 @@ Release Date: 6 August 2020
320320
321321.. _header-n124 :
322322
323+ PyGAD 2.7.0
324+ -----------
325+
326+ Changes in PyGAD 2.7.0 (11 September 2020):
327+
328+ 1. The ``learning_rate `` parameter in the ``pygad.nn.train() `` function
329+ defaults to **0.01 **.
330+
331+ 2. Added support of building neural networks for regression using the
332+ new parameter named ``problem_type ``. It is added as a parameter to
333+ both ``pygad.nn.train() `` and ``pygad.nn.predict() `` functions. The
334+ value of this parameter can be either **classification ** or
335+ **regression ** to define the problem type. It defaults to
336+ **classification **.
337+
338+ 3. The activation function for a layer can be set to the string
339+ ``"None" `` to refer that there is no activation function at this
340+ layer. As a result, the supported values for the activation function
341+ are ``"sigmoid" ``, ``"relu" ``, ``"softmax" ``, and ``"None" ``.
342+
343+ To build a regression network using the ``pygad.nn `` module, just do the
344+ following:
345+
346+ 1. Set the ``problem_type `` parameter in the ``pygad.nn.train() `` and
347+ ``pygad.nn.predict() `` functions to the string ``"regression" ``.
348+
349+ 2. Set the activation function for the output layer to the string
350+ ``"None" ``. This sets no limits on the range of the outputs as it
351+ will be from ``-infinity `` to ``+infinity ``. If you are sure that all
352+ outputs will be nonnegative values, then use the ReLU function.
353+
354+ Check the documentation of the ``pygad.nn `` module for an example that
355+ builds a neural network for regression. The regression example is also
356+ available at `this GitHub
357+ project <https://github.com/ahmedfgad/NumPyANN> `__:
358+ https://github.com/ahmedfgad/NumPyANN
359+
360+ To build and train a regression network using the ``pygad.gann `` module,
361+ do the following:
362+
363+ 1. Set the ``problem_type `` parameter in the ``pygad.nn.train() `` and
364+ ``pygad.nn.predict() `` functions to the string ``"regression" ``.
365+
366+ 2. Set the ``output_activation `` parameter in the constructor of the
367+ ``pygad.gann.GANN `` class to ``"None" ``.
368+
369+ Check the documentation of the ``pygad.gann `` module for an example that
370+ builds and trains a neural network for regression. The regression
371+ example is also available at `this GitHub
372+ project <https://github.com/ahmedfgad/NeuralGenetic> `__:
373+ https://github.com/ahmedfgad/NeuralGenetic
374+
375+ To build a classification network, either ignore the ``problem_type ``
376+ parameter or set it to ``"classification" `` (default value). In this
377+ case, the activation function of the last layer can be set to any type
378+ (e.g. softmax).
379+
380+ .. _header-n148 :
381+
323382PyGAD Projects at GitHub
324383========================
325384
@@ -328,7 +387,7 @@ https://pypi.org/project/pygad. PyGAD is built out of a number of
328387open-source GitHub projects. A brief note about these projects is given
329388in the next subsections.
330389
331- .. _header-n126 :
390+ .. _header-n150 :
332391
333392`GeneticAlgorithmPython <https://github.com/ahmedfgad/GeneticAlgorithmPython >`__
334393--------------------------------------------------------------------------------
@@ -339,7 +398,7 @@ GitHub Link: https://github.com/ahmedfgad/GeneticAlgorithmPython
339398is the first project which is an open-source Python 3 project for
340399implementing the genetic algorithm based on NumPy.
341400
342- .. _header-n129 :
401+ .. _header-n153 :
343402
344403`NumPyANN <https://github.com/ahmedfgad/NumPyANN >`__
345404----------------------------------------------------
@@ -353,7 +412,7 @@ neural network without using a training algorithm. Currently, it only
353412supports classification and later regression will be also supported.
354413Moreover, only one class is supported per sample.
355414
356- .. _header-n132 :
415+ .. _header-n156 :
357416
358417`NeuralGenetic <https://github.com/ahmedfgad/NeuralGenetic >`__
359418--------------------------------------------------------------
@@ -366,7 +425,7 @@ projects
366425`GeneticAlgorithmPython <https://github.com/ahmedfgad/GeneticAlgorithmPython >`__
367426and `NumPyANN <https://github.com/ahmedfgad/NumPyANN >`__.
368427
369- .. _header-n135 :
428+ .. _header-n159 :
370429
371430`NumPyCNN <https://github.com/ahmedfgad/NumPyCNN >`__
372431----------------------------------------------------
@@ -378,7 +437,7 @@ convolutional neural networks using NumPy. The purpose of this project
378437is to only implement the **forward pass ** of a convolutional neural
379438network without using a training algorithm.
380439
381- .. _header-n138 :
440+ .. _header-n162 :
382441
383442`CNNGenetic <https://github.com/ahmedfgad/CNNGenetic >`__
384443--------------------------------------------------------
@@ -390,7 +449,7 @@ convolutional neural networks using the genetic algorithm. It uses the
390449`GeneticAlgorithmPython <https://github.com/ahmedfgad/GeneticAlgorithmPython >`__
391450project for building the genetic algorithm.
392451
393- .. _header-n141 :
452+ .. _header-n165 :
394453
395454Submitting Issues
396455=================
@@ -407,7 +466,7 @@ is not working properly or to ask for questions.
407466If this is not a proper option for you, then check the **Contact Us **
408467section for more contact details.
409468
410- .. _header-n145 :
469+ .. _header-n169 :
411470
412471Ask for Feature
413472===============
@@ -424,7 +483,7 @@ to ahmed.f.gad@gmail.com.
424483
425484Also check the **Contact Us ** section for more contact details.
426485
427- .. _header-n149 :
486+ .. _header-n173 :
428487
429488Projects Built using PyGAD
430489==========================
@@ -443,15 +502,15 @@ Within your message, please send the following details:
443502
444503- Preferably, a link that directs the readers to your project
445504
446- .. _header-n160 :
505+ .. _header-n184 :
447506
448507For More Information
449508====================
450509
451510There are different resources that can be used to get started with the
452511genetic algorithm and building it in Python.
453512
454- .. _header-n162 :
513+ .. _header-n186 :
455514
456515Tutorial: Implementing Genetic Algorithm in Python
457516--------------------------------------------------
@@ -475,7 +534,7 @@ good resource to start with coding the genetic algorithm.
475534
476535|image0 |
477536
478- .. _header-n173 :
537+ .. _header-n197 :
479538
480539Tutorial: Introduction to Genetic Algorithm
481540-------------------------------------------
@@ -494,7 +553,7 @@ which is available at these links:
494553
495554|image1 |
496555
497- .. _header-n183 :
556+ .. _header-n207 :
498557
499558Tutorial: Build Neural Networks in Python
500559-----------------------------------------
@@ -514,7 +573,7 @@ available at these links:
514573
515574|image2 |
516575
517- .. _header-n193 :
576+ .. _header-n217 :
518577
519578Tutorial: Optimize Neural Networks with Genetic Algorithm
520579---------------------------------------------------------
@@ -534,7 +593,7 @@ available at these links:
534593
535594|image3 |
536595
537- .. _header-n203 :
596+ .. _header-n227 :
538597
539598Tutorial: Building CNN in Python
540599--------------------------------
@@ -560,7 +619,7 @@ good resource to start with coding CNNs.
560619
561620|image4 |
562621
563- .. _header-n216 :
622+ .. _header-n240 :
564623
565624Tutorial: Derivation of CNN from FCNN
566625-------------------------------------
@@ -579,7 +638,7 @@ which is available at these links:
579638
580639|image5 |
581640
582- .. _header-n226 :
641+ .. _header-n250 :
583642
584643Book: Practical Computer Vision Applications Using Deep Learning with CNNs
585644--------------------------------------------------------------------------
@@ -605,7 +664,7 @@ Find the book at these links:
605664.. figure :: https://user-images.githubusercontent.com/16560492/78830077-ae7c2800-79e7-11ea-980b-53b6bd879eeb.jpg
606665 :alt:
607666
608- .. _header-n241 :
667+ .. _header-n265 :
609668
610669Contact Us
611670==========
0 commit comments