SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

Main principles of Data Science and Machine Learning
Main principles of Data Science and Machine LearningMain principles of Data Science and Machine Learning
Main principles of Data Science and Machine LearningNikolay Karelin
 
Graph Neural Network 1부
Graph Neural Network 1부Graph Neural Network 1부
Graph Neural Network 1부seungwoo kim
 
Machine Learning Terminologies
Machine Learning TerminologiesMachine Learning Terminologies
Machine Learning TerminologiesAjitesh Kumar
 
Support vector machines (svm)
Support vector machines (svm)Support vector machines (svm)
Support vector machines (svm)Sharayu Patil
 
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...Simplilearn
 
Data Visualization using matplotlib
Data Visualization using matplotlibData Visualization using matplotlib
Data Visualization using matplotlibBruno Gonçalves
 
Convolutional neural network from VGG to DenseNet
Convolutional neural network from VGG to DenseNetConvolutional neural network from VGG to DenseNet
Convolutional neural network from VGG to DenseNetSungminYou
 
Loss Functions for Deep Learning - Javier Ruiz Hidalgo - UPC Barcelona 2018
Loss Functions for Deep Learning - Javier Ruiz Hidalgo - UPC Barcelona 2018Loss Functions for Deep Learning - Javier Ruiz Hidalgo - UPC Barcelona 2018
Loss Functions for Deep Learning - Javier Ruiz Hidalgo - UPC Barcelona 2018Universitat Politècnica de Catalunya
 
Dimensionality Reduction
Dimensionality ReductionDimensionality Reduction
Dimensionality ReductionSaad Elbeleidy
 
Basic Generative Adversarial Networks
Basic Generative Adversarial NetworksBasic Generative Adversarial Networks
Basic Generative Adversarial NetworksDong Heon Cho
 
Feature Engineering
Feature EngineeringFeature Engineering
Feature EngineeringHJ van Veen
 
Ml2 train test-splits_validation_linear_regression
Ml2 train test-splits_validation_linear_regressionMl2 train test-splits_validation_linear_regression
Ml2 train test-splits_validation_linear_regressionankit_ppt
 
DVC - Git-like Data Version Control for Machine Learning projects
DVC - Git-like Data Version Control for Machine Learning projectsDVC - Git-like Data Version Control for Machine Learning projects
DVC - Git-like Data Version Control for Machine Learning projectsFrancesco Casalegno
 
PR-207: YOLOv3: An Incremental Improvement
PR-207: YOLOv3: An Incremental ImprovementPR-207: YOLOv3: An Incremental Improvement
PR-207: YOLOv3: An Incremental ImprovementJinwon Lee
 
Convolutional Neural Networks
Convolutional Neural NetworksConvolutional Neural Networks
Convolutional Neural NetworksAshray Bhandare
 

Tendances (20)

Main principles of Data Science and Machine Learning
Main principles of Data Science and Machine LearningMain principles of Data Science and Machine Learning
Main principles of Data Science and Machine Learning
 
Graph Neural Network 1부
Graph Neural Network 1부Graph Neural Network 1부
Graph Neural Network 1부
 
Machine Learning Terminologies
Machine Learning TerminologiesMachine Learning Terminologies
Machine Learning Terminologies
 
Support vector machines (svm)
Support vector machines (svm)Support vector machines (svm)
Support vector machines (svm)
 
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
 
Data Visualization using matplotlib
Data Visualization using matplotlibData Visualization using matplotlib
Data Visualization using matplotlib
 
Convolutional neural network from VGG to DenseNet
Convolutional neural network from VGG to DenseNetConvolutional neural network from VGG to DenseNet
Convolutional neural network from VGG to DenseNet
 
Loss Functions for Deep Learning - Javier Ruiz Hidalgo - UPC Barcelona 2018
Loss Functions for Deep Learning - Javier Ruiz Hidalgo - UPC Barcelona 2018Loss Functions for Deep Learning - Javier Ruiz Hidalgo - UPC Barcelona 2018
Loss Functions for Deep Learning - Javier Ruiz Hidalgo - UPC Barcelona 2018
 
Recurrent Neural Network
Recurrent Neural NetworkRecurrent Neural Network
Recurrent Neural Network
 
Dimensionality Reduction
Dimensionality ReductionDimensionality Reduction
Dimensionality Reduction
 
Basic Generative Adversarial Networks
Basic Generative Adversarial NetworksBasic Generative Adversarial Networks
Basic Generative Adversarial Networks
 
What is Jupyter Notebook?
What is Jupyter Notebook?What is Jupyter Notebook?
What is Jupyter Notebook?
 
Go lang
Go langGo lang
Go lang
 
XGBoost & LightGBM
XGBoost & LightGBMXGBoost & LightGBM
XGBoost & LightGBM
 
Feature Engineering
Feature EngineeringFeature Engineering
Feature Engineering
 
Ml2 train test-splits_validation_linear_regression
Ml2 train test-splits_validation_linear_regressionMl2 train test-splits_validation_linear_regression
Ml2 train test-splits_validation_linear_regression
 
Yolov3
Yolov3Yolov3
Yolov3
 
DVC - Git-like Data Version Control for Machine Learning projects
DVC - Git-like Data Version Control for Machine Learning projectsDVC - Git-like Data Version Control for Machine Learning projects
DVC - Git-like Data Version Control for Machine Learning projects
 
PR-207: YOLOv3: An Incremental Improvement
PR-207: YOLOv3: An Incremental ImprovementPR-207: YOLOv3: An Incremental Improvement
PR-207: YOLOv3: An Incremental Improvement
 
Convolutional Neural Networks
Convolutional Neural NetworksConvolutional Neural Networks
Convolutional Neural Networks
 

Similaire à Introduction to Google Colaboratory.pdf

Reproducibility in artificial intelligence
Reproducibility in artificial intelligenceReproducibility in artificial intelligence
Reproducibility in artificial intelligenceCarlos 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 2018Holden 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 Runwesley 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++-APIYoni 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 PythonBrian Lyttle
 
1_International_Google_CoLab_20220307.pptx
1_International_Google_CoLab_20220307.pptx1_International_Google_CoLab_20220307.pptx
1_International_Google_CoLab_20220307.pptxFEG
 
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 processDenis 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 GoSimon 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 frameworksKaty Slemon
 
LCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience ReportLCU13: GPGPU on ARM Experience Report
LCU13: GPGPU on ARM Experience ReportLinaro
 
Google cloud Study Jam 2023.pptx
Google cloud Study Jam 2023.pptxGoogle cloud Study Jam 2023.pptx
Google cloud Study Jam 2023.pptxGDSCNiT
 
Bacalhau: Stable Diffusion on a GPU
Bacalhau: Stable Diffusion on a GPUBacalhau: Stable Diffusion on a GPU
Bacalhau: Stable Diffusion on a GPUAlly339821
 
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
 
Exploring and Using the Python Ecosystem
Exploring and Using the Python EcosystemExploring and Using the Python Ecosystem
Exploring and Using the Python EcosystemAdam 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 SwiftDiego 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
 

Similaire à 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...
 

Plus de 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.pdfYomna 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.pdfYomna 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
 
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 futureYomna 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 ECOCYomna Mahmoud Ibrahim Hassan
 

Plus de 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
 

Dernier

Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxcallscotland1987
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdfssuserdda66b
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 

Dernier (20)

Dyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptxDyslexia AI Workshop for Slideshare.pptx
Dyslexia AI Workshop for Slideshare.pptx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

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