Data Science Project_Classification

Discussion in 'Masters Program - Customers only' started by _24447, Aug 8, 2018.

  1. _24447

    _24447 Member
    Alumni

    Joined:
    Feb 27, 2018
    Messages:
    9
    Likes Received:
    0
    Hi i have a doubt with the code given for Data Science Project_Classification as my code is different from that of given and laso in given code he did not do any logistic regression please check my code for given project.

    code:
    #germancredit
    gcrd=read_csv('C:\\Users\\sarma\\Desktop\\datasetsfords\\germancredit.csv')
    str(gcrd)
    #logisticregression
    ldata=glm(Default~.,gcrd,family='binomial')
    #unconsider employ,residence,property,age,housing,cards,job,liable,tele
    ldata=glm(Default~checkingstatus1+duration+history+purpose+amount+savings+installment+status+others+otherplans+foreign,gcrd,family='binomial')
    #we have got regression with impacted components only
    #by using this predict if he will default or not and what percentage
    defcase=predict(ldata,gcrd,type='response')
    defcase=defcase*100
    #1--default,0--not default
    finaldata=cbind(gcrd,defcase)
    write_csv(finaldata,path="C:\\Users\\sarma\\Desktop\\datasetsfords\\germancredit12.csv")
    #clustering
    gcrd=na.omit(gcrd)
    clu=kmeans(gcrd[c(3,6,9)],centers = 3)

    Note: if i am wrong please let me know so that i can rectify my mistake
     
    #1

Share This Page