You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
How to implement KNN from scratch with Python
Code: https://github.com/AssemblyAI-Examples/Machine-Learning-From-Scratch/tree/main/01%20KNN
How to implement KNN from scratch with Python
In the video titled "How to implement KNN from scratch with Python", the speaker explains how to create a KNN classifier from scratch using Python. They cover the steps involved in implementing the algorithm, such as calculating the distance between the new data point and other points in the dataset, selecting the k closest points, and determining the label for classification or average for regression. The speaker implements the algorithm using a class in Python and demonstrates its successful implementation on the iris dataset with an accuracy rate of 96%. They also invite viewers to check out the code on their Github repository and ask questions in the comments section.
How to implement Linear Regression from scratch with Python
Code: https://github.com/AssemblyAI-Examples/Machine-Learning-From-Scratch/tree/main/02%20Linear%20Regression
How to implement Linear Regression from scratch with Python
This video covers the process of implementing linear regression from scratch using Python. The speaker explains how to find the best fitting line using mean squared error and how to calculate the weights and biases with gradient descent. The speaker also discusses how the learning rate affects convergence and demonstrates how to test the model using scikit-learn's data set feature. They also fix a typo in the code and adjust the learning rate to improve the fit of the prediction line. The code is shared on GitHub and viewers are invited to ask questions.
the result, and the error of the equation is calculated, making it easier using matrix multiplication with all data points to calculate the gradients. During testing, a trained model predicts results using the equation.
How to implement Logistic Regression from scratch with Python
Code: https://github.com/AssemblyAI-Examples/Machine-Learning-From-Scratch/tree/main/03%20Logistic%20Regression
How to implement Logistic Regression from scratch with Python
The video explains how to implement logistic regression from scratch with Python, using the sigmoid function to create probabilities and cross-entropy as an error function. The instructor shares step-by-step instructions for calculating predictions, gradients, and updating biases through iterations. They also demonstrate how to load a breast cancer dataset and train the logistic regression classifier to predict whether a tumor is malignant or benign. The video concludes by evaluating the accuracy of the model using a custom function. Overall, the implementation is successful and proves that the logistic regression algorithm works well.
How to implement Decision Trees from scratch with Python
Code: https://github.com/AssemblyAI-Examples/Machine-Learning-From-Scratch/tree/main/04%20Decision%20Trees
How to implement Decision Trees from scratch with Python
The video provides a step-by-step guide on building a decision tree from scratch using Python. The speaker explains the concept of decision trees, how they work, and how they are built. They discuss stopping criteria, the grow tree function, the helper functions "most common label," "information gain," "entropy," and "split," as well as the predict function. The speaker also demonstrates how to calculate information gain, weighted entropy, and accuracy. Additionally, they test the decision tree model and provide viewers with a link to their GitHub repository where the code is available.
How to implement Random Forest from scratch with Python
Code: https://github.com/AssemblyAI-Examples/Machine-Learning-From-Scratch/tree/main/05%20Random%20Forests
How to implement Random Forest from scratch with Python
This video tutorial teaches how to implement Random Forests from scratch with Python. During training, a random subset of the dataset is selected, and a decision tree is created with this subset. This process is repeated for the number of trees determined before beginning the algorithm. During inference, the prediction is obtained from each tree, and if it's classification, the majority vote of the class label is taken. The speaker demonstrates how to implement it by creating a list spreading the decision trees into it and adding it to a Numpy array. The accuracy can be calculated using the number of true values correctly predicted divided by the total number of true values. The speaker also talks about the number of trees, max depth, and min sample split can be modified to achieve higher accuracy.
How to implement Naive Bayes from scratch with Python
Code: https://github.com/AssemblyAI-Examples/Machine-Learning-From-Scratch/tree/main/06%20NaiveBayes
How to implement Naive Bayes from scratch with Python
This video tutorial focuses on implementing Naive Bayes from scratch using Python. The instructor provides an overview of Bayes' theorem and the assumption of independence. They explain how to calculate the prior probability and class conditional probability, necessary for training the algorithm. The speaker also introduces the Gaussian distribution as a way to model probabilities. The video demonstrates the training and prediction steps for the algorithm with code. The instructor tests the algorithm on a toy dataset with two classes, achieving an accuracy of 96.5%. Overall, this tutorial is a useful resource for those interested in learning Naive Bayes and implementing it in Python.
How to implement PCA (Principal Component Analysis) from scratch with Python
Code: https://github.com/AssemblyAI-Examples/Machine-Learning-From-Scratch/tree/main/07%20PCA
How to implement PCA (Principal Component Analysis) from scratch with Python
The video explains the process of implementing Principal Component Analysis (PCA) from scratch using Python and Numpy. PCA is a technique that reduces the dimensionality of a dataset while retaining most of the information. The instructor walks through the steps of creating a Python class with fit and transform methods to perform PCA on a dataset. The fit method first calculates the mean and covariance of the data and extracts the eigenvectors and eigenvalues. The transform method then projects the data onto the principal components. The speaker highlights the importance of subtracting means and sorting eigenvectors in the process. Finally, the implementation is tested on the Iris dataset, resulting in successful dimensionality reduction from four to two dimensions.
How to implement Perceptron from scratch with Python
Code: https://github.com/AssemblyAI-Examples/Machine-Learning-From-Scratch/tree/main/08%20Perceptron
How to implement Perceptron from scratch with Python
The video tutorial explains the theory behind the Perceptron algorithm, which can learn only linearly separable patterns for binary classification using an activation function, weights, and input. The presenter then outlines the necessary steps for implementing the Perceptron model from scratch in Python by selecting the learning rate and number of iterations for the optimization algorithm and defining the activation function as the unit step function. After initializing the weights and biases, the model learns from the training data by updating the weights and biases according to the Perceptron update rule. Finally, the presenter evaluates the model's accuracy by predicting the class labels for the test data, and the accuracy turns out to be 100%, indicating successful learning of the decision boundary.
How to implement SVM (Support Vector Machine) from scratch with Python
Code: https://github.com/AssemblyAI-Examples/Machine-Learning-From-Scratch/tree/main/09%20SVM
How to implement SVM (Support Vector Machine) from scratch with Python
Support Vector Machines (SVM) aim to find a linear decision boundary that maximizes separation between classes, with the weight being learned during training. The cost function involves a hinge loss determining how far we are from the correct side of the decision boundary, with a regularization term added to trade-off minimizing loss and maximizing distance. Gradients are computed, update rules derived, and weights initialized, while the prediction function is the output of the linear function. The code to implement SVM from scratch in Python using NumPy and Scikit-learn libraries is provided, including import train test and split, data sets, and plotting the decision boundary and the two hyperplanes confirming accurate implementation.
How to implement K-Means from scratch with Python
Code: https://github.com/AssemblyAI-Examples/Machine-Learning-From-Scratch/tree/main/10%20KMeans
How to implement K-Means from scratch with Python
This video demonstrates how to implement the K-Means clustering algorithm from scratch with Python. K-Means is an unsupervised learning algorithm for clustering unlabeled data into k different clusters by updating the means or centroids iteratively until there is no further change. The video covers initializing empty clusters and setting parameters for the number of clusters and iterations, updating cluster labels and centroids, and stopping the optimization loop once there is no change. The speaker also explains the importance of measuring Euclidean distance to calculate the closest centroids and provides a pre-written plotting function from Matplotlib to visualize the clustering process.