Wed 22 Nov

Performed regression analysis on the economics indicators dataset to predict an outcome variable using selected features and also assessed how well the model explained the variance within the data.
First preprocessed the data and utilised the features from the feature selection process and defined the target outcome variable.
Then divided the dataset into training and testing sets using train_test_split from sklearn.model_selection. Then initialized and trained the model using the training data. Used the test data to make predictions and calculated the R-squared value using r2_score from sklearn.metrics.
The model explained the proportion of variance in the target variable explained by quantifying the R-squared value. A higher R-squared value closer to 1 indicated a better fit of the model to the data, implying more accurate predictions.
Later examined the coefficients of the model using each feature’s impact on the predicted outcome.

Leave a Reply

Your email address will not be published. Required fields are marked *