Session on
TensorFlow
By GDGC, BBDNIIT
2024 -25
Impact of AI in the world
What is Artificial Intelligence?
AI is a broad field of computer science focused on creating intelligent
machines that can simulate human-like thinking and behavior.
Aims to develop systems capable of performing tasks that typically require
human intelligence.
Encompasses reasoning, problem-solving, learning, perception, and
language understanding.
Example:- Virtual assistants (e.g., Siri)
What is Machine Learning?
A subset of AI that focuses on enabling computers to learn and improve
from experience without being explicitly programmed.
Uses statistical techniques to help machines "learn" from data.
Allows systems to automatically improve their performance over time.
Example:- Spam email detection etc
Difference between AI and ML
Artificial Intelligence Machine Learning
Broader concept of creating intelligent
machines.
Specific approach to achieving AI through
data and algorithms.
Aims to create human-like intelligence. Focuses on learning patterns from data.
Includes reasoning and problem-solving.
Primarily concerned with statistical
learning.
Can be rule-based or learning-based. Strictly data-driven learning approach.
Example: Robotics, Expert Systems.
Example: Prediction models,
Classification
Machine Learning Life Cycle
Machine Learning Life Cycle
1. Problem Definition: Define the problem and set objectives.
2. Data Collection: Gather relevant data.
3. Data Preprocessing: Clean, transform, and prepare data.
4. Model Building: Choose and train an algorithm.
5. Model Evaluation: Test model performance.
6. Deployment: Deploy the model into production.
7. Monitoring: Track model performance and improve iteratively.
Types of Machine Learning
Supervised Learning
Unsupervised Learning
Semi-supervised Learning
Reinforcement Learning
Supervised Learning
Learning with labeled training data
Algorithm learns from input-output pairs
Goal is to predict outcomes for new, unseen data
Some key algorithms include: Linear & Logistic Regression, Decision
Trees, Support Vector Machines (SVM) etc.
Unsupervised Learning
Learning from un-labeled data
Discovers hidden patterns or intrinsic structures
No predefined outputs
Some key algorithms include: K-Means & Hierarchical Clustering,
Principal Component Analysis (PCA), Apriori Algorithm etc.
Semi-Supervised Learning
Combination of labeled and unlabeled data.
Uses small amount of labeled data with large unlabeled dataset.
Useful when labeling data is expensive or time-consuming.
Some key algorithms include: Self-training, Co-training, Graph-based
label propagation etc.
Reinforcement Learning
Learning through interaction with environment.
Agent learns to make decisions by receiving rewards/penalties.
Goal is to maximize cumulative reward.
Some key algorithms include: Q-Learning, Deep Q Network (DQN),
Actor-Critic Methods etc.
Popular Machine Learning Algorithms
 Regression Algorithms:-
 Linear Regression-
■ Predicts continuous numerical values
■ Establishes linear relationship between variables
 Polynomial Regression-
■ Captures non-linear relationships
■ Adds polynomial features to linear regression
Popular Machine Learning Algorithms
 Regression Algorithms:-
 Logistic Regression-
■ Used for binary classification
■ Predicts probability of an instance belonging to a class
Popular Machine Learning Algorithms
 Classification Algorithms:-
 Decision Trees-
■ Tree-like model of decisions
■ Splits data based on feature conditions
Popular Machine Learning Algorithms
 Classification Algorithms:-
 Support Vector Machines (SVM) -
■ Creates hyperplane to separate classes
■ Effective in high-dimensional spaces
Popular Machine Learning Algorithms
 Classification Algorithms:-
 Random Forest -
■ Creates hyperplane to separate classes
■ Effective in high-dimensional spaces
Popular Machine Learning Algorithms
 Classification Algorithms:-
 K-Nearest Neighbours (KNN) -
■ Classification based on nearest training examples.
■ Simple, non-parametric algorithm.
Popular Machine Learning Algorithms
 Clustering Algorithms:-
 K-Means Clustering -
■ Partitions data into K clusters.
■ Minimizes within-cluster variance.
Popular Machine Learning Algorithms
 Dimensionality Reduction:-
 Principal Component Analysis (PCA)-
■ Reduces feature dimensions.
■ Preserves maximum variance.
Popular Machine Learning Algorithms
 Some advanced Algorithms:-
 Gradient Boosting-
■ Creates strong predictive models.
■ Builds models sequentially.
 XGBoost -
■ Optimized gradient boosting.
■ High performance and scalability.
Basic code snippet for making ML model
Basic code snippet for making ML model
Basic code snippet for making ML model
Introduction to Neural Networks
What is a Neural Network?
● Computational model inspired by the human brain's neural structure.
● Consists of interconnected nodes (neurons) organized in layers.
● Capable of learning complex patterns and relationships in data.
Artificial Neural Network (ANN) –
● Computational system with interconnected processing nodes (artificial neurons).
● Designed to recognize patterns and solve complex problems.
● Consists of three main layers:
1. Input Layer: Receives initial data
2. Hidden Layer(s): Processes and transforms data
3. Output Layer: Produces final result
What is Deep Learning?
Advanced subset of machine learning using multi-layered neural networks.
Capable of learning hierarchical representations of data.
Uses multiple hidden layers to extract increasingly abstract features.
Example:- image recognition, natural language processing etc.
TensorFlow
Open-source machine learning library developed by Google Brain.
Primarily used for deep learning and neural network development.
Supports multiple programming languages (Python, C++, Java).
Provides flexible ecosystem for research and production
Features of TensorFlow
High scalability for large datasets and models.
Supports both CPU and GPU computations and extends its support to TPU
for faster computation. It also supports distributed computing.
Provides high-level APIs for easy model development such as pre-built
models and APIs like Keras.
Excellent visualization tools (TensorBoard).
Applications of TensorFlow
Image Recognition: Medical imaging, object detection.
Natural Language Processing: Chatbots, sentiment analysis.
Time Series Analysis: Forecasting stock prices.
Reinforcement Learning: Gaming AI, robotics.
Important TensorFlow Concepts
Tensors: Multidimensional arrays that form the fundamental data structure
in TensorFlow.
Graphs: Represent the computational flow of a model.
Variables: Store and update model parameters.
Placeholders: Input data to the model.
Important TensorFlow Concepts
Variables: Store and update model parameters.
Operations: Mathematical operations performed on tensors.
Loss Functions: Measure the model's error.
Optimizers: Adjust model parameters to minimize loss.
Basic TensorFlow Code Snippets
Basic Tensor Operations
Basic TensorFlow Code Snippets
Linear Regression Example
Basic TensorFlow Code Snippets
Building a Simple Neural Network
TensorFlow represents a powerful, flexible platform for
developing machine learning and deep learning
solutions across various domains. Understanding its
core principles and capabilities is crucial for modern AI
practitioners.
Conclusion

TensorFlow Event presentation08-12-2024.pptx

  • 1.
  • 2.
    Impact of AIin the world
  • 3.
    What is ArtificialIntelligence? AI is a broad field of computer science focused on creating intelligent machines that can simulate human-like thinking and behavior. Aims to develop systems capable of performing tasks that typically require human intelligence. Encompasses reasoning, problem-solving, learning, perception, and language understanding. Example:- Virtual assistants (e.g., Siri)
  • 4.
    What is MachineLearning? A subset of AI that focuses on enabling computers to learn and improve from experience without being explicitly programmed. Uses statistical techniques to help machines "learn" from data. Allows systems to automatically improve their performance over time. Example:- Spam email detection etc
  • 5.
    Difference between AIand ML Artificial Intelligence Machine Learning Broader concept of creating intelligent machines. Specific approach to achieving AI through data and algorithms. Aims to create human-like intelligence. Focuses on learning patterns from data. Includes reasoning and problem-solving. Primarily concerned with statistical learning. Can be rule-based or learning-based. Strictly data-driven learning approach. Example: Robotics, Expert Systems. Example: Prediction models, Classification
  • 6.
  • 7.
    Machine Learning LifeCycle 1. Problem Definition: Define the problem and set objectives. 2. Data Collection: Gather relevant data. 3. Data Preprocessing: Clean, transform, and prepare data. 4. Model Building: Choose and train an algorithm. 5. Model Evaluation: Test model performance. 6. Deployment: Deploy the model into production. 7. Monitoring: Track model performance and improve iteratively.
  • 8.
    Types of MachineLearning Supervised Learning Unsupervised Learning Semi-supervised Learning Reinforcement Learning
  • 9.
    Supervised Learning Learning withlabeled training data Algorithm learns from input-output pairs Goal is to predict outcomes for new, unseen data Some key algorithms include: Linear & Logistic Regression, Decision Trees, Support Vector Machines (SVM) etc.
  • 10.
    Unsupervised Learning Learning fromun-labeled data Discovers hidden patterns or intrinsic structures No predefined outputs Some key algorithms include: K-Means & Hierarchical Clustering, Principal Component Analysis (PCA), Apriori Algorithm etc.
  • 11.
    Semi-Supervised Learning Combination oflabeled and unlabeled data. Uses small amount of labeled data with large unlabeled dataset. Useful when labeling data is expensive or time-consuming. Some key algorithms include: Self-training, Co-training, Graph-based label propagation etc.
  • 12.
    Reinforcement Learning Learning throughinteraction with environment. Agent learns to make decisions by receiving rewards/penalties. Goal is to maximize cumulative reward. Some key algorithms include: Q-Learning, Deep Q Network (DQN), Actor-Critic Methods etc.
  • 13.
    Popular Machine LearningAlgorithms  Regression Algorithms:-  Linear Regression- ■ Predicts continuous numerical values ■ Establishes linear relationship between variables  Polynomial Regression- ■ Captures non-linear relationships ■ Adds polynomial features to linear regression
  • 14.
    Popular Machine LearningAlgorithms  Regression Algorithms:-  Logistic Regression- ■ Used for binary classification ■ Predicts probability of an instance belonging to a class
  • 15.
    Popular Machine LearningAlgorithms  Classification Algorithms:-  Decision Trees- ■ Tree-like model of decisions ■ Splits data based on feature conditions
  • 16.
    Popular Machine LearningAlgorithms  Classification Algorithms:-  Support Vector Machines (SVM) - ■ Creates hyperplane to separate classes ■ Effective in high-dimensional spaces
  • 17.
    Popular Machine LearningAlgorithms  Classification Algorithms:-  Random Forest - ■ Creates hyperplane to separate classes ■ Effective in high-dimensional spaces
  • 18.
    Popular Machine LearningAlgorithms  Classification Algorithms:-  K-Nearest Neighbours (KNN) - ■ Classification based on nearest training examples. ■ Simple, non-parametric algorithm.
  • 19.
    Popular Machine LearningAlgorithms  Clustering Algorithms:-  K-Means Clustering - ■ Partitions data into K clusters. ■ Minimizes within-cluster variance.
  • 20.
    Popular Machine LearningAlgorithms  Dimensionality Reduction:-  Principal Component Analysis (PCA)- ■ Reduces feature dimensions. ■ Preserves maximum variance.
  • 21.
    Popular Machine LearningAlgorithms  Some advanced Algorithms:-  Gradient Boosting- ■ Creates strong predictive models. ■ Builds models sequentially.  XGBoost - ■ Optimized gradient boosting. ■ High performance and scalability.
  • 22.
    Basic code snippetfor making ML model
  • 23.
    Basic code snippetfor making ML model
  • 24.
    Basic code snippetfor making ML model
  • 25.
    Introduction to NeuralNetworks What is a Neural Network? ● Computational model inspired by the human brain's neural structure. ● Consists of interconnected nodes (neurons) organized in layers. ● Capable of learning complex patterns and relationships in data. Artificial Neural Network (ANN) – ● Computational system with interconnected processing nodes (artificial neurons). ● Designed to recognize patterns and solve complex problems. ● Consists of three main layers: 1. Input Layer: Receives initial data 2. Hidden Layer(s): Processes and transforms data 3. Output Layer: Produces final result
  • 26.
    What is DeepLearning? Advanced subset of machine learning using multi-layered neural networks. Capable of learning hierarchical representations of data. Uses multiple hidden layers to extract increasingly abstract features. Example:- image recognition, natural language processing etc.
  • 27.
    TensorFlow Open-source machine learninglibrary developed by Google Brain. Primarily used for deep learning and neural network development. Supports multiple programming languages (Python, C++, Java). Provides flexible ecosystem for research and production
  • 28.
    Features of TensorFlow Highscalability for large datasets and models. Supports both CPU and GPU computations and extends its support to TPU for faster computation. It also supports distributed computing. Provides high-level APIs for easy model development such as pre-built models and APIs like Keras. Excellent visualization tools (TensorBoard).
  • 29.
    Applications of TensorFlow ImageRecognition: Medical imaging, object detection. Natural Language Processing: Chatbots, sentiment analysis. Time Series Analysis: Forecasting stock prices. Reinforcement Learning: Gaming AI, robotics.
  • 30.
    Important TensorFlow Concepts Tensors:Multidimensional arrays that form the fundamental data structure in TensorFlow. Graphs: Represent the computational flow of a model. Variables: Store and update model parameters. Placeholders: Input data to the model.
  • 31.
    Important TensorFlow Concepts Variables:Store and update model parameters. Operations: Mathematical operations performed on tensors. Loss Functions: Measure the model's error. Optimizers: Adjust model parameters to minimize loss.
  • 32.
    Basic TensorFlow CodeSnippets Basic Tensor Operations
  • 33.
    Basic TensorFlow CodeSnippets Linear Regression Example
  • 34.
    Basic TensorFlow CodeSnippets Building a Simple Neural Network
  • 35.
    TensorFlow represents apowerful, flexible platform for developing machine learning and deep learning solutions across various domains. Understanding its core principles and capabilities is crucial for modern AI practitioners. Conclusion