 If we are live, we have the microphone and everything working okay. Oh no, it's quickly, we don't have much time, see, just need the link. For the stream, that in a sec, try a different type of post on link and hopefully someone joins in and we'll get to fuzzy, back to fuzzy logic in a sec. Look at the edge, sometimes up here on the bottom, sometimes on top. My monitoring doesn't work. Sound monitoring, they keep talking just for testing bit working now. Yep, okay, seems like we're using the correct microphone, so that's good. We will be a couple things on the agenda today, unless you ask some interesting questions, then we're happy to change topics, more than happy to talk about any of those or something close to do it, something relevant to it. Now, we'll be quickly deploying the website, it's because we had some changes. We also want to make the, what is it that got the name, what was the name? The name was not video processing, that's by the way, we have an automated thing to process the live streams into much shorter videos, essentially getting rid of all the silent bits, the like. Let's open source by the way as well, if you want to use it on your own videos, it should be on GitHub. Now, so we'll be redeploying the website as so far as the logic is still in prototype stage, but could try the current prototype. Maybe you have some suggestions on how to actually make it work better. And we have this gesture groove, which is the music turning hand gestures into music. That one is on the JavaScript, actually happy to delete that copy. We weren't actually doing anything in testing, there's something, the bot generated the testing for it. I'm not actually using it at the moment, and just doing a sound check quickly. By the way, it's okay to say hello, and it will be more than great if you already checked bodykills.com, if you checked any of the tools and you have any feedback of them. So that's what I'm doing this for, doing the live stream. You can do it now, you can go on the site. I mean, it might overload my server, hopefully not, probably start seeing it with the frames in the stream being dropped, but so far so good. So let's deploy it now, just go for it. Yes, you might not be able to use it for like five, 10 seconds or so. Okay, so the fuzzy logic won't work because we haven't added to add a flask application. Okay, so there's no point deploying it now. We need to add a flask application first, did it many times, like 10 times or so, but still every time doing it there's some problems. Just quickly, just to get us going, we had this question emailed to us, so it won't be actually posting the original question, but we turned the question into prompts, and the original question actually didn't have any questions, so we turned the prompts into questions. So we have dss read this quickly. Yeah, so the first two are just general advice and it's really answering those questions, providing code. And this is GPT 3.5. So yeah, I'm always never to show how much better GPT-4 actually is. In the past I had some bugs that the 3.5 was not able to solve, but GPT-4 actually came up with a solution, happened a couple of times actually. So it tells you what, yeah, I won't be going into the details of it, we have that tool, so we have some Python code in a flask application implemented on the website, actually bunch of them that use the same, yeah, we have the DG spectrogram, cross-currents with a different thing, synthetic AG, yeah, we'll go in circles after we finish with the logic and neural networks and touch on annotating the AG as well. Then we'll start, that's what we're currently doing, then we'll start going over, we'll add the music, the gesture to music, that just as a side, yeah, so that's what I was doing over the break, quick, fun project kind of relates to considering how much stuff we did with music. So we added another feature that actually someone else was inspired by someone on LinkedIn. Let's just finish with this question. It's interesting that the AGPT was giving quite an extensive code already answering that question, essentially uncovering pretty much everything you need. The original question was how to apply the AG processing onto your own data, so yeah, I don't think the original code is required, it would not work on your data, you need to adjust it to suit your specific data set. I think that specific data set is also not in a public domain, by the way if you do have any data sets that are in a public domain, please do let me know, happy to have a look at them, but they have to be public domain. So it's calculating the PSD, which is called Power Spectrum Density, could explain you everything about Power Spectrum Density as well. Interestingly enough, when asked again, they didn't use the Python, didn't generate any code, it was referring to EEG Lab and M&E Python, so you're kind of trying to avoid, well, avoid MATLAB because it's not open source, and avoid M&E Python as well because it's a bit clunky old and we want to do things ourselves. So the first response was much better where it's actually generated an example that, well, it would not work, it needs the coefficients, but the questioner actually said that they were able to get the coefficients. So this will not work for us, but I'm happy to share that the code, I'll keep that email led to the person who asked the original question. Now GPT-4 was GPT-3.5, it generated an example, it was a shorter example, I'm not quite sure what's missing in PSD coefficients as well. So it's kind of hard to tell which one is better, it was the shorter, seems better, but then what's missing is the question. Again, 3.5 was quite good in turning the original message into actual prompts and questions and start answering them one by one, this one using a Welch function to calculate PSD, that one was using something else, so you can obviously have something comparing, comparing different methods of calculating PSD, could be another video, pretty much do anything that the GPT-1 import or the copilot bot is able to generate for us when that's on the same topic and that generated somehow a much more comprehensive response. Oh, and it's actually using the data, that one's called now, it's actually executing code online on the OpenAI server and speeding out the output, which is good in this case, it was trying to simulate some EEG signals, didn't do quite a great job, can improve it, we actually have a simulated EEG on this site as well. Yes, in the EEG signal generator you need to change that image, because that's the original LabVIEW example, now we're doing everything in Python, yes we're telling you which libraries to use, telling you that you need EEG data obviously, but yes you can simulate, one simulated data obviously is sometimes even better because you can actually test your algorithm in a more precise fashion, so you can actually inject more alpha or beta waves and actually see that your algorithm is working as expected, something that you cannot do with real data, then it's doing a discrete wavelet transform with DB5 wavelet, I have a tool that way you can select different wavelet types, so you can see what difference it makes, extracting coefficients is gamma, yeah between 30 and 100, yeah I have to double check the details of everything it says, something that's common knowledge, so it never gets it wrong, but other times yes, that's hallucination, I didn't come across any major hallucinations, and especially when it's generating code, you actually know if it's working or not, so that's your roof of, you know, lack of hallucinations, if the code is actually working, like the subplot business, data obviously has all this missing stuff, but it should give you an idea of how to get going, yeah a lot of datasets have the files in MATLAB file, which is unusual for EEG, normally EEG will be as its own file format, and yes Python should have a conversion method from well pretty much any file format, it's something of great interest as well, because that's what most people are struggling with, is converting the data from different, from one format to another, channel selection is a big thing, some channels might not work well, should be able to just monitor signal quality on each channel, so if you have an impedance measurement or something that could help you select a channel, you shouldn't be just looking at it, that's coming from engineering standpoint, clinicians will just look at the wiggly lines and make all sorts of decisions, but yeah sometimes it's a bit of a magic voodoo type of activity, way with transformation, transforming signal for EEG, and also set the parameters of the wavelet, and yeah a lot of visualisation of the options, tips and suggestions, yeah take advantage of any community forms, great idea, so might jump, so we said we're gonna be deploying today, but first we need to turn the fuzzy application app into, we need to add another flask application before we can deploy it, that's how it looks like at the moment, you can select your input wave from a dropdown, and change the amount of noise, yeah obviously a signal on that should be unrecognisable, so you expect the wrong output or ideal it should say, I don't know, which is an option in the code, when there is no noise it should give the correct response, in this case a triangle should return a triangle, however the current settings of the fuzzy logic are not quite right, so we have to adjust them, ideally, so I don't know if this tool should be, should also have a controls somewhere probably at the bottom of actually how to adjust the symmetry and sharpness membership functions, so we're looking at these two features in the signals, we're looking at the symmetry and sharpness, so a triangle wave in this case should be symmetric and sharp, then we also have left and right triangles which are different, they probably look more like trapezoids, it should have been, should adjust this to look like like a spike, because this will imitate the epileptic spike, so even triangle doesn't work at the moment, that's producing an output producing an output saying it's a trapezoid, trapezoid saying it is a trapezoid, so that's great, let me see the rule activation, it's mostly the trapezoid rule is being activated, once we add more noise you can see, yeah it starts making mistakes pretty much, over here it's already saying unknown, I don't know, yeah the centroid is all the way this, yeah we also need to plot, we need to add a couple of plots to this, we need to plot this kind of stuff, that's the selection, so essentially saying if the centroid is below 0.2 the output is a square, if it's below 0.4 the output is a triangle, 0.6 trapezoid and 0.6 it will produce unknown, yeah like in this case, so this will be a trapezoid in the middle there, so it's jumpy jumpy jumpy like that, shouldn't be jumpy like that, yeah so this will require quite a bit of work, I don't know, so the original idea was I have the same tool using neural networks, so essentially we'll be trying to see which one is better, obviously it will depend on the task at hand, the phasologic in lab view there was the tool to actually design the parameters, here it's all text base, so I don't have the tool, so what should we do next, yeah there's nothing to deploy because it doesn't really work, well it doesn't work well, now trying to, shall we try, last time we tried the gpt4 without much success, yeah how about today we go for github, a co-pilot and the tool, we have github with a different app, we can close that, close that for now, it doesn't look like we're gonna be deploying just yet to those trapezoid function, can fix it later, so there's couple of options for improvement, we could add another feature, I think two, two should suffice for now, it's okay for making some mistakes, it's fine, just trying to learn questions how we can improve in the centroid function, here's also a funny centroid, it wasn't a standard one, yeah mom is the minimum of a mean of maximum, centroid of area would be obviously a more standard thing to use, yeah we actually expected it to work with a centroid, everything should be more or less standard, the white detection error went from 100 to, here now square doesn't ever give square, we also need to monitor the features or each selected waveform, one of the features, JavaScript should be pretty straightforward because most of the stuff we doing in the back end, which is not ideal for a binary chaos should all be doing everything on the front end, on the client side, then you will have options to do more on the back end, on the server side, that's, yeah server can be costly, and considering these tools are free, I want you to spend electricity and not overload my server as much as possible, question, so if we load all the code and here we should be should have been able to use this say workspace, can you explain the link between the files in the workspace, so it's getting errors when using workspace, it's essentially collecting too much stuff or something, I don't know what's up, if that will work on Windows, can I do curious if I can just do this, send it to a GPT, see what says, what the problem might be I'm using Ubuntu, is this a unique problem, get this array buffer allocation error failed, this error message typically indicates that the process has run out of memory or that it's trying to allocate more memory than is available, on Ubuntu or any other operating system, this can happen if there's insufficient RAM or swap space to allocate the new buffer, this can be right, this can be right, have plenty of RAM, I think it's also happening on the server side, I do have plenty of RAM, I think the problem is happening on the server side of GitHub co-pilot, yep, if you have sufficient RAM on your local machine and you believe the issue is on the server side of GitHub co-pilot, it's possible that the server running your co-pilot instance is experiencing memory allocation issues, this could be due to a bug, a limitation in resources allocated to your session or an outage affecting GitHub services, okay GitHub is working fine, monitor memory usage, that shouldn't be it, well it should be a more simple command for co-pilot, so I don't know anyway it doesn't seem to work on Ubuntu properly, at least the workspace command which meant to look at all the open files, it's collecting workspace structure, yeah, power file location, no there's nothing wrong, yeah it's using bug role memory on my machine, okay so we asked about each file to explain each file, let's go back to the javascript, we need to modify the fuzzy logic parameters, what are we currently looking at, what are we visualizing in terms of the fuzzy logic parameters, to change them do we need to visualize other parameters, I have to speak quickly because I'm just sending it, as soon as you stop talking, yes we have the membership functions, symmetry and sharpness, we have the rule activation, it's plotted this, the x-axis representing this symmetry, assuming the same x-axis for all rules, okay this is odd and aggregated output of the fuzzy inference process, it is plotted as a graph on the x-axis representing symmetry, so rule activation, what the rule activation is working for both asymmetry and sharpness, yeah we do need to modify fuzzy rules to change how the system makes decisions, because currently it's making a lot of mistakes, in the nature of the parameters for example if you want to visualize input fuzzy sets, do we need the input fuzzy sets, yes we have both symmetry and sharpness parameters in low, mid, high, should be able to view yet the input, yeah it keeps saying stuff is not provided on the server side, even though we need to provide a Python code, so what's up with that, actions, yeah we should be to be able to plot, yeah it's probably if the compiler doesn't have all the context, let's do this quickly, do it another in a different order, your flask application for analyzing waveforms with fuzzy logic seems well structured, but there are issues with the accuracy of waveform classification, the incorrect classifications of square and triangle waves as trapezoids and the left triangle is unknown, suggests potential improvements in the fuzzy logic rules or input feature calculations, it enhance the accuracy of your classifications, consider the following steps, refine membership functions, adjust the shapes and ranges of the membership functions for the symmetry and peak underscore sharpness features, the current trapezoidal membership functions might not accurately capture the characteristics of each waveform type, improve feature calculations, for symmetry ensure that it effectively differentiates between symmetrical like square and triangle waves and asymmetrical waveforms like trapezoids, for peak underscore sharpness refine the calculation to better distinguish sharp peaks at in triangle waves from more gradual slopes at in trapezoids, hey can we add more visualization that will help us to modify the fuzzy logic parameters, the html should be pretty straight forward, yeah we need the input features, display graphs for each input feature, symmetry and peak sharpness alongside the original waveform, this will help you see how changes in the waveform affect these features, okay how do we do that, can we now use github to change the code, well it's not quite prompt, should advance to turn it into a prompt, yeah of course we need to modify the channel script and then the html, yeah i want to edit the html whether we put it the output graphs, we have the input graph, output graph, why is this tool over here, have obviously a problem of fitting everything into that one window, then the channel script, so it's a scatter plot that makes sense, turn this into a prompt, i don't know, interior is using gpt but in reality, yeah probably shouldn't be asking silly questions like that, should just give it, does it know of a previous prompt, how to modify the code based on the previous prompt, now why are we calculating symmetry, doesn't make any sense, we already calculated the array, so we'll have calculate, wait why is this, we have it in the back end, we need to pass it to the front end, when we calculate symmetry array, can we turn it into, okay, we calculate symmetry array, can we turn it into one number, how is current decision being made out of the array, considering we should have a single value for each input waveform, yes essentially what i don't understand is currently we have the algorithms searching for certain waveforms through the overtime, but we need a single response, it's actually calculating symmetry measures for each point in the signal, yeah that's not what we want to do, this is not what we want to do, yeah i think we need the keyed up for this, to already place the flask first, in the current code i haven't made any changes, why are we calculating sharpness and symmetry for each data point in the code, instead of for the whole input waveform, yeah so that's raw, generating super slowly, we can break while it's generating, the current approach in your code calculates symmetry and sharpness for each data point in the input waveform rather than for the entire waveform as a whole, this method has distinct advantages, particularly in the context of fuzzy logic and waveform analysis, local feature analysis, by calculating features like symmetry and sharpness at each point the system can assess local properties of the waveform, this is crucial for detecting variations within the waveform which might be lost if you only analyze these features on the whole waveform, detailed classification, analyzing each point individually allows for more detail than nuance classification, this is especially useful in scenarios where different segments of the waveform might exhibit different characteristics, e.g. a waveform that changes from a square to a triangle shape, yeah so that's wrong but i don't want to force it on it, just so it does get upset, how is it possible to calculate symmetry for a single data point, do you need at least two, yeah it does sound too complicated, calculating symmetry for a single data point in a waveform indeed sounds counterintuitive because symmetry by definition involves comparing two halves of a structure to assess their similarity, however in the context of signal processing in your application what's likely happening is a localized symmetry analysis around each data point, here's how localized symmetry analysis might work, windowing around each point for each data point in the waveform you consider a small, would you give me specific responses to the code i uploaded, i don't want any generic stuff, any generic struggling with the text to speech, yeah windowing around each point for each data point in your code calculate underscore symmetry underscore array function calculate symmetry for each data point in a signal, this is achieved by creating a window around each point and comparing the left and right halves of this window, the code ensures that this comparison is only made when the halves are of equal length which is crucial for a fair symmetry assessment, the calculate underscore peak underscore sharpness underscore array function measures are sharply the signal changes of each point, it does this by calculating the average absolute difference between a point and its immediate neighbors, okay so there is a misunderstanding, there is a misunderstanding, the input wave is a dropdown menu to select a waveform of a specific shape, now the fuzzy logic algorithm should then look at the entire wave and in the output wave make a decision what the waveform is or which group the waveform belongs to, can you double check the code and suggest how to fix this issue, yep symmetry and sharpness for each point in the waveform for the purpose of classifying the whole waveform the different approaches needed, here's how you can adjust the code to analyze the entire waveform, symmetry instead of calculating symmetry for each data point calculate the symmetry of the entire waveform, this involves splitting the waveform in half and comparing the two halves, the symmetry calculation could be the average difference between corresponding points in the two halves, I thought that what the code was doing already, sharpness for the whole waveform sharpness can be interpreted as the frequency and intensity of peaks and troughs, this might involve measuring the differences between peak and trough values or the rate of change across the entire waveform, yeah this one problem with sharpness, we also have an option to add noise to the signal, can we somehow make sure that sharpness is not affected by the noise too much, the noise is much higher frequency than the changes in the whole waveform, yep should be somehow embedded into the sharpness calculation adding noise to the signal and ensuring that the calculation of sharpness is not overly affected by this noise requires a careful approach, since the noise is of a higher frequency than the changes in the whole waveform you can use techniques to separate or mitigate the impact of this noise on your sharpness calculation, yeah so we don't want to use low pass filtering because yes it will be getting rid of the noise but we want to feed the noisy signal into the fuzzy logic and just see how it able to deal with it or not, that's okay if it's not, we want to see at what threshold of noise it starts making mistakes, yeah I want to ignore this for now that's okay, try something I haven't tried before, generate prompts, a potentially generate prompts from GPT-4 and actually ask the co-pilot to do the co-changes that work any better, update the calculate underscore waveform underscore symmetry function to assess the symmetry of the entire waveform, this function should take the entire signal as input, split it in half and compare the two halves, calculate the symmetry as the average difference between corresponding points in the two halves, also include handling for waveforms with an odd number of points, let's see, let's calculate waveform symmetry, check if nothing, so before, yeah before we had an array, right because it was calculating for each data point, okay can we just have it in the code, let's try this, let's comment this and now we have calculate waveform symmetry function to assess the symmetry of the entire waveform, it sounds better this function should take the entire signal input, split it in half, pair the two halves, calculate the symmetry as an average difference between corresponding points in the two halves, also include handling odd number of points, it's already like hallucinating, I just said, calculate waveform symmetry function, so obviously taking it from the code above, half, left half, three, giving three different options, obviously 54 and we get one, yeah return symmetry is okay, turning symmetry, just one minus symmetry measure or zero if that lands, so it's is it handling, well yeah it's returning as zero, it's kind of is handling it, but yeah it's nice and clear, but why does something weird happening like a keyboard thing when I go control, try to comment something else, it's happening again, keyboard stops working, I might help a function, find peaks, find, take these features, okay that's shit, peaks, find peaks, drops, find drops, again suggesting couple options that are actually quite different, returning sharpness, modify the筆 logic function, develop find peaks, five drops, I should take peaks and throws and then waveform, turn this function otherwise don't always can accurately identify significant peaks and throws, let's symmetry array, we don't need to calculate symmetry array anymore hopefully, because we also need to modify the fuzzy logic function, do it in the chat and now it's going places, isn't it, but we're really doing that, it's again always refating to use triangular membership functions instead of trapezoidal ones, okay anyway hopefully after this update it will do something more useful and it should appear on bodykills.com soon enough, please check bodykills.com if you haven't done so already, provide your feedback, this is what we're doing this live streams, so don't forget to comment, subscribe so you don't miss the next live stream and I'll see you in a bit, bye