Professional Documents
Culture Documents
That the
patient has a particular form of cancer (+) and 2. That the patient does not (-). A patient takes a lab
test and the result comes back positive. The test returns a correct positive result in only 98% of the
cases in which the disease is actually present, and a correct negative result in only 97% of the
cases in which the disease is not present. Furthermore, .008 of the entire population have this
cancer. Determine whether the patient has Cancer or not using MAP hypothesis.
P(cancer) = .008
P(+|cancer) = .98
P(-|!cancer) = .97
Explanation:
directly, but we can calculate it pretty easily using the law of total
positive is:
So now just plug and chug since we have all the required
numbers:
P(cancer|+)
= P(+|cancer) x P(cancer) /
( P(+|cancer) x P(cancer) + P(+|!cancer) x P(!cancer) ).
= .21
So even though the patient tested positve, the probability that he has
cancer is only 21%. How can we make sense of this, especially since
the cancer test is quite accurate? The answer lies in the fact that
Part B
1 ExplainBayestheorem? How it is useful.
Applications of the theorem are widespread and not limited to the financial realm. As
an example, Bayes' theorem can be used to determine the accuracy of medical test
results by taking into consideration how likely any given person is to have a disease
and the general accuracy of the test. Bayes' theorem relies on incorporating prior
probability distributions in order to generate posterior probabilities.
Constructed in feature
4 No feature selection.
selection.
Computationally
Computationally efficient because of
8 inefficient over non-
having analytical solutions.
sparse conditions.
https://www.javatpoint.com/bayesian-belief-network-in-artificial-intelligence
https://towardsdatascience.com/conditional-independence-the-backbone-of-bayesian-networks-
85710f1b35b
4 What is the difference between probability and likelihood?
https://medium.com/swlh/probability-vs-likelihood-cdac534bf523
5 Explain prior probability likelihood and marginal likelihood in context of Na¨ıve Bayes algorithm?
For example, three acres of land have the labels A, B, and C. One acre has
reserves of oil below its surface, while the other two do not. The prior probability of
oil being found on acre C is one third, or 0.333. But if a drilling test is conducted on
acre B, and the results indicate that no oil is present at the location, then the
posterior probability of oil being found on acres A and C become 0.5, as each acre
has one out of two chances.
Same as 3b
Same as 5b
https://medium.com/analytics-vidhya/naive-bayes-classifier-for-text-classification-556fabaf252b
9 Explain the general cause of overfitting and underfitting? What steps will you take to avoid
overfitting and underfitting?
Underfitting:
A statistical model or a machine learning algorithm is said to have
underfitting when it cannot capture the underlying trend of the data. (It’s just
like trying to fit undersized pants!) Underfitting destroys the accuracy of our
machine learning model. Its occurrence simply means that our model or the
algorithm does not fit the data well enough. It usually happens when we have
fewer data to build an accurate model and also when we try to build a linear
model with fewer non-linear data. In such cases, the rules of the machine
learning model are too easy and flexible to be applied on such minimal data
and therefore the model will probably make a lot of wrong predictions.
Underfitting can be avoided by using more data and also reducing the
features by feature selection.
Techniques to reduce underfitting:
1. Increase model complexity
2. Increase the number of features, performing feature engineering
3. Remove noise from the data.
4. Increase the number of epochs or increase the duration of training
to get better results.
Overfitting:
A statistical model is said to be overfitted when we train it with a lot of
data (just like fitting ourselves in oversized pants!). When a model gets
trained with so much data, it starts learning from the noise and inaccurate
data entries in our data set. Then the model does not categorize the data
correctly, because of too many details and noise. The causes of overfitting
are the non-parametric and non-linear methods because these types of
machine learning algorithms have more freedom in building the model based
on the dataset and therefore they can really build unrealistic models. A
solution to avoid overfitting is using a linear algorithm if we have linear data
or using the parameters like the maximal depth if we are using decision
trees.
Techniques to reduce overfitting:
1. Increase training data.
2. Reduce model complexity.
3. Early stopping during the training phase (have an eye over the loss
over the training period as soon as loss begins to increase stop
training).
4. Ridge Regularization and Lasso Regularization
5. Use dropout for neural networks to tackle overfitting.
10 Describe the average squared difference between classifier predicted output and actual output
https://www.javatpoint.com/machine-learning-naive-bayes-classifier
What is Hypothesis?
Hypothesis is an assumption that is made on the basis of some evidence. This is the initial point
of any investigation that translates the research questions into a prediction. It includes
components like variables, population and the relation between the variables. A research
hypothesis is a hypothesis that is used to test the relationship between two or more variables.
Characteristics of Hypothesis
Following are the characteristics of hypothesis:
Examples of Hypothesis
Following are the examples of hypothesis based on their types:
Same as 12b
Same as 3b
16 Explain the concept of EM Algorithm.
https://www.geeksforgeeks.org/ml-expectation-maximization-algorithm/
https://www.geeksforgeeks.org/gaussian-mixture-model/
https://svivek.com/teaching/lectures/slides/prob-learning/bayes-optimal-classifier.pdf
https://monkeylearn.com/blog/what-is-a-classifier/
Same as part b 8