Train And Evaluate Classification Models Flashcards

1
Q

Classification is a kind of machine learning used to categorise items into classes

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Classification is a form of machine learning in which you train and model to predict which category and item belongs to.
For example at health clinic might use diagnostic data such as a patient’s height weight blood pressure blood glucose level to predict whether or not the patient is diabetic

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Categorical data has distinct classes rather than numerical values.
Sometimes of data can be either numerical or categorical:
The time to run a race could be a time and seconds or we could split times in two classes of fast-medium and slow-categorical
While other kinds of data can only be categorical such as a type of shape like circle triangle or Square.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Binary classification.
Binary classification is classification of two categories.
For example we could label patients as non-diabetic or diabetic

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The class prediction is made by determining the probability for each class as a value between 0 which is impossible and one which is certain.
The total probability for all classes as fun as the patient is definitely either diabetic or non diabetic.
So if the predicted probability of a patient being diabetic is 0.3 then there is a corresponding probability of 0.7 that the patient is non diabetic
A threshold value usually 0.5 is used to determine the predicted class so if the positive blasts in this case diabetic has a predicted probability greater than the threshold then a classification of diabetic is predicted

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Training and evaluating a classification model.
Classification is an example of a supervised machine learning technique which means it relies on data that includes known feature values for example diagnostic measurements for patients as well as no label values for example a classification of non diabetic or diabetic.
A classification algorithm is used to fit a subset of the data to a function that can calculate the probability for each class label from the future values.
The remaining data is used to evaluate the model by comparing the production that generates from the features to the known class labels

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Simply calculating how many Productions will correct the sometimes misleading or too simplistic for us to understand the kinds of errors that will make in the real world
.
to get more detailed information we can tabulate the results in a structure called a confusion Matrix

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The training accuracy of a classification model is much less important and how well the model will work when given new and send data.
After all the train model so that they can be used or new data we find in the real world. So after we have trained a classification model we should evaluate how it performs on a set of new unseen data

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

The confusion matrix shows the total number of cases where the line
The models predicted zero and the actual label is zero - true negatives top-left
The model predicted 1 and the actual label as one - true positives bottom-right
The model predicted zero and the actual label is one - false negatives bottom-left
The model predicted 1 and the actual label is 0 - false positives top right.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The cells in the confusion matrix are often traded so that higher values have a deeper shade.
This makes it easier to see a strong diagonal trend from top left to bottom right highlighting the cells were the predicted value and actual value of the same

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

From these core values you can calculate the range of other metrics that can help you evaluate the performance of the model:
accuracy: out of all the predictions how many were correct. (TP+TN) /(TP+TN+FP+FN)
Recall: out of all of the cases that are positive how many did the model identify TP/(TP+FN)
Precision: of all the cases that the model predicted to be positive how many actually are positive. Tp/(Tp+FP)

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

It is also possible to create multi-class classification models in which there are more than two possible classes.
For example the health clinic might explain the diabetes model to classify patients as:
Non-diabetic
Type 1 diabetic
Type 2 diabetic

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Using multi-class classification models.
Multi-class classification model Cindy thought of as a combination of multiple binary classifiers. There are two ways in which you would approach the problem

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

One was stressed or ovr in which a classifier is created for each possible class value with a positive outcome for cases where the production in this class and negative predictions for classes were the production if there’s any other class.
For example of classification problem with four possible shape glasses like square circle triangle and hexagon would require for classify as that predict turn on New Line Square or not new line circle or not
Triangle or not
Hexagon or not

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

One versus one ortho va in which a Pacifier for each possible pair of glasses is created.
The classification problem with four shapes classes would require the following binary classifiers
Square or triangle new Lion Square or circle Newlands for your hexagon uline triangle or circle
Circle a hexagon or
Triangle hexagon In both approaches the overall model must take into account all of these predictions to determine which single category the item belongs to

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Fortunately in most machine learning frameworks including a scikit-learn implementing a multi-class classification model is not significantly more complex and binary classification and in most cases the estimate is used for binary classification implicitly support multi-class classification for abstracting and over our algorithm or OVO algorithm by allowing a choice of either

A