AI ML Unit V Notes
AI ML Unit V Notes
Support Vector Machines (SVM) are a powerful machine learning technique widely used in
artificial intelligence (AI), machine learning (ML), and data science for classification,
regression, and even outlier detection tasks.
SVMs are utilized in facial recognition systems, natural language processing (NLP), and
robotics, where they help classify and make decisions by learning from past data.
SVM aids AI systems in achieving high precision for binary classification tasks, such as
distinguishing between sp
am and non-spam emails or detecting fraud.
2. In Machine Learning
SVM falls under the category of supervised learning algorithms. Its core functionality includes:
Classification: SVM seeks to find the hyperplane that best separates data into different
classes. For example, in binary classification, the hyperplane maximizes the margin
between two classes.
Regression: SVM can also be adapted for regression tasks (known as SVR - Support
Vector Regression) by finding a hyperplane that best fits the data within a margin of
tolerance.
Kernel Trick: SVMs can handle nonlinear data through kernel functions, transforming
input data into higher-dimensional spaces where it becomes linearly separable.
Steps in SVM:
1. Identify the separating hyperplane that maximizes the margin between classes.
2. Use support vectors (critical data points close to the margin) to define the hyperplane.
3. Apply the kernel trick for complex and nonlinear decision boundaries.
High-dimensional Data: SVM performs well even when the number of features is greater
than the number of samples, making it ideal for fields like genomics or text classification.
Handling Overfitting: By maximizing the margin, SVM minimizes overfitting and
improves generalization, especially in small datasets.
Applications:
o Text and Image Classification: Categorizing documents, emails, or images into
predefined categories.
o Outlier Detection: Identifying anomalies in financial transactions, network traffic,
or industrial processes.
Mathematical Intuition
For nonlinear problems, the kernel function K(xi,xj) replaces the dot product, allowing SVM to operate in
a transformed feature space.
Advantages of SVM:
Limitations of SVM:
Neural Networks are the backbone of Artificial Intelligence (AI) and Machine Learning (ML),
inspired by the human brain’s structure and functioning. They enable machines to recognize
patterns, learn from data, and make predictions. Among them, Convolutional Neural Networks
(CNNs) and Recurrent Neural Networks (RNNs) are specialized architectures designed for
specific tasks like image and sequence processing.
1. Neural Networks (NN)
Definition:
Structure:
Input Layer: Receives raw data (e.g., images, text, numerical values).
Hidden Layers: Perform computations using weights, biases, and activation functions to
extract features.
Output Layer: Produces predictions or classifications.
Key Concepts:
1. Weights and Biases: Parameters that are adjusted during training to minimize error.
2. Activation Functions: Introduce non-linearity (e.g., ReLU, sigmoid, tanh).
3. Backpropagation: Algorithm to adjust weights by minimizing the loss function using
gradient descent.
Applications:
Definition:
CNNs are a type of neural network designed specifically for image processing and computer
vision tasks. They can automatically and adaptively learn spatial hierarchies of features.
Key Components:
1. Convolutional Layers:
o Apply filters (kernels) to extract spatial features like edges, textures, and shapes.
o Preserve spatial relationships in data.
2. Pooling Layers:
o Reduce spatial dimensions to decrease computation and prevent overfitting.
o Types: Max pooling, Average pooling.
3. Fully Connected Layers:
o Combine extracted features for final classification or regression.
4. Dropout:
o Prevents overfitting by randomly deactivating neurons during training.
Advantages:
Applications:
Definition:
RNNs are specialized neural networks designed for sequence-based data. They leverage
sequential dependencies by maintaining a memory of previous inputs.
Key Features:
1. Recurrent Connections:
o Each neuron’s output feeds back into the network, allowing information retention.
2. Hidden State:
o Captures context from prior steps in a sequence.
Variants:
1. Vanilla RNNs: Basic RNN architecture but suffers from vanishing/exploding gradients
in long sequences.
2. LSTM (Long Short-Term Memory):
o Overcomes vanishing gradients by introducing gates (input, forget, output) to
control memory retention.
3. GRU (Gated Recurrent Unit):
o A simplified version of LSTM with fewer parameters.
Applications:
4. Role in AI & ML
Natural Language Processing (NLP) is a subfield of artificial intelligence (AI) that focuses on
enabling computers to understand, interpret, generate, and interact with human language in a
meaningful way. It combines computational linguistics, machine learning, and statistical methods
to process and analyze natural language data, including text and speech.
NLP bridges the gap between human communication and machine understanding, allowing
machines to process vast amounts of unstructured language data efficiently.
1. Text Processing:
o Tokenization: Splitting text into words or phrases.
o Lemmatization & Stemming: Reducing words to their root forms.
o Stopword Removal: Filtering out common, non-informative words (e.g., "is,"
"and").
2. Syntax and Semantics:
o Part-of-Speech Tagging: Identifying nouns, verbs, adjectives, etc.
o Parsing: Analyzing sentence structure.
o Named Entity Recognition (NER): Extracting names, dates, locations, etc.
o Sentiment Analysis: Identifying emotional tone.
3. Machine Learning and Deep Learning:
o Feature Extraction: Representing text numerically (e.g., Bag of Words, TF-IDF,
embeddings).
o Model Training: Using ML algorithms to perform tasks like classification,
clustering, or translation.
4. Advanced NLP Techniques:
o Word Embeddings: Contextual word representations (e.g., Word2Vec, GloVe).
o Transformers: Modern deep learning models like BERT, GPT, and T5.
Applications of NLP:
2. Machine Translation
3. Sentiment Analysis
Use Case: Determining the sentiment (positive, negative, or neutral) in customer reviews
or social media posts.
Applications: Brand monitoring, market research, and customer feedback analysis.
6. Text Summarization
Use Case: Identifying and categorizing entities like names, locations, and dates in text.
Applications: Resume parsing, financial news analysis, and legal document processing.
9. Opinion Mining
Challenges in NLP:
Big Data technologies like Hadoop and Apache Spark are fundamental for managing, processing,
and analyzing large datasets efficiently. These tools play a crucial role in Artificial Intelligence
(AI) and Machine Learning (ML) by enabling scalable data storage and computation, essential
for training complex models and extracting insights from vast amounts of data.
Hadoop
What is Hadoop?
Hadoop is an open-source framework designed for distributed storage and processing of
large datasets using a cluster of computers.
Core Components:
1. HDFS (Hadoop Distributed File System): Distributed storage system for large-
scale data.
2. MapReduce: Programming model for distributed data processing.
3. YARN (Yet Another Resource Negotiator): Resource management layer.
Role in AI & ML:
o Efficiently stores massive datasets used for training AI/ML models.
o Processes raw data into structured forms suitable for ML workflows.
o Provides a foundation for data pipelines in AI/ML projects.
Apache Spark
Data Storage: Stores massive volumes of unstructured data such as text, images, and
logs, which can be used for training AI models.
Preprocessing: Prepares and cleans raw data to make it usable for ML models.
Cost-Effectiveness: Handles large-scale data on commodity hardware, making it a cost-
effective solution.
3. Applications in AI & ML
Hadoop Applications:
1. Data Lake Creation: Storing raw data from multiple sources for later use in AI/ML
workflows.
2. Log Analysis: Analyzing server logs for anomaly detection or user behavior modeling.
3. Preprocessing Pipelines: Cleaning and aggregating data for model training.
Spark Applications:
Handling Big Data: Both frameworks enable AI/ML systems to manage the vast datasets
required for accurate and robust model training.
Scalability: Distributed architectures allow for parallel processing, essential for handling
the increasing complexity of AI/ML algorithms.
Integration with AI/ML Tools: Spark integrates seamlessly with Python libraries (e.g.,
TensorFlow, PyTorch, scikit-learn), bridging the gap between data processing and AI
model training.
Future Trends and Career Prospects in AI, ML, and Data Science
The fields of Artificial Intelligence (AI), Machine Learning (ML), and Data Science are at the
forefront of technological innovation, influencing industries and reshaping the global job market.
With continuous advancements, they offer a plethora of opportunities for professionals while
setting trends that redefine the future.
AI and ML will become deeply integrated into industries such as healthcare, finance,
retail, and manufacturing.
Examples:
o Personalized medicine in healthcare using predictive models.
o AI-driven financial forecasting and fraud detection.
o Retail demand forecasting with ML-based analytics.
2. Expansion of Generative AI
Shift from centralized data processing to edge computing and federated learning to
address privacy concerns.
Enables training ML models directly on devices (e.g., smartphones, IoT devices),
reducing latency and enhancing security.
6. AI in Autonomous Systems
Growth in real-time data processing for dynamic decision-making in areas like IoT, stock
markets, and streaming platforms.
9. AI-Powered Cybersecurity
Companies across sectors are adopting AI/ML solutions, creating high demand for skilled
professionals.
Key industries:
o Healthcare: AI-driven diagnostics, personalized treatment plans.
o Finance: Risk modeling, fraud detection, algorithmic trading.
o Retail: Predictive analytics, recommendation systems.
o Technology: Core AI research, software development.
3. Emerging Roles
4. Required Skills
Technical Skills:
o Programming: Python, R, or Java.
o Data Management: SQL, Hadoop, Spark.
o ML Libraries: TensorFlow, PyTorch, Scikit-learn.
o Cloud Platforms: AWS, Google Cloud, Azure.
o Tools: Tableau, Power BI, Apache Kafka.
Soft Skills:
o Problem-solving and critical thinking.
o Communication skills for translating technical insights into business decisions.
5. Educational Pathways
Academic Degrees:
o Bachelor's/Master’s in Computer Science, Data Science, or AI.
o Specializations in AI, ML, or Data Analytics.
Certifications:
o Google Professional Machine Learning Engineer.
o AWS Certified Machine Learning Specialist.
o Coursera certifications in AI and Data Science.
With the rise of remote work, professionals can engage in freelancing or consulting roles,
solving data-driven challenges for global clients.