Need help with K clusturing

Discussion in 'Big Data and Analytics' started by _35665, Sep 13, 2018.

  1. _35665

    _35665 Member

    Joined:
    Jul 26, 2018
    Messages:
    11
    Likes Received:
    0
    Hi all,
    While creating a disance matrix with command dist(z) i get a error that says :"Error: cannot allocate vector of size 1094.0 Gb" can anyone please help me to resolve this issue
    ill post my code also

    #Load and read data
    library(readxl)
    Ecommerce <- read.csv("C:/Users/Sonick/Desktop/projects/Project/Projects for Submission/Ecommerce/Project 2_Dataset.csv")
    View(Ecommerce)
    str(Ecommerce)


    #Make Factors

    Ecommerce$CustomerID<-as.factor(Ecommerce$CustomerID)


    # To get overview of data

    summary(Ecommerce)

    #data celeansing
    cluster_data<-Ecommerce[,-c(1,2,3,5,7,8)]
    m<-apply(cluster_data, 2, mean)
    s<-apply(cluster_data,2,sd)
    z<-scale(cluster_data,m,s)


    #distance
    distance<-dist(z)
     
    #1
  2. Priyanka_Mehta

    Priyanka_Mehta Well-Known Member
    Simplilearn Support

    Joined:
    May 25, 2017
    Messages:
    807
    Likes Received:
    55
    Hi,

    Please find the solution for your error mentioned below:

    ##To know the current storage capacity
    > memory.limit()
    [1]8103
    ## To increase the storage capacity
    > memory.limit(size=56000)
    [1]56000
    ## I did this to increase my storage capacity to 7GB

    So, accordingly, you can increase the limit and go ahead. I am sure this will help you.
     
    #2
  3. _35665

    _35665 Member

    Joined:
    Jul 26, 2018
    Messages:
    11
    Likes Received:
    0
    It did work for me
    Thanks Priyanka
     
    #3

Share This Page