GoConqr has a new look! Let us know what you think.

Flashcards

ITEC 620 - FINAL

Layla Ibrahim Data Analytics English 74 cards

Cards in this deck (74)

  1. 1RegressionPrediction of value of dependent variable (y) using independent variables (x)
  2. 2Meaning of P-Values in Regression OutputStatistical significance of independent variable(s)
  3. 3Error (or Residual) of RegressionDifference between estimates and observations in model
  4. 4Meaning of Standard Error in Regression OutputStandard Error of Prediction used similarly to Standard Deviation
  5. 5Meaning and Synonym of R-SquaredMeaning: Percent of variation in y-value explained by x-variables in model
    Synonym: Coefficient of Determination
  6. 6Adjusted R-SquaredAdjusts for number of variables (and collinearity?)
  7. 7Meaning of "Significance F" in ANOVA TableGlobal Test of Model's Statistical Significance/Predictive Value
  8. 8True or False: Regressions are only applicable to numeric variablesTrue
  9. 9R Script: attitude.MLRinteractionmodel <- lm(rating ~ complaints + privileges + learning + critical*advance, data = attitude) What is the "rating" part of the script?Dependent variable of interest
  10. 10What does the lm() function do?Runs linear regression model
  11. 11R Script: attitude.MLRinteractionmodel <- lm(rating ~ complaints + privileges + learning + critical*advance, data = attitude) What is the interaction term in this script?critical*advance
  12. 12How can you run regressions using qualitative data?Create dummy variables
  13. 13True or False: Dummy variables must be binary?True
  14. 14Can you assess importance of a dummy variable using correlation coefficient?CAN NOT MAKE ASSESSMENT OF COEFFICIENT OF DUMMY VARIABLE;
    Can make inferences based on sign
  15. 15How can one capture the interaction between two variables in a model?Create a new variable which as a value of X1*X2
    This captures the non-additive relationship of their effects on Y
  16. 16Shortcomings of linear regression models?Captures additive linear effects but cannot expand further
    Sensitive to outliers
    'Parametric'
    Prone to mistakes with very large number of variables
  17. 17Advantages of Regression ForecastingCan incorporate additional independent variables
    Can be done with more software than other models
  18. 18What does it mean that a regression is 'parametric'?The model uses implicit assumptions about how variables relate to each other
  19. 19Models for predictive use with smaller datasetsRegression models
    Forecasting time series models
  20. 20Models for predictive use with larger datasetsKNN
    Classification/regression trees
    Logistic regressions
  21. 21Curse of DimensionalityGreater quantity of variables leads to more complications in prediction;
    Many difficulties arise as number of variables grow;
    "Space" becomes difficult to visualize and grows exponentially
  22. 22Meaning of multivariate analytical methodsPredict one variable based on other(s);
    All predictive models (except for time series) are multivariate
  23. 23Key R Function to Create Dummy Variablesmodel.matrix()
    creates dummy variable for each value of categorical variable
  24. 24What does a regression ignore when capturing interactions between variables?Synergistic or anti-synergistic effects between variables
  25. 25what are the cons of forecasting with regression?Can't easily capture non-constant trends or seasonal effects
    Computationally much more intensive if we're going to forecast many periods
  26. 26what is a reasonable assumption of regression?regression treats the effect of each independent variable as independent of one another
  27. 27true or false: dummy variables shift the regression line up or down and also can change the slope of the line.False:
    Dummy variables do shift reg line but do not change slope
  28. 28True or False: Most all predictive models are complex.False:
    Predictive models range in complexity
  29. 29What is the purpose of K-Nearest Neighbors?To predict an outcome for a new data point, use the k most similar data points from the data set
  30. 30what are the steps to k-nearest neighbors?1. identify the k most similar points
    2. take the average outcome of those k points
  31. 31How do we choose k?k=1 considers the single most similar data point
    k=n gives us an average or classification based on every data point
  32. 32Tradeoff of K in KNNOverfitting (k=1) vs generic model (k=n)
  33. 33what is the main difference between regression and other predictive models?Model based on all of the available data because it gives us better predictions
  34. 34Difference in comparing two regression models versus comparing two KNN models?Easy to compare two regression models but not as easy to do a comparison of k-nearest neighbors.
  35. 35R Package for KNNfnn
  36. 36steps of partitioning data0. set.seed()
    1. Split the data points randomly into sets
    2. Use the models to predict the outcomes for the data points in the other set(s)
    3.Evaluate the models' predictions against the actual outcomes
  37. 37how do you evaluate the predictions in partitioning data with the actual outcomes?All models produce the same error metric (want to minimize)
    Root mean squared error (RMSE) for numeric outcomes
  38. 38what does this line of R code do? training <- sample (1:1000, 600)stores 600 different randomly chosen integers from 1 to 1000 in an object called training
  39. 39when comparing multiple different methods, how many times should we partition?we only need to partition once, and then build each model using the same training set
  40. 40what does it mean when we run a loop in KNN?the loop tries a range of values for k to find which gives the most accurate predictions
  41. 41how do you evaluate the predictions in partitioning data with the actual outcomes?All models produce the same error metric (want to minimize)
    Root mean squared error (RMSE) for numeric outcomes
  42. 42what does this line of R code do? training <- sample (1:1000, 600)stores 600 different randomly chosen integers from 1 to 1000 in an object called training
  43. 43what does a loop check?checks to see if the current RMSE beats the best RMSE observed so far
  44. 44what does best.k<--1 mean?the best value for k
  45. 45what does RMSE<- 999999 mean?this needs to be large enough so all RMSE are smaller than this
    trying to find smallest RMSE
  46. 46what does "(i for 1:50) mean?This loop checks values of k from 1 to 50.
  47. 47what does the .6 in this command mean? training <- sample(1:nrow(dc), 0.6*nrow(dc))The following command will randomly select 60% of the row numbers in the data set to represent the training data
  48. 48what does the "==" mean in this function: sum(DC.knn == DC.test.results) / length(DC.test.results)?comparison -- gives you how many times the knn model and the actual results are equal
  49. 49in the command: DC.knn.new[1:nrow(DCnew)] what does "nrow" mean?the last row
  50. 50what command do you use to change a column name in R?names(data) [column #] <- NewName
  51. 51when creating a classification tree in R, what does "mindev" mean in this code? DC.tree <- tree(DEDUCTIBLE ~ ., data=dc[training,], mindev=0.001)how much variation you allow in the tree -- increase in mindev, smaller the tree
  52. 52when running a logistic regression in R, what does the code: DC.test.probabilities <- predict(DC.lr,DC.test,type = "response") do?creates a list of the model's probabilities of each organization in the test set having tax-deductible donations
  53. 53when running logistic regression in R, what does DC.lr.classifications <- round(DC.test.probabilities,0) do?The following command converts the probabilities to binary 0/1 classifications
    to see overall accuracy have to convert to binary
  54. 54Regression Trees Conceptgrouping together data points that will likely have similar outcomes
    By similarity that means the outcomes have a small variance
  55. 55Regression Tree StepsSplit the data repeatedly into successively smaller groups that have similar outcomes
    Each split is done in a way that minimizes the variances within the two resulting subgroups -- splitting created two more branches of the tree
    Once we're finished, each endpoint of the tree is a group of similar data points from the training set
  56. 56Interpret Tree and Make Prediction1.Determine which group the data point would fall into
    2.Use the average outcome from that group as the prediction
  57. 57At what point should one stope growing a regression tree?When model becomes overfit (so detailed that it predicts training set 100% accurately but doesn't handle future data well)
  58. 58When to split group in reg tree?If the average outcomes for the two smaller groups are sufficiently different
  59. 59Most popular package in R for reg trees?tree()
  60. 60mindev parameter meaningthe amount of variation you are allowing in the tree. the smaller the mindev- the bigger the tree
  61. 61Problem with reg treeRegression trees can be overly sensitive to outliers in the training set
  62. 62Improvement of reg treeEnsemble Methods
  63. 63Ensemble Trees ConceptBasic idea is to create lots of weaker regression trees using the training set, and aggregate their predictions
    making a bunch of trees and seeing the mistakes
  64. 64what are two types of methods of ensemble trees?Bagging (bootstrap aggregation)
    Random trees (a.k.a. “random forests”)
  65. 65BaggingCreate lots of regression trees
    Each tree is based on a random sample of the training set
    Use the average prediction
  66. 66what is bagging with Ensemble trees good for?Good for reducing the effect of outliers in the training set
  67. 67Random Trees with Ensemble TreesCreate lots of regression trees
    Each tree uses only a random subset of the variables
    Use the average prediction
  68. 68What is random trees with Ensemble Trees good for?Works well when the number of relevant variables is large
    If you have a lot of variables that have real but small affects - this will get picked up in the tree
  69. 69What is not good to use Random Trees with Ensemble Trees for?Will not be good if you have small amount of variables with high affects
  70. 70How can you use KNN with binary variables?classification trees
  71. 71Classification TreesFor a binary outcome variable
    Splits each group attempting to get as close as possible to all 0s and 1s in each of the two smaller groups
    At each endpoint of the tree, reports the proportion of 1s in that group
  72. 72Classification accuracyproportion of points in the test set that the model classifies correctly
    # of correct predictions / # of points in test set
  73. 73error rate of a classification1 - classification accuracy
  74. 74what are the two types of errors in classification accuracy?Two types of errors (predict FALSE, result is TRUE, and predict TRUE, result is FALSE)

Information

Description
Data Analytics Flashcards on ITEC 620 - FINAL, created by Layla Ibrahim on 04/06/2021.
Created by
Layla Ibrahim
Views
5
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?