SlideShare a Scribd company logo
Introduction to Google
Colaboratory
Yomna Hassan
Misr International University
Why this session?
This is session is to introduce you to cloud based IDE’s such as
Colab and Jupyter. This is to help in facilitating your coding
experience while minimizing the amount of setup effort
needed to run standard AI and machine learning based
projects using Python.
We are focused on python as it is one of the main languages
focused on machine learning applications.
Survey - What’s your knowledge
level?
1- Python
2-Machine Learning
3- Google Colab
Difference between Jupyter and
Colab
Jupyter is the open source project on which Colab is based.
Colab allows you to use and share Jupyter notebooks with
others without having to download, install, or run anything.
Google Colab
In this session, we will focus on Google Colab. Colab has
already installed many of the popular libraries you may need
to run your code. In addition to this you can access and run
your code from anywhere with an internet connection.
Google Colab also facilitates teamwork/sharing between
multiple programmers.
Colab Pros and Cons
Pros:
1. Fast with no hassle GPU support
2. Can be accessed from anywhere
3. Leaves you free to work on your computer without using resources
4. File can be saved out as Jupiter file
5. Most popular libraries are pre-installed
Colab Pros and Cons
Cons:
1. Can be hard to upload local file
2. Files need to be downloaded which may take time if your internet
is slow
Today’s Program
1- How to start a Google Colab Notebook (file is saved automatically on
your google drive)
2- Running basic code with a “Local” file
3- Uploading files to Google Drive and connecting files to the code
4- Python Libraries
5- Simple Classifications Tasks :
- What is Classification
- CSV Data Classification
- Image Classification
New notebook
https://colab.research.google.com/
- Notebooks Location
- Playground mode
- External Files
- Github and Colab: ex: continualai
- Revisions, Show Diff
- Cells
- Sharing
- Comments
Colab Runtime
- What is runtime?
- GPU versus TPU
- Resources
Note:
Colab offers optional accelerated compute environments, including GPU and TPU. Executing code in a GPU or
TPU runtime does not automatically mean that the GPU or TPU is being utilized. To avoid hitting your GPU
usage limits, we recommend switching to a standard runtime if you are not utilizing the GPU. Choose
Runtime > Change Runtime Type and set Hardware Accelerator to None.
Colab is able to provide free resources in part by having dynamic usage limits that sometimes fluctuate,
and by not providing guaranteed or unlimited resources. This means that overall usage limits as well as
idle timeout periods, maximum VM lifetime, GPU types available, and other factors vary over time. Colab
does not publish these limits, in part because they can (and sometimes do) vary quickly.
Runtime Accelerators
● CPU: Central Processing Unit. Manage all the functions of a
computer.
● GPU: Graphical Processing Unit. Enhance the graphical
performance of the computer.
● TPU: Tensor Processing Unit. Custom build ASIC to accelerate
TensorFlow projects.
Python
Python is an interpreted high-level general-purpose
programming language.
Its language constructs as well as its object-oriented approach
aim to help programmers write clear, logical code for small
and large-scale projects.
Let’s start Coding!
- Basic line of code/ Printing (Input/Output consoles)
- Files Location
- Google Drive
- from google.colab import drive
drive.mount('/content/gdrive'
)
Try:
with open('/content/gdrive/My Drive/foo.txt'
, 'w') as f:
f.write('Hello Google Drive!'
)
!cat /content/gdrive/My Drive/foo.txt
Note: Upload Zipped folder and extract on drive
Classification
Type of Data
- Images/ Videos
- Tables / Structures
Datasets
UCI Machine Learning repository
Kaggle
Google Dataset Search
Visual Data
Tensor Flow Catalog
https://data.mendeley.com/
Python Libraries
Numpy : Matrices and numbers
PIL: Images
os: file systems
Scikit-learn: Machine learning
TensorFlow: machine learning
Terminologies
Data Frame
Algorithms:knn, kmeans , DT
Tuning
Features
Training
Testing
Accuracy
Epoch
Neural networks
KNN
The k-Nearest Neighbor classifier is by far the most simple machine learning and image
classification algorithm. It doesn’t actually “learn” anything. Instead, this algorithm
directly relies on the distance between feature vectors (which in our case, are the raw
RGB pixel intensities of the images).
k-NN algorithm classifies unknown data points by finding the most common class among
the k closest examples. Each data point in the k closest data points casts a vote, and the
category with the highest number of votes wins. Or, in plain English: “Tell me who your
neighbors are, and I’ll tell you who you are”
Choosing K Value - Bias-Variance
Tradoff
● The bias error is an error from erroneous assumptions in the learning
algorithm. High bias can cause an algorithm to miss the relevant
relations between features and target outputs (underfitting).
● The variance is an error from sensitivity to small fluctuations in the
training set. High variance may result from an algorithm modeling the
random noise in the training data (overfitting).
Choosing K Value
Writing Code
#Import Libraries
#Import dataset
#Shape dataset into dataframe /struct
#Design model
#Fit data model
#Compute accuracy
--------
Extra Steps: pre and post processing
Task 1 - Heart Disease Classification
Dataset: https://www.kaggle.com/ronitf/heart-disease-uci
Code:
https://colab.research.google.com/drive/19XE4497Gh-Xth
U9YE12ucuOPw3jywVtL
Exercise
Dataset:
https://www.kaggle.com/uciml/iris/tasks?taskId=1732
Code???
Text Versus Images
Task 2 - Image Classification
Dataset:
https://www.kaggle.com/c/dogs-vs-cats
Code:
https://colab.research.google.com/drive/1ZdRYZIMtMcBelTn4lCzx
aT9_ZD5Foe0s?usp=sharing
Calculate Accuracy
Downloading Data from Link Directly
on Colab
!wget -cq
https://s3.amazonaws.com/content.udacity-data.com/courses/nd188/flo
wer_data.zip
!unzip -qq flower_data.zip
Running Colab Code Offline
Colaboratory lets you connect to a local runtime using Jupyter. This allows you to
execute code on your local hardware and have access to your local file system.
Instructions for setting up Jupyter for the local runtime available here :
https://research.google.com/colaboratory/local-runtimes.html
Where to go from there?
Reading papers related to your topic to identify the most suitable tools/ methods to use
If you want to extend your knowledge about machine learning using python:
https://cognitiveclass.ai/courses/machine-learning-with-python
https://www.youtube.com/watch?v=ihK_YRMMHQM
https://www.analyticsvidhya.com/blog/2021/06/how-to-learn-mathematics-for-machin
e-learning-what-concepts-do-you-need-to-master-in-data-science/?fbclid=IwAR0gsww
28F2sppZ95LVAmQFEG2N0ohhsDMigE3g7HTiNG5ly_QYk30PMsQ4
Questions

More Related Content

What's hot

Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"
Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"
Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"
Fwdays
 
Multilayer perceptron
Multilayer perceptronMultilayer perceptron
Multilayer perceptron
omaraldabash
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual Introduction
Lukas Masuch
 
Recursive Neural Networks
Recursive Neural NetworksRecursive Neural Networks
Recursive Neural Networks
Sangwoo Mo
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language Processing
Pranav Gupta
 
Intro to deep learning
Intro to deep learning Intro to deep learning
Intro to deep learning
David Voyles
 
Data Science: Applying Random Forest
Data Science: Applying Random ForestData Science: Applying Random Forest
Data Science: Applying Random Forest
Edureka!
 
Jupyter, A Platform for Data Science at Scale
Jupyter, A Platform for Data Science at ScaleJupyter, A Platform for Data Science at Scale
Jupyter, A Platform for Data Science at Scale
Matthias Bussonnier
 
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Simplilearn
 
HML: Historical View and Trends of Deep Learning
HML: Historical View and Trends of Deep LearningHML: Historical View and Trends of Deep Learning
HML: Historical View and Trends of Deep Learning
Yan Xu
 
Introduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnIntroduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-Learn
Benjamin Bengfort
 
Machine learning
Machine learning Machine learning
Machine learning
Saurabh Agrawal
 
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
Simplilearn
 
Bert
BertBert
Generative adversarial text to image synthesis
Generative adversarial text to image synthesisGenerative adversarial text to image synthesis
Generative adversarial text to image synthesis
Universitat Politècnica de Catalunya
 
Introduction to Neural Networks
Introduction to Neural NetworksIntroduction to Neural Networks
Introduction to Neural Networks
Databricks
 
Python, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersPython, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for Engineers
Boey Pak Cheong
 
Deep Learning - Convolutional Neural Networks
Deep Learning - Convolutional Neural NetworksDeep Learning - Convolutional Neural Networks
Deep Learning - Convolutional Neural Networks
Christian Perone
 
Onnx and onnx runtime
Onnx and onnx runtimeOnnx and onnx runtime
Onnx and onnx runtime
Vishwas N
 
Installing Anaconda Distribution of Python
Installing Anaconda Distribution of PythonInstalling Anaconda Distribution of Python
Installing Anaconda Distribution of Python
Jatin Miglani
 

What's hot (20)

Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"
Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"
Thomas Wolf "An Introduction to Transfer Learning and Hugging Face"
 
Multilayer perceptron
Multilayer perceptronMultilayer perceptron
Multilayer perceptron
 
Deep learning - A Visual Introduction
Deep learning - A Visual IntroductionDeep learning - A Visual Introduction
Deep learning - A Visual Introduction
 
Recursive Neural Networks
Recursive Neural NetworksRecursive Neural Networks
Recursive Neural Networks
 
Introduction to Natural Language Processing
Introduction to Natural Language ProcessingIntroduction to Natural Language Processing
Introduction to Natural Language Processing
 
Intro to deep learning
Intro to deep learning Intro to deep learning
Intro to deep learning
 
Data Science: Applying Random Forest
Data Science: Applying Random ForestData Science: Applying Random Forest
Data Science: Applying Random Forest
 
Jupyter, A Platform for Data Science at Scale
Jupyter, A Platform for Data Science at ScaleJupyter, A Platform for Data Science at Scale
Jupyter, A Platform for Data Science at Scale
 
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
Recurrent Neural Network (RNN) | RNN LSTM Tutorial | Deep Learning Course | S...
 
HML: Historical View and Trends of Deep Learning
HML: Historical View and Trends of Deep LearningHML: Historical View and Trends of Deep Learning
HML: Historical View and Trends of Deep Learning
 
Introduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-LearnIntroduction to Machine Learning with SciKit-Learn
Introduction to Machine Learning with SciKit-Learn
 
Machine learning
Machine learning Machine learning
Machine learning
 
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
What is TensorFlow? | Introduction to TensorFlow | TensorFlow Tutorial For Be...
 
Bert
BertBert
Bert
 
Generative adversarial text to image synthesis
Generative adversarial text to image synthesisGenerative adversarial text to image synthesis
Generative adversarial text to image synthesis
 
Introduction to Neural Networks
Introduction to Neural NetworksIntroduction to Neural Networks
Introduction to Neural Networks
 
Python, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersPython, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for Engineers
 
Deep Learning - Convolutional Neural Networks
Deep Learning - Convolutional Neural NetworksDeep Learning - Convolutional Neural Networks
Deep Learning - Convolutional Neural Networks
 
Onnx and onnx runtime
Onnx and onnx runtimeOnnx and onnx runtime
Onnx and onnx runtime
 
Installing Anaconda Distribution of Python
Installing Anaconda Distribution of PythonInstalling Anaconda Distribution of Python
Installing Anaconda Distribution of Python
 

Similar to Introduction to Google Colaboratory.pdf

Reproducibility in artificial intelligence
Reproducibility in artificial intelligenceReproducibility in artificial intelligence
Reproducibility in artificial intelligence
Carlos Toxtli
 
Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018
Holden Karau
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
wesley chun
 
carrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-APIcarrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-API
Yoni Davidson
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
Brian Lyttle
 
1_International_Google_CoLab_20220307.pptx
1_International_Google_CoLab_20220307.pptx1_International_Google_CoLab_20220307.pptx
1_International_Google_CoLab_20220307.pptx
FEG
 
Reproducibility and automation of machine learning process
Reproducibility and automation of machine learning processReproducibility and automation of machine learning process
Reproducibility and automation of machine learning process
Denis Dus
 
Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)
DoiT International
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
Simon Hewitt
 
Advantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksAdvantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworks
Katy Slemon
 
LCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience ReportLCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience Report
Linaro
 
Google cloud Study Jam 2023.pptx
Google cloud Study Jam 2023.pptxGoogle cloud Study Jam 2023.pptx
Google cloud Study Jam 2023.pptx
GDSCNiT
 
Bacalhau: Stable Diffusion on a GPU
Bacalhau: Stable Diffusion on a GPUBacalhau: Stable Diffusion on a GPU
Bacalhau: Stable Diffusion on a GPU
Ally339821
 
Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Google Platform Overview (April 2014)
Google Platform Overview (April 2014)
Ido Green
 
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Luciano Resende
 
Customize and Secure the Runtime and Dependencies of Your Procedural Language...
Customize and Secure the Runtime and Dependencies of Your Procedural Language...Customize and Secure the Runtime and Dependencies of Your Procedural Language...
Customize and Secure the Runtime and Dependencies of Your Procedural Language...
VMware Tanzu
 
Why Go Lang?
Why Go Lang?Why Go Lang?
Why Go Lang?
Sathish VJ
 
Exploring and Using the Python Ecosystem
Exploring and Using the Python EcosystemExploring and Using the Python Ecosystem
Exploring and Using the Python Ecosystem
Adam Cook
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
Diego Freniche Brito
 
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
DataKitchen
 

Similar to Introduction to Google Colaboratory.pdf (20)

Reproducibility in artificial intelligence
Reproducibility in artificial intelligenceReproducibility in artificial intelligence
Reproducibility in artificial intelligence
 
Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018Intro - End to end ML with Kubeflow @ SignalConf 2018
Intro - End to end ML with Kubeflow @ SignalConf 2018
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
 
carrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-APIcarrow - Go bindings to Apache Arrow via C++-API
carrow - Go bindings to Apache Arrow via C++-API
 
Introduction to Google App Engine with Python
Introduction to Google App Engine with PythonIntroduction to Google App Engine with Python
Introduction to Google App Engine with Python
 
1_International_Google_CoLab_20220307.pptx
1_International_Google_CoLab_20220307.pptx1_International_Google_CoLab_20220307.pptx
1_International_Google_CoLab_20220307.pptx
 
Reproducibility and automation of machine learning process
Reproducibility and automation of machine learning processReproducibility and automation of machine learning process
Reproducibility and automation of machine learning process
 
Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)Kubernetes - State of the Union (Q1-2016)
Kubernetes - State of the Union (Q1-2016)
 
Introduction to Go
Introduction to GoIntroduction to Go
Introduction to Go
 
Advantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworksAdvantages of golang development services & 10 most used go frameworks
Advantages of golang development services & 10 most used go frameworks
 
LCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience ReportLCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience Report
 
Google cloud Study Jam 2023.pptx
Google cloud Study Jam 2023.pptxGoogle cloud Study Jam 2023.pptx
Google cloud Study Jam 2023.pptx
 
Bacalhau: Stable Diffusion on a GPU
Bacalhau: Stable Diffusion on a GPUBacalhau: Stable Diffusion on a GPU
Bacalhau: Stable Diffusion on a GPU
 
Google Platform Overview (April 2014)
Google Platform Overview (April 2014)Google Platform Overview (April 2014)
Google Platform Overview (April 2014)
 
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
Elyra - a set of AI-centric extensions to JupyterLab Notebooks.
 
Customize and Secure the Runtime and Dependencies of Your Procedural Language...
Customize and Secure the Runtime and Dependencies of Your Procedural Language...Customize and Secure the Runtime and Dependencies of Your Procedural Language...
Customize and Secure the Runtime and Dependencies of Your Procedural Language...
 
Why Go Lang?
Why Go Lang?Why Go Lang?
Why Go Lang?
 
Exploring and Using the Python Ecosystem
Exploring and Using the Python EcosystemExploring and Using the Python Ecosystem
Exploring and Using the Python Ecosystem
 
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides:  Let's build macOS CLI Utilities using SwiftMobileConf 2021 Slides:  Let's build macOS CLI Utilities using Swift
MobileConf 2021 Slides: Let's build macOS CLI Utilities using Swift
 
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
Open Data Science Conference Big Data Infrastructure – Introduction to Hadoop...
 

More from Yomna Mahmoud Ibrahim Hassan

W1_CourseIntroduction.pptx advancedgraphics
W1_CourseIntroduction.pptx advancedgraphicsW1_CourseIntroduction.pptx advancedgraphics
W1_CourseIntroduction.pptx advancedgraphics
Yomna Mahmoud Ibrahim Hassan
 
First Umrah Application Details - A proposal
First Umrah Application Details - A  proposalFirst Umrah Application Details - A  proposal
First Umrah Application Details - A proposal
Yomna Mahmoud Ibrahim Hassan
 
1Computer Graphics new-L1-Introduction to Computer Graphics.pdf
1Computer Graphics new-L1-Introduction to Computer Graphics.pdf1Computer Graphics new-L1-Introduction to Computer Graphics.pdf
1Computer Graphics new-L1-Introduction to Computer Graphics.pdf
Yomna Mahmoud Ibrahim Hassan
 
Human Computer Interaction-fall2021 - CSC341-L1.pptx.pdf
Human Computer Interaction-fall2021 - CSC341-L1.pptx.pdfHuman Computer Interaction-fall2021 - CSC341-L1.pptx.pdf
Human Computer Interaction-fall2021 - CSC341-L1.pptx.pdf
Yomna Mahmoud Ibrahim Hassan
 
Word Tagging using Max Entropy Model and Feature selection
Word Tagging using Max Entropy Model and Feature selection Word Tagging using Max Entropy Model and Feature selection
Word Tagging using Max Entropy Model and Feature selection
Yomna Mahmoud Ibrahim Hassan
 
Social Learning
Social LearningSocial Learning
Planning Innovation
Planning InnovationPlanning Innovation
Planning Innovation
Yomna Mahmoud Ibrahim Hassan
 
3alem soora : Submission to ITU competition
3alem soora : Submission to ITU competition3alem soora : Submission to ITU competition
3alem soora : Submission to ITU competition
Yomna Mahmoud Ibrahim Hassan
 
Report on Knowledge Modeling in Various applications in Traffic Systems
Report on Knowledge Modeling in Various applications in Traffic SystemsReport on Knowledge Modeling in Various applications in Traffic Systems
Report on Knowledge Modeling in Various applications in Traffic SystemsYomna Mahmoud Ibrahim Hassan
 
Knowledge Modeling in Various applications in Traffic Systems
Knowledge Modeling in Various applications in Traffic SystemsKnowledge Modeling in Various applications in Traffic Systems
Knowledge Modeling in Various applications in Traffic SystemsYomna Mahmoud Ibrahim Hassan
 
Applicability of Interactive Genetic Algorithms to Multi-agent Systems: Exper...
Applicability of Interactive Genetic Algorithms to Multi-agent Systems: Exper...Applicability of Interactive Genetic Algorithms to Multi-agent Systems: Exper...
Applicability of Interactive Genetic Algorithms to Multi-agent Systems: Exper...
Yomna Mahmoud Ibrahim Hassan
 
Genetic Algorithms in Repeated Matrix Games: The Effects of Algorithmic Modif...
Genetic Algorithms in Repeated Matrix Games: The Effects of Algorithmic Modif...Genetic Algorithms in Repeated Matrix Games: The Effects of Algorithmic Modif...
Genetic Algorithms in Repeated Matrix Games: The Effects of Algorithmic Modif...
Yomna Mahmoud Ibrahim Hassan
 
How a company may expand its share in the student/university market segment f...
How a company may expand its share in the student/university market segment f...How a company may expand its share in the student/university market segment f...
How a company may expand its share in the student/university market segment f...
Yomna Mahmoud Ibrahim Hassan
 
Using Information Systems to Improve Businesses: The present and the future
Using Information Systems to Improve Businesses: The present and the futureUsing Information Systems to Improve Businesses: The present and the future
Using Information Systems to Improve Businesses: The present and the future
Yomna Mahmoud Ibrahim Hassan
 
ECG beats classification using multiclass SVMs with ECOC
ECG beats classification using multiclass SVMs with ECOCECG beats classification using multiclass SVMs with ECOC
ECG beats classification using multiclass SVMs with ECOC
Yomna Mahmoud Ibrahim Hassan
 

More from Yomna Mahmoud Ibrahim Hassan (20)

W1_CourseIntroduction.pptx advancedgraphics
W1_CourseIntroduction.pptx advancedgraphicsW1_CourseIntroduction.pptx advancedgraphics
W1_CourseIntroduction.pptx advancedgraphics
 
First Umrah Application Details - A proposal
First Umrah Application Details - A  proposalFirst Umrah Application Details - A  proposal
First Umrah Application Details - A proposal
 
1Computer Graphics new-L1-Introduction to Computer Graphics.pdf
1Computer Graphics new-L1-Introduction to Computer Graphics.pdf1Computer Graphics new-L1-Introduction to Computer Graphics.pdf
1Computer Graphics new-L1-Introduction to Computer Graphics.pdf
 
Human Computer Interaction-fall2021 - CSC341-L1.pptx.pdf
Human Computer Interaction-fall2021 - CSC341-L1.pptx.pdfHuman Computer Interaction-fall2021 - CSC341-L1.pptx.pdf
Human Computer Interaction-fall2021 - CSC341-L1.pptx.pdf
 
Word Tagging using Max Entropy Model and Feature selection
Word Tagging using Max Entropy Model and Feature selection Word Tagging using Max Entropy Model and Feature selection
Word Tagging using Max Entropy Model and Feature selection
 
Social Learning
Social LearningSocial Learning
Social Learning
 
Planning Innovation
Planning InnovationPlanning Innovation
Planning Innovation
 
3alem soora : Submission to ITU competition
3alem soora : Submission to ITU competition3alem soora : Submission to ITU competition
3alem soora : Submission to ITU competition
 
Report on Knowledge Modeling in Various applications in Traffic Systems
Report on Knowledge Modeling in Various applications in Traffic SystemsReport on Knowledge Modeling in Various applications in Traffic Systems
Report on Knowledge Modeling in Various applications in Traffic Systems
 
Knowledge Modeling in Various applications in Traffic Systems
Knowledge Modeling in Various applications in Traffic SystemsKnowledge Modeling in Various applications in Traffic Systems
Knowledge Modeling in Various applications in Traffic Systems
 
Yomna Hassan CV 2014
Yomna Hassan CV 2014Yomna Hassan CV 2014
Yomna Hassan CV 2014
 
Image Annotation
Image AnnotationImage Annotation
Image Annotation
 
Heterogeneous data annotation
Heterogeneous data annotationHeterogeneous data annotation
Heterogeneous data annotation
 
Applicability of Interactive Genetic Algorithms to Multi-agent Systems: Exper...
Applicability of Interactive Genetic Algorithms to Multi-agent Systems: Exper...Applicability of Interactive Genetic Algorithms to Multi-agent Systems: Exper...
Applicability of Interactive Genetic Algorithms to Multi-agent Systems: Exper...
 
Genetic Algorithms in Repeated Matrix Games: The Effects of Algorithmic Modif...
Genetic Algorithms in Repeated Matrix Games: The Effects of Algorithmic Modif...Genetic Algorithms in Repeated Matrix Games: The Effects of Algorithmic Modif...
Genetic Algorithms in Repeated Matrix Games: The Effects of Algorithmic Modif...
 
Sparks RSS Reader
Sparks RSS ReaderSparks RSS Reader
Sparks RSS Reader
 
How a company may expand its share in the student/university market segment f...
How a company may expand its share in the student/university market segment f...How a company may expand its share in the student/university market segment f...
How a company may expand its share in the student/university market segment f...
 
Using Information Systems to Improve Businesses: The present and the future
Using Information Systems to Improve Businesses: The present and the futureUsing Information Systems to Improve Businesses: The present and the future
Using Information Systems to Improve Businesses: The present and the future
 
ECG beats classification using multiclass SVMs with ECOC
ECG beats classification using multiclass SVMs with ECOCECG beats classification using multiclass SVMs with ECOC
ECG beats classification using multiclass SVMs with ECOC
 
Beginners XNA
Beginners XNABeginners XNA
Beginners XNA
 

Recently uploaded

Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
MIRIAMSALINAS13
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 

Recently uploaded (20)

Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXXPhrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
Phrasal Verbs.XXXXXXXXXXXXXXXXXXXXXXXXXX
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 

Introduction to Google Colaboratory.pdf

  • 1. Introduction to Google Colaboratory Yomna Hassan Misr International University
  • 2. Why this session? This is session is to introduce you to cloud based IDE’s such as Colab and Jupyter. This is to help in facilitating your coding experience while minimizing the amount of setup effort needed to run standard AI and machine learning based projects using Python. We are focused on python as it is one of the main languages focused on machine learning applications.
  • 3. Survey - What’s your knowledge level? 1- Python 2-Machine Learning 3- Google Colab
  • 4. Difference between Jupyter and Colab Jupyter is the open source project on which Colab is based. Colab allows you to use and share Jupyter notebooks with others without having to download, install, or run anything.
  • 5. Google Colab In this session, we will focus on Google Colab. Colab has already installed many of the popular libraries you may need to run your code. In addition to this you can access and run your code from anywhere with an internet connection. Google Colab also facilitates teamwork/sharing between multiple programmers.
  • 6. Colab Pros and Cons Pros: 1. Fast with no hassle GPU support 2. Can be accessed from anywhere 3. Leaves you free to work on your computer without using resources 4. File can be saved out as Jupiter file 5. Most popular libraries are pre-installed
  • 7. Colab Pros and Cons Cons: 1. Can be hard to upload local file 2. Files need to be downloaded which may take time if your internet is slow
  • 8. Today’s Program 1- How to start a Google Colab Notebook (file is saved automatically on your google drive) 2- Running basic code with a “Local” file 3- Uploading files to Google Drive and connecting files to the code 4- Python Libraries 5- Simple Classifications Tasks : - What is Classification - CSV Data Classification - Image Classification
  • 9. New notebook https://colab.research.google.com/ - Notebooks Location - Playground mode - External Files - Github and Colab: ex: continualai - Revisions, Show Diff - Cells - Sharing - Comments
  • 10. Colab Runtime - What is runtime? - GPU versus TPU - Resources Note: Colab offers optional accelerated compute environments, including GPU and TPU. Executing code in a GPU or TPU runtime does not automatically mean that the GPU or TPU is being utilized. To avoid hitting your GPU usage limits, we recommend switching to a standard runtime if you are not utilizing the GPU. Choose Runtime > Change Runtime Type and set Hardware Accelerator to None. Colab is able to provide free resources in part by having dynamic usage limits that sometimes fluctuate, and by not providing guaranteed or unlimited resources. This means that overall usage limits as well as idle timeout periods, maximum VM lifetime, GPU types available, and other factors vary over time. Colab does not publish these limits, in part because they can (and sometimes do) vary quickly.
  • 11. Runtime Accelerators ● CPU: Central Processing Unit. Manage all the functions of a computer. ● GPU: Graphical Processing Unit. Enhance the graphical performance of the computer. ● TPU: Tensor Processing Unit. Custom build ASIC to accelerate TensorFlow projects.
  • 12. Python Python is an interpreted high-level general-purpose programming language. Its language constructs as well as its object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.
  • 13. Let’s start Coding! - Basic line of code/ Printing (Input/Output consoles) - Files Location - Google Drive - from google.colab import drive drive.mount('/content/gdrive' ) Try: with open('/content/gdrive/My Drive/foo.txt' , 'w') as f: f.write('Hello Google Drive!' ) !cat /content/gdrive/My Drive/foo.txt Note: Upload Zipped folder and extract on drive
  • 14.
  • 16. Type of Data - Images/ Videos - Tables / Structures
  • 17. Datasets UCI Machine Learning repository Kaggle Google Dataset Search Visual Data Tensor Flow Catalog https://data.mendeley.com/
  • 18. Python Libraries Numpy : Matrices and numbers PIL: Images os: file systems Scikit-learn: Machine learning TensorFlow: machine learning
  • 19. Terminologies Data Frame Algorithms:knn, kmeans , DT Tuning Features Training Testing Accuracy Epoch Neural networks
  • 20. KNN The k-Nearest Neighbor classifier is by far the most simple machine learning and image classification algorithm. It doesn’t actually “learn” anything. Instead, this algorithm directly relies on the distance between feature vectors (which in our case, are the raw RGB pixel intensities of the images). k-NN algorithm classifies unknown data points by finding the most common class among the k closest examples. Each data point in the k closest data points casts a vote, and the category with the highest number of votes wins. Or, in plain English: “Tell me who your neighbors are, and I’ll tell you who you are”
  • 21. Choosing K Value - Bias-Variance Tradoff ● The bias error is an error from erroneous assumptions in the learning algorithm. High bias can cause an algorithm to miss the relevant relations between features and target outputs (underfitting). ● The variance is an error from sensitivity to small fluctuations in the training set. High variance may result from an algorithm modeling the random noise in the training data (overfitting).
  • 23. Writing Code #Import Libraries #Import dataset #Shape dataset into dataframe /struct #Design model #Fit data model #Compute accuracy -------- Extra Steps: pre and post processing
  • 24. Task 1 - Heart Disease Classification Dataset: https://www.kaggle.com/ronitf/heart-disease-uci Code: https://colab.research.google.com/drive/19XE4497Gh-Xth U9YE12ucuOPw3jywVtL
  • 27.
  • 28. Task 2 - Image Classification Dataset: https://www.kaggle.com/c/dogs-vs-cats Code: https://colab.research.google.com/drive/1ZdRYZIMtMcBelTn4lCzx aT9_ZD5Foe0s?usp=sharing
  • 30. Downloading Data from Link Directly on Colab !wget -cq https://s3.amazonaws.com/content.udacity-data.com/courses/nd188/flo wer_data.zip !unzip -qq flower_data.zip
  • 31. Running Colab Code Offline Colaboratory lets you connect to a local runtime using Jupyter. This allows you to execute code on your local hardware and have access to your local file system. Instructions for setting up Jupyter for the local runtime available here : https://research.google.com/colaboratory/local-runtimes.html
  • 32. Where to go from there? Reading papers related to your topic to identify the most suitable tools/ methods to use If you want to extend your knowledge about machine learning using python: https://cognitiveclass.ai/courses/machine-learning-with-python https://www.youtube.com/watch?v=ihK_YRMMHQM https://www.analyticsvidhya.com/blog/2021/06/how-to-learn-mathematics-for-machin e-learning-what-concepts-do-you-need-to-master-in-data-science/?fbclid=IwAR0gsww 28F2sppZ95LVAmQFEG2N0ohhsDMigE3g7HTiNG5ly_QYk30PMsQ4