5

Classification is a problem where your input data consists of elements with 2 parts: Some data features that reflect the traits of an entity A label that assigns the entity to a group or class. With that kind of data, you can train a model that receives the data features (first part) and generates the label (second part). This kind of training, where you ...


3

Is this approach a correct approach, or logical with respect to machine learning principles? It will affect the performance of the model in the sense that your algorithm learned to separate the clusters based upon distance according to all the features. I have read discussions about how to calculate feature importance on unsupervised problems like yours, so ...


2

I would use all the features and see how the separateness of my clusters behave according to some metric, for example, silhouette score Additionally, it is very important to scale your data prior to clustering since kmeans is a distance-based algorithm. heart_data = pd.read_csv("https://archive.ics.uci.edu/ml/machine-learning-databases/00519/...


2

Clustering would indeed give you something like group1, group2, etc., i.e. it would assign every instance to a group meant to represent similar instances together. With the model you could also assign any new instance to one of the groups in the model, i.e. find the group that this instance is the most similar to. In general clustering doesn't give you which ...


1

Interesting question. The answer is: It depends. The best way to find out how it would affect your model is with the shap package. You can use it to uncover the importance of features and reveal interaction effects in the model. There could be a very different effect depending on how „important“ the excluded features are. Let‘s assume a very simple decision ...


1

Naive approach: define a similarity or distance function, say for instance cosine similarity. Calculate the similarity score between any pair $(x_i\in A, y_j\in B)$ Define a precision level, say $\epsilon=0.000001$. The assumption is that it's extremely unlikely that two vectors would be this close by chance in $A$. For every $y_j\in B$, find the set $c(y_j)...


1

Suppose if you use kmeans clustering then you can 1.train and save the model using pickle 2.loa the model using pickle 3.pass your new sample as a vector to the predict function of the loaded model object model.predict([[0, 0], [12, 3]]) this will give you only one cluster label 4.if you want to get top n clusters that the sample might belong to then ...


1

Yes it can happen. In fact it is quite normal since there are different clusters in 2D and different in 3D, since more or less information is added to data (by having more dimensions). This is a by-product of the curse of dimensionality. Adding as more relevant information as possible would make clusters more close to underlying groups. So 3D would be better ...


1

I would start with the simple option: represent every person as a boolean vector in which every position represents the answer to a particular question (the length is the total number of questions). Then you can apply any standard clustering algorithm, such as K-means (hierarchical clustering would probably also work with data like this).


1

Clustering and recommendation are similar tasks, however in recommendation you usually want to recommend several items while clustering usually assigns each sample to only one cluster. Anyway for your problem a clustering or even a classifier might help. If labels are assigned on the basis of a similarity metric (and you have a good guess of what this metric ...


1

[Note: essentially my answer is the same as @ncasas, just an alternative phrasing] Classification belongs to supervised learning whereas clustering belongs to unsupervised learning: In supervised learning there is a training stage during which some instances (examples) are provided together with their answer (the target). During training the model "...


1

Your case is where K=number of points in dataset : K-means: Lets suppose, there are 10 data points and k=10, so you have 10 clusters. the new test point will be matched with the cluster nearest to it KNN: If K=1, then the new test point classified will be same as in K-means. So, if there is one data-point per cluster, then your given answer ie. knn is ...


1

That is not clustering since the rows are not being grouped together. It is a filtering problem where the threshold to keep a row is based on frequency in each column.


1

OpenRefine is the tool that you need. The clustering functionality is accessible without creating a text facet by using the "Cluster & Edit" function (under "Edit Cells") will take you directly to the clustering dialog. The clustering itself is actually pretty fast, but, until recently, there were scalability issues with displaying ...


1

Depending on the representation of your sentences, you have different similarity metrics available. Some might be more suited to the representation you are using than others. One of the most popular metrics is the cosine distance. However, you have other available in the literature, such as: Jaccard similarity Sørensen–Dice coefficient Tversky index You ...


Only top voted, non community-wiki answers of a minimum length are eligible