Wednesday, November 16, 2016

Learning Faster and Memory Structures


Make effective connections.

Prologue:

Learning Faster

The idea is this:  the more effectively you use your time to learn something, the less time you have to spend on reviewing it (i.e. "reviewing" what you thought you knew in the first place).  Here are four steps in the "Feynman Technique" (based on a post from Medium) that could help you more effectively learn an idea that is new to you:

Step 1:  Teach it [as if] to a child.
Step 2:  Review.
Step 3:  Organize and Simplify.
Step 4 (optional):  Transmit.

I personally would addTest it.  Apply it. 

And based on a post from LinkedIn:  
When you learn something, check that you can actually do a few things. 
C
an you...:  Understand it? 
Explain itRemember it so you can use it later? 
...Use it in real life? 

_________________________

Now here's all of the above info, re-digested and re-combined into pictures:

Step 1: Link "New" Idea to "Old" Idea
Step 1Take a new idea (usually an abstract idea, or at least an idea that's "new" to you) and link it to an "old" idea (something concrete and/or that you personally understand well already).  There's at least three ways to do this.  You could directly relate the new idea to something you learned earlier (if that idea was well understood in the first place).  Or you could substitute the new idea with a more concrete one by using an analogy or metaphor.  Or you could (try to) put the new idea into simpler words while still capturing the same meaning (just trying to do this can help test how well you understand something, as if you were trying to explain something to a very young child.)
Step 2: Make a Cohesive "Story" out of the Ideas
Step 2This builds on step 1Connect the new ideas together into one "story", like how different ideas in a textbook can build on each otherLike how different pieces of a puzzle can be put together to tell a bigger story.  Like how different parts of an assembly line contribute to the final product.  Like how different moves in a game help you to win.  Like parts of an organism or a chemical pathway or a movie or a song.  It should flow naturally as if it were one story.
Step 3: "Tell" your "Story" to Someone Else
Step 3:  Tell your "story" to someone else.  Actually try to explain the ideas to someone else.  Or pretend to explain it to someone (ever heard of "rubber ducking"?).  Either way, this can help make sure you know the ideas well enough by forcing yourself to organize your ideas so that someone else can understandPreferably find a beginner who doesn't already know the subject.  And see if they can explain it back to you---in their own words.
Step 4: Use it and Test it
Step 4:  Test it.  This is another way to check for gaps in your understanding.  Actually see if your explanations are helpful when the ideas are used in real-life.  Don't just feel satisfied that people like your explanation or that they can tell it back to you in their own words.  The ultimate test is to use what you know and understand, to do something with it.  And isn't that why you're learning it in the first place?

_________________________

Epilogue:

Memory Structures 

The structures in those pictures are quite similar to the structure of some mnemonic techniques (i.e. similar to the structures of different ways to help yourself remember things).

Visually, they remind me of machine learning and neural network connections, but also can serve as "schematics" for memory and understanding.

The table below shows my visualizations of five memory techniques I've seen before (link, sub, story, peg, loci)*, plus one "new" visual I've thought up for remembering branching information (I don't really know what to call it besides "branching memory structure").

Visuals Examples Example Uses
Link
A grocery list (milk, apples, and cash) can become a ridiculous but memorable mental image that can be described as "a cow made of apples eating grass made of money---so money doesn't grow on trees". For lists of visualizable items. Or for "attaching" reminders to objects you'll see in your home or surroundings.
Substitution
The state of Kentucky becomes "KFC food". Or "nihao" becomes "knee how" (homophones). Or conifer tree becomes your friend Khan or Connie is suddenly made of cones (head partial homophones). Or Nevada becomes a "new Vader". For remembering definitions or translations by turning abstract words into visualizable or concrete items.  The free website Memrise "automates" this with crowd-sourced memory aids for vocabulary.
Story
= Substitution + Link For a list of abstract words that are new to you.
Pegs
Make use of how numbers and letters have built-in order. "One" rhymes with "sun", two with shoe, three with tree. Or A is for Aladdin, B is for Batman, C is for Cookie monster. You then use the link method to attach items to the visuals already associated to each number/letter peg. Example: Aladdin drinking milk, Batman slicing apples, Cookie monster eating cookies shaped like money. For longer lists where the order might matter. You can still recall and test yourself on items out of order once you establish your own pegs. Also for main ideas of a script, book, presentation, etc.
Loci / Journey / Mind Palace
Similar to the pegs method, but instead uses spatial memory pegs that are real-life permanent items in a room you're familiar with, and those items numbered clockwise around the room, and extending to other rooms in your house. Example in my room: 1=window, 2=bed, 3=shelf. --> Milk splat on the window, pile of apples on the bed, cash exploding out from books on the shelf. For even longer listsFor the main ideas in a script, book, presentation, etc.  You recall or practice by mentally "walking" through the numbered path in your house.
(Branching memory structure)
Example: broadleaf trees can be divided into opposite-branching and alternate-branching leaves. This can be visualized as a brood Zerg having opposing claws and a tail that wags alternately back and forth. Further sub-divisions among opposite-branching trees are visualized by that opposing brood Zerg claw scratching Optimus Prime, who has a hand holding a SIMS character (simple leaf) and has a foot kicking a compound inmate (compound leaf). For branching information, like in tree identification.

 (If you can think of a better name for the last one, let me know!)

Final thoughts:
Without scrolling up, are you able draw down on paper one thing you've just learned? 
Choose just one idea and try putting it to use.

_________________________
* You can see more examples and details at:  

Lorayne, Harry, and Jerry Lucas. The memory book: The classic guide to improving your memory at work, at school, and at play. Ballantine Books, 2012.

And for a 7-minute video on Sherlock's Mind Palace: 
https://www.youtube.com/watch?v=3vlpQHJ09do

_________________________


LINKS TO OTHER STUFF: 

Favourites
Programming
Original Art
Games

Monday, September 26, 2016

How to Convert Temperature Quickly in Your Head - Animated



Exact: Easier: Error:
C = (F-32) × 5÷9 C = F÷2 + (F÷2)÷10 - 18* Within 1 degree + 1% of F.
F = C × 9÷5 + 32 F = C×2 - (C×2)÷10 + 32 0
* - 18 = - 20 + 2



Animated CALCULATOR:




Original post: 
hchiam.blogspot.ca/2015/12/how-to-convert-temperature-f-c-quickly.html


GitHub code: 
github.com/hchiam/embeddedWebApps 

_________________________

LINKS TO OTHER STUFF: 

Favourites
Programming
Original Art
Games

Sunday, September 18, 2016

The Code 7 Project - Problem 6 - Sierpinski Triangle

The Code 7 Project - Problem 6 - Sierpinski Triangle
For this practice problem, I created a Sierpiński Triangle generator - in HTML.  Try it out right here:



Your browser does not support the HTML5 canvas tag.
GitHub repo code:  
https://github.com/hchiam/code7/blob/master/problem6.html 

Fun fact:
Sierpiński is pronounced as /ɕɛrˈpʲiɲskʲi/ in IPA, and sounds like "share pin skii". 

Part 2:  Sierpiński Carpet:



Your browser does not support the HTML5 canvas tag.   
GitHub repo code:  
https://github.com/hchiam/code7/blob/master/problem6_square.html 

_________________________

LINKS TO OTHER STUFF: 

Favourites
Programming
Original Art
Games

Chinese Learning Projects:
 - Book
 - HSK 1
 - HSK 5
 - Homonyms Mnemonics

Friday, August 26, 2016

Machine Learning - Basic Simulator


You can run the simulation right here in your browser!
Click on the ▶ symbol to run the simulation of a red dot ("predator") learning to move towards a blue dot ("prey"):


You can look at the code again by clicking on the pencil icon.

Based on code from: 
http://hchiam.blogspot.ca/2016/08/machine-learning-very-basic-code.html

GitHub repo:
https://github.com/hchiam/machineLearning/blob/master/predatorSim1D.py

Tuesday, August 23, 2016

Machine Learning - Very Basic Code

Machine Learning!

Sounds complicated?  Well, it can be.  But I've put together some super simple code at this GitHub repo github.com/hchiam/machineLearning which has my .py Python files (plus one from iamtrask) that you can run on your own computer (I like to use Terminal commandline)... or you can run the code yourself right here on this page!

Instructions:
= Run Code
= Edit Code

The following four code examples are four different neural nets, ranging from differing approaches to giving "feedback" to the "neuron connections", to testing out a layered version.  Each example is commented (Python uses the "#" character for comments, which should turn green in these interfaces).


neuralNet1.py:  Version 1.  Example of a very simplified neural network, and using a sensitivity parameter.



neuralNet2.py:  Version 2.  Example of a very simplified neural network, with weighting based on "responsibilities" of different inputs.  (This one seems really fast but may be unstable or naive because it's basically using learning sensitivity = 1.)



neuralNet3.py:  Version 3.  Example of a very simplified neural network that combines version 1 and version 2, combining sensitivity parameter and "responsibilities" of different inputs.
 


neuralNet4_Layered.py:  Version 4.  Example of a neural network that kinda combines version 2 and version 3:  uses learning error sensitivity, but now also uses a hidden layer. It also has my own "transformed" (i.e. translated) version of the sigmoid function that goes from -1 to 1.


Again, note that I created these code examples to help myself wrap my head around the very basic basics of machine learning, specifically neural networks.  Hopefully they help you too, through experimenting and reading the comments.  You can Google the rest.


LINKS TO INTERESTING READS/FINDS for Machine Learning:
  • Neural network playground:  here.
  • Python neural network in 11 lines of code:  here.
  • Python genetic algorithm in 15 lines of code:  here.
  • Ruby code for "suggested posts" via machine learning:  here.
  • Python Recurrent Neural Network for generating Shakespeare and more:  here.
  • A longer read but great code examples running in-browserhere.
_________________________

LINKS TO OTHER STUFF: 

Favourites
Programming
Original Art
Games

Chinese Learning Projects:
 - Book
 - HSK 1
 - HSK 5
 - Homonyms Mnemonics

Sunday, August 7, 2016

The Code 7 Project - Problem 5 - Pascal Triangle

(Build Schema.  Run SQL.  Pascal triangle row values in tables below.)
The Code 7 Project - Problem 5 - Pascal Triangle

As usual, you can see my code and run it online without installing anything specialhttp://sqlfiddle.com/#!9/87f0d/3 

For problem 5 from this website, my basic goal was to use SQL to create and access values from a math construct called Pascal's triangleYou can choose a row number (i.e. which row in the triangle to look at), and then you receive the values in that row, output in the form of a table.  My code is programmed using the MySQL dialect of SQL, based on the available online compiler that I used.

If you go to that sqlfiddle link for the code, it should automatically run and print out a few tables (the "val" columns are the values that correspond to their respective rows in Pascal's triangle).  I used the online “sqlfiddle” website to create the MySQL table and client because it seemed easier to use than the corresponding TutorialsPoint website.

I found this YouTube video really helpful in figuring out how to get the fiddler website to work (change the “‘;” in the blue button to “//“):  youtube.com/watch?v=QtiCEAeSOYc   

More info on the "Code 7 Project":  hchiam.blogspot.ca/2016/06/code-7-project-github-blog.html

_________________________

A separate side-project:  "Cognate Language" in Python code.  

Description at the GitHub readme file: 
github.com/hchiam/cognateLanguage/blob/master/README.md


And most up-to-date versions of files: 
github.com/hchiam/cognateLanguage 


_________________________

LINKS TO OTHER STUFF: 

Favourites
Programming
Original Art
Games

Chinese Learning Projects:
 - Book
 - HSK 1
 - HSK 5
 - Homonyms Mnemonics