Welcome to the Simplilearn Community

Want to join the rest of our members? Sign up right away!

Sign Up

DATA SCIENCE WITH R : Jan 27,28 Feb 3,4,10,11,17,18

Priyanka_Mehta

Well-Known Member
Simplilearn Support
Hello All,

Greetings from Simplilearn!!

Let us have a discussion about the course, explore the course here and try to resolve all our queries related to the same.

Happy Learning!!

Regards,
Priyanka
GTA - Simplilearn
 

Suraj Salunkhe

Member
Alumni
hey guys,
dummies package with dummy.data.frame(<dataset_name>) function was not working with my r-studio.
so i used package called dummy with dummy(<dataset_name>) function and it is working fine and giving results.
 

Priyanka_Mehta

Well-Known Member
Simplilearn Support
hey guys,
dummies package with dummy.data.frame(<dataset_name>) function was not working with my r-studio.
so i used package called dummy with dummy(<dataset_name>) function and it is working fine and giving results.
Great Suraj, I really appreciate your acknowledgment here for the error. I am sure this will help all.
 

Priyanka_Mehta

Well-Known Member
Simplilearn Support
Hi all,

Please find the data files shared by Anirban for 10th and 11th Feb session.
 

Attachments

  • datasetsfor10thand11thoffeb2018.zip
    11.7 KB · Views: 11

_21323

New Member
Alumni
Hi,

I ran the below query to insert a column new_disp before disp in new_mtcars table, after calling tibble library:

add_column(new_mtcars, new_disp = disp/3, .before = "hp")

But getting the below error:
> add_column(new_mtcars, new_disp = disp/3, .before = "hp")
Error in overscope_eval_next(overscope, expr) : object 'disp' not found
 

Suraj Salunkhe

Member
Alumni
hi,
Training session of 17 th feb 2018 has ended at 12.02 pm automatically and i m enable to join it again.....please help in this issue
 

Priyanka_Mehta

Well-Known Member
Simplilearn Support
Hi all,

We deeply apologize for the inconvenience caused to you due to the WebEx crash, we have reported this issue to our WebEx team and it will be rectified soon, however, in the interim we have arranged a fix.

We have created a temporary link for tomorrow's session and have registered you for the same for which you would have received an email from Get Certified Team. We suggest you to join tomorrow's session using the same link.
 

M Ashwin

Member
Alumni
Dear Anirban Sir, we would like to get an example of simple non-linear regression converted to linear regression.
 

Priyanka_Mehta

Well-Known Member
Simplilearn Support
Dear Anirban Sir, we would like to get an example of simple non-linear regression converted to linear regression.
Hi Ashwin,

Kindly allow some time for it, As soon as Anirban would prepare a good example for the same, it will be shared on this thread.
 

Priyanka_Mehta

Well-Known Member
Simplilearn Support
As discussed in the session, kindly find the attached LungCap dataset.
 

Attachments

  • LungCapData.zip
    4.5 KB · Views: 9

Suraj Salunkhe

Member
Alumni
HI Suraj, didnt work for me, can you give the code or paste the screenshot.
Sure Raghavendra,
below is the code:
install.packages("dummy")
library(dummy)
test_reg_2 <- dummy(reg_1)

this will give u data frame structure of only dummy variables.....u have to merge these dummy variables with the main data for further analysis
 
Last edited:

b raghavendra raju

Member
Alumni
Sure Raghavendra,
below is the code:
install.packages("dummy")
library(dummy)
test_reg_2 <- dummy(reg_1)

this will give u data frame structure of only dummy variables.....u have to merge these dummy variables with the main data for further analysis

Hi Suraj,
Thanks Bro, It worked.
I had not installed dummy package, hence I was getting the error. By the way do you when will the class 8 video be uploaded.
 

Suraj Salunkhe

Member
Alumni
Dear Anirban,
As discussed in the lecture today (24th Feb 2018) i have copied the regression analysis code below. Please have a look.
Its regarding the "NA" appearing in the output. For model "Reg_model_lung1" i am getting this "NA" error, so i build another model named as "Reg_model_lung2", where i took only one dummy var in model for Smoke(Smoke_yes) & Gender (Gender_female).

#1. Importing the data
lungcap = LungCapData
View(lungcap)

#2. Create dummy variables
library(dummy)
lungcap_1 <- dummy(lungcap)
View(lungcap_1)

#merging the dummy variables with main dataset
lung_cap_1 = data.frame(lungcap,lungcap_1)
View(lung_cap_1)

#3.splitting the model in to the tarining and test dataset
#lets split the 75% as train and 25% as test data
set.seed(123)
test = sample(seq_len(nrow(lung_cap_1)), size = floor(0.75 * nrow(lung_cap_1)))
#training dataset of 75% data rows
train.lung <- lung_cap_1[test,]
# testing data set of 25% rows for testing
test.lung <- lung_cap_1[-test,]

View(train.lung)
View(test.lung)

#Step:4_Building Model of regression
#building model with all available variables
Reg_model_lung = lm(LungCap~., data = train.lung)
summary(Reg_model_lung)
#Adjusted R-squared: 0.8588
#p-value: < 2.2e-16

#building with significant var....using all dummy variables
Reg_model_lung1 = lm(LungCap~Age+Height+Smoke_no+Smoke_yes+Gender_female+Gender_male+
Caesarean_no+Caesarean_yes, data = train.lung)
summary(Reg_model_lung1)


#building with significant var....and using only one of the dummy var
Reg_model_lung2 = lm(LungCap~Age+Height+Smoke_yes+Gender_female,data = train.lung)
summary(Reg_model_lung2)

#Adjusted R-squared: 0.8587
#p-value < 2.2e-16

#step 5 predicting or validating
#so we will use Reg_model_lung2 model to predict the result
prediction_lung = predict(Reg_model_lung2,newdata = test.lung)
prediction_lung

#step 7: calculating R squred value of the predicted data
SSE <- sum((test.lung$LungCap - prediction_lung) ^ 2)
SST <- sum(((test.lung$LungCap) - mean(test.lung$LungCap)) ^ 2)
1 - SSE/SST
#Rsqured value of predicted data = 0.8275809
 

_19716

Active Member
Alumni
Hi,
I need the recording of the extended class that took place on 24 feb.
Also i need to know whether therewill be any project mentering session.Thank you.
 

_20132

Member
Alumni
Hi Priyanka,

Is there no live project mentoring session for our batch? If it is there then please tell me the date.

Thanks,
Puja
 

_19716

Active Member
Alumni
Hi i was trying the sample projects for R Data mining with association none of these instructions work.
itemFrequency(playlist)

itemFrequencyPlot(playlist,support=.08,cex.names=1.5)

musicrules <- apriori(playlist,parameter=list(support=.01,confidence=.5))
inspect(musicrules)

inspect(subset(musicrules, subset=lift > 5))

I need help through this
Thank you
Suchithra
 
Top