Category : linear-regression

I want to create a linear regression model for the rent over a number of years in Tokyo. So far, I have managed to do the scatter plot with seaborn. However, when I try to do linear regression, the error UFuncTypeError: ufunc ‘multiply’ did not contain a loop with signature matching types (dtype(‘<U32’), dtype(‘<U32’)) -> ..

Read more

I’m perfoming a LinearRegression model with a pipeline and GridSearchCV, i can not manege to make it to the coefficients that are calculated for each feature of X_train. mlr_gridsearchcv = Pipeline(steps =[(‘preprocessor’, preprocessor), (‘gridsearchcv_lr’, GridSearchCV(TransformedTargetRegressor(regressor= LinearRegression(), func = np.log,inverse_func = np.exp), param_grid=parameter_lr, cv = nfolds, scoring = (‘r2′,’neg_mean_absolute_error’), return_train_score = True, refit=’neg_mean_absolute_error’, n_jobs = -1))]) ..

Read more

I am new to machine learning and I was working on a small project using the Credit Balance data. I have noticed that when I add one specific predictor i.e ‘Limit’ to ‘Age’ and ‘Cards’ all predictors become significant est = smf.ols(‘Balance ~ Income+Cards+Age+Student1’, cred1).fit() R-square = 0.236 but est1 = smf.ols(‘Balance ~ Limit+Cards+Age+Student1’, cred).fit() ..

Read more