79628479

Date: 2025-05-19 09:45:31
Score: 1
Natty:
Report link

Try this instead :

x = pd.DataFrame(my_data2["trestbps"])
y = pd.DataFrame(my_data2["chol"])

Or

x = my_data2["trestbps"].values.reshape(-1, 1)
my_data2["chol"].values.reshape(-1, 1)

The reason is that scikit-learn models work with 2D arrays.

Reasons:
  • Whitelisted phrase (-1): Try this
  • Low length (0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: TenukiPy