Tumgik
aiml-vikashkumar · 2 years
Text
Data Visualizations in ML
Visualization is a critical component of ML. In this article, we explore some of the current visualizations that are being used today in order to better understand the data.
Types of Data Visualizations
There are many different types of data visualizations, and the best one for your needs will depend on the type of data you have and what you want to accomplish with it. Here are some of the most popular types of data visualizations:
 1. Bar charts: Bar charts are a simple and effective way to compare data sets. They can be used to show trends over time, or to compare different groups of data.
eg:
Tumblr media
 2. Line graphs: Line graphs are a great way to visualize data that changes over time. They can be used to track trends, or to compare different data sets.
 eg:
Tumblr media
3. Pie charts: Pie charts are a popular way to visualize data sets. They can be used to show proportions, or to compare different groups of data.
 eg:
Tumblr media
4. Scatter plots: Scatter plots are a great way to visualize relationships between two variables. They can be used to find patterns, or to compare different data sets.
 eg:
Tumblr media
5. Heat maps: Heat maps are a great way to visualize complex data sets. They can be used to find patterns, or to compare different groups of data.
eg:
Tumblr media
0 notes
aiml-vikashkumar · 2 years
Text
Types Of Regression Model In Machine Learning
Regression models are used to study the relationship between two variables. They are used in order to find out how changes in one variable affect changes in the other variable. In this article we'll explore 8 different types of regression models and what they each aim to achieve.
 What is a regression model?
 A regression model is a type of machine learning model that predicts a continuous value. For example, you could use a regression model to predict the price of a house based on its features, such as the number of bedrooms and bathrooms, the size of the lot, etc.
 Regression models are commonly used in many different fields, such as finance, economics, and marketing. In machine learning, there are many different types of regression models. Some popular examples include linear regression, logistic regression, and support vector regression.
 Each type of regression model has its own advantages and disadvantages. For example, linear regression is a very simple model that is easy to understand and interpret. However, it may not be able to capture more complex relationships between variables. Logistic regression is more complex than linear regression but can handle categorical data better. Support vector regression is another popular choice for machine learning tasks. It can often produce more accurate predictions than other types of regression models but can be harder to train and tune.
  Ultimately, the type of regression model you choose will depend on your specific machine learning task and the data you have available.
 Types of Regression model
 There are many different types of regression model that can be used in machine learning. The most common types are linear, logistic, and polynomial regression.
 Linear regression is the simplest type of regression. It models the relationship between a dependent variable and one or more independent variables using a straight line. Logistic regression is a more complex type of regression that can be used to model non-linear relationships. Poisson regression is another type of regression that can be used to model count data.
 Each type of regression has its own advantages and disadvantages. Linear regression is simple to understand and easy to implement. However, it is not well suited for modeling non-linear relationships. Logistic regression is more complex but can handle non-linear relationships better. Poisson regression is good for modeling count data but is not as widely used as linear and logistic regression.
 There are many different types of regression models that can be used in machine learning. The type of regression model that is used will depend on the data that is available and the specific goals of the project.
 Linear regression is a very popular type of regression model. It is often used when there is a linear relationship between the dependent variable and the independent variables. This means that as the value of one variable increases, the value of the other variable also increases in a linear fashion. Linear regression is relatively easy to interpret and can be used to make predictions about future values.
 Logistic regression is another popular type of regression model. It is often used when there is a binary dependent variable, such as whether or not someone will purchase a product. Logistic regression can be used to predict the probability that an event will occur.
 Decision trees are another type of regression model that can be used in machine learning. Decision trees are very flexible and can be used for both linear and nonlinear relationships. They are easy to interpret and can be used to make decisions about which actions to take in various situations.
 There are many other types of regression models that can be used in machine learning. The type of model that is used will
 Linear Regression Model
 A linear regression model is the simplest type of regression model. It is used to predict a quantitative outcome. The outcome is continuous, meaning it can take on any value within a range. Linear regression models are used when there is a linear relationship between the predictor variables and the outcome variable.
 2. Logistic Regression Model
A logistic regression model is used to predict a qualitative outcome. The outcome is binary, meaning it can only take on two values (e.g. 1 or 0, Yes or No). Logistic regression models are used when there is a non-linear relationship between the predictor variables and the outcome variable.
 3. Polynomial Regression Model
A polynomial regression model is similar to a linear regression model, but with a more complex relationship between the predictor variables and the outcome variable. Polynomial regression models are used when there is a non-linear relationship between the predictor variables and the outcome variable.
 4. Stepwise Regression Model
A stepwise regression model is an algorithm that automatically selects the best predictor variables for the model. Stepwise regression models are used when there are multiple predictor variables and it is not clear which ones are most important for predicting the outcome variable.
 Quadratic Regression Model
 A quadratic regression model is a type of regression model that is used to model data that has a quadratic relationship.
 A quadratic regression model is a type of regression model that is used to model data that has a quadratic relationship. A quadratic relationship is one where the dependent variable, y, is a function of the independent variable, x, squared.
 The equation for a quadratic regression model is: y = ax^2 + bx + c
 The coefficients a, b, and c are estimated from the data. The coefficient a represents the strength of the quadratic relationship. The coefficient b represents the strength of the linear relationship. The coefficient c is the intercept.
 Quadratic regression models can be used to model data that has a non-linear relationship. They can also be used to model data that has a linear relationship, but with some curvature. Quadratic regression models are more flexible than linear regression models and can fit data better.
 Overall, quadratic regression models are a type of regression model that is used to model data that has a quadratic relationship. They are more flexible than linear regression models and can fit data
 Cubic Regression Model
 Logistic Regression Model
 Decision Tree Regression Model
 Support Vector Machine Regression Model
 Generalized Additive Model For Location Scale And Shape (GAMLSS)
 Kriging
0 notes
aiml-vikashkumar · 4 years
Text
Solve simultaneous equations in python
Let’s take below equations
x - 3y + 3z = -4 2x + 3y - z = 15 4x - 3y - z = 19
Step 1: Convert these equations in matrix
Tumblr media
This can be written as
  AX= B
Where
Tumblr media
Step 2: Import the numpy model (numpy will be used in defining the array and solving)
Step 3: define A and B matrix using array method
Step 3: use linalg.solve() method to solve the equations
    Complete code
Tumblr media
0 notes
aiml-vikashkumar · 4 years
Text
Introduction to Machine Learning
What is Machine Learning?
Machine Learning is the study of computer algorithms that improve automatically through experience: - Tom M. Mitchell
He has defined the Machine Learning in <P,T,E > form
Machine learning is study of algorithms that improves their performance P at some task T with experience E
Let’s understand this with small example. Suppose we have below data set of employee salary
Tumblr media
Now if we build a machine learning algorithm and train with this data set then machine will predict the salary of new employee based on years of experience (i.e. suppose if we enter years of experience 5, machine will predict the monthly salary)
Traditional programming vs machine learning
Traditional programming
Tumblr media
Machine Learning
Tumblr media
More training data -> better model -> higher accuracy
Types of machine leaning:
1.  Supervised Learning
2.  Unsupervised learning
3.  Reinforcement Learning
1.  Supervised Learning: In supervised learning algorithms are train using labelled data, which means input and output are known.
Example: In above data set (employee salary) both input (experience) and output (monthly salary) are known hence its known as labelled data and its part of supervised learning.
Supervised learning is categorized into two types
1.1  Regression
1.2  Classification
1.1  Regression: Regression problems are supervised learning problem where the output variable is a real number
Example:
o   Predicting used mobile price
o   Predicting employee salary
o   Predicting employee age
o   Predicting weight
1.1  Classification: Classification problem are supervised learning problem where the output variable is category, such as (“Yes” or “No”), (“0” or “1”), (“Red” or ”Green” or “Blue”).
Example:
o   Predicting whether a patient has COVID-19 or not
o   Predicting today will rain or not
o   Predicting color of a ball
2.  Unsupervised learning: In unsupervised learning algorithms are train using unlabeled data, which means output are unknown.
 Example: let’s consider a cricketer data set, which has name, run scored and wicket taken, once we plot this data we will get two category of cricketer one with high run score and low wicket taken and another with high wicket taken and low run score, based on these category we can say one is bowler and another one is batsman, but bowler and batsman are not marked in data set hence it called unlabeled data and its part of unsupervised learning.
Types of unsupervised learning
2.1 Clustering
2.1 Clustering: Clustering problems are unsupervised Learning problems. Clustering is the technique of grouping the data into different classes where data in each class have similar properties 
Example:
o   Based on patient data set, find groups of patients with similar blood groups.
o   Group the customer based on purchase behavior
3.   Reinforcement Learning: In Reinforcement Learning no row data is given as input instead reinforcement learning algorithm have to figures out the situation on their own. These learning are used in gaming, robotics.
3 notes · View notes