-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross Validation Conflict With Pseudocode #566
Comments
Good point ... How about if we rename |
I like this idea. My only issue is how will we fit this with modern languages. If we simply write One fix to this would be to adjust algorithm definitions to receive as input a dataset and a list of arguments and then unpack the list:
I don't think this is elegant enough though. We could do something like this: a) As you suggested, replace b) When we call the I don't see any loose ends with this idea, but I could be wrong. All in all, I think we should have a "symmetrical" system with how we handle complexity. Not only do we need to "pack" it in a way the given Learner accepts, but we need to "unpack" it to call the Learner with too, since this is compatible with how languages work. |
In the cross validation pseudocode, when running a learner we pass an argument,
size
, which reflects a parameter of the learner (like thek
in k-Nearest Neighbors, if I understand correctly). Unfortunately in the implementations of the algorithms, there are cases where more than one, or none at all, parameters are needed for the algorithm (like the neural network, which needs multiple parameters).How should we go about this?
I was thinking that when we partition for the given fold, we call another function which will take as input the learner and
size
. It will then check ifsize
matches the learner (eg. neural net needs hidden layers, epochs etc.) and if it does it will run the learner on the partitioned data and will return the hypothesis (h
in the pseudocode). After that the algorithm will go on as normal.I think this is a good enough approach, since it does not diverge much from the pseudocode, although we do have to write some "ugly" if-then statements which are not found in the pseudocode.
Any feedback/suggestions?
The text was updated successfully, but these errors were encountered: