App Stat Final Cards

0.0(0)
Studied by 4 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play

1/57

encourage image

There are no tags or description

Looks like no tags are added yet.

58 Terms

1
New cards

What kind of patterns do you search for with data visualization

Clusters, outliers, and other linear or non-linear patterns

2
New cards

Let X be a n×p data matrix with n observations and p variables. Show how to use the SVD to calculate the principal components of the data.

VDDVT

3
New cards
What do you need to assume about n and p in prob. 2? Suppose that n < p, can you figure out how to calculate the principal components of X.
Assume n > p. If n < p, use XXᵀ = UD²Uᵀ (n×n) instead
4
New cards
Let X be a n×p data matrix with n observations and p variables. What is the factor model?
X = LF + ε (loadings × factors + error).
5
New cards

Let X be a n×p data matrix with n observations and p variables. How do you select the number of factors?

Eigenvalues > 1, scree plot, or % of variance explained.
6
New cards

Let X be a n×p data matrix with n observations and p variables. What is the difference between the PCA analysis and factor analysis?

PCA has no model and explains total variance. FA is a model of latent factors plus error that explains the covariance (common variance).
7
New cards

Give the definition of varimax rotation.

out of all possible rotations of the loadings Λ, choose the one that maximizes the sum of squares of the columns
8
New cards

Is the factor model identifyable? Why?

No. You can put a rotation in the middle and the model doesn't change.
9
New cards

Which algorithms are standard for estimating the factor model?

-Principal components method

-Maximum likelihood

10
New cards

Describe the Principal Components algorithm for estimating the factor model.

Take the top m eigenpairs of S. L = [√λ₁e₁ … √λₘeₘ], and ψᵢ = sᵢᵢ − Σⱼ lᵢⱼ².
11
New cards

Describe the method of Principal components regression.

1. Calculate principal component variables

2. Use principal components as predictors for the regression model

12
New cards

Describe the method of Partial Least Squares regression giving the first iteration.

Do individual regression for each predictor and calculate the linear combination of the slopes. This gives the 1st PLS component
13
New cards

Does Least Squares and/or PLS regression require that you have less variables than observations? Explain.

LS yes but not PLS. LS needs n > p to invert XᵀX. PLS is independent of n and p because it only uses individual regressions for each predictor.
14
New cards

Give the form of the linear discriminant analysis method for predicting a response Y with three possible values {"1","2","3"}. NOT ON TEST


NOT ON TEST

<p></p><p>NOT ON TEST</p>
15
New cards

In preprocessing the data for clustering, give some available transformations to improve the scale of the data.

1. Make sdev equal.

2. Normalize the inverse sqrt of the common covariance matrix

3. Normalize each cluster by the common within-cluster inverse-square-root covariance

16
New cards

What algorithms did you study for cluster analysis and what are their differences?

Hierarchical clustering, k-means, PAM and model-based clustering.

  • Only the first one assumes k unknown.

  • k- means and pam minimize WCSS, non-robust and robust respectively.

  • Model based assumes a mixture of normal distributions, so there exist k clusters in the population.


17
New cards

Give some examples of hierarchical clustering algorithms and describe their distances.

  • Single linkage (closest)

  • average linkage(average distance)

  • complete linkage (longest distance)

  • Ward is R2 distance


18
New cards

Define Euclidean distance d(x,y) for x,y p-dimensional vectors.



<p></p>
19
New cards

Define Manhattan distance d(x,y) for x,y p-dimensional vectors.


knowt flashcard image
20
New cards

What is the Ward method for hierarchical clustering?

Uses the most improvement on R2 to define the hierarchical tree.

21
New cards

What is singe linkage?

Joints the closest clusters by the closest pair of observations

22
New cards

What is complete linkage?

Joins the closest clusters by the farthest pair of observations

23
New cards

What is average linkage?

Joins the closest clusters by the average distance between all pairs of observations

24
New cards

What is the difference between unsupervised classification and supervised classification?

Unsupervised you don’t observe the response variable. Supervised you observe the response.

25
New cards

Describe briefly the methodology of k-means clustering.

  • Find the configuration which Minimizes the WCSS for a given number of clusters k.

  • Start with an initial configuration and move to better configurations by exchanging points between clusters


26
New cards

What are the criteria that we minimize with k-means clustering?

the within cluster sum of squares

27
New cards

Describe the algorithm for k-means clustering and discuss the convergence.

  1. Start with an initial configuration and move to better configurations by exchanging points between clusters.

  2. Stop when converged to a local minima.

  3. Repeat with new initial configuration as many times as needed to improve the convergence to a local minima


28
New cards

Describe briefly the methodology of PAM clustering.

Minimize the mean absolute deviations(MAD) with respect to the cluster medians.

29
New cards

Describe briefly the methodology of model based clustering.

Assume a mixture of k normal distributions and estimate it with EM.

30
New cards

Give the silhouette value for an observation.

d₂(Xᵢ) − d₁(Xᵢ)

S(Xᵢ) = ─────────────────────

max( d₂(Xᵢ), d₁(Xᵢ) )


d2 (Xi) = Ave distance to closest cluster.

d1 (Xi)= Ave distance to own cluster

31
New cards

What is the use of the silhouette statistic?

  1. to select the number of clusters

  2. To check the consistency of the clusters


32
New cards

Give the average silhouette statistic for evaluating a clustering configuration.

Average ( S(Xi)) where S(Xi) is the silhouette value for Xi

33
New cards

Why do we use the second derivative method on an elbow plot?

We use it to select the optimal number of clusters.

34
New cards

Describe the algorithm for the second derivative of the elbow plot method for selecting the number of clusters.

  1. Calculate the 2nd differences (in percentage) of the (WCSS) across clusterings with 1 to k clusters (2nd derivative of the elbow plot).

  1. Choose the # of clusters that maximizes the 2nd differences.


35
New cards

Why do we use the gap statistic?

We use it to select the optimal number of clusters

36
New cards

Describe the algorithm using the gap statistic for selecting the number of clusters.

Selects the optimal # of clusters k by comparing the change in WCSS of your data against that expected under a uniform random null hypothesis.

37
New cards

Which statistic is generally used for selecting the number of clusters with PAM clustering?

The Average Silhouette statistic

38
New cards

Which statistic are generally used for selecting the number of clusters with k-means clustering?

-gap statistic

-elbow plot

-the second derivative of the elbow plot


39
New cards

Which statistic are generally used for selecting the number of clusters with hierarchical clustering?

-The gap statistic

-elbow plot

-second derivative of the elbow plot

40
New cards

When is the elbow plot preferred over the gap statistic?

when the sample size and/or the dimension are large.

41
New cards

What is the basic idea behind the recursive partitioning algorithms?

Split the nodes into buckets until we span the entire data into homogenous buckets

42
New cards

Give the main steps of the CART algorithm.

1. Build the tree until nodes are too small according to stopping rule.

2. Prune the tree as much as needed using CV or Mallow’s CP statistic.

43
New cards

Give the CART splitting criteria for continuous response with equal variances.

( Nl sigma2L + Nr Sigma2R ) / (Nl + Nr)

44
New cards

Give the entropy index splitting criteria for CART with binary response.

PL ( -p0L log(p0L) - p1Llog(p1L)) + PR( -p0R log(p0R) - p1Rlog(p1R))

45
New cards

Give the gini index splitting criteria for CART with binary response.

pL ( p0L p1L) + pR (p0R p1R)

46
New cards

Explain the pruning step of recursive partition.

Take terminal split and compare the CV residual with and without split.

If better without splitting, then delete split. Repeat until no more pruning is possible.

47
New cards

What is a random forest?

Algorithm which generates a forest of trees and takes the average predicted values as the prediction.

Each tree is calculated on a bagged sample.

The in-bag sample is used to fit the tree and the out -of-bag sample is used to estimate the prediction.

Each split is done with a random subset of predictors.

48
New cards

What is the standard number of variables that are sampled at a node of the random forest algorithm?

If you have p variables => sqrt(p)

49
New cards

What is the in-bag sample of random forest?

Bootstrap sample with deleted repeats.

50
New cards

What is the out-of-bag sample of random forest?

Remaining observations outside the bootstrap sample

51
New cards

Give the Steps of the random forest algorithm.

Bag in-bag sample. build the tree. Estimate prediction on out-of-bag sample. Final prediction is average of all out-of-bag predictions

52
New cards

What does it mean bagging?

Sampling n observations out n with replacement and deleting repeats

53
New cards

Give the basic steps of the Boosting algorithm.

Built a sequence of trees. At each step increase the weights of the observations misclassified by the previous tree and decrease the weights of the observations classified correctly. Repeat until misclassification rate above 50%. Choose the average of the 1 thru k trees that has the least misclassification error.

54
New cards

Define the Kernel method for function approximation

knowt flashcard image
55
New cards

What is the basic structure of a neural net

knowt flashcard image
56
New cards

Give the sigmoidal function and method that is used in a neural net.

or a node output t of a neural net, Sigmoidal(t)=1/(1+exp(-t)

57
New cards

Give the Softmax function and method that is used in a neural net

For a node k of the output layer T containing K nodes of a neural net

<p>For a node k of the output layer T containing K nodes of a neural net</p>
58
New cards

What is an Autoencoder/decoder?

A neural net where the inputs are the same as the outputs and the center layer is small. First half = encoder, second half = decoder.