text_html_output_1.png
from sklearn.linear_model import LinearRegression

from sklearn.metrics import mean_absolute_error

from sklearn.metrics import mean_absolute_percentage_error

from sklearn.pipeline import Pipeline

from sklearn.preprocessing import PolynomialFeatures

from sklearn.preprocessing import StandardScaler

import numpy as np # linear algebra

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

data = pd.read_csv('/kaggle/input/no-ground/fake2no_train.csv')

x = np.array(data[['theta', 'phi', 'power_fakeDB']]).reshape(len(data), 3)
y = np.array(data[['theta', 'phi', 'power_noDB']]).reshape(len(data), 3)

poly_reg = Pipeline([('poly', PolynomialFeatures(degree=9)), ('std_scale', StandardScaler()), ('lin_reg', LinearRegression())])
poly_reg.fit(x, y)

from sklearn.metrics import mean_absolute_error
from sklearn.metrics import mean_absolute_percentage_error
data_1 = pd.read_csv('/kaggle/input/no-ground/fake2no_test.csv')
x_1 = np.array(data_1[['theta', 'phi', 'power_fakeDB']]).reshape(len(data_1), 3)
y_1 = np.array(data_1[['theta', 'phi', 'power_noDB']]).reshape(len(data_1), 3)

y_predict = poly_reg.predict(x_1)
MAE = mean_absolute_error(y_1[:, 2], y_predict[:, 2])
MAPE = mean_absolute_percentage_error(y_1[:, 2], y_predict[:, 2])

y_predict_csv = pd.DataFrame(y_predict)
y_predict_csv.to_csv('y_predict.csv')
y_predict_csv.loc[122:152]

y_predict_csv.loc[1692:1722]