1οΈβ£ Data types: strings, integers, floats, etc.
2οΈβ£ Variables
3οΈβ£ Control flow: if/else, loops
4οΈβ£ Functions
5οΈβ£ Modules & packages
6οΈβ£ Input/output
Get the fundamentals down to unlock coding potential.
Dec 30, 2023 β’ 8 tweets β’ 2 min read
Day 59 of #60daysOfMachineLearning
π· Percision, Recall, F1 π·
Precision is a measure of the accuracy of the model's positive predictions. It is calculated as the number of true positive predictions divided by the total number of positive predictions made by the model.
Recall is a measure of the model's ability to correctly identify all positive examples. It is calculated as the number of true positive predictions divided by the total number of positive examples in the dataset.
Dec 29, 2023 β’ 8 tweets β’ 2 min read
Day 58 of #60daysOfMachineLearning
π· Accuracy, Overfitting, Underfitting π·
In machine learning, accuracy is a measure of how well the model is able to make predictions on new examples. It is usually measured as the percentage of correct predictions made by the model.
Overfitting occurs when the model has learned the training data too well and is not able to generalize to new examples. This means that the model will have high accuracy on the training data, but low accuracy on the validation and test data.
Dec 28, 2023 β’ 8 tweets β’ 2 min read
Day 57 of #60daysOfMachineLearning
π· Training, validation, test data π·
In machine learning, it is important to divide your data into three sets: training, validation, and test.
𧡠π
The training set is used to train the model. The model is presented with examples from the training set and adjusts its parameters to minimize the error on these examples.
Dec 28, 2023 β’ 8 tweets β’ 2 min read
Day 57 of #60daysOfMachineLearning
π· Training, validation, test data π·
In machine learning, it is important to divide your data into three sets: training, validation, and test.
𧡠π
The training set is used to train the model. The model is presented with examples from the training set and adjusts its parameters to minimize the error on these examples.
Dec 27, 2023 β’ 8 tweets β’ 2 min read
Day 56 of #60daysOfMachineLearning
π· Long Short-Term Memory Neural Networks π·
Long Short-Term Memory (LSTM) networks are a type of artificial neural network that is specifically designed to process sequential data, such as time series or natural language.
LSTM networks are composed of multiple layers, each of which contains "memory cells" that can store information for long periods of time. These cells are connected by "gates" that can control the flow of information in and out of the cell.
Dec 26, 2023 β’ 9 tweets β’ 2 min read
Day 55 of #60daysOfMachineLearning
π· Convolutional Neural Networks π·
Convolutional Neural Networks (CNNs) are a type of artificial neural network that is specifically designed to process data with a grid-like topology, such as images.
CNNs are composed of multiple layers, each of which performs a specific function. The first layer, known as the input layer, receives the raw data.
Dec 25, 2023 β’ 7 tweets β’ 2 min read
Day 54 of #60daysOfMachineLearning
π· Feed Forward Neural Networks π·
A feedforward neural network is a type of neural network that consists of multiple layers of interconnected neurons that process and transform the input data.
In a feedforward neural network, the data flows through the network in a forward direction, from the input layer to the output layer, without looping back or branching out.
Dec 25, 2023 β’ 7 tweets β’ 1 min read
Day 54 of #60daysOfMachineLearning
π· Feed Forward Neural Networks π·
A feedforward neural network is a type of neural network that consists of multiple layers of interconnected neurons that process and transform the input data.
In a feedforward neural network, the data flows through the network in a forward direction, from the input layer to the output layer, without looping back or branching out.
Dec 23, 2023 β’ 9 tweets β’ 2 min read
Day 52 of #60daysOfMachineLearning
π· Deep Learning π·
Deep learning is a type of machine learning algorithm that uses deep neural networks to learn complex patterns and relationships in data.
In deep learning, the model is a neural network that consists of multiple layers of interconnected nodes, called neurons, that process and transform the input data.
Dec 23, 2023 β’ 8 tweets β’ 2 min read
Day 53 of #60daysOfMachineLearning
π· Neural Networks π·
A neural network is a computational model that is inspired by the structure and function of the brain.
𧡠π
A neural network consists of multiple layers of interconnected nodes, called neurons, that process and transform the input data.
Dec 22, 2023 β’ 7 tweets β’ 2 min read
Day 51 of #60daysOfMachineLearning
π· Ensemble Learning π·
Ensemble learning is a machine learning technique that combines multiple models to improve the performance and robustness of the final model.
In ensemble learning, the individual models, called base models or weak learners, are trained on the same data, and their predictions are combined using a combination rule, such as majority voting, averaging, or weighted averaging.
Dec 17, 2023 β’ 8 tweets β’ 2 min read
Day 47 of #60daysOfMachineLearning
π· K-Means Clustering π·
K-means clustering is a popular and simple unsupervised learning algorithm for clustering data into groups.
In K-means clustering, the goal is to partition the data into K clusters, where each cluster is defined by its center or centroid, and each data point belongs to the cluster with the closest centroid.
Dec 10, 2023 β’ 5 tweets β’ 2 min read
Day 40 of #60daysOfMachineLearning
π· Pandas Plotting π·
Pandas also includes a number of functions for visualizing and plotting data. To create a basic line plot in Pandas, use the .plot() method on a dataframe. This method takes optional arguments to customize the appearance
For example, if you had a dataframe df with two columns x and y, you could create a line plot of these columns using the following code:
Dec 9, 2023 β’ 5 tweets β’ 2 min read
Day 39 of #60daysOfMachineLearning
π· Pandas - Data Correlation π·
Finding data correlations in Pandas dataframes can be a useful way to understand the relationships between different columns in a dataset.
𧡠Letβs take a look π
To find correlations in Pandas, you can use the .corr() method on a dataframe to compute the pairwise correlations between all columns in the dataframe. This will return a new dataframe containing the correlation coefficients for each pair of columns.
Dec 7, 2023 β’ 6 tweets β’ 2 min read
Day 37 of #60daysOfMachineLearning
π· Pandas - Fixing Wrong Data π·
"Wrong data" does not have to be "empty cells" or "wrong format", it can just be wrong.
If you look at the data set in row 7, the duration is 450, but for all the other rows the duration is between 30 and 60.
It doesn't have to be wrong, but taking in consideration that this is the data set of someone's workout sessions, we conclude with the fact that this person did not work out in 450 minutes.
How can we fix wrong values, like the one for "Duration" in row 7?
Dec 3, 2023 β’ 6 tweets β’ 2 min read
Day 33 of #60daysOfMachineLearning
π· Pandas - Reading CSV/JSON Files π·
π¦ Read CSV Files
A simple way to store big data sets is to use CSV files (comma separated files). CSV files contains plain text and is a well know format that can be read by everyone including Pandas.
If you have a large DataFrame with many rows, Pandas will only return the first 5 rows, and the last 5 rows:
Nov 23, 2023 β’ 4 tweets β’ 2 min read
Day 23 of #60daysOfMachineLearning
π· Data Management - Joining Tables π·
You can combine rows from two or more tables, based on a related column between them, by using a JOIN statement.
These two tables can be combined by using users' fav field and products' id field.
π Left Join
Hannah and Michael were excluded from the result in the preceding example because INNER JOIN only displays data when there is a match.
Use the LEFT JOIN statement to show all users, even if they don't have a favorite product.
Nov 18, 2023 β’ 5 tweets β’ 2 min read
Day 18 of #60daysOfMachineLearning
π· Data Management - Reading Database Records π·
To get results from a table, you will need to use the select keyword.
Select all records from the "customers" table, and display the result:
π Selecting Columns
To select only some of the columns in a table, use the "SELECT" statement followed by the column name(s).
Select only the name and address columns:
Nov 14, 2023 β’ 4 tweets β’ 2 min read
Day 14 of #60daysOfMachineLearningπ· Data Prep π·After covering Python, we can get serious about Machine Learning!But before we can start creating models, we first need data!Most of the time you will need to dig for data. So, it is important to have Web Scrapping skillsπ
Web scrapping involves dabbling in html code. Donβt worry, itβs nothing complicated and its quite easy. ALl you need to do is go to the website, click F12 and a side panel appears. Then you search for the element that represents the text you want to parse.
Nov 12, 2023 β’ 9 tweets β’ 3 min read
Day 12 of #60daysOfMachineLearning
π΅ Python Classes and Objects
𧡠Here is how to work with classes and objects π
π Create a classTo create a class, use the keyword class.
Create a class named MyClass, with a property named x: