anchor.diff:            h4 BI Tech CP303 - Data Mining
             h4 Erin Shellman 
             h4 
  -            a(href="#") R Notebook
  -
  -        section(data-transition-speed="fast")
  -          h2 Unsupervised learning
  -          p Sometimes you won't really know what your outcome is.
  -          p in that case to build a predictor
  -          ol 
  -            li create clusters
  -            li name clusters
  -            li build predictor for the cluster
  -
  +            a(href="https://github.com/erinshellman/BI-TECH-CP303/blob/master/projects/project%203/clustering-in-R.Rmd") R Notebook
  +
  +        section
  +          h2 
  +          p Last time, we used 'market baskets' from Amazon.com to generate association rules between products. We used purchasing patterns to create rules that can be used to create product recommendations. Suppose that we didn't have any knowledge about purchasing behavior, but only knew about the features of the product themselves <i>e.g.</i> from the product catalog. Could we use that information to create a recommender?
  +
  +        section(data-transition-speed="fast")
  +          h2 Feature-based recommendations
  +          p Feature-based recommendations are those that are created from the characteristics of the products themselves and not purchase behavior.
  +
  +        section(data-transition-speed="fast")
  +          h2
  +          p That's cool, but our product catalog as 262,111 items in it, are we supposed to find similar products by hand?
  +
  +        section(data-transition-speed="fast")
  +          h2 Clustering!
  +          p Cluster analysis (sometimes called segmentation) aims to group collections of objects into subsets, or clusters, so that the objects within a cluster are more closely related to one another than objects assigned to different clusters. An object can be described by a set of measurements or by its relationship to other objects. Sometimes the goal is to arrange the clusters into a natural hierachy.
  +
  +        section(data-transition-speed="fast")
  +          h2 Clustering
  +          p Clustering is the classification of a data object into similarity groups (clusters) according to a defined distance metric.
  +
  +        section(data-transition-speed="fast")
  +          h2 Dissimilarity
  +          p Central to all of the goals of cluster analysis is the notion of the degree of similarity (or dissimilarity) between the individual objects being clustered. A clustering method attempts to group the objects based on the definition of similarity supplied to it. Fundamental to all clustering techniquest is the choice of distance of dissimilarity measure between two objects. 
  +
  +        section(data-transition-speed="fast")
  +          h2 Clustering Algorithms
  +          p Clusting algorithms fall into three distinct types: combinatorial, mixture modeling and mode seeking.
  +
  +        section(data-transition-speed="fast")
  +          h2 #[a(href="http://en.wikipedia.org/wiki/K-means_clustering") K-means Clustering]
  +          figure.right(style="width: 45%")
  +            img(src="images/euclidean_dist.jpg" style="width: 100%")
  +            figcaption Look familiar? It's an application of the Pythagorean theorem!
  +          p One of the most popular clustering methods. It's intended for situations in which all variables are of the quantitative type and the squared #[a(href="http://en.wikipedia.org/wiki/Euclidean_distance") Euclidean distance] is the dissimilarity measure.
  +
  +        section(data-transition-speed="fast")
  +          h2 Algorithm
  +          figure.left(style="width: 25%")
  +            img(src="images/K_Means_Example_Step_1.svg" style="width: 100%")
  +            figcaption 1. k initial "means" (in this case k=3) are randomly generated within the data domain (shown in color). 
  +          figure.left(style="width: 25%")
  +            img(src="images/K_Means_Example_Step_2.svg" style="width: 100%")
  +            figcaption 2. k clusters are created by associating every observation with the nearest mean. The partitions here represent the Voronoi diagram generated by the means.
  +          figure.left(style="width: 25%")
  +            img(src="images/K_Means_Example_Step_3.svg" style="width: 100%")
  +            figcaption 3. The centroid of each of the k clusters becomes the new mean.
  +          figure.left(style="width: 25%")
  +            img(src="images/K_Means_Example_Step_4.svg" style="width: 100%")
  +            figcaption 4. Steps 2 and 3 are repeated until convergence has been reached.
  +
  +        section(data-transition-speed="fast")
  +          h2 Selecting K
  +          p In order to apply K-means one must select the number of clusters and an initialization. The choice of the number of K depends on the goal. For segmentation, K is usually definied as part of the problem. For example, a company may employ K sales people, and the goal is to partition a customer data base in to K segments, one of r each sales person, such that the customers assigned to each one are similar as poissbile. Often, however, cluster analysis is used to provide a descriptive statistics for ascerntaining the extent to which the observations comprising the data base fall into natural distinct groupings. Here the number of such K groupings is unkown.
  +
  +        section(data-transition-speed="fast")
  +          h2 Hierarchical Clustering
  +          p The results of K-means depend on the choice for the number of clusters to be search and a starting configuration assignment, In contrast, hierarchical clustering methods do not require such specifications. Instead, they require the user to specify a measure of dissimliarty between disjiont groups of observations, based on the pairwise dissimilarities among the observations in the two groups. As the name suggests, they rpoduce heirarchical representations in which the clusters at each level of the hierarchy are created by merging clustering at the next lower level. At the lowest level each cluster contains a single observation. At the highest level there is only one cluster containing all the data.
  +
  +          
           section(data-transition-speed="fast")
             h2 Clustering Resources
             ol
               li Nice presentation by #[a(href="http://www.slideshare.net/PhamCuong/clustering-technique-for-collaborative-filtering-recommendation-and-application-to-venue-recommendation") Pham Cuong] about clustering techniques for recommendations.
  +            li #[a(href="http://manuals.bioinformatics.ucr.edu/home/R_BioCondManual#R_clustering") Clustering and Data Mining in R]
  +            li #[a(href="http://www.rdatamining.com/docs/data-clustering-with-r") Data Clustering with R], from RDataMining.com.
   
           section#share(data-background="images/data_miner9.jpg" data-background-size="cover")
             h2 Sharing is caring!
  
positive.code:           h4 BI Tech CP303 - Data Mining
            h4 Erin Shellman 
            h4 
              a(href="#") R Notebook
  
          section
            h2 A new paradigm
  
negative.code:           h4 Erin Shellman 
            h4 
              a(href="#") R Notebook
  
          section(data-transition-speed="fast")
            h2 Review of concepts
  
          section(data-transition-speed="fast")
            h2 Share your work!
  