From 5b056aa7f4ffee4d3aec88397b475712ddec467d Mon Sep 17 00:00:00 2001 From: Shreyas Grampurohit Date: Thu, 5 Oct 2023 20:24:03 +0530 Subject: [PATCH] Improved structure --- docs/source/bayesian_ridge.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/source/bayesian_ridge.md b/docs/source/bayesian_ridge.md index db646037..86f3aa99 100644 --- a/docs/source/bayesian_ridge.md +++ b/docs/source/bayesian_ridge.md @@ -196,21 +196,22 @@ In the main function, data is loaded either from a custom dataset or the Califor california = fetch_california_housing() actions = pd.DataFrame(california.data, columns=california.feature_names) observations = pd.DataFrame(california.target, columns=['MEDV']) - +``` ### Data preprocessing -#### Data preprocessing is performed using the preprocess_data function. +Data preprocessing is performed using the preprocess_data function. +```python: X, y = preprocess_data(actions, output, exp_path) - +``` ### Data Visualization -#### Optional data visualization can be enabled by setting the visualize flag to 'True'. - +Optional data visualization can be enabled by setting the visualize flag to 'True'. +```python: # Visualize the data if FLAGS.visualize: visualize_data(observations, exp_path) - +``` ### Model Training -#### If the train flag is set to True, the Bayesian Ridge regression model is trained. - +If the train flag is set to True, the Bayesian Ridge regression model is trained. +```python: if FLAGS.train: print('------Training the model------') # Split the data into train and test