ModuleNotFoundError: No module named 'kmodes'

I have tried installing it using pip install kmodes and it says that "Requirement is satisfied" but am not being able to import the library even after that. The list of libraries doesn't have...

How to visualize cluster in R (Kmodes

this is my codes to cluster kmodes in R: library(klaR) setwd("D:/kmodes") data.to.cluster <- read.csv('kmodes.csv', header = TRUE, sep = ';') cluster.results <-...

Kmodes cluster size change quite on each run

I am using kmodes clustering in r. Each time I run the below code I get different clusters size even after setting up the seed set.seed(11) c1 = kmodes(data, 3, iter.max = 1000, weighted =...

I got an error when calling kmodes module in python

When calling the kmodes package like this: ```python I have also tried from kmodes.kmodes import KModes from kmodes.kprototypes import KPrototypes ``` c ModuleNotFoundError: No module named...

How to use Kmodes in R (Categorical data clustering)

I want to cluster my categorical data from a csv file. I want to use kmodes algorithm CSV File example(50 row from my...

Measuring dissimilarity within the cluster - Kmodes

I was doing clustering with categorical data. I came across Kmodes algo and found it to be perfect for my requirements. Now, I want to measure dissimilarity within a cluster for all the clusters....

Initialize categorical data to predefined centroids for kmodes

I want to cluster real-world categorical data on five predefined centroids using kmodes. My code looks like this: real_df = [['B' 'A' 'A' ... 'D'] ['D'...

Silhouette Distance for KModes Clustering

I have been trying to calculate the Silhouette coeffecient for the clusters I have created using KModes clustering (since all of my data fields are categorical). I am using matching dissimilarity...

R, error in kmodes() application to a text matrix

I'm trying to apply the kmodes clustering method (from klaR package) in R to a text matrix made of around 1000 strings and 6 columns. Unfortunately, I get an error that I cannot...

What do the numbers mean in Kmodes (python) result array?

I'm currently using Kmodes library acquired from https://github.com/nicodv/kmodes. My input dataframe has categorical attributes, but they are in string format... like below input data But when I...

KModes : initialize centroids with an array and categorical data

I am trying to reproduce the results of a KModes clustering model initially started at 'random'. For that I try to initialize the centroids with the array of previous centroids. It seems that the...

ValueError: Attempted relative import in non-package in pyspark/not able to find the kmodes module(pyspark)

ValueError: Attempted relative import in non-package in pyspark. Above error is coming when i am trying to use kmode in pyspark .So i parrelelize the kmode package by using...

Use Kmodes in Python with a big csv file

I would like some assist with a problem I have. I have a big csv file (6239292, 5) and want to perform an unsupervised machine learning technique (kmodes). My code is this: import numpy as...

How to resolve error in running KModes algorithm in R

I'm working on a segmentation problem and I have a dataframe with 49 variables and 500000 observations which could be continous, binary or categorical. I'm reading only those variables which do...

Error Package KlaR kmodes : Error: Column index must be at most 5 if positive, not 6

Applying the klaR kmodes algorith to the below dataset > summary(raw) CREDIT_LIMIT CP gender IE_CHILD_NB IE_TOT_DEP_NB TOTAL_INCOME IE_HOUSE_CHARGE maritial ...

kmodes VS one-hot encoding + kmeans for categorical data?

I'm exploring the possibility of clustering some categorial data with python. I have currently 8 features each with approximately 3-10 levels. As I understood both one-hot encoding with kmeans and...

Kmodes which.min(dist) : replacement has length zero error

This is the head of my data set: SUB_SEGMENTO GENERO ESTADO_CIVIL INSTRUCCIÓN 3 Masivo MASCULINO SOLTERO BACHILLER 5 Masivo MASCULINO SOLTERO ...

Means to save a Python kmodes clustering model to disk?

Background I am currently using the kmodes python package to perform unsupervised learning on data that includes categorical parameters. I need to be able to save these models, as I am planning to...

Python ImportError .util module not found

I have the following problem using the kmodes package which was recently uploaded: https://pypi.python.org/pypi/kmodes/ Running the usage example: import numpy as np from kmodes import...

How to show total number in same coordinate in R Programming

(update 11/09/2017 question) this is my codes to cluster kmodes in R: library(klaR) setwd("D:/kmodes") data.to.cluster <- read.csv('kmodes.csv', header = TRUE, sep =...

Python: K-modes explanation

I am using the kmodes python library. Can some one explain what the parameters mean? Link: https://github.com/nicodv/kmodes#huang97 km = kmodes.KModes(n_clusters=4, init='Huang',...

how to find k in k-means when there is a mix of categorical and numerical data?

I am using a variation of k-means called k-prototype clustering as implemented in the kmodes package, which works when there is a mixture of categorical and numerical...

pysparkDistributedKmodes lib error

I'm trying to run pyspark-distributed-kmodes example: import numpy as np data = np.random.choice(["a", "b", "c"], (50000, 10)) data2 =...

Error in kmodes() for categorical datasets with missing values (or alternate algorithms) with r

I have a small dataset with 11 columns and 50 rows (plus a header row). I'm trying to apply the kmodes clustering method (from klaR package) in R to this text matrix. Unfortunately, I get an...

Stability of K-Modes Clustering in R

I have to make clusters in categorical data. I am using following k-modes code to make cluster, and check optimum number of clusters using elbow method: set.seed(100000) cluster.results...

Kmodes function Error in x[[jj]][iseq] <- vjj : replacement has length zero

I got this error when using a big data set, I cleaned the data and used Data&lt;-na.omit(Data) to delete all rows with nulls, it worked and in RStudio I don't get any errors. When I run the script...

How to do user segmentation in machine learning when with all categorical features

I have a problem where all my feature columns are categorical. Now how can i find out user segmentation. Shall i do just smart binning and use kmodes algorithm ? Is there any other way and suggestions

`Error in 1:nrow(A) : argument of length 0` using function kmodes of Package ‘klaR’

I have a matrix A, from which I try to calculate a second matrix B, in this way: B&lt;-t(sapply(1:nrow(A), function(x) { rowSums((t(t(A)-A[x,])!=0)) })) As a result of this, I obtained the...

Invalid subscript type 'list' in k modes in R

I have a dataset with 8848 observations with 46 variables.While applying kmodes for the required columns it is giving error. I tried like below library(klaR) Data_Value &lt;-...

No data plot for multiple nominal attributes in for-loop with python

I am currently working on clustering categorical attributes that I want to visualize with relative frequencies with dexplot. The attributes come from a bank marketing dataset from Kaggle, from...