MI classified output with Hyperplane distance

Working with OpenViBE signal processing scenarios and doing scenario/BCI design
Post Reply
harithhansaka
Posts: 11
Joined: Wed Mar 23, 2022 3:39 am

MI classified output with Hyperplane distance

Post by harithhansaka »

I'm using the MI-CSP replay scenario. To get classified output to python, I've used chunk hyperplane values. But problem is, in both directions, those values are positive. To identify the direction, one direction should get positive and the other should get negative?

https://ibb.co/42WSC08
https://ibb.co/VJ0YhKm
https://drive.google.com/file/d/1R9HExD ... sp=sharing
https://drive.google.com/file/d/159lSVe ... sp=sharing

Thank you,
BR,
Harith

Thomas
Posts: 210
Joined: Wed Mar 04, 2020 3:38 pm

Re: MI classified output with Hyperplane distance

Post by Thomas »

Hi Harith,

To identify the direction using the values provided in by the hyperplane output of the processor, you can do the following:

Code: Select all

if (len(chunk) == 2):
	v1 = int(chunk[0])
	v2 = int(chunk[1])
	sum = v1 +v2
	// if sum = 0, neither left or right
	if (sum == 0):
		res = 0
	else:
		res = v2/sum - v1/sum
		
	if(res > 0):
		print("Right")
	if(res <):
		print("Left")
	else:
		return
I haven't tested it, but the logic is here.

Hope this helps,
Thomas

harithhansaka
Posts: 11
Joined: Wed Mar 23, 2022 3:39 am

Re: MI classified output with Hyperplane distance

Post by harithhansaka »

Thank you Thomas.

Post Reply