Final exam Flashcards
Explain the difference between supervised and unsupervised learning.
Supervised learning develops model and trains that model using both input and output data and predicts future outputs. Un-supervised learning interprets data based only on known input and predicts output i.e. this learning finds hidden patterns only in input data and does not need output data.
What types of tasks are classified as supervised and what kind of tasks as unsupervised learning?
Supervised : classification and regression
Un-supervised : clustering
Explain cross-validation.
Cross-validation is a resampling procedure used to evaluate machine learning models on a limited data sample. For existing machine learning model and some data, it shows if model fits. It splits data into training and test set. Model is being trained with the training set and evaluated the result with test set.
Draw a 2x2 confusion matrix and explain what each box means.
Predicted class
Actual class Class=1 Class=0
Class=1 TP FN
Class=0 FP TN
TP – True Positive; TN – True Negative; FP – False Positive; FN – False Negative
NxN matrix is used to evaluate performance of classified model by comparing actual class vs. predicted class. Applicable only to 2-class models: C=[0, 1].
State 2 types of Fuzzy logic and explain the difference.
Mamdani and Sugeno. Mamdani uses rules determined by the user to get output distribution, uses fuzzification and defuzzification. Sugeno generates fuzzy rules based on a data set with inputs and outputs and does not use fuzzification and defuzzification.
Define sensitivity and specifity in words and using formulas.
Sensitivity= TP/(TP+FN) (TPR)
Specificity= TN/(TN+FP) (FPR)
Sensitivity represents a ratio of values classified correctly as positive and all positive values i.e it represents how good at classifying positive class is; it is also called true positive rate.
Specificity represents a ratio of values classified incorrectly as positive and all negative values i.e it represents how good at classifying negative class is; it is also called false positive rate.
Explain the correlation coefficient and in which kind of problems it is used? What performance metrics is also used in such problems?
The correlation coefficient is a statistical measure of the strength of a linear relationship between two variables.
It is calculated as:
***
It is used in regression problems.
Performance metrics which are used are mean-absolute error (MAE), root mean-squared error (RMSE), relative absolute error (RAE), root relative squared error (RRSE).
What is the class imbalance problem? Which performance metric is typically used in such cases? How would you prevent this issue?
The class imbalance problem typically occurs when there are many more instances of some classes than others (for example, 500 samples in class 1 and 30 samples in other class). Performance metric is average recall. Either change performance metric or resample.
Is ANFIS neural network of Fuzzy system?
ANFIS (Adaptive Neuro-Fuzzy Inference System) is a hybrid intelligent system that combines the capabilities of both neural networks and fuzzy logic. It utilizes fuzzy logic to handle uncertainty and imprecision in data and combines it with the learning capabilities of neural networks to adaptively tune the parameters of the fuzzy inference system.
Explain key difference between PSO and GA in terms of principle of operation and terminology.
PSO – Particle Swarm Optimization, GA – Genetic Algorithm.
- PSO does not have genetic operators (crossover, mutation)
- Particles have memory in PSO, there is no selection and removal of population members, while GA does not have memory and there are selection and removal of members;
- Particles survive the whole run (no survival of the fittest) in PSO;
- PSO is more efficient, faster;
- PSO needs more iterations than GA, but fewer number of partcles;
- In GA variables are called genes, in PSO dimensions;
- In PSO topology is constant, while it changes in GA.
Explain the difference between feature selection and extraction.
Feature selection is selection of relevant attributes for model construction, ie. It gives a subset of features. Feature extraction is making new attributes from the original data base so there are new features created from functions of original features.
List 3 main types of feature selection.
Wrapper, filter, embedded
Explain the difference between relevant and redundant.
Relevant refers to information, data, or features that are directly related to the problem or task at hand. Relevant information contributes meaningfully to achieving the objective or understanding the subject matter. In other words, relevant items are essential, valuable, or useful in addressing the specific goal or question being considered.
Redundant, on the other hand, refers to information, data, or features that are unnecessary, repetitive, or duplicative. Redundant items do not provide additional value or contribute meaningfully to the task or objective at hand. They may repeat information already present or be extraneous to the problem being addressed.
Why is k-NN termed as lazy learner?
It does not build models explicitly unlike decision trees and rule-based systems. Because it is not learning functions of data base but it is memorizing training data set instead. K-NN is a lazy learner because it does not learn a discriminative function from the training data but “memorizes” the training data set instead.
What is the purpose of kernel trick in SVM?
Kernel is opposite from feature selection – it is adding dimensions (going from lower to higher) in order to solve non-linear separable problems. It deals with non-linearity and higher dimension.