Kamis, 14 September 2023

Convert Decimal to Hexadecimal

As with binary and octal, we will use the same calculation technique.

Example 1:

6710 = …….16 ?

  • First of all 67/16 = 4, remainder 3
  • Then 4/16 = 0, remainder 4,
  • Thus from the calculation results obtained 6710 = 4316

 

Example 2:

9210 = ………………………16 ?

  • First 92/16 = 5, remainder 12 (written C)
  • Then 5/16 = 0, remainder 5,
  • Thus from the calculation results obtained 9210 = 5C16

Senin, 11 September 2023

Calculation of Naive Bayes Classification (Part 2) Training Data Test Phase

After calculating each probability, the next step is to test the training data.

  • Training Data Test Phase


Information :
  • The data above is the data that we have obtained from the previous training data
  • What is calculated first is the part of P (Remarks | Roadworthy)
  • P(Remarks|Easy to Road) is the calculation for the criteria Description|Easy to Go * Driver criteria = Healthy * Lights criteria = On * Tire criteria = New * Machine criteria = New
  • = 0.6 * (0.555556 * 0.666667 * 0.555556 * 0.44444) and the result is below
  • This stage is carried out for all training data

So the results obtained are as follows :


This stage is also carried out for criteria P (Remarks|Not Roadworthy), so the results are as follows :


The next step is to enter the results of criteria P (Remarks|Road Worthy) and P criteria (Remarks|Not Roadworthy) into a table.


From the data above, we compare the results of Roadworthy and Roadworthy criteria and select the largest value, so we get the following results :


From the data above it can be concluded :
  • The data that corresponds to the training data is 13 data
  • Data that does not match the training data are 2 data

Sabtu, 09 September 2023

Konversi Desimal ke Heksadesimal

Seperti halnya biner dan oktal, kita pun akan menggunakan teknik perhitungan yang sama.

Contoh 1:

6710 = …….16 ?

  1. Pertama-tama 67/16 = 4, sisa 3
  2. Lalu 4/16 = 0, sisa 4,
  3. Dengan demikian dari hasil perhitungan didapatkan 6710 = 4316

 

Contoh 2:

9210 = ………………………16 ?

  1. Pertama-tama 92/16 = 5, sisa 12 (ditulis C)
  2. Lalu 5/16 = 0, sisa 5,
  3. Dengan demikian dari hasil perhitungan didapatkan 9210 = 5C16


Kamis, 07 September 2023

Naive Bayes Classification Calculations (Part 1)

In this post, I will discuss classification calculations using the Naive Bayes method.

What we will classify is the Roadworthy BUS Classification

The data to be used consists of the following:

  • Number of data = 14
  • Noise = 4
  • Number of classifications = 2 


From the data above, what we have to do is:

1. Determine class probabilities
  • Roadworthy = 9/15 = 0.6
  • Not Roadworthy = 6/15 = 0.4
Information :
  • 15 is the amount of data
  • 9 is the amount of data for Roadworthy
  • 6 is the amount of data for Not Roadworthy

2. Determine category probabilities
  • Roadworthy Category


Information :
  • P(Driver=Healthy|Road Worthy) is the number of Healthy and Roadworthy Driver categories
  • 5 is the number of healthy drivers who are roadworthy
  • 9 is the number of roadworthy classifications
  • So the result is 0.555556
  • Likewise with the next process

  • Not Roadworthy Category


Information :
  • P(Driver=Healthy|Unfit for Road) is the number of categories of Healthy and Unfit for Road drivers
  • 2 is the number of healthy drivers who are not roadworthy
  • 6 is the number of classifications not roadworthy
  • So the result is 0.333333
  • Likewise with the next process

After the probability calculation process is carried out, the data that will be obtained is as follows :


Sabtu, 02 September 2023

Convert Decimal to Octal

With the same formula as binary we can also do it for base 8 (octal) numbers.

Example:

6710 = ……8 ?

  • First of all 67/8 = 8, remainder 3
  • Then 8/8 = 1, remainder 0,
  • Last 1/8=0, remainder 1.
  • Thus from the calculation results obtained 6710 = 1038

Jumat, 01 September 2023

Comparison of Euclidean Distance, Manhattan Distance and Minkowsky Distance

This time I will post a comparison of Euclidean distance, Manhattan distance and Minkowsky distance.
This is just a comparison.
The data to be used are as follows :


Perform the data calculation above using Euclidean distance, Manhattan distance and Minkowsky distance.
If you don't understand, you can see my previous post.
  • Euclidean Distance https://infmining.blogspot.com/2022/08/set-data-euclidean-distance.html
  • Manhattan distance https://infmining.blogspot.com/2022/08/set-data-jarak-manhattan.html
  • Minkowsky Distance https://infmining.blogspot.com/2022/09/set-data-jarak-minkowski.html

So the results we will get are as follows :


From the above results it is obtained that the Minkowsky Distance has a smaller value than the Manhattan Distance and also the Euclidean Distance.