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
MI classified output with Hyperplane distance
-
- Posts: 11
- Joined: Wed Mar 23, 2022 3:39 am
Re: MI classified output with Hyperplane distance
Hi Harith,
To identify the direction using the values provided in by the hyperplane output of the processor, you can do the following:
I haven't tested it, but the logic is here.
Hope this helps,
Thomas
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
Hope this helps,
Thomas
-
- Posts: 11
- Joined: Wed Mar 23, 2022 3:39 am
Re: MI classified output with Hyperplane distance
Thank you Thomas.