Skip to content

Commit

Permalink
bayesian ridge grid search added
Browse files Browse the repository at this point in the history
  • Loading branch information
sitamgithub-MSIT committed Aug 10, 2024
1 parent 5235cec commit 065438e
Show file tree
Hide file tree
Showing 2 changed files with 1,699 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1196,11 +1196,11 @@
" \"\"\"\n",
" Calculate the root mean square error between the predicted X and true X values.\n",
"\n",
" Parameters:\n",
" group (pandas.DataFrame): A DataFrame containing the predicted X and true X values.\n",
" Args:\n",
" group (pandas.DataFrame): A DataFrame containing the predicted X and true X values.\n",
"\n",
" Returns:\n",
" float: The root mean square error between the predicted X and true X values.\n",
" float: The root mean square error between the predicted X and true X values.\n",
" \"\"\"\n",
" return np.sqrt(np.sum(np.square([group[\"Predicted X\"], group[\"True X\"]])))\n",
"\n",
Expand All @@ -1209,13 +1209,11 @@
" \"\"\"\n",
" Calculate the root mean square error between the predicted Y values and the true Y values.\n",
"\n",
" Parameters:\n",
" - group: pandas.DataFrame\n",
" A DataFrame containing the predicted Y values and the true Y values.\n",
" Args:\n",
" group (pandas.DataFrame): A DataFrame containing the predicted Y values and the true Y values.\n",
"\n",
" Returns:\n",
" - float\n",
" The root mean square error between the predicted Y values and the true Y values.\n",
" float: The root mean square error between the predicted Y values and the true Y values.\n",
" \"\"\"\n",
" return np.sqrt(np.sum(np.square([group[\"Predicted Y\"], group[\"True Y\"]])))\n",
"\n",
Expand Down Expand Up @@ -1389,18 +1387,16 @@
" \"\"\"\n",
" Plots the true and predicted points for X and Y coordinates.\n",
"\n",
" Parameters:\n",
" - ax (matplotlib.axes.Axes): The axes object to plot on.\n",
" - y_test_x (list or numpy.ndarray): The true X coordinates.\n",
" - y_pred_x (list or numpy.ndarray): The predicted X coordinates.\n",
" - y_test_y (list or numpy.ndarray): The true Y coordinates.\n",
" - y_pred_y (list or numpy.ndarray): The predicted Y coordinates.\n",
" - title (str, optional): The title of the plot. Defaults to None.\n",
" Args:\n",
" - ax (matplotlib.axes.Axes): The axes object to plot on.\n",
" - y_test_x (list or numpy.ndarray): The true X coordinates.\n",
" - y_pred_x (list or numpy.ndarray): The predicted X coordinates.\n",
" - y_test_y (list or numpy.ndarray): The true Y coordinates.\n",
" - y_pred_y (list or numpy.ndarray): The predicted Y coordinates.\n",
" - title (str, optional): The title of the plot. Defaults to None.\n",
"\n",
" Returns:\n",
" - None\n",
" Returns: None\n",
" \"\"\"\n",
"\n",
" # Convert the data to numpy arrays\n",
" y_test_x = np.array(y_test_x)\n",
" y_test_y = np.array(y_test_y)\n",
Expand Down Expand Up @@ -1505,18 +1501,13 @@
" \"\"\"\n",
" Perform analysis on the given DataFrame.\n",
"\n",
" Parameters:\n",
" - df: DataFrame\n",
" The input DataFrame containing the data for analysis.\n",
" - ax: AxesSubplot, optional\n",
" The subplot to plot the analysis results on.\n",
" - title: str, optional\n",
" The title of the plot.\n",
" Args:\n",
" - df (DataFrame): The input DataFrame containing the data for analysis.\n",
" - ax (AxesSubplot, optional): The subplot to plot the analysis results on.\n",
" - title (str, optional): The title of the plot.\n",
"\n",
" Returns:\n",
" None\n",
" Returns: None\n",
" \"\"\"\n",
"\n",
" # Initialize the StandardScaler and BayesianRidge model\n",
" # with 2-degree polynomial features\n",
" sc = StandardScaler()\n",
Expand Down
Loading

0 comments on commit 065438e

Please sign in to comment.