Your SlideShare is downloading.
×

- 1. LINEAR REGRESSION AND PIVOT CHART ON TOP 100 SOCIAL MEDIA PROFILE DATASET NAME: KHUSHAL CHOUDHARY BUSINESS INTELLIGENCE ROLL NO. 8606 TEACHER: NISHA YADAV CLASS : TYIT D
- 2. INTRODUCTION ON LINEAR REGRESSION Linear regression analysis is used to predict the value of a variable based on the value of another variable. The variable you want to predict is called the dependent variable. The variable you are using to predict the other variable's value is called the independent variable. This form of analysis estimates the coefficients of the linear equation, involving one or more independent variables that best predict the value of the dependent variable. Linear regression fits a straight line or surface that minimizes the discrepancies between predicted and actual output values. There are simple linear regression calculators that use a “least squares” method to discover the best-fit line for a set of paired data. You then estimate the value of X (dependent variable) from Y (independent variable).
- 3. INTRODUCTION ON PIVOT CHART You can use a Pivot Table to summarize, analyze, explore, and present summary data. PivotCharts complement PivotTables by adding visualizations to the summary data in a PivotTable, and allow you to easily see comparisons, patterns, and trends. Both PivotTables and PivotCharts enable you to make informed decisions about critical data in your enterprise. You can also connect to external data sources such as SQL Server tables, SQL Server Analysis Services cubes, Azure Marketplace, Office Data Connection (.odc) files, XML files, Access databases, and text files to create PivotTables, or use existing Pivot Tables to create new tables.
- 4. DATASET ON TOP 100 SOCIAL MEDIA PROFILE https://www.kaggle.com/datasets/medaxone/top-100-social-media- profiles?resource=download About Dataset This dataset contains LinkedIn Influencers' post details and other details(post dependent as well as independent) per post. This dataset can be used to analyze LinkedIn reach based on post content and related account details. This dataset is great for Exploratory Data Analysis and NLP tasks. The data was scraped using BeautifulSoup and Selenium.Last updated on 15th Feb,2021.
- 5. LINEAR REGRESSION specifying on comments and reactions # x- reactions and y- comments A) Create relationship model and get the coefficient > )>x<- c(11,15,44,22,21,16,40,29,14,12,7,12,20,8,12,24,23,19,7,7,3,1,2,4,5,8,3,2,2,17,5,8,3,1,3,1,0,4,0, 2,2,18,14,23,21,16,15,5,10,7,9,16,7,10,5,5,9,39,9,19,14,18,168,257,81,975,108,224,1239,424,716 ,307,116,81,112,124,457,86,93,180,142,104,232,2,0,3,10,4,2,4,7,3,2,4,7,1,5,2,11,2) > >y<- c(0,0,0,2,1,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,0,1,1,3,0,0,0,2,0,0,0,1,0,1,0,1,0,1,0,1,0,2,4,0,2,0,1, 2,0,10,1,5,0,0,0,2,0,1,0,1,35,21,15,75,38,27,81,70,50,24,29,12,18,4,447,1,12,11,18,14,15,0,0,1,0 ,1,4,2,2,0,3,28,1,6,4,0,1,19) > relation<-lm(y~x) > print(relation)
- 6. B) Get the summary of relationship > >x<- c(11,15,44,22,21,16,40,29,14,12,7,12,20,8,12,24,23,19,7,7,3,1,2,4,5,8,3,2,2,17,5,8,3,1,3, 1,0,4,0,2,2,18,14,23,21,16,15,5,10,7,9,16,7,10,5,5,9,39,9,19,14,18,168,257,81,975,108,22 4,1239,424,716,307,116,81,112,124,457,86,93,180,142,104,232,2,0,3,10,4,2,4,7,3,2,4,7,1, 5,2,11,2) > >y<- c(0,0,0,2,1,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,0,1,1,3,0,0,0,2,0,0,0,1,0,1,0,1,0,1,0,1,0,2,4, 0,2,0,1,2,0,10,1,5,0,0,0,2,0,1,0,1,35,21,15,75,38,27,81,70,50,24,29,12,18,4,447,1,12,11,1 8,14,15,0,0,1,0,1,4,2,2,0,3,28,1,6,4,0,1,19) > relation<-lm(y~x) > print(summary(relation))
- 7. C)Predict Function x<- c(11,15,44,22,21,16,40,29,14,12,7,12,20,8,12,24,23,19,7,7,3,1,2,4,5,8,3,2,2,17,5,8,3,1,3,1,0,4,0,2,2,18,14,2 3,21,16,15,5,10,7,9,16,7,10,5,5,9,39,9,19,14,18,168,257,81,975,108,224,1239,424,716,307,116,81,112,124,4 57,86,93,180,142,104,232,2,0,3,10,4,2,4,7,3,2,4,7,1,5,2,11,2) > y<- c(0,0,0,2,1,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,0,1,1,3,0,0,0,2,0,0,0,1,0,1,0,1,0,1,0,1,0,2,4,0,2,0,1,2,0,10,1,5,0, 0,0,2,0,1,0,1,35,21,15,75,38,27,81,70,50,24,29,12,18,4,447,1,12,11,18,14,15,0,0,1,0,1,4,2,2,0,3,28,1,6,4,0,1 ,19) > relation<-lm(y~x) > a<-data.frame(x=170) > result<-predict(relation,a) > print(result)
- 8. D) Visualize the regression graphically > > x<- c(11,15,44,22,21,16,40,29,14,12,7,12,20,8,12,24,23,19,7,7,3,1,2,4,5,8,3,2,2,17,5,8,3,1,3,1,0,4,0,2,2,1 8,14,23,21,16,15,5,10,7,9,16,7,10,5,5,9,39,9,19,14,18,168,257,81,975,108,224,1239,424,716,307,116,8 1,112,124,457,86,93,180,142,104,232,2,0,3,10,4,2,4,7,3,2,4,7,1,5,2,11,2) > y<- c(0,0,0,2,1,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,0,1,1,3,0,0,0,2,0,0,0,1,0,1,0,1,0,1,0,1,0,2,4,0,2,0,1,2,0,1 0,1,5,0,0,0,2,0,1,0,1,35,21,15,75,38,27,81,70,50,24,29,12,18,4,447,1,12,11,18,14,15,0,0,1,0,1,4,2,2,0, 3,28,1,6,4,0,1,19) > relation<-lm(y~x) > png(file="linear_regression.png") > plot(y,x,col="blue",main="COMMENTS & REACTIONS Regression",abline(lm(x~y)),cex=1.3,pch=16,xlab="REACTIONS",ylab="COMMENTS") > dev.off() > plot(y,x,col="blue",main="COMMENTS & REACTIONS Regression",abline(lm(x~y)),cex=1.3,pch=16,xlab="REACTIONS",ylab="COMMENTS")
- 9. COMMENTS AND REACTION LINEAR REGRESSION
- 10. PIVOT CHART SPECIFYING NAMES AND THEIR FOLLOWERS
- 11. PIVOT CHART SPECIFYING NAMES AND THEIR COMMENTS
- 12. Explanation The following graph represents the relation between the Reactions and comments on each article of each influencers. Here X has the value of reactions and Y has the value of comments. We use linear regression to predict Y and X. THANK YOU