What is the percentage of variance captured by components

Assignment Help Other Subject
Reference no: EM132284368

Assignment - PCA and Clustering

1. Principal component analysis

sklearn comes with several data sets. Load data set called digits by running following code from sklearn.datasets import load_digits DigitData =load_digits()

digits is a dataset of handwritten digits in matrix form of 8x8 pixels that means the dimension of data is 64. Our goal is to reduce this dimension to some lower dimension by using principal component analysis.

Run the PCA on the data. Get the first two components and plot it with their corresponding labels.

To run PCA, use PCA from sklearn.decomposition.

Note: you can use pyplot from matplotlib for plotting.

What do you observe? What is the percentage of variance captured by these two components? Is it sufficient or we should find more components?

2. K-mean Clustering

use the same digit data set as above from sklearn.datasets

It is a good idea to scale this data before performing clustering. To do that use scale from sklearn.preprocessing

Show the images with their labels using matplotlib.

Divide the data into training set and test set with testset = 20% of total data.

To divide the data into training and test set, use train_test_split from sklearn.cross validation

Perform clustering assuming there are 10 clusters.

To perform clustering, use cluster from sklearn.

U se KMeans function of cluster (cluster.KMeans).

Assign numbering or labels to your clusters (remember your labeling has nothing to do with actual labels, we pretend that we do not know the actual labels)

Test your cluster on the test data set. What do you observe? Print a confusion matrix of your test.

To divide the data into training and test set, use train_test_split from sklearn.cross validation

Perform clustering assuming there are 10 clusters.

To perform clustering, use cluster from sklearn.

Use KMeans function of cluster (cluster.KMeans).

Assign numbering or labels to your clusters (remember your labeling has nothing to do with actual labels, we pretend that we do not know the actual labels)

Test your cluster on the test data set. What do you observe? Print a confusion matrix of your test.

What to submit? A single jupyter notebook file with code and results.

Reference no: EM132284368

Questions Cloud

Solve the issues related to healthcare policies : Locate a news article or story related to a current event in healthcare policy. Some examples may be, but are not limited to healthcare reform.
Explain how article supports the sustainability initiative : Identify best practices you can use in your sustainability initiative - Explain how the article supports the sustainability initiative you are developing
Identify two or three unique strengths : How well you answer this question could be the difference between getting the job and not getting the job.
Article change your perception of google as employer : Why are older employees often neglected or discriminated against? Does this article change your perception of google as an employer? How?
What is the percentage of variance captured by components : Principal component analysis - What do you observe? What is the percentage of variance captured by these two components
What are some of the limitations of using the swot model : We can apply concepts from various models, such as SWOT, SPACE, PEST/PESTLE, Porter's Five Forces, the BCG Portfolio matrix, etc. Understanding the basic.
Knowledge management strategy to business strategy : How can an organization align its knowledge management strategy to the business strategy?
Why it is important for a company to have a viable business : The 5 most basic strategic approaches for setting a company apart from rivals and winning a sustainable competitive advantage.
Customer service representative : For this assignment you will compose two different messages - the first as a customer, and the second as a customer service representative.

Reviews

Write a Review

Other Subject Questions & Answers

  The wage rate increases in a purely competitive industry

The wage rate increases in a purely competitive industry. This change will result in a(n):

  Discuss about the fighting crime or public service

Policing is complex and involves different characteristics to fight crime and serve the public.Explain what is meant by service to the public and how do officers fulfill this mission.Provide specific examples.

  Identify the databases and search words you would use

Consider how you would extract the relevant information from the articles. How would you take the information and organize it in a way that was useful? How could you take the step from simply having useful knowledge to gaining wisdom?

  During reconstruction, in five southern states

During Reconstruction, in five Southern states

  Discuss your strategy about psychology in everyday life

How to Effectively Learn and Remember" included in your lesson, the author recommends goal setting as a strategy for success.

  What are organizational ethics identify and describe the

1.define social responsibility?2.what is an advantage to a business being socially responsible?3.list the three main

  Issues which affect a lot of people

Most U.S. supreme court cases involve issues which affect a lot of people

  Completely randomized design

We begin by looking at a simple 2*2 factorial with 5 replications in a CRD (completely randomized design). Let the following table denote mean yields, Yij MAIN EFFECT OF P, MAIN EFFECT OF N What we see is that the difference between low P and high P ..

  Leadership varies widely by culture and personality

Leadership varies widely by culture and personality. An international organization with locations in several countries must balance the local custom

  Describe the agency or program and its target population

What are the time frames, assessments, primary intervention modalities case management. process group, education group?

  Explain the use of artificial intelligence technologies

What are some of the limitations or dangers you see in the use of Artificial Intelligence technologies such as expert systems, virtual reality, and intelligent agents?

  What are the opportunities for personal growth

Describe an instance when you had to think on your feet to remove yourself from a difficult situation.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd