Posts

Showing posts with the label data science

Matplotlib Library for Python Visualization

Image
Matplotlib is a Python library for creating visualizations like graphs, charts, and plots. It helps us see data visually , which makes it easier to understand patterns, trends, and relationships. Why Matplotlib is used in Python for Data Science: Easily create line charts, scatter plots, bar charts, histograms, and more. Change colors, labels, titles, legends, figure size, and styles. Works well with Pandas and NumPy data structures.

Scikit-learn Library for Data Science and Machine Learning

Image
Scikit-learn is a Python library for Machine Learning . It has  tools to create models, train data and test models for predicting or classifying data. Why Scikit-learn is used in Python for Data Science: It has Simple functions to train models and make predictions. It Supports many algorithms: Linear Regression, Decision Trees, Random Forest, K-Nearest Neighbors, Clustering, etc. Test Model and Provides metrics like accuracy, r-squared, mean squared error. Prepare data with  Scaling, encoding, splitting data into train / test datasets. Works with NumPy , Pandas , and Matplotlib easily.

Pandas Library in Data Science

Image
Pandas is a Python library for data manipulation and analyzing dataset with rows and Columns. Suitable for working with Large Datasets. Why Pandas is used in Python for Data Science: Stores data in a structured way using Data Frames . Easily handle missing data, duplicates, or incorrect values. Perform calculations, filtering, sorting, grouping, and aggregation. Read and write CSV, Excel, SQL, JSON, and more. Integration with Other Libraries: Works well with NumPy , Matplotlib , Seaborn , and Scikit-learn .

NumPy Library in Data Science

Image
We use the NumPy library in data science with Python because it makes working with numbers and large datasets much faster and easier. Why NumPy is important in data science: NumPy stores data as arrays that uses less memory Applies Math Operations directly on all values in the array at once. We can work with 1D (vectors), 2D (matrices), and even higher-dimensional data. Libraries like Pandas , Scikit-learn , TensorFlow , and Matplotlib depend on NumPy for handling numeric data. NumPy has built-in functions for matrix multiplication, eigenvalues, random number generation, and statistical calculations.

What is a Python Library?

When we use Python for data analysis, machine learning, or any programming, we do not write each and every code. Why Should we? Some experts already wrote code for us and packed it as a Library. This reusable collection of code is called a Python Library . A library in Python is like a ready-made toolbox. Instead of building every tool yourself, you take the tools from the toolbox and start using it in your code. Why do we need Python Libraries? Save time – We do not write the same code again and again. Easy to use – Just install, import, and start using. Powerful features – Some libraries can do complex tasks in one line of code. Community support – Big communities maintain them, so they keep improving. Examples of Python Data Science Libraries: Pandas – Works with data tables like Excel, filtering and summarizing data NumPy – Works with numbers, arrays, mathematical calculations Matplotlib – Creates graphs and charts Scikit-learn – For machine learning models like regres...

Linear Regression in Python to find Relationship between two columns - Code Explanation

import numpy as np Importing Numpy Library and giving it a short name as np import pandas as pd Importing pandas librabry and giving it a short name as pd from sklearn.linear_model import LinearRegression Importing Linear Regression Model from Sckit Learn Library. import matplotlib.pyplot as plt Importing Matplotlib library for making graphs and giving a short name as plt filepath = r'C:\Users\kkumaran\Downloads\Python - Regression Practice Workbook.xlsx' This is the Location of the Excel File in my Computer. I am importing Excel file into variable called "filepath" data = pd.read_excel(filepath,sheet_name='Linear Regression Practice 1') This code reads the excel file using pandas library and load the sheet Linear Regression Practice 1 into a dataframe called "data". Now your excel data is inside python. print(data) This show the dataset for you to verify. x = data[['Square Feet']] I am creating a variable called x and putting Square feet Col...

Linear Regression in Python to find Relationship between two columns - Formula Explanation

Image
Have you ever noticed in your Life that One thing affects another thing? If Someone Study Well, they score High Marks If Someone Eat Well, they gain Weight If Someone Sleep Well, they remain Younger Doing One thing affects Another thing. But, How much? How much One thing affects Another thing? 50%? 90%? or only 20%? To find that, we use Linear Regression method. Linear Regression Method uses this Formula:  Y = MX + C What is Y: Y is also called as 'Dependent' Value. Because it depends on X. If X Changes, Y Changes. So Y is Dependent value. So we always assign Dependent Column to Variable Y is Python. example: We have 2 Columns. "Study Hours" and "Exam Score" Now, does the Exam score increase when Study Hour increase? YESS! If Someone study more time, their score will obviously increase. So 'Exam Score' Column is depending on 'Study Hours' Column, Right? We call 'Exam Score' Column as Y Column. Because, it is dependent on another Colum...

What is Mean? Median? Mode? why they are used?

Image
Mean: Its nothing but Average.  Well, what is Average? When you see some scoring Not Higher, Not Lower, but medium marks like 50, 60 etc.. we call them average student. Example : Now, I have 5 Students Marks: 10,40,51,68,98 What is the Average mark of this 5 Students? 53.4 is the Average score of 5 students. How this is calculated? (10+40+51+68+98) / Number of values. How many values I have? 10,40,51,68,98 - I have 5 Values. So,  (10+40+51+68+98) / 5 267 / 5 = 53. 4 Mode: It is the number that is repeating more times in the group of numbers. Example:  I have money in my Pocket. 1 - 500 rupees Note, 3 - 100 Rupees Note, 7 - 20 Rupees Note. Now, tell me which Note I have the Most? 20 Rupees Right? because I have 7 20 rupees Notes.  Exactly, that is how we check Mode. If you are given data with numbers (1,2,3,4,5,5,5,5,5,5,6,7,8,9) You know which is Mode. It is 5, because it is the most available number in this group. Median: It is the central Point of data.  You a...

Basic & Commonly used Chart Types for Data Professionals

Image
As a Data Professional, Instead of showing data in a sentence or table, which is hard to read, You can show Data using suitable graph in Excel, Power BI, Tableau Etc. for better understanding  Column Chart Column Chart is made of Vertical Bars. Each Bar shows Each value.  Column Chart is mostly used to show the performance of an Employee every year, every month, etc... You can also use this chart to show Sales, Quantity, Improvement by time period. It works best if you have X axis = Timeline & Y axis = Quantity / Value. Bar Chart: Bar Chart is made of Horizontal Bars. Each Bar shows Value of Each Category. You can use this Chart to show Data by Category Like Products: TV, Mobile, Fridge. It helps analyze which is a Top Category and which is a Lowest Category. It works best if you have X axis = Value & Y axis = Category. Line Chart: It is used to show Trends over time. Internet Service provider Companies can check how the Internet speed in your area changes every Second...

What is Artificial Intelligence? What is Machine Learning? What is Data Science? how they are related to each other?

Image
Artificial Intelligence means making Computers think like Human Brain, choosing correct & realistic decisions, answers based on the Current circumstance and importance. Personal Example: Data Science = What is Actually Happening in your Life. Machine Learning = What you are learning and experiencing in your Life. Artificial Intelligence = Taking Correct Decisions based on your Life Experience Another Example: You are AI Engineer & you created a Personal AI Friend using Python. Now, You give all information about your Financial Status, Economic Status, Emotional Status, Social Status, Current Situation in your Life, Current Situation in your Family, Current Situation in your Country etc etc... and your Current problems in an Excel file or SQL Database. Now you are giving this data to your AI tool which you created. 1. It will analyze the information, choose which is important and which is useless based on your current situation. 2. Now, it sends that important Information to Mac...

What is Data Science? What Data Scientists Do?

Image
Data Science is the art of turning data into decisions by combining machine learning, software development, and traditional research to solve real-world problems. I know I know... But Explain Practically & Simply, So I know what Data Scientists DO!? I hear You! Look at this Image & Read the concepts in Data Science before you scroll further. Now: Lets Start with our School Memories.... Your Old school wants to find out which students are likely to fail in final exams , so they can give extra support early. But How can they find out? Of course, they can ask teachers. But teachers may have some favorite students, Some enemy students and some Own assumptions. Assuming who is better student and who is worst student randomly is a Risky Calculation. It cannot be always Correct. So, your School Needs a Data Scientist. Because Data Scientist Works with Data , Not with Assumptions. A Data Scientist who never even met the Students before, can make Right Calculations and Give Correct resu...

எங்கே எப்படி Real Life Data Science & Machine Learningகில் Matrix பயன்படுகிறது

Image
  Data Science மற்றும் Machine Learningல் நாம நிறைய Numbers மற்றும் Dataset-களை  கையாளுகிறோம். Dataset என்றால், பல Rows மற்றும் Columns கொண்ட Table மாதிரியான Structure. Matrix உபயோகிப்பதால், பெரிய அளவிலான Calculationகளை வேகமாகவும் எளிமையாகவும் கணக்கிடலாம். தரவுகளை சேமிப்பது நீங்கள் காணும் எந்த Dataset-யும் (Excel file, CSV, SQL table) எல்லாமே ஒரு Matrix மாதிரி Structure தான். Rows = Records (Row 1, 2, 3, …) Columns = Features or Variables (Column A, B, C, …) ஒரு Column-ல் இருக்கும் Headings: Name, Subject, Employee ID, Attendance, Height, Weight இதெல்லாம் Features. ஒரு Row-ல் இருக்கும் Values: Akash, Ajith, Maths, English, 5 feet, 6 feet — இவை எல்லாம் Values. இது தான் Data சேமிக்க மிக சிறந்த முறை .  மனிதர்களுக்கும் Computerகும் சமமாக புரியும். Image Processing Digital Images எல்லாம் Matrixஸாக சேமிக்கப்படும். ஒவ்வொரு Pixel-க்கும் ஒரு Matrix Value இருக்கும், அது Computerகு அந்த Pixel-ல் என்ன Color, density காட்டணும் என்பதை சொல்லி தரும். Black & White படம் → ...