Roadmap for AI/ML Roles [2024/2025]

Introduction

Preparing for AI/ML roles can be overwhelming due to the vast amount of topics to cover. To stay organized, I created a structured roadmap that covers fundamental concepts from classical ML to Generative AI. Here’s my checklist, which helped me stay on track.

Roadmap for AI/ML Interviews

  1. Mathematics for ML
  2. Classical Machine Learning
  3. Multi-Layer Perceptrons (MLP)
  4. Deep Neural Networks (DNN)
  5. Natural Language Processing (NLP)
  6. Computer Vision (CV)
  7. Generative AI (GenAI)
  8. Model Evaluation & Training Techniques
  9. Final Interview Preparation

Mathematics for ML

  • Linear Algebra
    • Vector spaces
    • Eigenvalues/Eigenvectors, Orthogonal Eigenvectors
    • Matrix decompositions (SVD, PCA)
  • Probability and Statistics
    • Bayes’ theorem
    • Naïve Bayes
    • Gaussian Distributions
    • KL Divergence
    • Entropy
  • Optimization
    • Gradient Descent (SGD, Adam, RMSprop)
    • Convex Optimization
    • Lagrange Multipliers
  • Calculus
    • Differentiation
    • Chain Rule
    • Hessian Matrices
    • Jacobians

Classical Machine Learning

  • Overfitting, Underfitting, and Regularization
    • L1 Regularization
    • L2 Regularization
    • Dropout (relation with L1 and L2)
  • Bias-Variance Tradeoff
  • Feature Engineering
  • Supervised vs. Unsupervised Learning
  • Common ML Algorithms
    • k-NN
    • SVM
    • XGBoost
    • Random Forests
    • Naïve Bayes
    • Decision Trees
    • Gini Index

Multi-Layer Perceptrons (MLP)

  • Perceptron Model, Learning Rule, XOR Problem
  • Activation Functions: ReLU, Sigmoid, Tanh, Softmax
  • Backpropagation, Chain Rule, Weight Updates
  • Batch Normalization, Dropout
  • Vanishing and Exploding Gradient Problem

Deep Neural Networks (DNN)

  • CNNs (Filters, Pooling, Architectures: AlexNet, VGG, ResNet, EfficientNet)
  • Transfer Learning, Fine-Tuning, Normalizations
  • Residual Connections, 1x1 Convolutions
  • RNN, LSTM, GRU: Vanishing Gradients, Gated Mechanisms
  • Attention Mechanisms, Transformers (Self-Attention, Multi-Head Attention)

Natural Language Processing (NLP)

  • Basic NLP Preprocessing
    • Tokenization, Lemmatization, Stemming, Stop-word Removal
  • Word Embeddings
    • Word2Vec (CBOW, Skip-Gram), GloVe, FastText
    • Transformer-based embeddings
  • Sequence Models
    • RNNs, LSTMs, GRUs (gates) and need of BERT
  • NLP Tasks
    • Named Entity Recognition (NER), Part-of-Speech (POS) Tagging
    • Sentiment Analysis, Machine Translation

Computer Vision (CV)

  • CNN Architectures: ResNet, MobileNet, EfficientNet, Residual Connections
  • Object Detection: YOLO, Faster R-CNN, SSD
  • Non-Maximum Suppression (NMS) in Object Detection
  • Image Segmentation: U-Net, R-CNNs family, Semantic vs. Instance vs. Panoptic Segmentation, RoIPooling
  • Generative Models for Images: GANs, Autoencoders

Generative AI (GenAI)

  • GANs: Vanilla GAN, DCGAN, StyleGAN, CycleGAN
  • Variational Autoencoders (VAEs) and Latent Representations
  • Transformers & LLMs: Basic architecture, GPT-series, LLaMA, Mistral
  • Diffusion Models: DALL-E, Stable Diffusion
  • Transformer Models in GenAI: ViT, Transformer-XL
  • Types of Attention Mechanisms: Self-Attention, Multi-Head Attention, Cross-Attention, Group Query Attention
  • Optimization Techniques for Attention: FlashAttention, Sliding Window Attention, Linformer
  • Other quite asked topics : Positional encodings, RPE, layernormalization, RMS Norm, SwiGLU

Model Evaluation & Training Techniques

  • Evaluation Metrics
    • Accuracy, Precision, Recall, F1-score, MAE, MSE, cosine similarity
    • ROC-AUC Curve, PR Curve, perplexity score, BLUE score
  • Validation Techniques
    • Train-Test Split, Cross-Validation (k-Fold, Leave-One-Out)
    • Bootstrapping
  • Famous Training Techniques
    • Early Stopping, Learning Rate Scheduling
    • Data Augmentation, Transfer Learning
    • Hyperparameter Tuning (Grid Search, Random Search, Bayesian Optimization)

Final Preparation

  • Common pitfalls in ML model deployment
    • Overfitting
    • Data Leakage
    • Model Interpretability
  • System Design for AI Applications
  • Coding Challenges for ML/AI Roles
    • Implementing ML Algorithms from Scratch
    • Data Structures & Algorithms (DSA)

Conclusion

This checklist helped me cover essential topics in a structured manner while preparing for AI/ML roles. If you’re on the same journey, feel free to use this as a reference and tailor it to your needs!

My Podcasting Adventure: A Journey of Fumbles and Interview Insights

Recently, I had the unique opportunity to be interviewed on a podcast hosted by my friend and former colleague. As I stepped into this new role as the interviewee, I was excited yet anxious about sharing my journey into machine learning (ML) and my experiences with job interviews, particularly at Intel. Little did I know that this would turn into a delightful mix of insights and humorous blunders.

🎥 The Setup: Lights, Camera, Action!

As the podcast began, I felt a rush of adrenaline. I was ready to share my story—how I transitioned into data science and the skills necessary for ML roles. However, as soon as the camera rolled, I found myself fumbling over non-technical questions. It’s one thing to discuss algorithms and data sets, but when asked about my journey! It was like being asked to recite Shakespeare while juggling flaming torches—definitely not my forte.

🤦‍♂️ The Hiccups Were Real

Throughout the interview, there were plenty of hiccups. From awkward pauses to mispronouncing terms, I found myself in a comedy of errors. At one point, I accidentally mixed up technical jargon with everyday phrases, leaving both me and my friend chuckling. It was a reminder that even in professional settings, it’s okay to laugh at oneself. After all, who doesn’t love a good blooper reel?

📚 Sharing My Journey

Despite the stumbles, I managed to share key insights from my journey:

  • Educational Influence: I discussed how my academic background laid the foundation for my interest in machine learning. Exploring diverse subjects early on helped me discover my passion for data science.

  • Real-World Applications: My fascination with real-world applications—especially in computer vision—was a major driving force in my career. This curiosity led me to seek hands-on projects that bridged theory with practice.

  • Essential Skills: I emphasized that mastering mathematics and programming is critical for anyone looking to excel in ML roles. Whether you’re coding in Python or diving into C/C++, having a solid grasp of these skills is non-negotiable.

  • Interview Preparation: Sharing tips on preparing for job interviews was particularly important. Understanding the job requirements and practicing both technical and behavioral questions can make all the difference—trust me; I learned this the hard way!

  • Emergence of ML Compilers: We also touched on the rise of ML compilers and their significance in optimizing model efficiency. This niche area is becoming increasingly relevant as companies look to enhance their AI applications.

🌐 The Future Looks Bright

As we wrapped up our conversation, I highlighted the exciting future of AI and generative intelligence. These trends emphasize adaptability in the workforce—a lesson that resonated with me throughout my career journey. The ability to collaborate and continuously learn will be vital as technology evolves.

🤝 A Call to Action

So there you have it! My first podcast experience was filled with laughter, learning moments, and a generous dose of self-mockery. If you’re considering diving into podcasting or just want to hear about job interview experiences at Intel, I invite you to check out the full video. You’ll definitely gain valuable insights that could help you navigate your own career path.

Identifying Bullish and Bearish Patterns with EMA and Hammer Candles in Pine Script

In the world of technical analysis, understanding candlestick patterns and moving averages can give traders insights into potential market direction. Today, we’ll go through a Pine Script code that identifies key candlestick patterns, specifically Bullish Engulfing, Bearish Engulfing, Hammer, and Inverted Hammer candles, along with Exponential Moving Averages (EMAs) for additional trend confirmation. By the end, you’ll have a clear understanding of how each pattern is detected and how EMAs can be used to support these signals.

Table of Contents

  1. Introduction to Candlestick Patterns and EMAs
  2. Setting Up Bullish and Bearish Engulfing Patterns
  3. Adding Exponential Moving Averages (EMAs)
  4. Identifying Hammer and Inverted Hammer Candles
  5. Plotting and Alert Conditions
  6. Complete Code for the Indicator
  7. Conclusion

1. Introduction to Candlestick Patterns and EMAs

Candlestick patterns and Exponential Moving Averages (EMAs) are essential components of technical analysis. Candlestick patterns help traders spot possible reversals or continuations, while EMAs highlight the trend direction. In this article, we’ll use Pine Script to combine these elements and identify:

  • Bullish and Bearish Engulfing Candles
  • Bullish and Bearish Hammer Candles (and their inverted forms)
  • EMAs (5, 9, 15, 50, 100, and 200-period)

This script will help traders visualize these patterns and moving averages on the chart, providing potential buy or sell signals.


2. Setting Up Bullish and Bearish Engulfing Patterns

An engulfing candle pattern occurs when a candle “engulfs” the previous one, indicating a potential reversal. Here’s how we define the logic for Bullish and Bearish Engulfing patterns in Pine Script.

Bullish Engulfing Condition

A Bullish Engulfing candle forms when:

  • The previous candle is bearish (close[1] < open[1]).
  • The current candle is bullish (close > open).
  • The current candle’s close is higher than the previous close.
  • The current candle’s high is higher than the previous high, and its low is lower than the previous low.
  • Volume is higher than the previous candle.
1
bullish_engulfing = (close[1] < open[1]) and (close > open) and (close > close[1]) and (close > high[1]) and (low < low[1]) and (open < open[1]) and (high > high[1]) and (volume > volume[1])

Bearish Engulfing Condition

A Bearish Engulfing candle forms when:

  • The previous candle is bullish (close[1] > open[1]).
  • The current candle is bearish (close < open).
  • The current candle’s close is lower than the previous close.
  • Volume is higher than the previous candle.
1
bearish_engulfing = (close[1] > open[1]) and (close < open) and (close < open[1]) and (close < close[1]) and (low < low[1]) and (open > open[1]) and (high > high[1]) and (volume > volume[1])

These conditions are then used to plot signals on the chart when a Bullish or Bearish Engulfing candle is detected.


3. Adding Exponential Moving Averages (EMAs)

EMAs are calculated by giving more weight to recent prices, making them more responsive to price changes than Simple Moving Averages. Here, we include 5, 9, 15, 50, 100, and 200-period EMAs to provide different levels of trend indication.

1
2
3
4
5
6
ema_5 = ema(close, 5)
ema_9 = ema(close, 9)
ema_15 = ema(close, 15)
ema_50 = ema(close, 50)
ema_100 = ema(close, 100)
ema_200 = ema(close, 200)

These EMAs are then plotted on the chart to help traders identify trends and potential support or resistance levels.


4. Identifying Hammer and Inverted Hammer Candles

Hammer and Inverted Hammer candles indicate potential reversals. A Hammer candle has a small body and a long lower shadow, signaling buying pressure after a downtrend. Conversely, an Inverted Hammer has a long upper shadow and small body, often indicating a potential reversal in an uptrend.

Hammer and Inverted Hammer Conditions

We define specific conditions to identify Green (Bullish) and Red (Bearish) Hammers, as well as Green and Red Inverted Hammers. These conditions consider:

  • The body-to-shadow ratio.
  • The size of the body and shadows.
  • Volume.

Here’s how we define the conditions:

1
2
pure_hammer_condition = (close >= open and body_size <= hammer_body_to_total_ratio * (high - low)) and (body_size >= min_body_size) and (lower_shadow_size >= min_shadow_size * body_size) and (upper_shadow_size < open_high_error * body_size) and (lower_shadow_size > upper_shadow_size) and (volume > volume[1])
pure_inverted_hammer_condition = (close <= open and body_size <= hammer_body_to_total_ratio * (high - low)) and (body_size >= min_body_size) and (upper_shadow_size >= min_shadow_size * body_size) and (lower_shadow_size < open_high_error * body_size) and (upper_shadow_size > lower_shadow_size) and (volume > volume[1])

Reversal Hammer Conditions

These conditions capture Red Hammers and Green Inverted Hammers, which can indicate reversal patterns:

1
2
reversal_hammer_condition = (close < open and body_size <= hammer_body_to_total_ratio * (high - low)) and (body_size >= min_body_size) and (lower_shadow_size >= min_shadow_size * body_size) and (upper_shadow_size < open_high_error * body_size) and (lower_shadow_size > upper_shadow_size) and (volume > volume[1])
reversal_inverted_hammer_condition = (close > open and body_size <= hammer_body_to_total_ratio * (high - low)) and (body_size >= min_body_size) and (upper_shadow_size >= min_shadow_size * body_size) and (lower_shadow_size < open_high_error * body_size) and (upper_shadow_size > lower_shadow_size) and (volume > volume[1])

5. Plotting and Alert Conditions

Now that we’ve set up the conditions for each pattern, we can plot them on the chart and add alerts. We use plotshape() to visualize the signals on the chart and alertcondition() to trigger alerts when specific patterns appear.

Plotting the Signals

Here’s how we plot each pattern with different colors and shapes:

1
2
3
4
5
6
7
plotshape(signal, style=shape.labelup, location=location.belowbar, color=color.green, text="HVB", size=size.small)
plotshape(signal2, style=shape.labeldown, location=location.abovebar, color=color.red, text="HVB", size=size.small)

plotshape(pure_hammer_condition, style=shape.triangleup, location=location.belowbar, color=color.lime, size=size.small, title="Green Hammer")
plotshape(pure_inverted_hammer_condition, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, title="Red Hammer")
plotshape(reversal_hammer_condition, style=shape.triangleup, location=location.belowbar, color=color.yellow, size=size.small, title="Reversal Hammer")
plotshape(reversal_inverted_hammer_condition, style=shape.triangledown, location=location.abovebar, color=color.maroon, size=size.small, title="Reversal inverted Hammer")

Adding Alerts

Alerts notify you when the selected patterns are identified. In this example, we add an alert for high volume Bullish Engulfing patterns.

1
alertcondition(signal, title="High Volume Bullish Engulfing", message="A high volume bullish engulfing candle has been identified")

6. Complete Code for the Indicator

Here is the complete code that combines all the components discussed:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//@version=5
indicator("EMA and Candlestick Patterns", overlay=true)

// Input parameters for engulfing patterns
length = input.int(10, title="Length")
mult = input.float(1.5, title="Multiplier")
min_vol = input.int(1000, title="Minimum Volume")

// Calculate the bullish engulfing condition
bullish_engulfing = (close[1] < open[1]) and (close > open) and (close > close[1]) and (close > high[1]) and (low < low[1]) and (open < open[1]) and (high > high[1]) and (volume > volume[1])

// Calculate the bearish engulfing condition
bearish_engulfing = (close[1] > open[1]) and (close < open) and (close < open[1]) and (close < close[1]) and (low < low[1]) and (open > open[1]) and (high > high[1]) and (volume > volume[1])

// Calculate the high volume condition
high_volume = volume > mult * ta.sma(volume, length)

// Calculate the 9 EMA, 50 EMA, and other EMAs
ema_5 = ta.ema(close, 5)
ema_9 = ta.ema(close, 9)
ema_15 = ta.ema(close, 15)
ema_50 = ta.ema(close, 50)
ema_100 = ta.ema(close, 100)
ema_200 = ta.ema(close, 200)

// Combine the conditions to create the signal for engulfing patterns
signal_bullish_engulfing = bullish_engulfing
signal_bearish_engulfing = bearish_engulfing

// Plot the engulfing signals
plotshape(signal_bullish_engulfing, style=shape.labelup, location=location.belowbar, color=color.green, text="BE", size=size.small)
plotshape(signal_bearish_engulfing, style=shape.labeldown, location=location.abovebar, color=color.red, text="BE", size=size.small)

// Input parameters for hammer and inverted hammer
hammer_body_to_total_ratio = input.float(0.55, title="Hammer Body to Total Candle Ratio")
min_body_size = input.float(0.001, title="Minimum Body Size")
min_shadow_size = input.float(0.5, title="Minimum Shadow Size")
open_high_error = input.float(0.15, title="Open-High Margin of Error")

// Calculate body size and shadow size for hammer conditions
body_size = math.abs(close - open)
upper_shadow_size = high - math.max(open, close)
lower_shadow_size = math.min(open, close) - low

// Define conditions for green hammer and red inverted hammer
green_hammer_condition = (close >= open and body_size <= hammer_body_to_total_ratio * (high - low)) and (body_size >= min_body_size) and (lower_shadow_size >= min_shadow_size * body_size) and (upper_shadow_size < open_high_error * body_size) and (lower_shadow_size > upper_shadow_size) and (volume > volume[1])
red_inverted_hammer_condition = (close <= open and body_size <= hammer_body_to_total_ratio * (high - low)) and (body_size >= min_body_size) and (upper_shadow_size >= min_shadow_size * body_size) and (lower_shadow_size < open_high_error * body_size) and (upper_shadow_size > lower_shadow_size) and (volume > volume[1])

// Define conditions for red hammer and green inverted hammer
red_hammer_condition = (close < open and body_size <= hammer_body_to_total_ratio * (high - low)) and (body_size >= min_body_size) and (lower_shadow_size >= min_shadow_size * body_size) and (upper_shadow_size < open_high_error * body_size) and (lower_shadow_size > upper_shadow_size) and (volume > volume[1])
green_inverted_hammer_condition = (close > open and body_size <= hammer_body_to_total_ratio * (high - low)) and (body_size >= min_body_size) and (upper_shadow_size >= min_shadow_size * body_size) and (lower_shadow_size < open_high_error * body_size) and (upper_shadow_size > lower_shadow_size) and (volume > volume[1])

// Plot hammer and inverted hammer signals
plotshape(green_hammer_condition, style=shape.triangleup, location=location.belowbar, color=color.lime, size=size.small, title="Green Hammer")
plotshape(red_inverted_hammer_condition, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small, title="Red Inverted Hammer")
plotshape(red_hammer_condition, style=shape.triangleup, location=location.belowbar, color=color.yellow, size=size.small, title="Red Hammer")
plotshape(green_inverted_hammer_condition, style=shape.triangledown, location=location.abovebar, color=color.maroon, size=size.small, title="Green Inverted Hammer")

// Add alert conditions for bullish engulfing pattern
alertcondition(signal_bullish_engulfing, title="High Volume Bullish Engulfing", message="A high volume bullish engulfing candle has been identified")

// Plot the EMAs on the chart
plot(ema_5, color=color.orange, linewidth=1, title="EMA-5", display = display.none)
plot(ema_9, color=color.purple, linewidth=1, title="EMA-9", display = display.none)
plot(ema_15, color=color.orange, linewidth=2, title="EMA-15")
plot(ema_50, color=color.purple, linewidth=2, title="EMA-50")
plot(ema_100, color=color.teal, linewidth=2, title="EMA-100", display = display.none)
plot(ema_200, color=color.rgb(230, 241, 75), linewidth=2, title="EMA-200", display = display.none)

Conclusion

With this Pine Script code, you can now identify key candlestick patterns like Bullish Engulfing, Bearish Engulfing, Hammer, and Inverted Hammer candles on your TradingView charts. By adding EMAs, you can confirm trends and make more informed trading decisions. This script helps visualize potential reversal and continuation signals, making it a valuable tool in any trader’s toolkit.

Happy trading!