Skip to main content

All Questions

Filter by
Sorted by
Tagged with
2 votes
1 answer
504 views

Can the k-nearest neighbor algorithm tell you how many clusters there are among predictors?

I recently did a short course on machine learning in R and found the k-means and k-nearest neighbor techniques extremely interesting. Forgive my naivete if this is all wrong, but it seems like the ...
llewmills's user avatar
  • 2,187
0 votes
0 answers
254 views

Classification on aggregate data

I've been tasked with creating a model that can classify individual cases as either something to be flagged or not. However, the training data I have access to is only aggregate data, where each row ...
proofs_challenged's user avatar
0 votes
1 answer
125 views

KNN and K-means, very different but possible equivalency?

Why does the k-nearest neighbor algorithm and k-means clustering algorithm with $k=1$ act the same?
Mio Unio's user avatar
1 vote
2 answers
196 views

Is it possible to have same result for knn classifier and kmeans?

Could we achieve similar grouping or results for a set of data, if applied with either Knn and k-means
blackmamba591's user avatar
0 votes
0 answers
232 views

Which is the best clustering algorithm for clustering multidimensional data with low density difference?

I am working on a project currently and I wish to cluster multi-dimensional data. I tried K-Means clustering and DBSCAN clustering, both being completely different algorithms. The K-Means model ...
Ashish Rao's user avatar
1 vote
0 answers
162 views

python find the optimal # of cluster for K-Means algorithm

I have a data that contains 24 features and all features have some missing values. I want to use the impute-KNN algorithm from sklearn to fill the missing values. However, before I do that, I think I ...
skylar1218's user avatar
2 votes
1 answer
801 views

What is the difference in application between KNN and K-means

I know that KNN is a supervised learning method and K-means is an unsupervised clustering method. I also know their algorithms. What I am confused about is that what is the point having K-means given ...
Yuan's user avatar
  • 513
0 votes
1 answer
3k views

In k-means or kNN, we use euclidean distance to calculate the distance between nearest neighbours. Why not manhattan distance?

In k-means or kNN, we use euclidean distance to calculate the distance between nearest neighbours. Why not manhattan distance ?
VRawat's user avatar
  • 1
2 votes
1 answer
1k views

k-means/k-nearest neighbours on multi-dimensional scaled data

I used the Python manifold library for multi-dimensional scaling on my distance matrix. Can I use k-means or k-nearest neighbours on ...
Maths12's user avatar
  • 579
3 votes
0 answers
956 views

Difference between identifying outliers using LOF and K-means clustering

I am identifying outliers using K-means and LOF (Local Outlier Factor). Let's say if we are identifying possible outliers using both the techniques, I believe LOF will pick global outliers also as ...
Arpit Sisodia's user avatar
4 votes
0 answers
4k views

Distance metric for categorical and numerical data

I have asked a related question in mathematics section, but I think here is a better place to ask. for both KNN algorithm (classification) and k-means algorithm (clustering), there is a need for a ...
Adel's user avatar
  • 295
2 votes
2 answers
2k views

Why are k-means and k-NN considered simple algorithms in machine learning?

We all know the k-means clustering algorithm and the k-nearest neighbors algorithm: the former is an unsupervised clustering method, and the latter is a supervised learning technique in machine ...
DavideChicco.it's user avatar
-1 votes
1 answer
2k views

Clustering a list of similar categorical words and phrases in python

I am trying to cluster a list of words/phrases in the context of similarity (not semantic). I have a large dataset of categorical variables. In a perfect world, the categorical variables would have a ...
Drakhlur's user avatar
1 vote
1 answer
46 views

K mean clustering

I have coordinates data set (X.Y) with an additional attribute "Z". I want to cluster the data into 5 clusters based on X and Y but I want to add some constrains on how much the sum of "Z" can be at ...
Omar Elbagalati's user avatar
1 vote
0 answers
3k views

Cosine similarity and normalization

When I normalize a data set and compute the cosine similarity between the rows, the cosine similarity differs from the one without any normalization. Say there are 4 2D vectors: (1, 1), (2, 2), (1, 2)...
AbhinavChoudhury's user avatar
26 votes
1 answer
18k views

Does Dimensionality curse effect some models more than others?

The places I have been reading about dimensionality curse explain it in conjunction to kNN primarily, and linear models in general. I regularly see top rankers in Kaggle using thousands of features on ...
Dileep Kumar Patchigolla's user avatar
3 votes
2 answers
2k views

How to predict property value using lat/lon?

I have lat/lon and property values for households in a particular region. Format: Lat Lon value 32.2 -98.22 120000 .... Now I have new data of the ...
icm's user avatar
  • 131
0 votes
1 answer
56 views

Classifying a set of photos to places

I want to cluster photos and map them to places. As input I have Photos with locations (lat, long) Places - some as (imprecise) bounding boxes, some just as points, maybe others as bounding ...
John M's user avatar
  • 113
5 votes
2 answers
4k views

Does K-means incorporate the K-nearest neighbour algorithm?

I was watching this tutorial on K-means clustering and from what I understand K-means is: Randomly generate the centroids for k clusters Create a classification model dividing into k regions (Do we ...
A A's user avatar
  • 541
135 votes
5 answers
175k views

What are the main differences between K-means and K-nearest neighbours?

I know that k-means is unsupervised and is used for clustering etc and that k-NN is supervised. But I wanted to know concrete differences between the two?
nsc010's user avatar
  • 1,697