ns-rse / sheffield-thyroid

http://blog.nshephard.dev/sheffield-thyroid/
GNU General Public License v3.0
0 stars 0 forks source link

chore: Tidying table links; rendering LASSO section #21

Closed ns-rse closed 3 months ago

ns-rse commented 3 months ago

Some of the table links weren't working I think this was one of two possible reasons.

  1. The #| label: value shouldn't have _ (underscore) in them as Markdown treats such charactesr as special as they are used for marking text as italics.
  2. In all the Quarto examples I have seen table labels all begin with tbl-.

I've corrected these and the tables are now correctly referenced and linked when rendered/previewed.

After tinkering with the recipe::() stages and removing some duplicated text to make it simpler we now...

  1. Filter the variables of interest.
  2. Remove individuals who are missing final_pathology
  3. Setup a recipe() using the notation final_pathology ~ . where . means all other variables, which we selected in step 1.
  4. Use recipes::step_filter_missing() to remove instances where recipes::all_predictors() are missing.
  5. Use recipes::step_normalize() to normalise recipes::all_numeric_predictors().
  6. Use recipes::step_dummy() to generate dummies for recipes::all_nominal_predictors(). This last step now includes all binary No/Yes variables too.

I'm still not yet convinced everything is running perfectly smoothly, things to check would be the number of observations in the df_complete and the train and test data frames.

I did try splitting out the code that builds the recipe to its own sections/recipe.qmd and including it in the same manner as the sections/lasso.qmd is, but encountered errors when trying to preview as there is an attempt made to render notebooks from these files and that was for some reason failing (and I've not been able to work out why today).