Samhitha . Samhitha .

Ch3: Polls and Predictions( classification or regression?)

On the edge of her seat, Amma watches the election results unfold on TV, her eyes flickering with anticipation. In their cozy living room, the tension is palpable. Next to her, Meenu tries to catch up on some work, but her mother's excitement is contagious.

"Meenu, are you following the AP elections? I'm very nervous and excited to see who will become the chief minister this term," Amma exclaims, her voice a mix of anxiety and thrill.

"Yes, Amma, I've been following. It seems to be a tight race between the two parties," replies Meenu, glancing at the television screen that flashes vibrant graphs and numbers.

"If only we had a machine learning model that could predict which party will win and how many seats each will secure based on previous data. It would be supervised learning, right?" Amma muses, her newly acquired tech jargon making Meenu smile.

"Wow, Mom, you've picked up on that pretty quickly! Yes, you're right, it is supervised learning. Predicting whether a party wins or not is a classification problem, and predicting the number of ministers from each party is a regression problem," Meenu explains, impressed by her mother’s grasp of the concepts.

Amma’s curiosity peaks. "What are classification and regression? Is there more to supervised learning?" she asks, eager to understand more.

"Definitely, Amma. Let's start with regression. This type involves predicting a continuous value. For example, consider you have data on various houses, including their size, number of bedrooms, location, and price. Here, the goal is to predict the price of a house based on its features. Price is a continuous value. Connecting this to our election results, the number of candidates who will win from each party is a regression problem because the number is continuous."

"And classification?" Amma interjects, her interest peaking.

"Classification involves predicting a label into discrete classes. It can be two-class or multi-class. An example of two-class classification is if you have data on students and their marks and whether they passed or failed a previous test. Based on this, you can predict whether a student will pass the upcoming test or not. A multi-class example is when you have images of handwritten digits from 0 to 9 and their corresponding labels. The goal here is to identify which digit a new handwritten image represents, and here, there are 10 classes."

"Now, in the context of our election, predicting which party wins is a two-class classification problem, as the outcome is either win or lose."

Intrigued, Amma ponders, "And how does a model know if it's a regression or classification problem?"

"That depends on the type of data and the function of the model. There are specific types of modeling and activation functions tailored for each," Meenu says, noting her mother's overwhelmed expression.

"Let’s leave the deeper terminology for another day. I think I need to sit down with a book to note all this down. For now, I'll just see if the party we voted for is classified to win or not," Amma chuckles, her eyes returning to the screen, now armed with a little more understanding and a lot more curiosity about the intersection of technology and her world of politics.



Read More
Samhitha . Samhitha .

Ch2: People who bought this also bought…… ( what is ML? )

Meenu was working from home that day, alone and immersed in her tasks, when a knock interrupted her concentration. It was a delivery guy with a package. She thanked him, took the package inside, and returned to her work. However, just thirty minutes later, another knock echoed through her quiet home. This pattern continued throughout the day, as four deliveries intended for her mother arrived in succession. Each knock seemed perfectly timed to disrupt her just as she settled into a meeting, leaving Meenu increasingly frustrated.

By evening, when her mother finally returned, Meenu was waiting, surrounded by packages. "Amma! You're back," she exclaimed, relief and annoyance mingling in her voice. "There were so many deliveries today! What did you order?"

"Oh, Meenu," her mother began with a sheepish grin as she started unpacking the items. "Initially, I only planned to order a bedside table. But then, the app suggested a lamp, and it was so pretty! Next, it showed some scented candles, and then a throw. Each suggestion seemed to complement the bedside table so well, I ended up buying them all."

Meenu shook her head, amused yet exasperated. "Amma, you've been tricked into buying all these things using machine learning."

"Tricked? But I like everything I bought. And what does machine learning have to do with this?" her mother asked, genuinely puzzled.

"Yes, Amma, the products are good. They didn't trick you by giving you poor quality, but they used machine learning and data analytics to make you buy things you didn't actually need. Initially, you just wanted a bedside table, but the app manipulated you into buying ten more items!" Meenu explained.

Her mother looked bewildered. "But how did the app know that a table needs a lamp and all the other items?"

"That's the work of ML, Amma," Meenu said. "Remember, I mentioned I would explain machine learning to you? Now's the perfect time. Once you understand, you'll see what's happening here."

Meenu settled next to her mother, ready to demystify the concept. "Machine Learning allows computers to learn and make decisions on their own without being explicitly programmed for each task. It's like teaching a computer to figure things out by itself, by showing it many examples and letting it recognize patterns."

"Let me break it down further into its subsets," Meenu continued:

Supervised Learning: "This involves training a model on a labeled dataset, where the outcomes are already known. Imagine you're learning to recognize different types of animals, and you have a guide who shows you pictures and tells you what each animal is. You use these examples to learn and later, when shown a new picture, you can identify the animal based on your previous learning. Similarly, if we have data on houses in Hyderabad—including their size, location, and price—we can predict a house's price based on these factors because the model has been trained with examples where the outcomes are known."

Unsupervised Learning: "In contrast to supervised learning, unsupervised learning works with unlabeled data. This method looks for patterns and relationships without any pre-existing labels. For instance, if we analyze shopping data from a supermarket, we might discover that people who buy bread also tend to buy jam. The model groups these items together based on customer buying patterns, not because someone told it to. That's how the shopping app suggested the lamp and candles to you; it recognized a pattern from other users' purchases."

Reinforcement Learning: "This method involves learning through trial and error, using feedback from actions to learn behaviors. It’s akin to training a pet with treats for good behavior. The machine makes decisions, receives feedback, and adjusts its actions accordingly. Over time, it learns to optimize its behavior to maximize rewards."

"Now, Amma, do you see how you were subtly influenced?"

Her mother nodded, a look of realization dawning on her face. "Yes, I see now. I need to be cautious with those 'suggested for you' and 'people who bought this also bought...' messages."

"Exactly!" Meenu smiled, pleased with her explanation. "Being informed helps you make better choices."





Read More
Samhitha . Samhitha .

Ch1: Alexa! Play Vishnusahasranamam (an intro to AI ML)

Meenu entered the house, a box under her arm. "Hi Amma! Look what I brought home!" she said, unpacking it enthusiastically.

"What's that?" Amma asked, peering over.

"It's Alexa, Amma. Now, we can operate the whole house with this," Meenu explained as she began setting up the device.

"Alexa! Turn on the lights. Turn off the lights," Meenu commanded. Amma watched in amazement as the lights responded to Meenu’s voice.

"Meenu, how is this working?" Amma inquired.

"It's all the magic of AI, Amma," Meenu replied with a smile.

"What's AI?" Amma asked.

"I'll explain, but first, watch this," Meenu said, changing her tone. "Alexa, what’s the weather like tomorrow?"

"I can hear that you might be having a tough day," Alexa responded. "The weather tomorrow will be sunny with a high of 75 degrees. Maybe some sunshine will help brighten things up."

Amma was shocked. "How did it recognize that you are feeling down? Is anyone watching us? Are there cameras around?"

"No, Amma, it understood my mood based on my voice modulation," Meenu explained.

"And how is that possible? Can it guess my mood too and play a song to brighten me up?" Amma asked.

"Yes, Amma, it can. It has Artificial Intelligence, or AI. It detects our moods based on our voice, and the more we interact, the more it learns about our daily routines and behaviors," Meenu explained.

"You mean like Rajnikanth, Chitti the robot?" Amma asked.

"Yes! Exactly like Chitti!" Meenu affirmed.

"So, what is Artificial Intelligence?" Amma pressed for an explanation.

"Alexa isn't human, so it doesn't have a brain like us. We give it Artificial Intelligence so it can perform tasks that usually require human intelligence. When we spoke just now, Alexa used sentiment analysis, NLP, and machine learning to understand our conversation and even added a message to brighten our mood," Meenu said.

"Are AI and Machine Learning different?" Amma asked.

"ML is part of AI. AI is a broad field that includes many techniques, one of which is machine learning. AI refers to the system that enables Alexa to understand and respond to human emotions, integrating speech recognition, natural language processing, and machine learning models. Machine Learning is a specific technique used to train models on large datasets to recognize patterns and make predictions," Meenu clarified.

"How does Machine Learning actually work?" Amma asked, intrigued.

"It's been a long day. I'll explain more tomorrow," Meenu said, feeling tired. "Alexa! Can you set the alarm for 6 am?"

"Sure, setting the alarm for 6 am," Alexa confirmed.

"Alexa! Play Vishnu Sahasranamam every morning," Amma requested.

"Playing Vishnu Sahasranamam every day after the alarm," Alexa complied.

"Nice way to use Alexa!" Meenu laughed.

With their new companion, Meenu went to sleep, leaving Alexa to fill the silence of the night.

Read More