Personal blog written from scratch using Node.js, Bootstrap, and MySQL. https://jrtechs.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

170 lines
4.6 KiB

  1. Quick review sheet for Dr. Homan's RIT CSCI-331 final.
  2. # Learning from examples (Ch 18)
  3. - Supervised learning: where you already know the answers
  4. - Re-enforcement learning: Learning with rewards
  5. - Unsupervised: clustering
  6. ![](media/final/learningAgent.PNG)
  7. ## Inductive learning problems
  8. ![](media/final/inductiveLearning.PNG)
  9. ![](media/final/ock.PNG)
  10. Ockham's razor: Maximize a combination of consistency and simplicity.
  11. Often times overly complex models that perfectly fit the training data does not generalize well for new data.
  12. ## Decision trees
  13. Often the most natural way of representing a boolean problem, but, don't often generalize well.
  14. ![](media/final/decisionTree.PNG)
  15. ## Entropy
  16. Decision trees use entropy to pick which input to branch on first.
  17. A 50/50 split in data is usually less useful than a 80/20 split in data because the 50/50 split still has more "information" in it.
  18. We pick the input that minimizes entropy.
  19. $$
  20. entropy = \sum^n_{i = 1} -P_i log_2 P_i
  21. $$
  22. ## Neural networks
  23. Based on human brains.
  24. McCullon-Pitts
  25. ![](media/final/pitts.PNG)
  26. Examples of logic functions:
  27. ![](media/final/logicNeurons.PNG)
  28. ### Single Layer Perceptrons
  29. ![](media/final/singleLayer.PNG)
  30. ### Multi-layer Perceptrons
  31. ![](media/final/multiLayer.PNG)
  32. ## Backpropagation
  33. Way of incrementally adjusting the weights so that the model better fits the training data.
  34. ## SVMs: Support Vector Machine
  35. - very high dimensions
  36. - as long as data is sparse, the curse of dimensionality is not an issue
  37. - By default it assumes you can linearly separate the data if you can use a large amount of dimensions. Sometimes you use something called the kernel trick to distort the space to make the data linearly separable.
  38. ![](media/final/svm.PNG)
  39. ## CNNs: Convolutional neural Networks
  40. ![](media/final/ccn.PNG)
  41. ## LSTMs: Long short term memory
  42. - Heavily used in natural language processing(NLP).
  43. ![](media/final/lstm.PNG)
  44. # Probabilistic Learning (Ch. 20)
  45. ## Maximum A Posteriori approximation (MAP)
  46. You assume the model which is most likely and use that to make your prediction.
  47. This is approximately equivalent to the Bayseian formula.
  48. Using the weighted average of the predictions of all the potential models, you make your prediction.
  49. ``` python
  50. """
  51. Equation 20.1
  52. P(h_i|d) = gamma * p(d|h_i)p(h_i)
  53. gamma is 1/P(d) where P(d) is calculated by summing P(h_i|d)
  54. p(d|h_i) is simply the frequency of that bag in the wild times
  55. the sum of the observations times their respective distribution
  56. in the bag.
  57. """
  58. ```
  59. ## Maximum Likelihood approximation (MLE)
  60. This process has 3 steps: 1: write down expression for the likelihood of the data as a function of the parameters. 2: Write down the derivatives of the log likelihood with respect to each parameter. 3: Find the parameter values such that the derivatives are zero.
  61. ## EM
  62. Used in k-means clustering.
  63. # Reinforcement learning (Ch. 21)
  64. MDP (Markov decision process): Goal is to find an optimal policy.
  65. Often have to explore the space to learn the reward.
  66. ## Bellman equation
  67. ![](media/final/bellman.png)
  68. # Logic (Ch 7)
  69. - knowledge base = set of sentences in a formal language
  70. - inference engine: domain-independent algorithms
  71. - declarative approach to logic: tell the agent what it needs to know
  72. ![](media/final/propositional.png)
  73. - Logics are formal languages for representing information to make conclusions
  74. - syntax defines the sentences in the language
  75. - semantics define the meaning
  76. - A model are formally structured worlds with respect to which truth can be evaluated.
  77. ## Propositional Logic
  78. - Assumes world contains facts: models evaluate truth values for propositional symbols.
  79. ![](media/final/propLogic.png)
  80. ## Entailment
  81. - Entailment means that one thing follows from another.
  82. - KB |= alpha. Knowledge base KB entails sentence "alpha" iff "alpha" is true in all words where KB is true. Ex: x + y = 4 entails 4 = x + y
  83. - AKA: entailment is a relationship between syntax that is based on meaning
  84. ![](media/final/wumpus.png)
  85. ## Inference
  86. - Inference: Deriving sentences from other sentences
  87. - Soundess: derivations produce only entailed sentences
  88. -Completeness: derivations can produce all entailed sentences
  89. ## Forward chaining
  90. Forward chaining will find everything that is true in the logic. As a basic idea, this algorithm checks all rules that are satisfied in the knowledge base and add its conclusion to the knowledge base until the query is found.
  91. ## Resolution
  92. Resolution is sound and complete for propositional logic.
  93. ## First-order logic (Ch #8)
  94. First-order logic (FOL) like natural languages assumes the world contains objects, relations, functions. Has increased expressiveness power over propositional logic.