
Summarizes the course contents from Python setup and data preprocessing to supervised and unsupervised learning, model evaluation, and hyperparameter tuning with hands-on Python examples.
Explore the data science landscape from artificial intelligence to machine learning, focusing on machine learning and data mining concepts, and master core terms like data, samples, and features.
Explore popular integrated development environments for data science and machine learning, including Jupyter notebook, PyCharm, and Spyder, bundled by the Anaconda distribution. Learn simple installation and how to use Spyder.
Download the spider IDE installer, run the Windows executable, and complete installation with default settings. Restart if needed and locate the executable to launch the IDE.
Hi,
In this session, we are going to install the required libraries that we need during the course.
We are going to use pip installation. You can find the related codes for this installation below:
pip install numpy
pip install pandas
pip install -U scikit_learn
pip install scipy
Note1! If you receive an error with the above commands, just google the pip install (name of the package) and you should see the last updated pip installation commands. IT'S VERY EASY :)
Note2! If you are using anaconda distribution, please use the below commands
conda install numpy
conda install pandas
conda install -c conda-forge scikit-learn
conda install -c anaconda scipy
Hi,
In case you do not have Python on your computer as we discussed, please go to the below link and download any version of the Python that you prefer and then select it as an interpreter as we discussed in the video:
https://www.python.org/downloads/
Thanks
Hi and Congrats on Finishing First Chapter!
As we promised, you can download all the source codes from the below link!
https://www.dropbox.com/sh/034svu06emp71r4/AAANXcqD-eUjjFI8YVzuwZyVa?dl=0
I strongly suggest to code with me during the course and this is just for your archive!
Enjoy the course!
Build two 2x2 arrays and compare matrix multiplication with element-wise multiplication, using the dot-style matrix multiply and the star operator to show different results.
Explore NumPy arrays, learn element-wise addition and subtraction, and master broadcasting and array summation to operate on large data efficiently.
Learn to divide arrays with numpy, convert results to integers using floor, and apply numpy’s math functions; finish with random numbers and normal and uniform distributions.
Explore generating normal and uniform distributions with NumPy, create random arrays of specified size, and filter data with logical conditions to select values in a range.
This section reviews calculating mean, median, variance, and standard deviation from arrays, and demonstrates axis-based calculations for row-wise or column-wise statistics.
Learn pandas basics by comparing series and data frames, label a series with age indices, create and filter data, and understand indexing changes for handling student age data.
Learn to convert an array into a pandas data frame, set custom indices and column names, and add a new grade column for streamlined data preprocessing in data science.
Explore pandas basics by using loc and iloc to select rows and columns by label or index, including zero-based ranges, extracting specific data and previews from a sample dataset.
Master pandas for data preprocessing by dropping columns, replacing values, and using head, tail, and sort_values, then read data from csv or excel files into a dataframe.
Learn to visualize climate data with matplotlib by plotting a line graph of year versus temperature index, then add x and y labels and a title.
Learn to visualize two customers’ monthly electricity consumption with Matplotlib by creating lists, plotting with colors and markers, labeling axes and legends, and arranging two subplots side by side.
Explore how to create line plots, scatter plots, histograms, and bar charts with Matplotlib, and customize labels, colors, legends, grids, and bin settings for clear data visualization.
Learn how to create and compare bar charts in Matplotlib, adjust bar width, place bars side by side, and customize x-axis labels for monthly data.
Visualize box plots in matplotlib, learn to toggle notch and orientation, and customize with patch artist and props for box, whiskers, caps, and median across customers.
Learn preprocessing workflows by importing a dataset with pandas, setting the working directory, renaming headers, and dropping unused columns to form a clean 27-sample, 6-feature data frame.
Compute the mean, variance, and standard deviation from data with simple formulas. Explore how these statistics relate to normal and uniform distributions through practical examples and Python analysis.
Learn data cleaning and exploration using describe to compute mean, standard deviation, and outliers; drop a row, reset the index, then locate and replace a faulty heat value.
Explore covariance to understand how variables relate, compute the covariance matrix and correlation, and visualize these relationships with seaborn heatmaps.
Identify missing values by distinguishing null and NaN, use info to spot gaps, replace entries that are not numbers with NaN, and apply numeric conversion for preprocessing.
Identify and locate missing values during preprocessing using is not and NaN detection. Drop or fill these values using forward or backward fill, or mean imputation with a simple imputer.
Define outliers as data points far from the main range, and introduce quartiles (Q1, Q3), the IQR, and box plots, plus mild and extreme outlier calculations.
Detect outliers through box plots and quartile-based rules, calculating q1, q3, and iqr to establish lower and upper bounds for mild and extreme outliers in preprocessing.
Learn to detect and replace an outlier in a dataset using a one-line pandas operation in place within a preprocessing workflow, updating the Eppalock column from 120 to 42.
Learn to concatenate data with pandas by attaching a new column or rows, using axis=1 for column-side joins and axis=0 for row-side joins, including read_csv usage.
Explore dummy coding and one-hot encoding with Pandas get_dummies to convert categorical features, such as peak and off-peak, into numeric inputs for machine learning models.
Understand normalization to scale features to a common range, and apply min-max scaling and distance-based norms like Euclidean and Manhattan in sklearn for modeling.
Explore the types of machine learning models: supervised, unsupervised, and reinforcement learning, using cat and dog labeling examples. Understand how labeled data trains models and how reinforcement learning builds policies.
Explore supervised learning models, focusing on classification and regression. Learn to prepare the iris dataset for binary and multiclass classification with four features across 150 samples, labeling data for training.
Understand the k-nearest neighbors classifier, why it is a lazy learner, and how to compute distances with Euclidean, Manhattan, and Minkowski metrics.
Develop a k-nearest neighbors classifier by setting six neighbors and using Minkowski distance with p=1. Train on iris data with X and Y, then predict new samples.
Learn to create training and test sets for k-NN by using sklearn train_test_split with test_size, random_state, shuffle, and stratify, then train, predict, and evaluate accuracy.
Learn decision tree concepts as a classifier with root nodes, branch nodes, and leaves guiding end decisions. See a house-purchase scenario and iris data sets to illustrate how decisions unfold.
Develop a decision tree classifier on the iris dataset using a sklearn-like library, training with a train/test split, fitting the model, predicting, and achieving about 97 percent accuracy; next, cross-validation.
Learn cross-validation with 10-fold evaluation for a decision tree, splitting data into training and test sets. Assess model performance through accuracy scores across folds.
Explain how Naive Bayes uses Bayes' theorem to classify data, compute P(class|features), and apply the iris dataset example to illustrate misclassification.
This session demonstrates developing a naive bayes classifier using scikit-learn's gaussian nb on the iris dataset, achieving about 97% accuracy and applying ten-fold cross-validation to report scores.
Explore logistic regression as a binary classifier for cancer versus not cancer, using the logistic function to separate two classes and predict cancer probability.
Develop a logistic regression model for breast cancer classification by loading the dataset, preparing X and y, and performing a train-test split.
Explore evaluation concepts for binary classifiers, including accuracy limitations, confusion matrices, and metrics like precision, recall, and F1, then visualize ROC curves and AUC to compare models.
Explore evaluating a logistic regression classifier using confusion matrices, classification reports, and ROC curves to assess precision, recall, and AUC on breast cancer data.
Explore simple and multiple linear regression using the Boston housing data to predict prices, with X features and Y targets, and apply train-test split and scaling.
Develop your first multiple linear regression model using the linear model package, train-test split, apply inverse transform to predictions, and compare with actual values for evaluation metrics.
Explore evaluation metrics for regression, including mean absolute error, mean squared error, RMSE, absolute percentage error (MAPE), and R-squared, using actual versus predicted values and residuals to assess model performance.
Explore evaluation metrics for linear regression, including mean absolute error, mean squared error, root mean square error, absolute percentage error, and r-squared, using scikit-learn metrics with actual versus predicted values.
Explore polynomial regression concepts, showing how one feature with powers creates a curve that fits data better than simple linear or multiple regression.
Develop a polynomial linear regression model in Python using scikit-learn's PolynomialFeatures to transform the Boston dataset's number of rooms feature, apply a train-test split, fit, and evaluate with r-squared.
Explore random forest regression as an ensemble learning method that combines multiple decision trees to produce robust regression predictions, using parameters like the number of trees and maximum depth.
Develop a random forest regression model, preprocess data, train and predict, inverse transform results, and evaluate with r-squared and error metrics while tuning n_estimators and max_depth.
Understand SVR using an epsilon tube to ignore inside errors, minimize outside errors via slack variable C, and apply kernels: polynomial, Gaussian (RBF), sigmoid, and hyperbolic tangent in Python.
Develop a support vector regression model, preprocess and scale data, train and predict, inverse-transform results, and evaluate with R^2, RMSE, and MAE, comparing with random forest and MLR.
Explore unsupervised learning by clustering unlabeled data using similarity and distance measures, and start with centroid-based clustering using the calming algorithm, then compare hierarchical and density-based methods on iris data.
Explore k-means clustering by visualizing how samples partition into clusters, randomly initialize centroids, assign points to nearest centroids, update centroids, and repeat until clusters stabilize, using Euclidean or Manhattan distances.
Evaluate a k-means clustering model using inertia and the elbow method to choose the optimal number of clusters, and implement your first clustering model in Python.
Build a first k-means clustering model on the iris dataset without labels, using sepal length, sepal width, petal length, and petal width to group 150 samples into three species.
Develop and fit a k-means clustering model on the iris data, set three clusters, and generate labels and centroids for visualization.
Explore evaluating k-means models by measuring inertia across varying cluster counts, plotting inertia versus k, and using the elbow method to identify three as the optimal number of clusters.
Explore the DBSCAN density-based clustering method, including epsilon, minimum points, core points, border points, and noise, and see how density determines clusters and outliers.
Learn to develop a DBSCAN model to detect outliers in the iris data set by tuning epsilon and min samples, generating labels, and visualizing with a scatterplot.
Explore hierarchical clustering as a bottom-up approach, using the linkage methods—complete, single, and average—to build a tree-like graph that groups samples by distance.
Master hierarchical clustering with python using the Sibai library to build dendrograms, compare linkage methods (single, complete, average), and generate labeled clusters from the Iris data.
Explore hyperparameters and model tuning to boost performance across classification, regression, and clustering. Use for loops and grid search to optimize kernel choices and the number of clusters.
Learn how to tune a support vector regression model with grid search, testing kernels like rbf and linear, gamma values, and mean squared error scoring, after normalizing the data.
this session tunes the k-means clustering parameter, the number of clusters, by looping 1 to 10, calculating inertia, and using the elbow method to find the optimum count.
Tune the k-nearest neighbors model on the iris dataset by testing K values from 1 to 50, evaluating train and test accuracy, and plotting results to spot underfitting and overfitting.
Explore overfitting and underfeeding, with examples of a model that trains perfectly but fails on the test set, and a simpler model that generalizes better and yields higher test accuracy.
Bonus Lecture (link to discounted coupons)
Are you interested in data science and machine learning, but you don't have any background, and you find the concepts confusing?
Are you interested in programming in Python, but you always afraid of coding?
I think this course is for you!
Even if you are familiar with machine learning, this course can help you to review all the techniques and understand the concept behind each term.
This course is completely categorized, and we don't start from the middle! We actually start from the concept of every term, and then we try to implement it in Python step by step. The structure of the course is as follows:
Chapter1: Introduction and all required installations
Chapter2: Useful Machine Learning libraries (NumPy, Pandas & Matplotlib)
Chapter3: Preprocessing
Chapter4: Machine Learning Types
Chapter5: Supervised Learning: Classification
Chapter6: Supervised Learning: Regression
Chapter7: Unsupervised Learning: Clustering
Chapter8: Model Tuning
Furthermore, you learn how to work with different real datasets and use them for developing your models. All the Python code templates that we write during the course together are available, and you can download them with the resource button of each section.
Remember! That this course is created for you with any background as all the concepts will be explained from the basics! Also, the programming in Python will be explained from the basic coding, and you just need to know the syntax of Python.