I am working to get more familiar with {tidymodels} and have run into an issue with a knn model using {kknn}. I posted this on StackOverflow yesterday, but it's not getting any interest over there (<20 views).
I would like to use knn regression to predict multiple outcomes, but I get a single output variable. Here's a reprex:
I suspect you're not getting any reaction on that side because you're fundamentally not adhering to how KNN works. KNN will typically only work with one dependent variable as outcome (if you create this as a multiclass factor, continous variable etc that is up to you and your specific problem at hand, i.e. you don't only have to predict one class at a time but you can't have multiple columns or variables acting as your dependent variables).
I am working with a coworker on a shiny deployment of their python model that uses a knn for a model similar to the reprex. I will dig into that documentation to see what might be going on under the hood.
Thanks, Max. I'll need to dig into the underlying model to see why it only provides one predictor. In case future readers are curious, this is the package I was attempting to copy this functionality KNeighborsRegressor.
I don't see anything that would indicate that the model predictions are changed by the different outcome columns. In other words, this would probably be equivalent to doing separate models for each outcome.