You are building a class which wraps the functionality of your data analysis model in usable methods. You want to make this class very fast to use (it may be accessible via API), while minimising IO, and keeping the code simple and beautiful. What software design pattern / type of class do you implement to do this?
Some more info: A 'predict' method will be the main use, which will take in a vector of data, and output the results of the analysis (several vectors, some risk classifications, etc - which will possibly be in the form of a small class itself).
My use case specific info: I'm using Python 3.6.5 on Django 2.0.1, and have created a small app which will act almost like an API to run analytics (a regression, some polynomial fitting and some rules-based stuff) on data sent from my main app. Because this is in python I need it to be efficient - creating a new large class every time, and reading the data from 3 csvs is not good enough.
Aucun commentaire:
Enregistrer un commentaire