---
title: "Monojit Sarkar (@monojit) | Hashnode"
description: "I taught myself AI and ML by reading books. Read the latest articles by Monojit Sarkar on Hashnode."
url: "https://hashnode.com/@monojit"
---

@monojit

# Monojit Sarkar

@monojit · Kolkata, West Bengal, India · Joined November 2023

I taught myself AI and ML by reading books.

### [Date Manipulation with Pandas](https://monojit13.hashnode.dev/date-manipulation-with-pandas?utm_source=hashnode&utm_medium=feed)

Here's the task. You need to generate dates between two ranges, extract the year, extract the month and extract the quarter number. import pandas as pd start = '1/1/2018' end = '31/12/2020' df = pd.DataFrame(columns=\['Year', 'Month', 'Quarter'\] Le...

1 min read · [monojit13.hashnode.dev](https://monojit13.hashnode.dev/date-manipulation-with-pandas?utm_source=hashnode&utm_medium=feed)

[Jul 28, 2024](https://hashnode.com/posts/date-manipulation-with-pandas/66a6219e1eda9a20dc7a93c8)

### [Visualize Attention Mechanism in Sequence to Sequence Models](https://monojit13.hashnode.dev/visualize-attention-mechanism-in-sequence-to-sequence-models?utm_source=hashnode&utm_medium=feed)

Attention mechanism is really fascinating. It tries to mimic human way of perceiving the world. In this post, I will provide visualizations on how attention mechanisms work on different simple problems. I will demonstrate them by reversing, right shi...

3 min read · [monojit13.hashnode.dev](https://monojit13.hashnode.dev/visualize-attention-mechanism-in-sequence-to-sequence-models?utm_source=hashnode&utm_medium=feed)

[Jul 22, 2024](https://hashnode.com/posts/visualize-attention-mechanism-in-sequence-to-sequence-models/669e76fb6b7ec1ae2ce41066)

### [What I learnt about LSTM.](https://monojit13.hashnode.dev/what-i-learnt-about-lstm?utm_source=hashnode&utm_medium=feed)

LSTM’s can learn from its input sequence when to use short term dependency and when to use long term dependency. In short term dependency it decides to clear the cell state. In long term dependency it decides not to clear the cell state. LSTM’s cont...

2 min read · [monojit13.hashnode.dev](https://monojit13.hashnode.dev/what-i-learnt-about-lstm?utm_source=hashnode&utm_medium=feed)

[Jul 21, 2024](https://hashnode.com/posts/what-i-learnt-about-lstm/669d3e31320a8d964b9de6ed)

### [Visualization of Self-Attention Network for Sentiment Analysis](https://monojit13.hashnode.dev/visualization-of-self-attention-network-for-sentiment-analysis?utm_source=hashnode&utm_medium=feed)

I use Self-Attention network for Sentiment Analysis. This model is equivalent to 1 head of Multi head Transformer Encoder. I use the IMDB dataset which contains 50K movie reviews which are marked positive or negative in sentiment. Architecture The i...

4 min read · [monojit13.hashnode.dev](https://monojit13.hashnode.dev/visualization-of-self-attention-network-for-sentiment-analysis?utm_source=hashnode&utm_medium=feed)

[Jul 21, 2024](https://hashnode.com/posts/visualization-of-self-attention-network-for-sentiment-analysis/669d37f419f3c8c18d694eb1)

### [Beyond Basics: Advanced Data Handling with Python's operator.itemgetter and Lambda](https://monojit13.hashnode.dev/beyond-basics-advanced-data-handling-with-pythons-operatoritemgetter-and-lambda?utm_source=hashnode&utm_medium=feed)

Extracting First Elements from Sublists. item1 = \[\['a', 1\], \['b', 2\], \['c', 3\], \['d', 4\]\] list(map(operator.itemgetter(0), item1)) # \['a', 'b', 'c', 'd'\] # Using Lambda list(map(lambda x: x\[0\], item1)) # \['a', 'b', 'c', 'd'\] Extracting Last Eleme...

3 min read · [monojit13.hashnode.dev](https://monojit13.hashnode.dev/beyond-basics-advanced-data-handling-with-pythons-operatoritemgetter-and-lambda?utm_source=hashnode&utm_medium=feed)

[Dec 12, 2023](https://hashnode.com/posts/beyond-basics-advanced-data-handling-with-pythons-operatoritemgetter-and-lambda/65787d0dcdafa9133f93501c)
