Data Science

Linear Functions in Data Science

Linear Functions in Data Science

In mathematics, functions are used to associate one variable with another.

Suppose we are looking at the relationship between any two variables. In general, it is reasonable to assume that changing one variable's value will change the other variable's value.
It may be reasonable to assume that two variables are considered.

We call on the dependent variable and the other the independent variable because one depends on the other. Relationships between dependent and independent variables can often be expressed mathematically using formulas (functions).

A linear function has an independent variable (x) and a dependent variable (y) and has the form


y = f(x) = ax + b
This function is used to calculate the dependent variable's values when choosing the independent variables' values.

Explanation:

f(x) = output (dependent variable)
x = input (independent variable)
a = slope = is the coefficient of the independent variable. indicates the rate of change of the dependent variable
b = intercept = is the value of the dependent variable when x = 0. This is also the point where the diagonal meets the vertical axis. Plotting functions means plotting the values ​​of the data using the matplotlib library.
 

Top course recommendations for you

    Advanced Statistics
    7 hrs
    Advanced
    Time Series Forecasting
    8 hrs
    Intermediate
    Data Science Foundations
    2 hrs
    Beginner
    542.2K+ Learners
    4.45  (16651)
    Basics of Exploratory Data Analysis
    2 hrs
    Beginner
    81.3K+ Learners
    4.53  (1543)
    Probability for Data Science
    2 hrs
    Beginner
    45K+ Learners
    4.49  (1407)
    Statistical Methods for Decision Making
    2 hrs
    Intermediate
    55.1K+ Learners
    4.42  (1078)
    Predictive Modeling and Analytics - Regression
    3 hrs
    Beginner
    27.3K+ Learners
    4.52  (405)
    Clustering in R
    3 hrs
    Beginner
    16.8K+ Learners
    4.54  (324)
    Data Visualization using Tableau
    2 hrs
    Beginner
    100.7K+ Learners
    4.5  (30)
    Data Visualization With Power BI
    2 hrs
    Beginner
    158.5K+ Learners
    4.49  (9527)