05-27-2023 04:06 PM
Hello!
I work on my thesis, and the python node is kinda new to me. From LabView I send the selected features and target variables to Python. There I do some machine learning stuff, but this is not the problem. After getting the y_pred (1D array), y_test (1D array), the Python calculating RMSE, R2 and MAE values, which are single values. When I programmed that, it worked, because the y_pred and y_test wasn't a 1D array, just single values. But with bigger amount of features and target variables, it can't give me back anything and I getting error codes. I changed the return type to 2D array, but still nothing.
I hope someone with some experience can help me.
Thanks,
Balázs
06-13-2023 03:52 AM
06-13-2023 07:10 AM
@balazsmore wrote:
Hello!
.. and I getting error codes.
Which ones? What do they say?
@balazsmore wrote:
I changed the return type to 2D array, but still nothing.
I haven't worked with python nodes, but I guess that you would need to to some cluster return type. If you are returning mixed data, you are returning a tuple. I guess LabVIEW wants to know exactly what is coming through, being statically typed and all.
Alternatively, change your python code so that only one piece of the information is returned per function - or return everything as a big string, if you just need some quick fix (this is super not best practice though).