O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
Iris data
analysis
example
Author: Do Thi Duyen
Overview: data analysis process
Iris setosa
Iris virginica
Iris versicolor
Iris flower data set
• Also called Fisher’s Iris data set or Anderson’s Iris data set
• Collected by Edgar Anderson and Ga...
Draw a hypothesis that you can test!
• Null hypothesis
• Alternative hypothesis
• P-value < 0.05
Get data!
Some ways to read data in R:
• read.table, read.csv, read.xls, data.frame,..
• edit,…
• …
=> Hint: Never modify ...
Exploration of data
Some basic function in R to examine iris
data:
>?iris
>names(iris)
>iris
>str(iris)
>iris$new_class_specis<-as.character(i...
Summarize and plot your data!
>summary(iris)
>plot(iris)
Scatter plot
Scatter plot
plot(iris, col=iris$Species)
legend(7,4.3,unique(iris$Species),col=1:length(iris$Species),p
ch=1)
Lattice lib...
Box plot
Box plot
>par(mfrow=c(1,2))
> plot(iris$Petal.Length)
>boxplot(iris$Petal.Length~ iris$Species)
> par(mfrow=c(2,2)) # to d...
Histogram
Histogram vs Bar chart
Outlier
Outlier
Histogram
> par(mfrow=c(1,1))
>hist(iris$Petal.Length[1:50])
Subsetting:
>iris$Sepal.Length[1:50]
>iris$Sepal.Length[-(1:5...
Build a statistical model!
Data mining:
• Predict:
• Classification
• Regression
• Deviation detection
• Descript:
• Clust...
Analysis
Clustering
Clustering
• Principle: based on measure of distances
• Algorithms:
• Hierarchical clustering: bottom up, top down
• Centr...
K-Mean
Classification
Clasification algorithms
• Linear classifiers: Fisher's linear discriminant analysis, Naive
Bayes classifier,..
• Support ...
Fisher's linear discriminant analysis (LDA)
Demo in R
Regression analysis
Y ≈ f(X, β)
Regression analysis
• Methods: Linear regression, Logistic regression, Poisson
regression
• Regression analysis is widely ...
Predict model
Linear regression
Analysis simple linear regression in R
Demo in R
Estimate
• Clustering: hard, using: user examine, similarity measure,
classification algorithms, entropy, F-measure, pure,...
Report
References
• http://en.wikipedia.org/wiki/Iris_flower_data_set
• http://ykhoa.net/r/R/Chuong%2010.%20%20Phan%20tich%
20hoi...
Q&A
Thank for listening
Próximos SlideShares
Carregando em…5
×

Iris data analysis example in R

169.129 visualizações

Publicada em

Presentation: Iris data analysis example in R and demo

Publicada em: Tecnologia
  • Here's How YOU Can Stake Out Your Personal Claim In Our EIGHT MILLION DOLLAR GOLDMINE...  http://ishbv.com/goldops777/pdf
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui
  • Follow the link, new dating source: ❶❶❶ http://bit.ly/2LaDVgK ❶❶❶
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui
  • Dating for everyone is here: ♥♥♥ http://bit.ly/2LaDVgK ♥♥♥
       Responder 
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui

Iris data analysis example in R

  1. 1. Iris data analysis example Author: Do Thi Duyen
  2. 2. Overview: data analysis process
  3. 3. Iris setosa Iris virginica Iris versicolor
  4. 4. Iris flower data set • Also called Fisher’s Iris data set or Anderson’s Iris data set • Collected by Edgar Anderson and Gaspé Peninsula • To quantify the morphologic variation of Iris flowers of three related species • >iris
  5. 5. Draw a hypothesis that you can test! • Null hypothesis • Alternative hypothesis • P-value < 0.05
  6. 6. Get data! Some ways to read data in R: • read.table, read.csv, read.xls, data.frame,.. • edit,… • … => Hint: Never modify your raw data file; always work on a copy!
  7. 7. Exploration of data
  8. 8. Some basic function in R to examine iris data: >?iris >names(iris) >iris >str(iris) >iris$new_class_specis<-as.character(iris$Species) >iris$new_class_specis<-NULL >iris$Species <- gsub("%","",iris$Species)) >iris<-na.omit(iris)
  9. 9. Summarize and plot your data! >summary(iris) >plot(iris)
  10. 10. Scatter plot
  11. 11. Scatter plot plot(iris, col=iris$Species) legend(7,4.3,unique(iris$Species),col=1:length(iris$Species),p ch=1) Lattice library Ggplot2 library
  12. 12. Box plot
  13. 13. Box plot >par(mfrow=c(1,2)) > plot(iris$Petal.Length) >boxplot(iris$Petal.Length~ iris$Species) > par(mfrow=c(2,2)) # to draw four figs in one window > for(i in 1:4) boxplot(iris[,i] ~ Species, data=iris, main=names(iris)[i])
  14. 14. Histogram
  15. 15. Histogram vs Bar chart
  16. 16. Outlier
  17. 17. Outlier
  18. 18. Histogram > par(mfrow=c(1,1)) >hist(iris$Petal.Length[1:50]) Subsetting: >iris$Sepal.Length[1:50] >iris$Sepal.Length[-(1:50)] Select by name: >iris$Sepal.Length[iris$Species == "setosa"] Change the order of data frame: >iris.ordered<-iris[order(iris$Sepal.Length),]
  19. 19. Build a statistical model! Data mining: • Predict: • Classification • Regression • Deviation detection • Descript: • Clustering • Association Rule Discovery
  20. 20. Analysis
  21. 21. Clustering
  22. 22. Clustering • Principle: based on measure of distances • Algorithms: • Hierarchical clustering: bottom up, top down • Centroid-based clustering: k-mean, PAM, CLARA, CLARANS,.. • Distribution-based clustering: STING, WAVECluster, CLIQUE,.. • Density-based clustering: DBSCANS, OPTICS, DENCLUE,.. • Model-based cluatering: statistical model + Neural network • …
  23. 23. K-Mean
  24. 24. Classification
  25. 25. Clasification algorithms • Linear classifiers: Fisher's linear discriminant analysis, Naive Bayes classifier,.. • Support vector machines: Least squares support vector • Quadratic classifiers • Kernel estimation: k-nearest neighbor • Boosting (meta-algorithm) • Decision trees: Random forests • …
  26. 26. Fisher's linear discriminant analysis (LDA) Demo in R
  27. 27. Regression analysis Y ≈ f(X, β)
  28. 28. Regression analysis • Methods: Linear regression, Logistic regression, Poisson regression • Regression analysis is widely used for prediction and forecasting
  29. 29. Predict model
  30. 30. Linear regression
  31. 31. Analysis simple linear regression in R Demo in R
  32. 32. Estimate • Clustering: hard, using: user examine, similarity measure, classification algorithms, entropy, F-measure, pure,… • Clasification: holdout, k-fold cross validation,… • Regression: statistical hypothesis test
  33. 33. Report
  34. 34. References • http://en.wikipedia.org/wiki/Iris_flower_data_set • http://ykhoa.net/r/R/Chuong%2010.%20%20Phan%20tich% 20hoi%20qui%20tuyen%20tinh.pdf • http://www.statsoft.com/Textbook/Elementary-Statistics- Concepts • http://bis.net.vn/forums/p/366/628.aspx
  35. 35. Q&A
  36. 36. Thank for listening

×