MATLAB executable file for predictive modeling

I have created a ML model using separate external functions for training and prediction. I want to provide the trained models for predictions to my client who does not has MATLAB installed in their systems. I guess I would need to create an exectuable of my script file, but I am not sure whether it can be done successfully. My concern is whether the executable file would be able to integrate / recognize the external function (which is needed for prediction) when encountered by the MATLAB compiler? I was thinking of creating an executbale by creating a function which inputs the test data to be predicted, trained model structure, and prediction function handle, but I am unsure whether this can work.

 Respuesta aceptada

Steven Lord
Steven Lord el 3 de Feb. de 2022

0 votos

From the documentation: "MATLAB Runtime only works on MATLAB code that was encrypted when the deployable archive was built. Any function or process that dynamically generates new MATLAB code will not work against MATLAB Runtime."
If you're hoping to create an executable that can execute a training function that is specified by the user when they run the application (that is not present when the executable was created) that's not going to work.
But looking at what functionality from Statistics and Machine Learning Toolbox MATLAB Compiler supports I see that "All command line functionality" is supported while "Prebuilt Apps and UIs included in the toolbox" are not.

3 comentarios

Maaz Ahmad
Maaz Ahmad el 6 de Feb. de 2022
Thanks for the response Steven. Understand that once a code is excrypted, I cannot alter it using some function or process. However, I am still skeptical about my concern. I would try to be clearer. My MATLAB function for which I intend to create an executable would comprise of the following input arguments - a dataset which may change from time to time based on the client's data, same trained model structure and same external function handle (that makes predictions for the data set) used for first creating the executable. My function code remains the same but its output varies depending on the dataset passed as inputs (the function / executable returns the predictions for the dataset based on the trained model). So, would such an executable work, where the function handle is a user-created function and not an in-built function.
Steven Lord
Steven Lord el 6 de Feb. de 2022
Is the function that makes predictions for the data set available when the application is created or do you want to specify it at runtime?
Maaz Ahmad
Maaz Ahmad el 6 de Feb. de 2022
Yes I would include the function at the time of creation of executable. There won't be any new functions at runt time. Only the data set would vary from time to time, which I believe should not be an issue.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Centro de ayuda y File Exchange.

Productos

Versión

R2019a

Preguntada:

el 3 de Feb. de 2022

Comentada:

el 6 de Feb. de 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by