项目作者: DanShai

项目描述 :
Genome Network Ala Neural Network
高级语言: Python
项目地址: git://github.com/DanShai/Genome.git
创建时间: 2019-02-28T22:26:09Z
项目社区:https://github.com/DanShai/Genome

开源协议:

下载


Who Needs Neuron when you have Genome

check here deployed as Web app

Also updated version here

Faster Genome Network ala Neural Network!
The Genome Network mimic the architecture of the Neural Network, contains Layers and Nodes. you can add activations and stuffs!
the Advantage is to have a real expressive formula for your network instead of weights!
Can be used for :

  • Classification.
  • Regression.
  • Kernel finder for better understanding the data
  • Feature extraction

The Genome parameters are:

  1. nrOpts = {"opx": 2, "depth": 2, "nvars": None,
  2. "pvc": .7, "pf": 1., "cross": .4, "mut": .6,"mrand": .5
  3. }

The Network parameters are:

  1. gOpts = {"mxepoch": 3000, "bsize": 64, "bupdate": 5, "fraction": .5,"history": 4,
  2. "mxtries": 10,"mode": this one take either "REG" or "CLA" }

you can fine tune them to your need.

check the GOerationsDef.py file for the list of functions can the Genome take! you can then select what slot / group of functionalities your Genome will use for solving the problem!
set the group index in the variable “opx” of the genome option : nrOpts = {“opx”: 2,..}

  • group 1 : basic operations add and multiply
  • group 2 : logarithmic functions
  • group 3 : periodic functions
  • group 4 : mix of 2 & 3 above
  • group 5: logical functions
  • group 6 : all the functions
  1. class GOperationsDef:
  2. ...
  3. self._FunctSlots = {
  4. 1: [self.mul_o, self.add_o],
  5. 2: [self.mul_o, self.sub_o, self.add_o, self.log_o, self.sqrt_o, self.exp_o],
  6. 3: [self.mul_o, self.sub_o, self.add_o, self.sqrt_o, self.cos_o, self.sin_o],
  7. 4: [self.inv_o, self.abs_o, self.div_o, self.mul_o, self.sub_o, self.add_o, self.log_o, self.sqrt_o, self.exp_o, self.cos_o, self.sin_o],
  8. 5: [self.max_o, self.min_o, self.if_o, self.lt_o, self.gt_o, self.not_o, self.xor_o, self.and_o, self.or_o],
  9. 6: [self.inv_o, self.div_o, self.mod_o, self.xor_o, self.and_o, self.or_o, self.mul_o, self.sub_o, self.add_o,
  10. self.log_o, self.sqrt_o, self.exp_o, self.cos_o, self.sin_o, self.max_o, self.min_o, self.abs_o, self.if_o, self.gt_o, self.lt_o, self.not_o]
  11. }

Regression

Screenshot

Classification for iris example

Screenshot