September 29, 2023

  1.  I ran a model on a dataset to predict diabetes based on inactivity and obesity.
  2.  The model became overfit as I worked on it.
  3.  I used the scikit-learn to test the model after overfitting was identified in the model by performing k-fold cross validation on the data.
  4. Producing a number of partitions of sample observations from the training dataset is the objective of cross validation.
  5. Number of partitions are determined by the number of observations.
  6.  I used a different fold as the validation set each time I trained and evaluated the model after folding the data into K(5) folds.
  7. Performance metrics from each fold are summed to determine the model’s generalization performance.
  8.  Following cross validation, it does prevent overfitting to some extent.

September 27, 2023

Today’s Lecture,

A. Mean Squared Error:-

  1. It Tells us about the performance of the model.
  2. It penalized the error of the model.
  3. It is mostly used in cost function.
  4. Points which are far away from the best fit line are the outliers.
  5. It is sensitive to outliers.                                                                                                                                                                                                                                                                                                 B. More Complex Model:-
  6. Complexity of the model is depend on the parameters used for the model.
  7. More parameters means more complexity.
  8. We have seen the example of the quadratic equation which shows the complexity of the model.

September 25, 2023

Topics Cover in today’s lecure:

  1. There are two methods of sampling.                                                                                          A. Cross- Validation B. Bootstrap
  2. The difference between testing error and training error.                                          Training error is often quite lower than the test error.
  3. Training error is not a good surrogate to testing error.
  4. Understand the concept of overfitting through the graph of testing and training data.
  5. Bias– How far on the average the model is true.
  6. Variance– How much that the estimate varies around it average.
  7. Bias and Variance together gives prediction error.
  8. K- fold validation – This is used to estimate test error.
  9. Data is divided into equal size in this technique.
  10. True and estimated test for mean squared error for data.
  11. The estimate of prediction error is biased upward, this is the issue with cross-validation.
  12. Bias can be minimize but in that situation variance will be high.
  13. Understand when we should use cross- validation.
  14. Right and wrong ways to apply cross-validation.

September 22, 2023

Today work on some project tasks,

  1. Firstly, I compare obesity with diabetes and plot a graph. The r squared value is 0.36
  2. Then, I compare inactivity with diabetes. The r squared value was as same as the 0.36.
  3. Then got the values of standard Deviation, Variance, Mean, Skewness and heteroscedasticity.

September 20, 2023

About today’s lecture,

  1. Professor gave an example of perfect linear regression model which fits the dataset so well.
  2. The data was about pre-molt and post- molt of the crabs.
  3. Variance, Skewness was high for this model.
  4. All the data points was around the best fit line.
  5. The histogram of post-molted was slightly moved towards left and was having higher peak value.
  6. The error was comparatively minimal.
  7. r2_score value was up to the mark.
  8. Then we saw the concept of t-test.
  9. t-test compares the means of two groups.
  10. If software says t-test is violated then we use Monte Carlo Test.
  11. In Monte Carlo Test, it predict possible outcome of an uncertain event.

September 18, 2023

Today’s lecture was about some equations and few regression concepts.

  1. Correlation between predictor and variables

2. Interaction Term

3. Generalized Linear Mode

4. Overfitting = In this, data fits in the model so well but it does not predicts anything.

5. Method to check overfitting = Cross-validation.

Work on project…

  1. Extract the data from the given pdf.
  2. Checked first few figures for reference by using (.head).
  3. Checked the shape of the dataset (df.shape).
  4. Get description of the dataset where I got to know Count, Mean, Max, Min, Std, and percentage wise distribution (df.describe()).
  5. Checked data types (df.types).
  6. Checked if there is any null value (df.isnull.sum()).

September 15, 2023

Today’s discussion session was very helpful. The questions asked by the students cleared up some basic concepts about linear regression.

  1.  The explanation of ” Why we calculate distance parallel to the Y-axis in linear regression” helped to clarify conceptually.

2. Secondly, the professor suggests building a profile on Linkedin.

Work Done Towards Project:-

I tried multiple linear regression on inactivity, diabetes, and obesity. I took 20% data for testing and 80% for training.  As a result, the r2 score value was very low so I divided the data 50-50 to get the r2 score close 1.

September 13, 2023

Things I learned from today’s lecture.

  1. P-Value:- It is the probability of obtaining the results while performing hypothesis tests. It assumes that the null hypothesis is correct.

2. If the P-value is less than 0.05 it indicates stronger proof against the given statement and if the P-value is greater than 0.05 it indicates weaker proof against the given statement.

3. Heteroscedasticity:- In heteroscedasticity the variance of the residual term, varies widely.

4. R-square:- It defines the variance in our data. If it is high, the prediction of the model is good.