Linear Regression | R Square and Adjusted R Square 1 - P6
Code Starts Here
===============
import pandas as pd
df1 = pd.DataFrame()
X1 = [10,20,30,40,50]
Y1 = [3,4,2,5,6]
df1['X'] = X1
df1['Y'] = Y1
Ymean = df1['Y'].mean()
df1['Y-Ymean'] = df1['Y'] - Ymean
df1['(Y-Ymean)Square'] = (df1['Y'] - Ymean)**2
df1['Ybar'] = 1.9 + 0.07 * df1['X']
df1['Ybar - Ymean'] = df1['Ybar'] - Ymean
df1['(Ybar - Ymean)Square'] = (df1['Ybar'] - Ymean)**2
R_Square = df1['(Ybar - Ymean)Square'].sum() / df1['(Y-Ymean)Square'].sum()
'''
Adjusted_R_Square = 1 - (1 - R_Square)**2 * (N -1 ) / (N - K -1)
N = No of points in the data
K = no of independent variables
'''
N = 5
K = 1
Adjusted_R_Square = 1 - (1 - R_Square)**2 * (N -1 ) / (N - K -1)
All Playlist of this youtube channel
====================================
1. Data Preprocessing in Machine Learning
[ Ссылка ]
2. Confusion Matrix in Machine Learning, ML, AI
[ Ссылка ]
3. Anaconda, Python Installation, Spyder, Jupyter Notebook, PyCharm, Graphviz
[ Ссылка ]
4. Cross Validation, Sampling, train test split in Machine Learning
[ Ссылка ]
5. Drop and Delete Operations in Python Pandas
[ Ссылка ]
6. Matrices and Vectors with python
[ Ссылка ]
7. Detect Outliers in Machine Learning
[ Ссылка ]
8. TimeSeries preprocessing in Machine Learning
[ Ссылка ]
9. Handling Missing Values in Machine Learning
[ Ссылка ]
10. Dummy Encoding Encoding in Machine Learning
[ Ссылка ]
11. Data Visualisation with Python, Seaborn, Matplotlib
[ Ссылка ]
12. Feature Scaling in Machine Learning
[ Ссылка ]
13. Python 3 basics for Beginner
[ Ссылка ]
14. Statistics with Python
[ Ссылка ]
15. Sklearn Scikit Learn Machine Learning
[ Ссылка ]
16. Python Pandas Dataframe Operations
[ Ссылка ]
17. Linear Regression, Supervised Machine Learning
[ Ссылка ]
18 Interiew Questions on Machine Learning and Data Science
[ Ссылка ]
19. Jupyter Notebook Operations
[ Ссылка ]_
Linear Regression | R Square and Adjusted R Square 1 - P6
Теги
pythonanalyticsmachine learningdataframepandassumlinear regressionmeanR SquareAdjusted R Squarer squarer squaredstatisticsregressioncoefficient of determinationlinearregression analysiscorrelationsimple linear regressionmathtutorialRSquare and Adjusted RSquare with pythonRSquare and Adjusted RSquareimplement R Square with Pythonimplement adjusted R Square with pythonexample of R Squareexample of adjusted R Square