Bayes’ Theorem provides a way that we can calculate the probability of a piece of data belonging to a given class, given our prior knowledge.
P(class|data) = (P(data|class) * P(class)) / P(data)
Where P(class|data) is the probability of class given the provided data.
Explanation:
- Naive Bayes is a classification algorithm for binary and multiclass classification problems.
- It is called Naive Bayes or idiot Bayes because the calculations of the probabilities for each class are simplified to make their calculations tractable.
This Naive Bayes tutorial is broken down into 5 parts:
Step 1: Separate By Class : Calculate the probability of data by the class they belong to, the so-called base rate. Separate our training data by class.
Step 2: Summarize Dataset : The two statistics we require from a given dataset are the mean and the standard deviation
The mean is the average value and can be calculated using :
mean = sum(x)/n * count(x)
Step 3: Summarize Data By Class : Statistics from our training dataset organized by class.
Step 4: Gaussian Probability Density Function : Probability or likelihood of observing a given real-value. One way we can do this is to assume that the values are drawn from a distribution, such as a bell curve or Gaussian distribution.
Step 5: Class Probabilities : The statistics calculated from our training data to calculate probabilities for new data. Probabilities are calculated separately for each class. This means that we first calculate the probability that a new piece of data belongs to the first class, then calculate the second class, on for all the classes.
Answer:
Option c: Heuristic
Explanation:
Heuristic scanning is a form of computer virus detection analysis that screen for the suspicious characteristic of the program which maybe a virus. Heuristic scanning is designed to detect those new computer virus, unknown virus or the modified version of the known virus.
To perform heuristic scanning, a weigh-based evaluation algorithm will be adopted to estimate the likelihood of the current scanned program behaves like a virus which can pose a computer threat. If it exceeds a threshold level, an alarm will be triggered.
Answer:
count = 0;
longest =0;
String myString = new String();
while (input.hasNext()){
myString = input.next();
if (myString.length() == longest) count++;
else
if (myString.length() > longest){
longest = myString.length();
count = 1;
}
}
Explanation:
Answer: D) Application programming interface
It's like a layer that is between the programmer/program and the hardware. It allows developers to create useful programs or tools for operating systems.