Scratchpad

############################
# fish_chips_and_ketchup.py
############################
"""
A very simple example of the learning of a linear neural network
"""
# This is coded explicitly for fish, chips and ketchup
# for teaching clarity rather than being generalized.

from numpy  import exp      # For setting the learning rate
from random import randint  # For generating random chippy orders
MAX_ITERATIONS = 2000 # Number of visits to the chippy before giving up.
START_PRINTS   = 10   # Number of iterations reported on at the start.
STOP_ERROR     = 0.03 # Error margin - good enough to stop
cost = {'fish': 0.20, 'chips': 0.10, 'ketchup': 0.05} # This is the menu

def print_status_line(iteration, price, error): # Reporting of results at each iteration
    print ("%4d  Fish £%.2f, Chips £%.2f, Ketchup £%.2f, error £%.2f"
           % (iteration, price['fish'], price['chips'], price['ketchup'], error))

for e in range(1,7):
   # Set the learning rate 'epsilon' to exponentially slower values at each iteration
   epsilon = exp(-e)
   print ("Case %d: learning rate = %.3f" % (e, epsilon))

   weight = {'fish': 0.30, 'chips': 0.05, 'ketchup': 0.02} # Initial guesses
   error = (abs(weight['fish']-cost['fish'])
          + abs(weight['chips']-cost['chips'])
          + abs(weight['ketchup']-cost['ketchup']))
   print_status_line(0, weight, error)

   for n in range(1, MAX_ITERATIONS+1):
      # Just randomly set what this particular menu order is...
      portions = {'fish': randint(1, 5), 'chips': randint(1, 5), 'ketchup': randint(1, 5)}
      target_price = (weight['fish']*portions['fish']
                    + weight['chips']*portions['chips']
                    + weight['ketchup']*portions['ketchup'])
      actual_price = (portions['fish']*cost['fish']
                    + portions['chips']*cost['chips']
                    + portions['ketchup']*cost['ketchup'])
      # Difference in output...
      residual_error = target_price - actual_price
      # Condition for halting loop...
      prev_error = error
      error = (abs(weight['fish']-cost['fish'])
             + abs(weight['chips']-cost['chips'])
             + abs(weight['ketchup']-cost['ketchup']))
      # Adjust the weights
      for i in ['fish', 'chips', 'ketchup']:
         delta_weight = epsilon * portions[i] * residual_error
         weight[i] -= delta_weight

      # Output display and automatic halting on divergence or convergence...
      if abs(error) > 4.0*abs(prev_error):
          print_status_line(n, weight, error)
          print ("      Halting because diverging")
          break
      if (error <= STOP_ERROR) :
          print_status_line(n, weight, error)
          print ("      Halting because converged")
          break
      if (n <= START_PRINTS):
          print_status_line(n, weight, error)
      if (n == MAX_ITERATIONS) :
          print_status_line(n, weight, error)
          print ("      Halting but not yet converged")

Blah

Case 1: learning rate = 0.368
   0  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   1  Fish £0.29, Chips £0.03, Ketchup £0.01, error £0.18
   2  Fish £0.32, Chips £0.06, Ketchup £0.05, error £0.19
   3  Fish £-0.71, Chips £-0.14, Ketchup £-0.78, error £0.16
   4  Fish £12.15, Chips £12.72, Ketchup £15.30, error £1.98
      Halting because diverging
Case 2: learning rate = 0.135
   0  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   1  Fish £0.32, Chips £0.08, Ketchup £0.04, error £0.18
   2  Fish £0.28, Chips £0.05, Ketchup £-0.04, error £0.15
   3  Fish £0.24, Chips £0.03, Ketchup £-0.06, error £0.23
   4  Fish £0.36, Chips £0.60, Ketchup £0.51, error £0.22
   5  Fish £-1.41, Chips £-2.35, Ketchup £-1.26, error £1.12
      Halting because diverging
Case 3: learning rate = 0.050
   0  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   1  Fish £0.22, Chips £0.00, Ketchup £0.00, error £0.18
   2  Fish £0.29, Chips £0.17, Ketchup £0.17, error £0.16
   3  Fish £0.12, Chips £-0.04, Ketchup £0.13, error £0.28
   4  Fish £0.33, Chips £0.13, Ketchup £0.17, error £0.29
   5  Fish £0.22, Chips £0.02, Ketchup £0.10, error £0.29
   6  Fish £0.22, Chips £0.02, Ketchup £0.10, error £0.15
   7  Fish £0.20, Chips £0.01, Ketchup £0.07, error £0.15
   8  Fish £0.21, Chips £0.07, Ketchup £0.12, error £0.12
   9  Fish £0.18, Chips £0.05, Ketchup £0.04, error £0.11
  10  Fish £0.19, Chips £0.06, Ketchup £0.06, error £0.08
  18  Fish £0.21, Chips £0.11, Ketchup £0.04, error £0.02
      Halting because converged
Case 4: learning rate = 0.018
   0  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   1  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   2  Fish £0.29, Chips £0.04, Ketchup £0.01, error £0.18
   3  Fish £0.30, Chips £0.07, Ketchup £0.04, error £0.18
   4  Fish £0.26, Chips £0.06, Ketchup £0.03, error £0.14
   5  Fish £0.25, Chips £0.06, Ketchup £0.03, error £0.11
   6  Fish £0.25, Chips £0.06, Ketchup £0.03, error £0.11
   7  Fish £0.26, Chips £0.07, Ketchup £0.04, error £0.11
   8  Fish £0.26, Chips £0.08, Ketchup £0.04, error £0.10
   9  Fish £0.26, Chips £0.08, Ketchup £0.04, error £0.09
  10  Fish £0.26, Chips £0.08, Ketchup £0.04, error £0.09
  44  Fish £0.22, Chips £0.09, Ketchup £0.05, error £0.03
      Halting because converged
Case 5: learning rate = 0.007
   0  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   1  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   2  Fish £0.30, Chips £0.06, Ketchup £0.02, error £0.18
   3  Fish £0.30, Chips £0.06, Ketchup £0.03, error £0.17
   4  Fish £0.30, Chips £0.06, Ketchup £0.02, error £0.17
   5  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.17
   6  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.17
   7  Fish £0.29, Chips £0.05, Ketchup £0.02, error £0.18
   8  Fish £0.29, Chips £0.05, Ketchup £0.02, error £0.18
   9  Fish £0.29, Chips £0.04, Ketchup £0.02, error £0.18
  10  Fish £0.29, Chips £0.04, Ketchup £0.01, error £0.18
 152  Fish £0.21, Chips £0.09, Ketchup £0.04, error £0.03
      Halting because converged
Case 6: learning rate = 0.002
   0  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   1  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   2  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   3  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   4  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   5  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   6  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   7  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   8  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
   9  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
  10  Fish £0.30, Chips £0.05, Ketchup £0.02, error £0.18
 389  Fish £0.21, Chips £0.09, Ketchup £0.04, error £0.03
      Halting because converged

Blah

(scratchpad page – ignore)

Blah

micr

Blah

replit

Blah

‘Zero Degrees’, Akram Khan & Sidi Larbi Cherkaoui, Sadler’s Wells theatre, 2005.

Mirroring and Mimicry

blah

Lorenz attractor

http://brainvis.wustl.edu/resources/Lewis_00JCN00a.pdf

http://vis.berkeley.edu/courses/cs294-10-fa07/wiki/index.php/Image:A1_bad.gif Felleman and Van Essen’s famous ‘circuit diagram’ of the visual areas in the brain of a Macaque monkey

http://vis.berkeley.edu/courses/cs294-10-fa07/wiki/index.php/Image:A1b.gif

from http://vis.berkeley.edu/courses/cs294-10-fa07/wiki/index.php/A1-ArielRokem Berkeley course notes

Scientific Creatures

http://hci.ucsd.edu/102a/readings/SSMSymp/Clark.pdf

http://laymanstermspsychology.blogspot.co.uk/2012/03/friston-and-clark.html

blah

blah

blah

blah

blah

Grey Anatomy: Cortical Columns

Ramon y Cajal

Uniqueness of 6 layers. video through 6 layers.

Pyramidal neurons; interneurons; myelination.

Cortical columns. Changizi scaling with size. http://changizi.com/area.pdf

Blue Brain; connectome.

Grey Anatomy: ?

(Purkinje?)

Previously: ‘Not Just a Bunch of Neurons’.

Chapter 3, ‘Pulse, Impulse’ of Susan Greenfield’s ‘The Human Brain: A Guided Tour’.

Neuron signal transmission is electro-chemical. Don’t neglect the chemical aspect.

1. Video of ion channels. Turn off the sound. http://www.highlighthealth.com/wp-content/uploads/2012/03/the-synapse.swf

2. Comparison with electronics – Carver Mead’s 1980’s attempts to build analog neural nets. Link to paper: 8-transistor model of an ion channel. http://www.stanford.edu/group/brainsinsilicon/pdf/07_NComp_Channels.pdf

3. Post-synaptic density; Synapse proteomics. http://scienceblogs.com/neurophilosophy/2008/06/synapse_proteomics_brain_evolution.php

3. Chemicals produced in lower parts of the brain. What goes wrong when too much/too little. What goes wrong when proteins don’t get built correctly. Drugs, anaesthesia, Parkinsons, Alzheimers.

Suggest chemistry has a significant part to play in any explanation of consciousness.

Description of neurons. Interneurons. Pyramidal neurons. Axons, synapses, myelination. Speed of signals along axon, along unmyelinated axons, across synaptic cleft. Size of cleft.

http://www.youtube.com/watch?v=HVGlfcP3ATI&feature=player_embedded

http://en.wikipedia.org/wiki/File:Gray717.png

http://en.wikipedia.org/wiki/File:Gray727.png

Van Wedeen, Harvard Med School, diffusion spectrum MRI image of white matter in an owl monkey brain:

cerebrum===telencephalon; Caudate, Putamen, Globus pallidus (pallidum);
1500cc=cm^3

Brain Facts and Figures http://faculty.washington.edu/chudler/facts.html ;
volume (human): frontal lobe = 41%; temporal lobe = 22%; parietal lobe = 19%; occipital lobe = 18%;
Total surface area of the cerebral cortex = 2,500 cm^2;
77% volume of brain is cerebral cortex;
Area of the corpus callosum (midsagittal section) = 6.2 cm^2;
Number of synapses for a “typical” neuron = 1,000 to 10,000;
Typical synaptic cleft gap = approx 30nm;
Diameter of microtubule = 25 nm;

http://en.wikipedia.org/wiki/Cerebral_cortex

cortical columns

approx 3 mm thick

The surface of the cerebral cortex is folded such that more than two-thirds of it is buried in the sulci.

Grey anatomy: navigating the brain…

Mapping the Cortex

map vs globe

Gray’s Anatomy lateral (side) view of cerebrum (from Wikipedia)

http://www.smithlab.stanford.edu array tomography tour of Layers 1 thru 6, white matter and striatum…

Array tomographic reconstruction of a volume of mouse somatosensory cortex, whisker area. A subset of pyramidal cells express a fluorescent protein marker (green), and some of the larger dendrites and axons are delineated by microtuble immunolabeling (blue). Synapses are marked by synapsin I immunofluo-rescence (red). Most cells are unstained and transparent. A four-minute journey from the pial (outer) surface of the cortex through all six layers and subcortical white matter to the adjoining striatum. For more information, visit smithlab.stanford.edu and follow “connectome” and “array tomography” links.

  1. Joshua Greene: Mill and Kant / Free Will and Free Won’t (Jonathan Haidt)
  2. McGilchrist on Will: Competing wills of left and right hemispheres.
  3. McGilchrist’s Metaphor: + science as metaphor; metaphor preceding language

…severing of the Corpus Callosum…


McGilchrist’s Metaphor

ch2/ch3

dualism – cartesian – mind and matter coexisting. Alternative dualism – superposition of realism and idealism – two ways of looking at the world. Sometimes it is more appropriate to look at the world in one way, sometimes the other. Just like wave-particle duality. Both are approximations.

Quantifying Freedom, Part 2

???

x-ropy

Brief taxonomy:

  • Entropy: measure of disorder – how evenly energy is distributed in a system. [Clausius]. Reformulation for biological use: Gibb’s Free Energy.
  • Negentropy/syntropy: the entropy an organism exports to keep its own entropy low [Schroedinger: criterion for life]
  • Ectropy: tendency of a dynamical system to do useful work and grow more organized. Opposite of entropy. [Quine]
  • (Extropy: transhumanist philosophy: an evolving framework of values and standards for continuously improving the human condition.)

Dennett on Robert Kane

In chapter 4 (‘A Hearing for Libertarianism’), Dennett (a compatiblist) demolishes the ideas of Robert Kane (a libertarian). Some free will isms to help here:

  • compatabilism: free will is compatible with determinism.
  • hard determinism: incompatabilist view that (but something that appears to be like free will exists to help up morally)
  • libertarian: incompatabilist view that we have free will therefore determinism is false.

Presence of a random number generator within ‘mind’ or as an input. Functionally irrelevant. Irrelevant whether a THRNG (true hardware random number generator) or a PRNG (pseudo-random number generator).

Agreeing to something against your will. Unthinking ‘reflex’ agreement, subsequent reflection and regret. Separation in time. Not like unwilling spectator – epiphenomenal observer screaming no even whilst the body says yes – concurrently.

Kane’s problem with responsibility. Truman’s ‘buck stops here’. Heroic – taking responsibility for things outside of your control.

Connections:

  • Determinism to ‘free will’.
  • ‘free will’ to responsibility.
  • responsibility to punishment.

create a thread from determinism to punishment.

Extended Mind

John O Regan, U. Hertfordshire – extended mind
Videos of ext mind – youtube?
CADOES: Expand talk notes into text

Managing Complexity:

  • Waterfalls and Whirlpools
  • Known unknowns
  • Knowing what to do when you don’t know what to do
  • Wiki

(In old Arab literature, they say there are four types of men :

    1. one who knows, and knows that he knows… this is a man of knowledge, get to know him.
    2. one who knows, but doesn’t know that he knows… this is a man who’s unaware, so bring it to his attention.
    3. one who doesn’t knows, but knows that he doesn’t know… this is an illiterate man, teach him!
    4. one who doesn’t knows, and doesn’t know that they don’t know… this is a dumb man, stay away from him.)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s