11-20-2015 10:49 AM
Hello,
I am currently using MLT for KNN classification and I get an error: Error 91 occurred at Variant To Data in NILabs_MLT.lvlib:ml_Distance_L1 Norm.vi:280001->Test_KNN.vi ..
Possible reason(s):
LabVIEW: The data type of the variant is not compatible with the data type wired to the type input.
Although my inputs are of type variant! Attached 2 snapshots of the vi and the vi itself.
Please help me, its really urgent.
Solved! Go to Solution.
11-23-2015 02:19 PM
It looks like the variant data type you are trying to use is actually a 2-D array of doubles and by wiring in a cluster of 1-D double arrays to the variant-to-data type sub-VI it throws an error for type mismatch. Try changing the data type your variant is converting to to a 2-D double array
03-17-2016 01:31 AM
Hello everyone !!!
I am getting the same error: "The data type of the variant is not compatible with the data type wired to the type input" while using k-NN. But i am not getting the suggested solution in the preceding thread. I am stuck here. Please elaborate the suggestion.
Thanks & best regards !
03-17-2016 02:02 PM
LabVIEW is very particular about data types and data flow. In your block diagram, press Ctrl+H and use your mouse to hover over the data wires that are leading to where the error is being thrown. Make sure that the data types make sense and completely match. For example, in the previous person's post, a cluster of two 1-D arrays would throw this error when a 2-D array is expected. Look for things like that
03-18-2016 03:30 AM
Sir thanks for the elaboration !
But i couldn't solve the problem. Still, i am in same mess. VI is attached. Also the file in which error is coming, is attached. I believe we can't do any change in ml_Distance_L2 Norm.vi , as that is stored in program files-machine learning. So where am i doing wrong in my VI (query.vi).
Please suggest something.
Thanks & best regards !!!
03-21-2016 04:36 AM
With reference to above post,
I have now wired in 'cluster of 2-D double arrays' to the 'type' input of variant-to-data subvi. But still it is showing the same error. Please suggest something.
Thanks !!!
03-21-2016 04:39 AM
02-18-2020 09:49 PM
I am new guy for using labview and i am trap on the KNN VI. i am not understand what is class label suppose to input. can any one give some idea,pls