Practicing Machine Learning Interview Questions in Python
Lisa Stuart
Data Scientist
Function/method | returns |
---|---|
sklearn.cluster.KMeans |
K-Means clustering algorithm |
sklearn.metrics.silhouette_score |
score between -1 and 1 as measure of cluster stability |
kmeans.inertia_ |
SS distances of observations to closest cluster center |
range(start, stop) |
list of values beginning with start, up to but not including stop |
list.append(kmeans.inertia_) |
appends inertia value to list |
Practicing Machine Learning Interview Questions in Python