01-19-2024 09:37 AM
Hi.
I am newbie to labview and i am working on a project for real time classification of 5nos. electrical appliances by SVM(machine learning toolkit). First, i have written a file to extract the feature of those appliances and also a database contain of 31 combination.
Now i need a elaborate the program to do the real time classification by using the Power analyzer approach and SVM. But i have no clue to do it. i can only find example of real time classification by using picture or image but not number.
Can anyone help or give some example solution on this? Thanks a lot
01-19-2024 01:36 PM - edited 01-19-2024 01:36 PM
I probably would try to solve this with a small dense layer neural net.
but I am not sure, what you try to accomplish.
so you want to transform two measured input-signals into one vector containing 5 values representing class-probabilities e.g. input-signal --> {0.1,0.08,0.3.,0.12,0.95} --> signal is most-likely class 5?
or do you want to classify an input-signal in class 1 to 31?
01-20-2024 01:51 AM
Thanks for your reply. I want to classify an input-signal in class 1 to 31. 1 to 31 are representing 31 group of combination of 5 types of electrical appliance. The operation is like when the real time current and voltage is detected by the DAQ, the algorithm has to tell me which combination is belongs to. Furthermore, i can read from the dataset that (ex. 11th combination is found, that mean Luminaries + Water boiler are turned on).
I hope you can understand what i mean. Again thanks you
01-21-2024 03:09 PM
1,2,3,...,30,31 - this is your class array (blue, integer)
now you need at least one measurment or instance of data of those 31 variations (orange, double). usually, you have at least 100 instances of each class.
do you have the data in database.pdf in a .vi?
01-21-2024 05:26 PM
Do u mean I have to create a database file using ‘write to measurement file’ in pdf format? I can record the data into excel by this function
01-22-2024 03:04 AM
@what.ever wrote:
Do u mean I have to create a database file using ‘write to measurement file’ in pdf format? I can record the data into excel by this function
kind of. you need to transform this:
into a 2d array with 31 rows and 4 columns. how selective are those features? is there a overlap between measurments?
you should repeat each measurment for 100 times, so this will result in a 2d array with 31* 100 rows and 4 column;
you probably want to normalize each of those 4 columns to a range between 0 and 1.
the class array will also have to be extended to 31 * 100 rows, 1 column
split both arrays into 80% - 20 %, and keep the sort order.
the first layer is meant to have 4 neurons, the last layer will have 31 neurons, the # of elements in the hidden layer must be found by experiment, I would start with 2 or 20. also, you might have to change the activation function in the hidden layer.
train one configuration of the neural net with 80%, this will result in a weights matrix
test this weight matrix with the unused 20%, this will result in prognosted category for each measurment, which you have to compare with the true category.