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

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

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