add some notes

This commit is contained in:
onyx-and-iris 2024-01-19 17:21:42 +00:00
parent 0f52cf0f75
commit 1da4a16ec8
5 changed files with 23 additions and 1 deletions

3
chapter10/README.md Normal file
View File

@ -0,0 +1,3 @@
# Approximation algorithm
- Easy to write, fast to run, useful for obtaining approximate solutions for NP-hard problems.

6
chapter11/README.md Normal file
View File

@ -0,0 +1,6 @@
# Dynamic Programming
A programming technique for decomposing a problem into smaller discrete subproblems.
- Useful when trying to optimize something given a constraint.
- Example, items in a knapsack of size W that gives the greates value.

9
chapter12/README.md Normal file
View File

@ -0,0 +1,9 @@
# K-Nearest Neighbours
Useful for classification, regression and feature extraction. By examining a data point against its K nearest neighbours we can:
- categorize into a group
- predict responses
- convert the item into a list of features
A good starting point for machine learning.

View File

@ -1,6 +1,5 @@
import logging
import random
import time
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)

5
chapter9/README.md Normal file
View File

@ -0,0 +1,5 @@
# Shortest path for weighted graph (cost associated edges)
- Dijkstra's algorithm works when all weights are non-negative
- If there are negative weights use Bellman-Ford.
- Priority queue + min heap is optimal when compared to a function that operates on a list.