Machine Learning in Elixir: Mutate not working, missing pin ^ (Iris example, Chapter 1)

@seanmor5

For Explorer.Query to access variables defined outside of the query ^ must be used.

Updated in the example below:

cols = ~w(sepal_width sepal_length petal_length petal_width)
normalised_iris =
  DF.mutate(
    iris,
    for col <- across(^cols) do
      {col.name, (col - mean(col)) / variance(col)}
    end
  )
3 Likes

Nice catch! Will address