You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this is something which I was planning on doing once my schedule relented, but I may as well document the planned changes and rationale, in case anyone else would like to get to this before I do.
when I originally refactored the project to use an out directory, I appended "out/" + to a lot of directory calls intentionally, as I was trying to get a feel for what part of the codebase were producing output to the filesystem, but it was only meant as a stop gap measure. The plan is to create a model class that would be used in place of dictionary currently used to represent models.
the goal of the models class is to sit as a layer of abstraction between the file handling and model data(such as accuracy) and the code handling model logic. take for example the function split_incremental_results: instead of specifying the paths and the copying the directories to the training and test directories, you would do something like:
self.models[model].add_test_data(list_of_files)
the goal of this isn't abstraction for the sake of abstraction but making it to where pathing is mostly derived rather than hard coded. since all the models have the same directory layout, you can potentially make it to where you only feed the output directory and the model name during instantiation and then the pathing is handled (with getters to get file paths), and also allows you to conveniently access model properties(you can implement comparators in python using dunder methods, meaning something like get best model, could be the result of best_model=max(self.models)
this also makes it easy to change it to where files aren't moved or copied at all, only stored as list internally inside the model.
The text was updated successfully, but these errors were encountered:
this is something which I was planning on doing once my schedule relented, but I may as well document the planned changes and rationale, in case anyone else would like to get to this before I do.
when I originally refactored the project to use an out directory, I appended
"out/" +
to a lot of directory calls intentionally, as I was trying to get a feel for what part of the codebase were producing output to the filesystem, but it was only meant as a stop gap measure. The plan is to create a model class that would be used in place of dictionary currently used to represent models.the goal of the models class is to sit as a layer of abstraction between the file handling and model data(such as accuracy) and the code handling model logic. take for example the function split_incremental_results: instead of specifying the paths and the copying the directories to the training and test directories, you would do something like:
the goal of this isn't abstraction for the sake of abstraction but making it to where pathing is mostly derived rather than hard coded. since all the models have the same directory layout, you can potentially make it to where you only feed the output directory and the model name during instantiation and then the pathing is handled (with getters to get file paths), and also allows you to conveniently access model properties(you can implement comparators in python using dunder methods, meaning something like get best model, could be the result of
best_model=max(self.models)
this also makes it easy to change it to where files aren't moved or copied at all, only stored as list internally inside the model.
The text was updated successfully, but these errors were encountered: