Mathematical Model
Mathematical Model
AKSHATHA K N
(P03NK21S0390)
BANGLORE UNIVERSITY
Department of Mathematics,
Jnana Bharathi Campus,
Bengaluru-560056,India.
December-2023
Objective
1 Introduction
2 Convergences and Sampling
Probably Approximation correct
Concentration of Measure
3 Linear Regression
Polynomial Regression
Regularized Regression
4 Mathematical Classifications
Linear Classification
kNN classifiers
Neural Networks
5 Application and Impact
Data Analysis in Python
Educational Management System
Impact of Data Analysis on Football
6 Reference
Introduction
Preface
This project is meant for use with a self-contained course that introduces
many basic principles and techniques needed for modern data analysis. In
particular, it was constructed from material taught mainly in two courses.
The first is an early undergraduate course which was designed to prepare
students to succeed in rigorous Machine Learning and Data Mining
courses. The second course is that advanced Data Mining course.
Most data analysis starts with some data set, called P. It will composed
of a set n data point P = {p1 , p2 , . . . , pn }. But this data comes in "iid"
from a fixed, call this as f .( "iid" mean: Identically and Independently
Distributed.)
Here we estimating the mean of f . Now lets introduce a random variable
X ∼ f : a hypothetical new data point. The mean of f is the expected
value of X : E[X ].
Now estimate
Pn the mean of f using the sample mean, defined as
P̄ = n1 i=1 pi . we consider n "iid" random variables {Xi } corresponding
to a setPof n independent observation {pi } , and take their average as
n
P̄ = n1 i=1 pi to estimate the mean of f .
1X ←− ∼
P̄ = pi realize {Xi } iid f.
n
Pr[|X̄ − E[X̄ ]| ≥ ϵ] ≤ δ .
Concentration of Measure
E[X ]
Pr[X > α] ≤ .
α
Var[X ]
Pr[|X − E[X ]| ≤ ϵ] ≤ .
ϵ2
It is clearly is a PAC bound with δ = Var[X ]/ϵ2 . This bound is typically
stronger than the Markov one since δ decreases quadratically in ϵ instead
of linearly.
−2ϵ2 n
Pr[|X̄ − E[X̄ ]| > ϵ] ≥ 2exp .
∆2
−2ϵ2 k
Pr[|w̄ − ŵ | ≥ ϵ] ≤ 2exp = δ.
(Ψ/n)2
Priority Sampling
1. For item ai ∈ A with weight w (ai ) generate ui ∼ unif (0, 1]. Set
priority ρi = w (ai )/ui .
2. Let τ = ρ′k+1 , the (k + 1)th largest priority.
3. Assign new ( weights
max (w (ai ), τ ) if ρi > τ
w ′ (ai ) = .
0 if ρi ≤ τ
Linear Regression I
y = l(x ) = ax + b .
where a and b are parameters of this line. and l is model of this input
data.
Linear Regression II
The residual measures the error of a single data point. The common
approach is the sum of squared errors (SSE)
n
X
SSE ((X , y ), l) = (yi − l(xi ))2 .
i=1
Where b = ȳ − ax̄ ,
∥Ȳ ∥
a= cosθ .
∥X̄ ∥
Linear Regression IV
Polynomial Regression: Pp
ŷ = Mp (x ) = α0 + α1 x + α2 x 2 + · · · + αp x p = α0 + i=1 αi x i .
Measure error for a single data point (xi , yi ) as a residual as
ri = |ŷ − yi | = |Mα (xi ) − yi | and the error on n data points as the sum of
squared residuals
n
X n
X
SSE(P, Mα ) = ri2 = (Mp (xi ) − yi )2 .
i=1 i=1
Linear Regression V
Then for n data point (x1 , y1 ), . . . , (xn .yn ) we can create an n × (p + 1)
data matrix
1 x1 x12 . . . x1p
y1
1 x2 x22 . . . x2p y2
X̂p = . . y =.
.. . . ..
.. .. . . . ..
2 p
1 xn xn . . . xn yn
Regularized Regression
Linear Regression VI
Mathematical Classifications I
Mathematical Classifications II
the first coordinate is 1, and the next d coordinates come from the vector
xi . Then with a y ∈ Rn vector, we can solve for
α = (X̄ T X̄ )−1 X̄ T y ,
Mathematical Classifications IV
The algorithm: lets start with some normal direction w and then add
mis-classified points to w one at the time.
Algorithm 4.3.1. Perceptron(X , y )
Initialize w = yi xi ∀ (xi , yi ) ∈ (X , y )
repeat
For any (xi , yi ) such that yi ⟨xi , w ⟩ < 0 : update w ←− w + yi xi
until(repeat steps)
returns to w ←− w /∥w ∥
Mathematical Classifications V
K (p, x ) = exp(−∥px ∥/σ) for the Laplace kernel, with bandwidth σ,
K (p, x ) = (⟨p, x ⟩ + c)r for the polynomial kernel of power r , with
control parameter c > 0 .
kNN Classifiers: The kNN classifier means k-nearest neighbors
classifier. Which works as follows. Choose a scalar parameter k (say
k=5). Next define a majority function as maj : {−1, +1}k → {−1, +1}.
For a set Y = (y1 , y2 , . . . , yk ) ∈ {−1, +1}k it is defined
(
+1 if more than k/2 elements of Y are + 1
maj(y ) = .
−1 if more than k/2 elements of Y are − 1
Mathematical Classifications VI
x1
x2
w1
x3 w2 Pd
{0, 1} j=1
wi ẋi − b = ⟨x , w ⟩ − b > 0?
w3 > b?
wd
xd
2 Packages used
Numpy Seaborn
Pandas Matplotlib
3 Platform used
Anaconda [4].
4 Dataset used
Importing dataset
A sample of dataset
Cleaning data
Importing libraries
A Survey of work done in the Research area and the Need for
more research
who can create goal-scoring opportunities. They can then look over lists
of potential recruits and check to see whether their stats match what
they’re looking for.
References
THANK YOU