Archives:

std::unique_lock vs std::lock_guard No ratings yet.

The std::unique_lock class is a lot more flexible when dealing with mutex locks. It has the same interface as std::lock_guard but provides additional methods for explicitly locking and unlocking mutexes and deferring locking on construction As a general rule, std::lock_guard should be preferably used when the additional features of std::unique_lock are not needed use cases: • Read More »


k-Nearest Neighbors in plain English No ratings yet.

Here is how it works in plain English: we have training set ( known features ( normalized), and classification) : many data points: [ ( feature1,feature2,feature 3,…), ( f1,f2,f3 …), ….] and corresponding labels/classification: [category1, 2, …] for any new data point  t calculate the distance between this  t to each of the training set • Read More »