Final Project - Analyzing a Use Case for Case Study
Understanding the Strength of a Relationship
One primary goal of analytic methods… Understanding the relationships between variables.
Player performance and team performance
Performance in a given year related to the performance in the following year
Linear Relationships: Correlation Coefficient
For each subject, we measure two variables
Baseball player -> Number of hits and Number of runs scored (in a season)
(X) (Y)
A simple way to gain insight is a scatterplot
(X,Y) is plotted for each subject
Some cases the pattern is vague
Some cases the relationship is strong, the value of X almost completely determines the value of Y
The relationship is weak value of X giving a general indication of the value of Y
3
Measures to reduce the properties of such a relationship to one number that is useful as a simple summary of the relationship between variables.
Linear Relationships: Correlation Coefficients
Scatterplots
Strong relationship:
the value of X almost completely determines the value of Y
Weak relationship:
the value of X giving, at best, a general indication regarding the value of Y
Quantifying Association
To describe the relationship between two continuous variables, use:
Correlation analysis
Measures strength and direction of the linear relationship between two variables
Regression analysis
Concerns prediction or estimation of outcome variable, based on value of another variable (or variables)
Correlation Analysis
Plot the data (or have a computer to do so)
Visually inspect the relationship between two continuous variables
Is there a linear relationship (correlation)?
Are there outliers?
Are the distributions skewed?
Correlation Coefficient
Measures the strength and direction of the linear relationship between two variables X and Y
Population correlation coefficient:
Sample correlation coefficient :
(obtained by plugging in sample estimates)
Correlation Coefficient
The correlation coefficient, , takes values between -1 and +1
-1: Perfect negative linear relationship
0: No linear relationship
+1: Perfect positive relationship
Correlation Coefficient
Plot standardized Y versus standardized X
Observe an ellipse (elongated circle)
Correlation is the slope of the major axis
Correlation Notes
Other names for r
Pearson correlation coefficient
Product moment of correlation
Characteristics of r
Measures *linear* association
The value of r is independent of units used to measure the variables
The value of r is sensitive to outliers
r2 tells us what proportion of variation in Y is explained by linear relationship with X
Examples of Correlation Coefficient
Perfect positive correlation, r approx. 1
Perfect negative correlation, r approx. -1
Imperfect positive correlation, 0 < r < 1
Imperfect negative correlation, -1 < r <0
No correlation, r approx. 0
Theory and Methods
14
15
You’ve prepared your data: what’s next?
What kind of analysis do you need? Which model is more appropriate for it? …
Datasets
Training set: a set of examples used for learning, where the target value is known.
Validation set: a set of examples used to tune the architecture of a classifier and estimate the error.
Test set: used only to assess the performances of a classifier. It is never used during the training process so that the error on the test set provides an unbiased estimate of the generalization error.
16
Machine Learning
To learn: to get knowledge of by study, experience,
or being taught.
Types of Learning
Supervised
Unsupervised
17
Supervised Learning
Training data includes both the input and the desired results.
For some examples the correct results (targets) are known and are given in input to the model during the learning process.
The construction of a proper training, validation and test set is crucial.
These methods are usually fast and accurate.
Have to be able to generalize: give the correct results when new data are given in input without knowing a priori the target.
18
Unsupervised Learning
The model is not provided with the correct results during the training.
Can be used to cluster the input data in classes on the basis of their statistical properties only.
Cluster significance and labeling.
The labeling can be carried out even if the labels are only available for a small number of objects representative of the desired classes
19
Theory and Methods
Examine analytic needs and select an appropriate technique based on business objective initial hypothesis; and the data’s structure and volume
Apply some of the more commonly used methods in Analytics solutions
Explain the algorithms and the technical foundations for the commonly used methods
Explain the environment (use case) in which each technique can provide the most value
Use appropriate diagnostic methods to validate the models created
Use R to fit, score and evaluate models
20
20
Analytical Methods
Categorization (un-supervised):
K-Means clustering
Association Rules
Regression:
Linear
Logistic
Classification (supervised):
Naïve Bayesian classifier
Decision Trees
Times Series Analysis
Text Analysis
21
Where “R” we?
We previously reviewed R skills and basic statistics. You have the below guides to assist you.
“R Cookbook” textbook
“SimpleR – Using R for Introductory Statistics”
R cheat sheet
You can use R to:
Generate summary statistics to investigate a data set
Visualize Data
Perform statistical tests to analyze data and evaluate models
22
Prominent use cases for the method
Algorithms to implement the method
Diagnostics that are most commonly used to evaluate the effectiveness of the method
The reasons to choose (+) and cautions(-) (where the method is most and least effective)
23
Objectives to know for each method
What kind of Problem do I need to Solve? How do I Solve it?
24
Applying the Data Analytic Lifecycle
In a typical Data Analytical Problem – you would have gone through:
Phase 1 – Discovery – have the problem framed
Phase 2 – Data Preparation – have the data prepared
Now you need to plan the model and determine the method to be used.
Phase 3 – Model Planning
Have do people generally solve this problem with the kind of data and resources I have?
Does this work well enough? Or do I need to come up with something new?
What are related or analogous problems? How are they solved? Can I do that?
25
image1.png
image2.svg
.MsftOfcThm_Accent1_Fill { fill:#4472C4; } .MsftOfcThm_Accent1_Stroke { stroke:#4472C4; }