0
$\begingroup$

I am just beginning to get into data science and have never posted here before, apologies if this question is worded incorrectly! I am curious if there is an unsupervised machine learning algorithm that can take data with more than 2 dimensions and cluster the data similar to how k-means clustering works with 2 dimensions. Ultimately, I would like to take financial data (e.g. P/E, operating margin, earnings growth) and divide different stocks into groups (e.g. growth stocks vs. value stocks).

I have tried googling to see if k-means clustering would work with a dataset that has more than just X and Y values but couldn't find anything super helpful. Also, I thought about using k-nearest neighbor but I don't have a large amount of "training" data so I think an unsupervised algorithm would work the best. Any and all help is greatly appreciated!

Ross Leavitt

$\endgroup$
0
$\begingroup$

k-means works with more than two dimensions (e.g., the sklearn implementation of k-means does not make any assumptions on the dimensionality of the data). Assuming that k-means is the "appropriate" way to deal with your data, you may consider normalizing your columns to have unit variance first.

| improve this answer | |
$\endgroup$
0
$\begingroup$

For time series data such as financial data, you might want to look into Deep Temporal Clustering

A sample implementation can be found here: https://github.com/FlorentF9/DeepTemporalClustering

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.