I have the following code to perform a linear regression on pySpark:
lr = LinearRegression(featuresCol = 'features', labelCol='units_sold', maxIter=10, regParam=0.3, elasticNetParam=0.8)
lr_model = lr.fit(premodel_df)
summary =lr_model.summary
I am trying to get the standard error from the coefficients, which is supposed to be done with:
summary.coefficientStandardErrors
But I obtain the folloging error:
An error occurred while calling o704.coefficientStandardErrors. : java.lang.UnsupportedOperationException: No Std. Error of coefficients available for this LinearRegressionModel
Is there another way to obtain the standard error?