Machine-learning models are behind many recent technological advances, including high-accuracy translations of the text and self-driving cars. They are also increasingly used by researchers to help in solving physics problems, like Finding new phases of matter, Detecting interesting outliers
in data from high-energy physics experiments, Founding astronomical objects are known as gravitational lenses in maps of the night sky etc. The rudimentary algorithm that every Machine Learning enthusiast starts with is a linear regression algorithm. In statistics, linear regression is a linear approach to modelling the relationship between a scalar response (or dependent variable) and one or more explanatory variables (or independent
variables). Linear regression analysis (least squares) is used in a physics lab to prepare the computer-aided report and to fit data. In this article, the application is made to experiment: 'DETERMINATION OF DIELECTRIC CONSTANT OF NON-CONDUCTING LIQUIDS'. The entire computation is made through Python 3.6 programming language in this article.
Numerical Methods in Mechanical Engineering - Final ProjectStasik Nemirovsky
Final Project for the class of "Numerical Methods in Mechanical Engineering" - MECH 309.
In this project, various engineering problems were analyzed and solved using advanced numerical approximation methods and MATLAB software.
A TRIANGLE-TRIANGLE INTERSECTION ALGORITHM csandit
The intersection between 3D objects plays a prominent role in spatial reasoning, geometric
modeling and computer vision. Detection of possible intersection between objects can be based
on the objects’ triangulated boundaries, leading to computing triangle-triangle intersection.
Traditionally there are separate algorithms for cross intersection and coplanar intersection.
There is no single algorithm that can intersect both types of triangles without resorting to
special cases. Herein we present a complete design and implementation of a single algorithm
independent of the type of intersection. Additionally, this algorithm first detects, then intersects
and classifies the intersections using barycentric coordinates. This work is directly applicable to
(1) Mobile Network Computing and Spatial Reasoning, and (2) CAD/CAM geometric modeling
where curves of intersection between a pair of surfaces is required for numerical control (NC)
machines. Three experiments of the algorithm implementation are presented as a proof this
feasibility.
Using several mathematical examples from three different authors in texts from different courses this paper illustrates the easier way to avoid confusions and always get the correct results with the least effort was to use the proposed Excel Gamma function explained in detail for the proper use of the Q(z) and ercf(x) functions in most communication courses. The paper serves as a tutorial and introduction for such functions
Numerical Methods in Mechanical Engineering - Final ProjectStasik Nemirovsky
Final Project for the class of "Numerical Methods in Mechanical Engineering" - MECH 309.
In this project, various engineering problems were analyzed and solved using advanced numerical approximation methods and MATLAB software.
A TRIANGLE-TRIANGLE INTERSECTION ALGORITHM csandit
The intersection between 3D objects plays a prominent role in spatial reasoning, geometric
modeling and computer vision. Detection of possible intersection between objects can be based
on the objects’ triangulated boundaries, leading to computing triangle-triangle intersection.
Traditionally there are separate algorithms for cross intersection and coplanar intersection.
There is no single algorithm that can intersect both types of triangles without resorting to
special cases. Herein we present a complete design and implementation of a single algorithm
independent of the type of intersection. Additionally, this algorithm first detects, then intersects
and classifies the intersections using barycentric coordinates. This work is directly applicable to
(1) Mobile Network Computing and Spatial Reasoning, and (2) CAD/CAM geometric modeling
where curves of intersection between a pair of surfaces is required for numerical control (NC)
machines. Three experiments of the algorithm implementation are presented as a proof this
feasibility.
Using several mathematical examples from three different authors in texts from different courses this paper illustrates the easier way to avoid confusions and always get the correct results with the least effort was to use the proposed Excel Gamma function explained in detail for the proper use of the Q(z) and ercf(x) functions in most communication courses. The paper serves as a tutorial and introduction for such functions
Numerical Solution of Diffusion Equation by Finite Difference Methodiosrjce
IOSR Journal of Mathematics(IOSR-JM) is a double blind peer reviewed International Journal that provides rapid publication (within a month) of articles in all areas of mathemetics and its applications. The journal welcomes publications of high quality papers on theoretical developments and practical applications in mathematics. Original research papers, state-of-the-art reviews, and high quality technical notes are invited for publications.
Numerical approach of riemann-liouville fractional derivative operatorIJECEIAES
This article introduces some new straightforward and yet powerful formulas in the form of series solutions together with their residual errors for approximating the Riemann-Liouville fractional derivative operator. These formulas are derived by utilizing some of forthright computations, and by utilizing the so-called weighted mean value theorem (WMVT). Undoubtedly, such formulas will be extremely useful in establishing new approaches for several solutions of both linear and nonlinear fractionalorder differential equations. This assertion is confirmed by addressing several linear and nonlinear problems that illustrate the effectiveness and the practicability of the gained findings.
Engineering Research Publication
Best International Journals, High Impact Journals,
International Journal of Engineering & Technical Research
ISSN : 2321-0869 (O) 2454-4698 (P)
www.erpublication.org
Different analytical and numerical methods are commonly used to solve transient heat conduction problems. In this problem, the use of Alternating Direct Implicit scheme (ADI) was adopted to solve temperature variation within an infinitesimal long bar of a square cross-section. The bottom right quadrant of the square cross-section of the bar was selected. The surface of the bar was maintained at constant temperature and temperature variation within the bar was evaluated within a time frame. The Laplace equation governing the 2-dimesional heat conduction was solved by iterative schemes as a result of the time variation. The modelled problem using COMSOL-MULTIPHYSICS software validated the result of the ADI analysis. On comparing the Modelled results from COMSOL MULTIPHYSICS and the results from ADI iterative scheme graphically, there was an high level of agreement between both results.
Parameter Estimation for the Exponential distribution model Using Least-Squar...IJMERJOURNAL
Abstract: We find parameter estimates of the Exponential distribution models using leastsquares estimation method for the case when partial derivatives were not available, the Nelder and Meads, and Hooke and Jeeves optimization methodswere used and for the case when first partial derivatives are available, the Quasi – Newton Method (Davidon-Fletcher-Powel (DFP) and the Broyden-Fletcher-Goldfarb-Shanno (BFGS) optimization methods)were applied. The medical data sets of 21Leukemiacancer patients with time span of 35 weeks ([3],[6]) were used.
FINITE DIFFERENCE MODELLING FOR HEAT TRANSFER PROBLEMSroymeister007
This report provides a practical overview of numerical solutions to the heat equation using the finite difference method (FDM). The forward time, centered space (FTCS), the backward time, centered space (BTCS), and Crank-Nicolson schemes are developed, and applied to a simple problem in1volving the one-dimensional heat equation. Complete, working Matlab and FORTRAN codes for each program are presented. The results of running the codes on finer (one-dimensional) meshes, and with smaller time steps are demonstrated. These sample calculations show that the schemes realize theoretical predictions of how their truncation errors depend on mesh spacing and time step. The Matlab codes are straightforward and allow us to see the differences in implementation between explicit method (FTCS) and implicit methods (BTCS). The codes also allow us to experiment with the stability limit of the FTCS scheme.
A Computationally Efficient Algorithm to Solve Generalized Method of Moments ...Waqas Tariq
Generalized method of moment estimating function enables one to estimate regression parameters consistently and efficiently. However, it involves one major computational problem: in complex data settings, solving generalized method of moments estimating function via Newton-Raphson technique gives rise often to non-invertible Jacobian matrices. Thus, parameter estimation becomes unreliable and computationally inefficient. To overcome this problem, we propose to use secant method based on vector divisions instead of the usual Newton-Raphson technique to estimate the regression parameters. This new method of estimation demonstrates a decrease in the number of non-convergence iterations as compared to the Newton-Raphson technique and provides reliable estimates.
Numerical Solution of Diffusion Equation by Finite Difference Methodiosrjce
IOSR Journal of Mathematics(IOSR-JM) is a double blind peer reviewed International Journal that provides rapid publication (within a month) of articles in all areas of mathemetics and its applications. The journal welcomes publications of high quality papers on theoretical developments and practical applications in mathematics. Original research papers, state-of-the-art reviews, and high quality technical notes are invited for publications.
Numerical approach of riemann-liouville fractional derivative operatorIJECEIAES
This article introduces some new straightforward and yet powerful formulas in the form of series solutions together with their residual errors for approximating the Riemann-Liouville fractional derivative operator. These formulas are derived by utilizing some of forthright computations, and by utilizing the so-called weighted mean value theorem (WMVT). Undoubtedly, such formulas will be extremely useful in establishing new approaches for several solutions of both linear and nonlinear fractionalorder differential equations. This assertion is confirmed by addressing several linear and nonlinear problems that illustrate the effectiveness and the practicability of the gained findings.
Engineering Research Publication
Best International Journals, High Impact Journals,
International Journal of Engineering & Technical Research
ISSN : 2321-0869 (O) 2454-4698 (P)
www.erpublication.org
Different analytical and numerical methods are commonly used to solve transient heat conduction problems. In this problem, the use of Alternating Direct Implicit scheme (ADI) was adopted to solve temperature variation within an infinitesimal long bar of a square cross-section. The bottom right quadrant of the square cross-section of the bar was selected. The surface of the bar was maintained at constant temperature and temperature variation within the bar was evaluated within a time frame. The Laplace equation governing the 2-dimesional heat conduction was solved by iterative schemes as a result of the time variation. The modelled problem using COMSOL-MULTIPHYSICS software validated the result of the ADI analysis. On comparing the Modelled results from COMSOL MULTIPHYSICS and the results from ADI iterative scheme graphically, there was an high level of agreement between both results.
Parameter Estimation for the Exponential distribution model Using Least-Squar...IJMERJOURNAL
Abstract: We find parameter estimates of the Exponential distribution models using leastsquares estimation method for the case when partial derivatives were not available, the Nelder and Meads, and Hooke and Jeeves optimization methodswere used and for the case when first partial derivatives are available, the Quasi – Newton Method (Davidon-Fletcher-Powel (DFP) and the Broyden-Fletcher-Goldfarb-Shanno (BFGS) optimization methods)were applied. The medical data sets of 21Leukemiacancer patients with time span of 35 weeks ([3],[6]) were used.
FINITE DIFFERENCE MODELLING FOR HEAT TRANSFER PROBLEMSroymeister007
This report provides a practical overview of numerical solutions to the heat equation using the finite difference method (FDM). The forward time, centered space (FTCS), the backward time, centered space (BTCS), and Crank-Nicolson schemes are developed, and applied to a simple problem in1volving the one-dimensional heat equation. Complete, working Matlab and FORTRAN codes for each program are presented. The results of running the codes on finer (one-dimensional) meshes, and with smaller time steps are demonstrated. These sample calculations show that the schemes realize theoretical predictions of how their truncation errors depend on mesh spacing and time step. The Matlab codes are straightforward and allow us to see the differences in implementation between explicit method (FTCS) and implicit methods (BTCS). The codes also allow us to experiment with the stability limit of the FTCS scheme.
A Computationally Efficient Algorithm to Solve Generalized Method of Moments ...Waqas Tariq
Generalized method of moment estimating function enables one to estimate regression parameters consistently and efficiently. However, it involves one major computational problem: in complex data settings, solving generalized method of moments estimating function via Newton-Raphson technique gives rise often to non-invertible Jacobian matrices. Thus, parameter estimation becomes unreliable and computationally inefficient. To overcome this problem, we propose to use secant method based on vector divisions instead of the usual Newton-Raphson technique to estimate the regression parameters. This new method of estimation demonstrates a decrease in the number of non-convergence iterations as compared to the Newton-Raphson technique and provides reliable estimates.
Quantum algorithm for solving linear systems of equationsXequeMateShannon
Solving linear systems of equations is a common problem that arises both on its own and as a subroutine in more complex problems: given a matrix A and a vector b, find a vector x such that Ax=b. We consider the case where one doesn't need to know the solution x itself, but rather an approximation of the expectation value of some operator associated with x, e.g., x'Mx for some matrix M. In this case, when A is sparse, N by N and has condition number kappa, classical algorithms can find x and estimate x'Mx in O(N sqrt(kappa)) time. Here, we exhibit a quantum algorithm for this task that runs in poly(log N, kappa) time, an exponential improvement over the best classical algorithm.
In this work, we propose to apply trust region optimization to deep reinforcement
learning using a recently proposed Kronecker-factored approximation to
the curvature. We extend the framework of natural policy gradient and propose
to optimize both the actor and the critic using Kronecker-factored approximate
curvature (K-FAC) with trust region; hence we call our method Actor Critic using
Kronecker-Factored Trust Region (ACKTR). To the best of our knowledge, this
is the first scalable trust region natural gradient method for actor-critic methods.
It is also a method that learns non-trivial tasks in continuous control as well as
discrete control policies directly from raw pixel inputs. We tested our approach
across discrete domains in Atari games as well as continuous domains in the MuJoCo
environment. With the proposed methods, we are able to achieve higher
rewards and a 2- to 3-fold improvement in sample efficiency on average, compared
to previous state-of-the-art on-policy actor-critic methods. Code is available at
https://github.com/openai/baselines.
Applied Numerical Methods Curve Fitting: Least Squares Regression, InterpolationBrian Erandio
Correction with the misspelled langrange.
and credits to the owners of the pictures (Fantasmagoria01, eugene-kukulka, vooga, and etc.) . I do not own all of the pictures used as background sorry to those who aren't tagged.
The presentation contains topics from Applied Numerical Methods with MATHLAB for Engineers and Scientist 6th and International Edition.
Model Attribute Check Company Auto PropertyCeline George
In Odoo, the multi-company feature allows you to manage multiple companies within a single Odoo database instance. Each company can have its own configurations while still sharing common resources such as products, customers, and suppliers.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
2024.06.01 Introducing a competency framework for languag learning materials ...Sandy Millin
http://sandymillin.wordpress.com/iateflwebinar2024
Published classroom materials form the basis of syllabuses, drive teacher professional development, and have a potentially huge influence on learners, teachers and education systems. All teachers also create their own materials, whether a few sentences on a blackboard, a highly-structured fully-realised online course, or anything in between. Despite this, the knowledge and skills needed to create effective language learning materials are rarely part of teacher training, and are mostly learnt by trial and error.
Knowledge and skills frameworks, generally called competency frameworks, for ELT teachers, trainers and managers have existed for a few years now. However, until I created one for my MA dissertation, there wasn’t one drawing together what we need to know and do to be able to effectively produce language learning materials.
This webinar will introduce you to my framework, highlighting the key competencies I identified from my research. It will also show how anybody involved in language teaching (any language, not just English!), teacher training, managing schools or developing language learning materials can benefit from using the framework.
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Unit 8 - Information and Communication Technology (Paper I).pdfThiyagu K
This slides describes the basic concepts of ICT, basics of Email, Emerging Technology and Digital Initiatives in Education. This presentations aligns with the UGC Paper I syllabus.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Linear regression [Theory and Application (In physics point of view) using python programming language]
1. Linear Regression
Anirban Majumdar
June 21, 2020
Abstract
Machine-learning models are behind many recent technological ad-
vances, including high-accuracy translations of text and self-driving cars.
They are also increasingly used by researchers to help in solving physics
problems, like finding new phases of matter, detecting interesting outliers
in data from high-energy physics experiments, founding astronomical ob-
jects known as gravitational lenses in maps of the night sky etc. The rudi-
mentary algorithm that every Machine Learning enthusiast starts with is
a linear regression algorithm. In statistics, linear regression is a linear
approach to modeling the relationship between a scalar response (or de-
pendent variable) and one or more explanatory variables (or independent
variables). Linear regression analysis (least squares) is used in physics lab
in order to computer-aided analysis and to fit datas. In this article ap-
plication is made to experiment: ’DETERMINATION OF DIELECTRIC
CONSTANT OF NON-CONDUCTING LIQUIDS’. The entire computa-
tion is made through Python 3.6 programming language in this article.
1
2. 1 Theory of Linear Regression
Figure 1:
The blue stars are representing the training data points (xi, yi) and green star is the testing data point and the
red straight line is the fitted line (Getting by Least Square Approximation process). And ± i are respectively
positive and negative errors.
Let us consider that in an experiment we have measured 5 y for 5 different x (i.e.
5 blue stars). So now the objective is to predict what would be the value of y
for a different x for which we did not do the experiment explicitly. So, now one
simplest way is to draw a line through this 5 given points and once line is drawn
we can pickup any value of x, and just from the graph we can read out the value
of y corresponding to that x. Now that approach is very easy to implement.
But the main problem is there can be infinitely many curves through some finite
numbers of given data points. So now how to be know whether our line that we
have drawn is correct or not? For that we need testing data sets (indicated by
green star in the Figure- 1). Now that line is more applicable which is in close
enough to the testing data sets. Now this fitted line can be a curve line or a
straight line according to its distribution functions. In this section we will study
how a straight line can be fitted with some given data sets. The process is well
known as Linear Regression. In statistics, linear regression is a linear approach
to modeling the relationship between a scalar response (or dependent variable)
and one or more explanatory variables (or independent variables). Linear re-
gression analysis is used in physics lab in order to computer-aided analysis and
to fit datas.
Let us consider that the equation of the best fitted straight line will be y = mx+c
2
3. for some given data points (xi, yi). Now our objective is to find the value of m
and c for which the straight line will be best fitted for the given training and
testing data sets.
For this we will follow least square approximation method. According to this
theory the straight line, that minimizes the sum of the squared distances (devi-
ations) from the line to each observation (which is called error and denoted by
i for the ith
observation point), will be the best fitted straight line.
Now,
i = yi − mxi − c (1)
It should be noticed that the error of equation (1) can be positive or negative
for different given data points. But the errors should always be additive. So,
we will calculate the square of each error before adding them.
So, the total error is
E =
i
i
2
⇒ E =
i
(yi − mxi − c)
2
(2)
Now to minimize E we have the following conditions.
∂E
∂m
= 0 (3)
∂2
E
∂m2
> 0
∂E
∂c
= 0 (4)
∂2
E
∂c2
> 0
So, according to equation (4)-
−2
i
(yi − mxi − c) = 0
⇒
i
(yi − mxi − c) = 0
⇒
i
yi − m
i
xi − cn = 0
⇒ c = i yi − m i xi
n
(5)
3
4. where n is the total number of given data points
Now according to equation (3) and (5)-
−2
i
xi yi − mxi − i yi − m i xi
n
= 0
⇒ m =
n i xiyi − i xi i yi
n i xi
2 − ( i xi)
2 (6)
2 Python Programming for implementation of
Linear Regression
2.1 The Physics Problem- EXPERIMENTALLY DETER-
MINATION OF DIELECTRIC CONSTANT OF LIQ-
UIDS
Application for Linear Regression is made to experiment: ’DETERMINATION
OF DIELECTRIC CONSTANT OF LIQUIDS’.
Dielectric or electrical insulating materials are the substances in which elec-
trostatic field can persist for long times. When a dielectric is placed between
the plates of a capacitor and the capacitor is charged, the electric field between
the plates polarizes the molecules of the dielectric. This produces concentration
of charge on its surface that creates an electric field which is anti parallel to
the original field (which has polarized the dielectric). This reduces the electric
potential difference between the plates. Considered in reverse, this means that,
with a dielectric between the plates of a capacitor, it can hold a larger charge.
The extent of this effect depends on the dipole polarizability of molecules of
the dielectric, which in turn determines the dielectric constant of the material.
The method for determination of dielectric constants of liquids consists in the
successive measurement of capacitance, first in a vacuum, and then when the
capacitor is immersed in the liquid under investigation. A cylindrical capacitor
has been used for liquid samples.
4
5. Figure 2:
Dielectric measurement setup for non conducting liquids.
The capacitance per unit length of a long cylindrical capacitor immersed in
a medium of dielectric constant k is given by
C = k
2π 0
ln r2
r1
(Where 0 is free space permittivity, r1 is external radius of inner cylinder and r2 is internal radius of outer cylinder.)
In actual practice, there are errors due to stray capacitances (Cs) at the ends
of the cylinders and the leads. In any accurate measurement, it is necessary to
eliminate these. It has been done in the following way:
Consider a cylindrical capacitor of length L filled to a height h < L with a
liquid of dielectric constant k. Its total capacitance is given by-
C =
2π 0
ln r2
r1
[kh + 1 · (L − h)] + Cs
⇒ C =
2π 0
ln r2
r1
(k − 1) h +
2π 0L
ln r2
r1
+ Cs
So, the above equation shows that the measured capacity C is a linear function
of h (the height upto which the liquid is filled in the capacitor). If we vary the
liquid height h, and measure it, together with the corresponding capacitance C,
the plot of the data should be a straight line. The slope of this equation is given
by-
m =
2π 0
ln r2
r1
(k − 1)
⇒ k =
m ln r2
r1
2π 0
+ 1
From the above equation we can determine k for known values of r1 and r2.
5
6. 2.2 Experimental Results
Liquid Sample CCl4
External radius of inner cylinder 25.4mm
Internal radius of outer cylinder 30.6mm
Liquid Height (cm) Capacitance (pF)
0.0 0.70
1.0 4.54
2.0 8.48
3.0 11.98
4.0 15.95
5.0 19.78
6.0 23.88
7.0 28.07
2.3 Fitting of Datas Using basic Linear Regression Theory
Python Coding-
import matplotlib.pyplot as plt
import numpy as np
from math import *
X=np.array([0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0])
Y=np.array([0.7,4.54 ,8.48 ,11.98 ,15.95 ,19.78 ,23.88 ,28.07])
n=X.size
sop=0
x=0
y=0
x2=0
for i in range (n):
sop=sop+(X[i]*Y[i])
x=x+X[i]
y=y+Y[i]
x2=x2+(X[i]) ** 2
m=((n*sop)-(x*y))/float ((n*x2)-(x) ** 2)
c=((y)-(m*x))/float(n)
M=np.full(n,m)
C=np.full(n,c)
Y_avg=M*X+C
print("The equation of the fitted straight line is y=",m,"x+",c)
plt.plot(X,Y,’o’)
plt.plot(X, Y_avg , color=’red ’)
plt.xlabel(’Height (cm)’)
plt.ylabel(’Capacitance (pF)’)
plt.legend([’Data Plot ’, ’Fitted Plot ’])
plt.title(’Capacitance vs. Height Plot for CCl_4 ’)
plt.show ()
6
7. The output is-
2.4 Fitting of Datas Using LinearRegression Python Pack-
age
Python Coding-
import matplotlib.pyplot as plt
import numpy as np
from sklearn. linear_model import LinearRegression
x=np.array([0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0])
y=np.array([0.7,4.54 ,8.48 ,11.98 ,15.95 ,19.78 ,23.88 ,28.07])
X=x.reshape(-1,1)
Y=y.reshape(-1,1)
reg= LinearRegression ()
reg.fit(X,Y)
Y_pred = reg.predict(X)
m=reg.coef_
c=reg.intercept_
print("The equation of the fitted straight line is y=",m[0,0],"x+",
c[0])
plt.plot(X,Y,’o’)
plt.plot(X, Y_pred , color=’red’)
plt.xlabel(’Height (cm)’)
plt.ylabel(’Capacitance (pF)’)
plt.legend([’Data Plot ’, ’Fitted Plot ’])
plt.title(’Capacitance vs. Height Plot for CCl_4 ’)
plt.show ()
7
8. The output is-
2.5 Final Calculation
So, from the above Capacitance vs. Liquid Height linear plot, we get the slope
m = 3.883 pF/cm = 3.883 × 10−10
F/m
∴ k =
m ln r2
r1
2π 0
+ 1
⇒ k =
3.883 × 10−10
× ln 30.6
25.4
2 × π × 8.854 × 10−12
+ 1 = 2.3
3 Conclusion
Artificial Intelligence has become prevalent recently. People across different dis-
ciplines are trying to apply AI to make their tasks a lot easier. The rudimentary
algorithm that every Machine Learning enthusiast starts with is a linear regres-
sion algorithm. Linear Regression is a machine learning algorithm based on
supervised learning. It performs a regression task. Regression models a target
prediction value based on independent variables. It is mostly used for finding
out the relationship between variables and forecasting. From the above discus-
sions and application, we can conclude that Machine Learning as well as Linear
Regression are very much important and essential tools for Higher Physics too.
8