Gestation Fun

If you want to play with the gestation data using the Scheme Stack Machine you can use this program. This is not required for the homework.

  • Here’s how to ‘install’ it on your Live CD.
  • Copy the program to a USB stick. To do this, right click the link and ‘Save Link As’ to a USB stick.
  • Boot the Live CD.
  • Insert the USB stick. A file manager will pop up.
  • Navigate to the baby02.scm file on your stick.
  • Drag it to the Desktop
  • Open a terminal window by double clicking on the Terminal icon on the desktop.
  • Type, without the quotes, cd Desktop
  • Type, without the quotes, drscheme baby02.scm
  • When Dr Scheme is running select Language/Choose Language
  • Select, under Legacy Languages, Pretty Big and click ‘OK’.
  • You are now ready to Run and play.

It make take awhile to run. You can reduce the population or generation count if desired. When looking at the resulting program you will see ‘push (value)’. These are from the ‘context’ and given as follows,

  • 0 -> constant 0.1
  • 1 -> constant 0.2
  • 2 -> constant 0.3
  • 3 -> constant 0.4
  • 4 -> constant 0.5
  • 5 -> constant 0.6
  • 6 -> constant 0.7
  • 7 -> constant 0.8
  • 8 -> constant 0.9
  • 9 -> mother’s weight
  • 10 -> previous births
  • 11 -> mother’s age
  • 12 -> mother’s height
  • 13 -> mother’s weight
  • 14 -> father’s age
  • 15 -> family income
  • 16 -> smoking history
  • 17 -> number of cigarettes per day

When I ran I got only the constant 0.2, mother’s age, and mother’s height influencing the gestation period. It’s a pretty weak correlation as you can see from this image. R-squared is about 0.004 .. Essentially zero.

X axis is the actual Gestation, Y axis is the predicted Gestation.

 


Notes:

  • I took the original baby data, removed outliers and performed manual “Variable Selection” for you. Remember this is always an important step before you apply your CI engine.
  • I have added a few more constants.
  • This is not a requirement for the homework.
  • >

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>