Tutor profile: Ankur B.
Subject: Python Programming
Why are function decorators used in Python?
Function decorators wrap the function being decorated to extend its behavior, without actually modifying it.
Subject: Machine Learning
How can you determine the optimal number of clusters in the K-Means clustering algorithm?
One of the approaches to determine the optimal number of clusters in the K-Means clustering algorithm is the "Elbow method", in which the K-Means clustering is run for different values of K, and cost function (distortion) is computed. The cost decreases rapidly in the beginning range of K, but the rate of decrease reduces later, and cost remains almost constant. We would then chose that value of K where increasing K further doesn't give a significant reduction in cost.
Subject: C++ Programming
What would happen if std::unique_ptr is passed by value to a function?
The code won't compile as unique pointers can't be copied. To make it work, move semantics can, however, be used.
needs and Ankur will reply soon.