Deep Learning Exam 1 Review

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What is F1-score?

F1-score considers both precision and sensitivity. F1 score (or measure) = 2*(sensitivity*precision)/(sensitivity + precision)

Why do we need machine learning? (instead of humans doing the work)

Humans need to go through lots of training and still are prone to making mistakes Human expertise aren't readily available Solutions change in time (routing on a computer network) Solutions need to be adapted to particular cases Humans are unable to explain their expertise Human expertise doesn't exist

What is K-fold cross validation?

K-fold cross validation is a technique in machine learning where the training dataset is divided into K subsets, or folds, and the model is trained and tested K times, each time using a different fold as the validation set and the remaining folds as the training set.

What is machine learning?

ML is a tool that we use to study and learn from data measurements of a system. Ex: data about the global mean surface shows a trend that enables computers to learn and infer from data that the global temperature is increasing.

Reinforcement Learning

Not Supervised OR Unsupervised. RL agent performs an action in the environment. The environment gives a reward if Agent made a good action. Based on positive or negative observation, the agent learns and grows. Example: Training a model to operate on a chessboard. It will experimentally move a piece and depending on how good the move was, the environment will add a point to the agent, rewarding it. This helps agent learn rules of the game.

What is the most appropriate machine learning terminology? (Supervised, Unsupervised or Regression) "Detecting Alzheimer's disease patients from their cognitive performance."

Supervised classification

What is the most appropriate machine learning terminology? (Supervised, Unsupervised or Regression) "Developing a ML model to recommend sell or buy stocks."

Supervised classification

What is the most appropriate machine learning terminology? (Supervised, Unsupervised or Regression) "Emotion detection from voice."

Supervised classification

Feature Space/Attribute Space

The area in between x-axis and y-axis on a 2D graph where your data is plotted

Using the Area Under the Curve (AUC), how can you tell how good a model's performance is?

The closer AUC is to 1, the better is the model's performance.

Which statement describes the driving factor(s) for the recent growth in machine learning?

The growth in the amount of data and computing power.

Classifier

Thresholds, that separate two attributes in the feature space/data in the 2D graph

What is "True and false positive + True and false negative" ?

True and false positive/negative are terms to evaluate how well a binary classification model is doing. True positive means correctly identifying positive instances, false positive is identifying negative instances as positive, true negative is correctly identifying negative instances and false negative is identifying positive instances as negative.

What is the most appropriate machine learning terminology? (Supervised, Unsupervised or Regression) "Movie recommender systems."

Unsupervised classification

What is the most appropriate machine learning terminology? (Supervised, Unsupervised or Regression) "Segmenting brain tumor from brain MRI images."

Unsupervised classification

Regression Methods

Use when the data does not belong to classes, but are associated with numerical or continuous values. Example: House price prediction ML predicts house value based on square footage

Supervised Learning

When you have the correct labels for your data samples so you can train against the desired answer

Calculate the local field and output for a data sample of (x1, x2) using a Perceptron with weights (w1, w2) and a bias of w0.

X0 = 1 -> Sum(Local Field: u = Sum j = 0 -> 2) * wjxj X1 -> X2 -> x0(1)*w0 + x1(w1) + x2(w2) = u which is less than or greater than 0

What is the MNIST Dataset?

a dataset of over 70,000 handwritten digit examples; The MNIST dataset is used for benchmarking different machine learning models.

What is the Receiver Operating Characteristic (ROC)?

a graphical plot that displays the trade-off between the true positive rate and the false positive rate of a binary classifier as the classification threshold is varied.

What is leave-one-out validation?

a type of cross-validation where the model is trained and tested K times, where K is equal to the number of samples in the dataset. In each iteration, one sample is used as the validation set and the remaining samples are used for training the model.

var_a = input("Please enter a number: ") If a user inputs 2.2 what is the data type of var_a?

str

When developing an ML model, what sets should you split the data into?

we split the data to three sets: training, validation, and testing

What are steps to create Machine Learning Model?

1. Identify classes (groups, categories, etc.) 2. Identify what features represents people's health/financial risk. So x-axis attribute and y-axis attribute 3. Train a classifier that separates people from the two classes 4. Use trained model to detect if a new person is healthy or sick

What are the 4 different Machine Learning methods?

1. Regression 2. Logistic Regression 3. Decision Trees 4. Support vector machine

What are two main parts of developing a ML model?

1. Training - use sample data to train model. Model consists of sets of parameters such that each model achieves maximum possible accuracy on the training data 2. Testing - test accuracy of the model on a different set of data

A perceptron is used to classify data points into Class A or Class B. The perceptron has the inputs x0, x1, x2 and weights w0 = -0.3, w1 = -0.2, w2 = 0.8. What is the Local Field for data point (1, 3)?

1.9

A perceptron is used to classify data points into Class A or Class B. The perceptron has the inputs x0, x1 and x2. How many attributes does each data sample have?

2

What is the value of "?" in the code below to produce the output: ['cherry', 'durian'] (-> means indent bc quizlet sucks) fruitlist = ["apple", "banana", "cherry", "durian"] def fun_a (list_a): -> list_a[0:?] = [ ] fun_a(fruitlist) print(fruitlist)

2

In regards to perceptron learning, which statement is correct? 1. Perceptron learning can be used for training multi-layer neural networks. 2. Perceptron learning can be used to train one neuron and only if the classes are linearly separable. 3. Perceptron can be used to train a neuron that uses sigmoid as its activation function.

2. Perceptron learning can be used to train one neuron and only if the classes are linearly separable.

Select the statement that does NOT generate an array of size (5, 5) filled with 4: 1. np.ones((5, 5))*4 2. np.zeros((5,5))+4 3. np.eye((5))*4 4. np.full((5, 5), 4)

3. np.eye((5))*4

In a classification problem, the classification accuracy for detecting class 1 is 78% and 93% for detecting class 2. There are a total of 27 samples in class 1 and 32 in class 2. How many of the samples were classified correctly?

51

Joe plotted the ROC curve for an ML model to classify chest x-ray images to COVID vs. non-COVID patients. He used a dataset with 25 COVID and 25 non-COVID patients. From this ROC curve, he selects a point with a sensitivity of 75%. What is the ML specificity (in percentage) at this point?

75%

What are the correct values for A and B in the code below: import numpy as np b = np.array([[-1, 20.87, 12], [9.1, -5.4, 0]]) print(b.shape) print(b[A, B]) output: (2, 3) -5.4

A = 1, B = 1

Confusion Matrix

A confusion matrix is a table used to evaluate the performance of a classification algorithm, displaying the number of correct and incorrect predictions made by the model for each class.

What is accuracy and precision?

Accuracy is ratio of the total number of correctly classified samples to the total number of samples. Precision tells us how many of those attempts that are labeled as fraudulent as actually fraudulent.

Unsupervised Learning

Category of data samples are not known. You will notice the data clusters itself into groups. The patterns of the data will help to build a classifier. Clustering Method

A perceptron is used to classify data points into Class A or Class B. The perceptron has the inputs x0, x1, x2 and weights w0 = -0.3, w1 = -0.2, w2 = 0.8. A data point is in class A if v (local field value) < 0 otherwise it is in class B. What class does data point (1, 3) belong to?

Class B

What are some popular evaluation metrics in ML?

Classification: Confusion matrix True and false positive , True and false negative Accuracy and precision Sensitivity and specificity F1-score Receiver Operating Characteristic (ROC) Area under ROC (AUC) Regression: Correlation Mean squared error/Mean absolute error

Accuracy of trained models is not always 100%. What factors does Classification Accuracy depend on?

Complexity of the data, complexity of the ML model, etc.

What are the two metrics for regression models?

Correlation coefficient between the gold-standard and ML-predicted values Difference between the gold-standard and MLpredicted values (mean-absolute error, mean-square error)

Why tremendous growth in machine learning?

Data has become cheap and technology has improved significantly.

Why does machine learning work?

Data is not random, underlying behavior can be found from its structure. Predictions can be made using the understanding of this structure.

How to calculate overall Classification Accuracy?

# of Correct samples in both Classes/ Total # of samples in both Classes Example: Class A: 414 Correct, 25 Incorrect Class B: 227 Correct, 212 Incorrect (414+ 227) / [(414+25) + (227+212)] ALERT: Make sure you convert into % and round to 2 significant figures after the decimal

Segmentation Method

(Unsupervised Learning) Looking at x-ray for example. Use level of shading to identify whether covid exists in a person's lungs. Or distinguish soccer players on the field by using heat map and segmenting the player's colors as different.

Bias(W0)

- Add X0 as an input which is ALWAYS 1 - So your activation function adds: (-0.1)*(X0 or 1) as an input if Bias = -0.1 - This makes your threshold always 0

Perceptron

- the simplest neural network possible: a computational model of a single neuron - linear classifier used for ONLY binary classification

A perceptron is used to classify data points into Class A or Class B. The perceptron has the inputs x0, x1, x2 and weights w0 = -0.3, w1 = -0.2, w2 = 0.8. What is the weight of the first attribute?

-0.2

Based on the following output: yes int Which of the following codes give the output above? (-> means indent) A) x = int(5.9) if x==5.9: -> print('yes') type(x) B) x = int(5.9) if x==5: -> print('yes') type(x) C) x = int(5.9) if x==5: -> print('yes') type(x) D) x = int(5.9) if x==5.9: -> print('yes') type(x)

B) x = int(5.9) if x==5: -> print('yes') type(x)

How do you graph a Perceptron in the Feature Space?

Perceptron is a line you can plot. You have equation for u: u = -0.1(1) + 0.4*(X1) - 0.2*(X2) To find intercepts: Make u 0. Make x1 = 0 and get x2, plot this intercept. Repeat with making x2 = 0 to get x1. To find out which side is class 0 and class 1: Substitute

What is the most appropriate machine learning terminology? (Supervised, Unsupervised or Regression) "Predicting house prices according to their footage and neighborhood."

Regression

What is the most appropriate machine learning terminology? (Supervised, Unsupervised or Regression) "Salary prediction of FAU computer science students."

Regression

What is sensitivity (or recall) and specificity?

Sensitivity: Of the attempts who are fraudulent, how many were correctly detected? Specificity: Of the attempts who are non-fraudulent, how many were correctly detected?

What are the steps to make a handwritten digit classifier? (Only 0s and 1s)

Step 1 - identify the classes (groups, categories, etc.): 0 and 1 Step 2 - identify what features represents each image Step 3 - train a classifier that separates image samples from the two classes Step 4 - use the trained model to detect if a new image sample is 0 or 1


Kaugnay na mga set ng pag-aaral

MARK 3336 EXAM 4 PRACTICE QUESTIONS

View Set

A&P DSM chapter 14 sections 14.1-14.3

View Set

🌻🌻 1 st respirtory 🌻🌻

View Set

Section 8, Unit 2: Underwriting Guidelines for FHA Loans

View Set

Pharmacology Clear and Simple: Test One (Ch. 1-10)

View Set

37Qw/exp *LOOK Over* OB: Sexually Transmitted and Other Infections

View Set