Hello everyone this repo will contain my journey of machine learning and DeepLearning with some exciting projects
300 DAYS OF MACHINE LEARNING , DEEP LEARNING, NLP & Genrative AI.
| Books and Resources | Status of Completion | | ----- | -----| | 1. Machine Learning Specialization | ✅ | | 2.Hands-On Machine Learning with Scikit-Learn and TensorFlow| ✅ | | 3.Intro to DeepLearning | ✅ | | 4.Deep Learning Specialization| ✅ | | 5.LLM from Scratch| ✅ | | 6.Hugging face Nlp course| ✅ | | 7.LLM course| 🏊 | | 8.Efficiently Serving LLMs | ✅ | | 9.Langchain docs | ✅ |
| Projects Completed | | ----------------- | | 1. Medical Insurance Price Prediction | | 2.Iris Flower Classification | | 3.California Housing Price Prediction | | 4.Collabrative filtering: Book Recommender Webapp | | 5.CNN: Bird Species Classification | | 6.CNN Transfer Learning: Messy-or-CleanRoom-Detection | | 7.Data Augmentation | | 8.YOLO From Scratch | | 9.U-NET From Scratch | | 10.[LLM From Scratch]() | | 11.Shakespeare text generation| | 12.Neural Style Transfer Webapp | | 13.Langchain : Petname Generator| | 14.Langchain : YouTube Assistant| | 15.Mistarl7B-Question-Answer-on-your-data| | 16.Companyrecommender_LLM| | 17.Local LLM : DocBot| | 18.Fine Tuning Mistral7B on google colab | | 19.Multiclass Image Classification: Inception V3|
Topics Learned in each day
| Days | Topics Covered | Resources | |--------- | ------------------ | ------------- | | Day1 | Superviesed learning, regression, classification | Machine Learning Specialization | | Day2 | Univariate Linear regression, Cost function | Machine Learning Specialization | | Day3 | Gradient descent | Machine Learning Specialization | | Day4 | Learning rate | Machine Learning Specialization | | Day5 | Multiple linear regression, Vectorization | Machine Learning Specialization | | Day6 | Feature scaling, Choosing correct learning rate | Machine Learning Specialization | | Day7 | Feature engineering, Polynomial regression | Machine Learning Specialization | | Day8 | Classification, Logistic regression | Machine Learning Specialization | | Day9 | Sigmoid function, Decision boundary | Machine Learning Specialization | | Day10 | Gradient descent in Logistic regression, Cost function in Logistic regression | Machine Learning Specialization | | Day11 | Gradient descent in logistic regression Implementation | Machine Learning Specialization | | | Day12 | Underfitting,Overfitting, Addressing overfitting, Plotting overfitting,Regularization implementation | Machine Learning Specialization | | Day13 | Neural Network Introduction , Why neural network? | Machine Learning Specialization | | Day14 | Neural Network notation, forward propagation, Neuron Layer implementation| Machine Learning Specialization | | Day15 | Neural network implementation for digit classification, Classification of AI | Machine Learning Specialization | | Day16 | Vectorization in Neural Network , Neural network of Handwritten Binary Digit Classification| Machine Learning Specialization | | Day17 | Model Training Steps, Activation Function , Implementation of ReLU |Machine Learning Specialization | | Day18 | Multi Class classification, soft max regression, cost for softmax regression | Machine Learning Specialization | | Day19 | Improved Implementation of softmax/logistic regression in neural network,multilabel classification, Advanced optimization, Additional layer types | Machine Learning Specialization | | Day20 | BackpropagationImplementation of Backpropagation, Debugging a learning algorithm, Model selection and Machine learning diagnostic | Machine Learning Specialization | | Day21 | Bias/Variance , choosing regularization parameter | Machine Learning Specialization | | Day22 | Diagonising Bias and Variance ,Labs on Diagonising Bias and Variance , Choosing regularization parameter | Machine Learning Specialization | | Day23 | Iterative loop of ML Development, Error analysis, Transfer Learning | Machine Learning Specialization | | Day24 | Full cycle of Machine learning projects,Precison and Recall , Trading off precison and recall , Lab on Full Machine Learning Cycle| Machine Learning Specialization | | Day25 | Decision Tree, Decision Tree Learning| Machine Learning Specialization | | Day26 | Measuring Impurity, Information Gain, Decision Tree Learning, Recursive Splitting| Machine Learning Specialization | | Day27 | One hot encoding, Splitting for continous variable, Regression Tree| Machine Learning Specialization | | Day28 | Tree ensemble , Random Forest Algorithm, XG boost, when to use decision tree | Machine Learning Specialization | | Day29 | Unsupervised Learning, K means clustering Algorithm, cost function for k means clustering,Labs on K means Clustering| Machine Learning Specialization | | Day30 | Anamoly detection, Anamoly detection vs supervised Learning use case| Machine Learning Specialization| | Day31 | Recommender system, Content based Recommendation, Collaborative Filtering Recommender Systems | Machine Learning Specialization | | Day32 | Normalization, Limitation of Collaborative Filtering,Lab Collabrative filetering recommender system, Content base recommendation for large items | Machine Learning Specialization | | Day33 | Tensorflow implementation of Collaborative Filtering,Dimensonality Reduction, PCA | Machine Learning Specialization | | Day34 | Step by step calculation of PCA , Implementation of PCA, | Machine Learning Specialization | | Day35 | Reinforcement Learning, Markov Decision Process | Machine Learning Specialization | | Day36 | State Action Value Function, Bellman Function, Random stochastic environment,State Action value function Implementation | Machine Learning Specialization | | Day37 | Discrete State and Continuous State, Refinement of reinforcement learning by minibatches and softupdate | Machine Learning Specialization | | Day38 | Building a Book Recommender System using Collaborative Filtering | Machine Learning Specialization | | Day39 | California Housing Price Prediction : Batch learning vs online learning, Cost for Linear regression (RMSE and MAE) usecase,fetching and loading of data with EDA | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day40 | California Housing Price Prediction (Continued) : Created test data , and splitted data on the basis of train-test-split and also with stratifcation split to remove imbalance in data and create same proportion. | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day41 | California Housing Price Prediction (Continued) : data visualization, EDA | Hands-On Machine Learning with Scikit-Learn and TensorFlow| | Day42 | California Housing Price Prediction (Continued) : feature engineering, using simple imputer, handling categorical data by encoding | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day43 | California Housing Price Prediction (Continued) :Feature Scaling and Bucket Binning | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day44 | California Housing Price Prediction (Continued) : Data preprocessing pipeling development | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day45 | California Housing Price Prediction (Continued) : Selection, training and evaluation of model | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day46 | Binary Classification, measuring accuracy using Confusion matrix and ROC curve | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day47 | Multiclass classification, Multilablel classification, Multioutput classification Classification Implementation | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day48 | Linear Regression, Gradient descent, Stochastic Gradient descent and SGD regressor, Implementation | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day49 | Polynomial Regression, Learning curve, overfitting , underfitting and its solution| Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day50 | Ridge Regression and its Implementation with SGD Regressor| Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day51 | Lasso Regression, elastic net regression and early stopping | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day52 | Revision on logistic regression and softmax regression, logloss, Implementing logistic regression | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day53 | SVM, kernel function and kernel trick | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day54 | Polynomial kernel and RBF kernel | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day55 | Support Vector Machine and It classes | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day56 | Decision Tree and regularization in decision tree and its implementation | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day57 | Decision Tree for regression , hyperparameter tuning and its implementation. | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day58 | Ensemble Learning and Voting classifier | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day59 | Bootstrap Aggregation | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day60 | Random patches and random subspaces | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day61 | Random Forest | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day62 | Boosting | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day63 | History based gradient boosting and stacking | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day64 | Dimensionality Reduction and PCA | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day65 | Local Linear embeddings and K means | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day66 | Supervised Learning in Neural Network | Deep Learning Specialization | | Day67 | Image Classifier using sequential API | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day68 | Vectorization and Broadcasting in python | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day69 | Deep Learning Api to create complex model | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day70 | Perceptron as a binary classifier | Deep Learning Specialization | | Day71 | Perceptron trick , Loss function in perceptron, Gradient descent, Backpropagation, Batching and regularization, | Hands-On Machine Learning with Scikit-Learn and TensorFlow| | Day72 | RNNS, Encoding, Embeddings, Implementing simple RNN | Introduction to Deeplearning| | Day73 | Backpropagation through time, Gradient issues | Introduction to Deeplearning| | Day74 | LSTM, self attention | Introduction to Deeplearning)| | Day75 | Convolution Neural Network(CNN) | Introduction to Deeplearning)| | Day76 | Convolution Neural Network(CNN) Implementation and deeper understanding | Introduction to Deeplearning)| | Day77 | Steps of CNN and deeper intuition | Introduction to Deeplearning)| | Day78 | R-CNN | Introduction to Deeplearning)| | Day79 | Bird species classification using CNN | Introduction to Deeplearning)| | Day80 | Generative Modeling, Auto encoder and Variational Auto encoders | Introduction to Deeplearning)| | Day81 | prior on latent distribution , Regualrization and normal prior , Reparametrization, Latent peturbation and entanglement | Introduction to Deeplearning)| | Day82 | Generative Adversarial Networsk (GANS)| Introduction to Deeplearning)| | Day83 | Challenges for robust deep learning, algorithmic bias,Class Imbalance, Class Imbalance solution| Introduction to Deeplearning)| | Day84 | Debiasing VAES and uncertainity| Introduction to Deeplearning)| | Day85 | Auto encoders | Introduction to Deeplearning)| | Day86 | Unsupervised retraining using stacked autoencoders and Tying Weights| Introduction to Deeplearning)| | Day87 | Training autoencoders at a time,convolutional autoencoders, denoising autoencoder | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day88 | Sparsity autoencoders | Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day89 | variable autoencoders and its implementation| Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day90 | GAN implementation| Hands-On Machine Learning with Scikit-Learn and TensorFlow | | Day91 | sigmoid function,sigmoid derivative, image to vector conversion, normalizing rows, softmax function, vectorization, L1 loss, L2 loss| Deep Learning Specialization| | Day92 | shallow neural network and implemented logistic regression on neural network| Deep Learning Specialization| | Day93 | Optimization ,EWMA| Deep Learning Specialization| | Day94 | SGD momentum,Nesterov Accelerated Gradient (NAG),Adaptive Gradient(ADaGrad)| Deep Learning Specialization| | Day95 | Adam optimizer,RMSProp optimizer| Deep Learning Specialization| | Day96 | Regularization of neural network ,L1 and L2 regularization , Dropout regularzation, data augementation , early stopping for reducing overfitting and orthogonalization| Deep Learning Specialization| | Day97 | Normalizing input features to make gradinet descent faster , Vanishing and exploding of gradients, Checking of gradient descent| Deep Learning Specialization|Phase II : Exprementing Learning and funnn
Topics Learned in each day
| Days | Topics Covered | Resources | |--------- | ------------------ | ------------- | | Day211 | Multiagent soft start | Agent Course) |Day1
1. Supervised learning
Learns from being givenright answers.
Supervised machine learning is based on the basis of labeled data.First the data is fed to the model with both input and output and later on test data is given to make prediction by model.
some algorithm used in supervised learning with their uses are :
- Regression : House price prediction.
- Classification : Breast cancer detection.
2. Unsupervised learning
Learns by finding pattern in unlabelled data. Unsupervised learning is different from supervised learning as it is not provided with labelled data.The algorithm work by finding pattern in data. some algorithm used in unsupevised learning with it uses are:- Clustering : Grouping similar data points together e.g: grouping of customer , grouping of news,DNA microarray.
- Anomlay detection: Finding unusal data points e.g: fraud detection , quality check.
- Dimensionality reduction : Compress data using feweer numbers e.g : Image processing.
- 📚Resources
Day2
Univariate Linear regression
Univariate linear regression has one dependent variable and one independent variable. With the help of indendent variable also known as input,feature we predict the output. Firstly we provide training set to our model and later on we predict the output using training set.Cost function
A cost function is a measure of how well a machine learning model performs by quantifying the difference between predicted and actual outputs.lower the value of cost function better the model
- linear regression model
- cost function
- 📚Resources
Day3
Gradinet descent
Gradient descent is an algorithm for finding values of parameters w and b that minimize the cost function J.It is made cleared in below image.
- gradient descent
- 📚Resources
Day4
Learning rate
Learning ratealpha in gradient descent should be optimal.
- If learning rate is too small gradient descent may be too slow and take much time.
- If learning rate is too large gradient descent may overshoot and never reach minimum i.e fail to converge,diverge.
- 📚Resources
Day5
Multiple linear regression
Multiple linear regression in machine learning model that uses multiple variables called as features to predicts the output.
Vectorization
In muliple linear regression calculation is done using vectorization as it perform all calculation simultaneously and parallely and speed up the arithmetic operations.
- vectorization in numpy
- Multiple linear regression
- 📚Resources
Day6
Feature scaling
When you data features has very large range,too small range gradient descent may take large time so data is rescaled to normal similar range called feature scaling. some popular feature scaling techniques are:- mean normalization
- Z score normalization
Feature scaling visual representation
Choosing correct learning rate
First we make sure gradient descent is decreasing over the iteration by looking at learning curve if it is working properly we choose correct learning rate by starting with smaller learning rate and increase it gradually.- feature scaling and learning rate
- 📚Resources
Day7
Feature engineering
Feature engineering means designing newfeatures by transforming or combining original features which maybe very important in prediciting the output. for e.g: we have to predict the price of swimming pool and we have length breadth and height of swimming pool as features now we can used feature engineering to create our new feature which is volume which is very important in predicting the price of swimming pool.Polynomial regression
Polynomial Regression is a regression algorithm that models the relationship between a dependent(y) and independent variable(x) as nth degree polynomial. The Polynomial Regression equation is given below: y= b0+b1x1+ b2x12+ b2x13+...... bnx1n It is used incase of non linear dataset.
course:Machine Learning Specialization
Day8
Classification
Classification is a type of supervised learning in machine learning, where the goal is to predict the class label of an input data point.For example, we may want to classify emails as spam or not spam, or classify images as cats or dogs.Logistic regression
Logistic regression is a type of algorithm used for classification problems. It works by estimating the probability of an input data point belonging to a particular class. For example, it may estimate the probability that an email is spam or not spam, or the probability that an image is a cat or a dog.To estimate these probabilities, logistic regression uses a mathematical function called the logistic function, which maps the input data to the probability space. The logistic regression algorithm then learns the relationships between the input features and the target class by adjusting weights, or coefficients, assigned to each input feature. These weights are adjusted to maximize the probability of the correct classification.
In the end, logistic regression outputs the predicted class for each input data point, based on the estimated probabilities. This can be useful for a wide range of classification tasks, from predicting diseases to detecting fraud.
- classification
- 📚Resources
Day9
Sigmoid function
The sigmoid function is a mathematical function that maps any input value to a value between 0 and 1. It is commonly used in logistic regression to model the probability of a binary outcome. The sigmoid function has an S-shaped curve and is defined as follows:σ(z) = 1 / (1 + e^(-z))
where z is the input value to the function. The output of the sigmoid function, σ(z), is a value between 0 and 1, with a midpoint at z=0.
The sigmoid function has several important properties that make it useful in logistic regression. First, it is always positive and ranges between 0 and 1, which makes it suitable for modeling probabilities. Second, it is differentiable, which means that it can be used in optimization algorithms such as gradient descent. Finally, it has a simple derivative that can be expressed in terms of the function itself:
d/dz σ(z) = σ(z) * (1 - σ(z))
This derivative is used in logistic regression to update the model coefficients during the optimization process.
Decision boundary
The decision boundary is the line that separates the area where y=0 and where y=1.It is create by our hypothesis function. In logistic regression, the decision boundary is the line (or hyperplane in higher dimensions) that separates the different classes of the target variable. The decision boundary is determined by the logistic regression model, which uses the input variables to predict the probability of belonging to a certain class.
- decision boundary
- 📚Resources
Day10
Gradient descent in Logistic regression
Logistic Regression Ŷi is a nonlinear function(Ŷ=1/1+ e-z), if we put this in the above MSE equation it will give a non-convex function as shown:
- When we try to optimize values using gradient descent it will create complications to find global minima.
- Another reason is in classification problems, we have target values like 0/1, So (Ŷ-Y)2 will always be in between 0-1 which can make it very difficult to keep track of the errors and it is difficult to store high precision floating numbers.
Cost function for logistic regression
- 📚Resources
Day11
Gradient Descent in logistic regression
Gradient Descent in Logistic Regression is an iterative optimisation algorithm used to find the local minimum of a function. It works by tweaking parameters w and b iteratively to minimize a cost function by taking steps proportional to the negative of the gradient at the current point. Gradient descent in logistic regression looks similar to gradient descent in linear regression but it has different value for function.
- gradient descent in logistic regression
- 📚Resources
Day12
Underfitting
It is a situtation when the training set doesnot fit well. It happen when data has high bias.Overfitting
It is a situation when the training set fit extremely well . It is also known as data with high variance.Addressing overfitting
- Collecting more training example
- Select features include/exclude
- Reduce the size of parameters i.e "Regularization".
- overfitting
Regularization
Regularization is a technique to reduce the parameter and prevent overfitting of data. It has a term called lambda whose value if larger result underfitting and smaller result overfitting it also called penalty term.
course:Machine Learning Specialization
Day13
Neural network
Neural network is an computer algorithms that try to mimic the brain.neural network is made of a input layer that take input data and hidden layer does all the computation and output layer displays the output.
- 📚Resources
Day14
Neural network notation
In neural network.- neuron is represneted by subscript.
- neural network layer is represented by superscript.
Forward propagation in neural network
Forward propagation refers to storage and calculation of input data which is fed in forward direction through the network to generate an output. Hidden layers in neural network accepts the data from the input layer, process it on the basis of activation function and pass it to the output layer or the successive layers. Data flows in forward direction so as to avoid circular shape flow of data which will not generate an output. The network configuration that helps in forward propagation is known as feed-forward network.- 📚Resources
Day15
Neural network implementation in tensorflow
Neural network can be easily implemented in tensorflow as below:
AGI
AI is mainly classified into two type: ANI and AGI- AGI:An AGI is a hypothetical intelligent agent that can learn to accomplish any intellectual task that human beings or other animals can perform. It is defined as an autonomous system that surpasses human capabilities in the majority of economically valuable tasks
- 📚Resources
Day16
Vectorization in neural network
In neural network vectorization helps to perform calculation simultaneously and save a lot of time. It can implemented as :
Neural network implementation in code
course:Machine Learning Specialization
Day17
Model Training steps
Model training is simplified in 3 steps :- Specify how to compute output given input x and parameters w,b (define model)
- Specify loss and cost
- Train on data to minimize cost(Gradient descent)
- 📚Resources
Activation function
There are different activation function for different purpose some of the most commonly used are :- Linear acitvation function(activation='linear')
- ReLU (activation = 'ReLU')
- Sigmoid function(activation='sigmoid')
For hidden layer we choose ReLU as activation and for output layer we choose activation according to our problems,because if we choose sigmoid in hidden layer than neural network becomes very slow so it better to choose Relu in hidden layer
- ReLU implementaion
- 📚Resources
Day18
Multiclass classification
Target y can take on more than two possible values. In this case of multiclass classification we use Softmax regression.Softmax regression
Softmax regression is the generalization of logistic regression for multiple classs. Its output is calculated as:
Cost for softmax regression
Cost for softmax regression is also known as cross-entropy loss. It is obtained as.
- 📚Resources
Day19
Improved Implementation of softmax/logistic regression in neural network
Our normal implementation of softmax cause some of numerical roundoff error so for the more numerical accurate implementation of softmax regression we use linear activation in output layer and passingfrom_logits = True as parameter in loss at model.compile().
You can get more insight by looking at image below:
- It can be implemented similarly for softmax neural network.
- Numerically accurate implementation vs normal implementation
MultiLabel classification
Multilabel classification is a type of classification problem in machine learning where each instance can be assigned to multiple classes or labels simultaneously. In other words, instead of predicting a single class for an instance, the goal is to predict a set of labels that are applicable to that instance. Here is difference between multiclass and multilable classficationAdvanced optimization
Adam algorithm is used for advanced optimization in neural network.- If learning rate is smaller adam algorithm increases it automatically.
- If learning rate is larger then adam algorithm decreases it automatically.
model.compile( optimizer=tf.keras.optimizers.Adam(learningrate=1e-3), loss = tf.kearas.losses.SparseCategoricalCrossentropy(fromlogits=True))
Additional Layer types:
Some of layer types of neural network are :- Dense Layer (Fully Connected Layer): A dense layer is a basic layer where each neuron is connected to every neuron in the previous layer. It is characterized by its weight matrix, bias vector, and activation function. Dense layers are commonly used in feedforward neural networks and can learn complex patterns and relationships in the data.
- Convolutional Layer: Convolutional layers are primarily used in convolutional neural networks (CNNs) for analyzing grid-like data, such as images. These layers perform convolutions, applying filters to the input data, and capturing local patterns and features. Convolutional layers are effective in image recognition, object detection, and other computer vision tasks.
- 📚Resources
Day20
Back Propagation
Backpropagation, or backward propagation of errors, is an algorithm used in machine learning to adjust the parameters of a neural network by calculating the gradients of a loss function with respect to the network's weights and biases. It propagates the error from the output layer to the input layer, allowing the network to learn and improve its predictions.Debugging a learing algorithm
When we have large error in prediction we can debugg or learning algorithm as follow:- Get more training examples.
- Try smaller set of features.
- Try getting additional features.
- Try adding polynomial features.
- Try decreasing/increasing lamda regularizing parameter
Evaluating a choosen model:
You can evaluate a model by splitting data into trian/test and calculating cost for both training set and test set .Model selection:
The most effective way of model selection is by- splitting data into train/cross validation /test set
- Calculating error for cross validation set and selecting model with less cross validation error .
- Calculation error for test data of model with less cross validation error.
- Model selection using train/cv/test
Machine learning diagnostic
A test that you can run to gain insight into what is/isn't working with a learning algorithm to gain guidance into improving its performance . Ml model can be diagonse by looking at bias and variance: When model has high bias and variance it is not doing well.
- 📚Resources
Day21
Bias/Variance
- High bias: When model has large difference between baseline performance and Training error then it is called high bias and it also indicates underfitting.
- High variance: When model has large difference between training error and cross validation error then it is called high variance and it also indicates overfitting.
- High bias and variance: When model has large difference between training error , cross validation error and baseline performance then it is called both high bias and high variance.
Choosing regularization parameter
To choose good regularization paramter.- First,Apply all regularization value and get different cross validation error and the smallest cross validation error indicated a good regularization term.
- NOTE : Right model neither has high variance and neither has high bias
- 📚Resources
Day22
Diagonising bias and variance
If your algorithm has high bias:
- Try getting additional features.
- Try increase polynomial degree.
- Try decreasing regularization term.
If your algorithm has high variance:
- Getting more training examples.
- Trying decreasing set of features.
- Try increasing regularization term.
Bias and Variance in neural network:
- If your neural network has high bias try increasing size of neural network.
- If your neural network has high variance try increasing training sets.
- Diagonising bias and variance
- 📚Resources
Day23
Iterative loop of ML Development
Ml development revolve around following steps:- Choosing architecture(model,data,etc)
- Training model
- Diagnostics(bias,variance and error analysis)
Error analysis
It is the process to isolate,observe and diagnose erroneous ML predictions to understand pockets of high and low performance to the model.Adding more data
Adding more data is mostly useful to make better predictions and data can be added by following ways:- Data augmentation: Modifying an existing training example to create new training example. e.g: Data augmentation by adding distortion.
- Data synthesis: Using artifical data inputs to create a new training example. It is mostly used for computer vision applications.
Transfer learning
Transfer learning is a machine learning method where a model developed for a task is reused as the starting point for a model on a second task. It is a popular approach in deep learning where pre-trained models are used as the starting point on computer vision and natural language processing tasks given the vast compute and time resources required to develop neural network models on these problems and from the huge jumps in skill that they provide on related problems.- Download neural network parameters pretrained on large dataset with same input type (e.g: images,audio,text) as your application (or train your own).
- Further train(fine tune) the network on your own data.
- 📚Resources
Day24
Full cycle of machine learning project
Machine learning project is iterative process which is as below:
Deployment
Mlops focuses on making ml model to be used in largescale and deployment is basically done by:
ethics,bias and faireness of machine learning
While developing machine learning application we have to take care of biasness and negative case like : 1.Deepfake 2.Genrating fake content for commercial and political purposes 3.Ml model biasing in loan provider,job selection.Precision/recall
- precision : It tell of all positive prediction how many are actually positve.
- recall : It tell of all real positive cases how many are actually predicted positive.
Trading off precsion and recall
- When threshold is higher, precision become higher and recall lower down
- When threshold is lower, precision become lower and recall become higher.
F1 score which is the harmonic mean of precision and recall.
- Summary of Advance learning algorithm
- 📚Resources
Day25
Decision Tree
A decision tree is a type of supervised machine learning used to categorize or make predictions based on how a previous set of questions were answered. The model is a form of supervised learning, meaning that the model is trained and tested on a set of data that contains the desired categorization.
Decision tree learning
- How to choose what feature to split at each node ?
- Max
README truncated. View on GitHub