Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3. Let\'s assume we are going to create a naive Bayes model to classify each pix

ID: 3748864 • Letter: 3

Question

3. Let's assume we are going to create a naive Bayes model to classify each pixel in an image into two categories. 1. Plant 2. non-plant(Background) This task is called pixel-level plant segmentation. In each image, there is a plant and the background. i.e. two classes. Plant biologists are only interested to the plant area in an image. We are going to segment a plant image andfind whether every single pixel in an image belongs to the background or to the plant. An important task for plant biologists to focus on the plant area in an image and eliminate the background. Every pixel in an image has three information, red, green and blue (RGB). R, G and B together compose the color of each pixel in an image. We have probability distribution functions (PDFs) for R, G, and Blue channels for plant and background pixels in images as follow

Explanation / Answer

1) Green is the best variable for naive bayes classification as there is the least amount of common area shared between plant and non-plant PDGs among all the channels.

Let's define P(plant| x < G < y) as probability that the segment is plant given the green color channel is between (x,y) and P(non-plant| x < G < y)  as probability that the segment is non-plant given the green color channel is between (x,y) . Then ,from the diagram we see that that for the green channel,we have the smallest segment (x,y) which is (10,12) on the channel axis where both P(plant| x<G <y) > 0 and P(non-plant| x<G<y) > 0 which will give more unambiguos classification.

2. Blue pixel is the worst one for classification the there is greater length of segment (14,20) for which PDG of both plant and non-plant are greater than zero (which increases the likelihood for ambiguos classification.

// For the next two question since we don't know whether the pixel is plant or non-plant , i assume the // prior probability as 0.5 each that is, P(plant)prior = P(Non-plant)prior = 0.5   

3. From the PDG, we can easily see that P(Non-plant| R <=5,G <= 8 and B <= 9) = 0 Hence, the pixel is a plant. Since, R, G and B channels are independent of each other, we write  

P(Plant| R=5, G=8, B=9) = P(R=5|Plant) *P(G=8|Plant )*P(B=9|Plant)*P(plant)prior/P(R=5,G=8,B=9)

  P(Non-Plant| R=5, G=8, B=9) =

P(R=5|Non-Plant)*P(G=8|Non-plant) * P(B=9|Non-Plant) *P(Non-plant)prior//P(R=5,G=8,B=9)

Now P(R= 5|plant) > 0 , P(G =8|plant) >0 and P(B=9|plant) >0 while

P(R=5|non-plant) = P(G=8|non-plant) = P(B=9|non-plant) = 0

Hence ,the pixel is plant

4. With R = 30, G = 15 and B= 24 ,from the PDG , we can infer that the segment belongs to the non- plant .

More Formally,we write

P(Plant| R=30, G=15, B=24) =

P(R=30|Plant) *P(G=15|Plant )*P(B=24|Plant)*P(plant)prior/P(R=30,G=15,B=24)

  P(Non-Plant| R=30, G=15, B=24) =   

P(R=30|Non-Plant)*P(G=15|Non-plant) * P(B=24|Non-Plant) *P(Non-plant)prior//P(R=30,G=15,B=24)

Now P(R= 30|non-plant) > 0 , P(G=15|non-plant) >0 and P(B=24|non-plant) >0 while

P(R=30|plant) = P(G=15|plant) = P(B=24|plant) = 0

Hence, the pixel is non-plant

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote