 We're ready to start. So we have the four presentations from the four different Hands-on we strictly need to stay within ten minutes. So after ten minutes you're cut off. Okay We don't have it. Okay Okay. Hello everyone. My name is Ricardo and he's Luca. We're gonna talk about the machine learning hands-on the first part of the activity was using super vector machines, which basically are used to Differentiating data. So we want to categorize a bunch of data. This is a very intuitive example It's only in 2d and basically the problem is to use the minimization of the here minimization of the distance of the the hyperplane which in 2d is a is a line 2d to categories that you are distinguishing. So first we use the what's called a hard margin Which basically you just minimized the the distance of the of the of the line itself But then if you introduce a parameter, which is called C is basically you are penalizing how This how the distance of the elements that don't fit better to your line So moving this parameter C or changing the value you just say how bad it is for your Minimizing function to have some values close to your separating line, which is the yellow here. So You can underfit or overfit your system Basically, if you use a really high C You say that you have to take into account all of your points. So you see that every single point falls between the corresponding section of the of your of your plane and Here with a with a low value of C you say, okay I'm more flexible in in my models of so some values might be you know in the wrong category But in the end we find this to be more accurate because here is a clear example of an overfitting because just this single value Which is not typical compared to the rest of its category. It's significantly influencing the entire the entire classification In case the the data is not linearly Class if linearly separable as in the previous slide We use a mathematical tool, which is called the kernel function and basically what it does is to change Your the minimizing function The minimizing function you are just using it in a different in a higher order of of dimensions so really simple example we use the Gaussian function and We have we use the dummy example we created two clusters of of data and Calculated the covariance matrix here of of this of these two datas covariance matrix just shows how the each data is Related to the other one the parameter of interest this sigma which basically says as you all know like how your Gaussian distribution is So the higher the sigma the more the more spread out your distribution is and therefore the more similar All the data are gonna be one one to each other Now Here we can see some just general examples of Underfitted and overfitted cases here the main difference of course is that the the space is not linearly divisible as in the first slide so here we can see a Just let's say let's say like the the standard case where the the hyperplane that it's dividing the two sections is like correctly distinguishes between both categories here is a really low value of of C and We see that it's so flexible that it's not accurately predicting or actually accurately Classifying the both categories and here is the opposite example. We reduced sigma meaning that our Gaussian distribution is like really It's not spread out. It's like really constrained into the to the mean value So here we see that it's completely over constrained and overfitted sorry here And we can see a separation that doesn't make any sense So now look is gonna talk about a practical application of this tool Yeah, we apply to the this concept to some cardiac data Here we we can see some cardiac shape divided by healthy cardiac shape and pathological cardiac shape Here there are an example of Healthy cardiac shape and the pathological we identified as a parameter The oscillation in the curvature over the mean curvature of the first the left side of the the cure and Here the results as we see The the data Are quite linear separable in fact we try to separate linearly, but Here we use a high C. That means a harder hard edges but we even when I see we fail to To get another behavior Instead with a lower C. We perfectly Divided the the data in healthy pathological with a soft behavior and we try also with Kernel trick So with the Gaussian function dividing and better dividing the healthy from pathological Here we test then with a cross validation with the dividing the data in five interval and training with for and testing all the other one and we see the accuracy of the the testing with Depending on C and if we with an higher C That means when are the other behavior the accuracy the reach a plateau instead Sigma with Sigma we had the very strange behavior in some cases With an IS Sigma we reach a lower accuracy in some other cases There is a Plato so the accuracy don't get down significantly with an IS Sigma So let's Ricardo see the other part The second part of the hand zone was using PCA principle component analysis and Basically when you have some data you want to obtain the representative Bec it's called the eigenvectors, but it's basically the main Directions or the main parameters that characterize your your data So here we we can see that the obviously this is a the most intuitive example is always in into D We see that all these cloud of data are mainly varying along this axis the U1 it says the problem is to maximize the variance along this vector And we see that on the contrary over you to the The variances is minimum this means that the the main information of this set of data is given by this This vector and the value of associated with this vector is called the the eigenvalue Quantifies how important this direction is so obviously The eigenvalue associated with the first eigenvector is going to be much higher than the one associated to to the second one The problem as you all know is that when we deal with Data from the real world especially with in clinical applications our data set is not as good as we would as we would want it to be so an example we used is Data for a rhythmic detection, so the the data set we used was not very good because we had only around 450 patients divided into around 280 dimensions 280 labels no and Most of a lot of the data was even missing so we had to disregard those Those values let's say so when we get the the covariance matrix of this data set We see that there are many Interactions and we can't we can't really see any significant group and in a slow as low number a small number of Categories as we saw in the first example where he was clearly separated in two groups So once we use the PCA which applied to these 280 dimension case we We chose first a K of 10 so basically selecting the 10 dimensions more significant And when we tried to plot different cases of interaction just in 2d or even 3d. We saw that it's really difficult to to see a clearly separable Dimension so Here Lucas gonna talk to you about the practical use or the the effective way in which we consider how many dimensions is Significant for our for our case Here we can see two different way, but instead yeah In just one way and two way to look at it because here we have the screw plot So the the eigenvalues over the dimension as you see the the first is the main the principal component is the higher one and as we Increase the dimension the eigenvalues go down as the Carlos said and We see that the eigenvalues approach to zero. So The dimension here are not effectively on the problem Here in moving this value as we see the 90 percent percent of information reached with the 78 dimension that we see With we can see it in this plot because at More or less 80 iteration we reached the 90 percent of course we reach a plateau The this is a normalizide Plot to so we reached the 100 percentage, but With we can see that with an higher dimension There's no many information we reached the total information even with a lower dimension problem Here we test the accuracy with a dimension reduction The red dot is the model without the dimension reduction as we see the model is not As good as we expect because the the accuracy is around the 75 percent and As we see in the previous slide we reached a plateau and With the the dimension when we reached the plateau About the information which also the maximum accuracy Reaching more or less the 75 percent this is only one one plot about One value of C and one value of Sigma of course it can be interesting to evaluate the The influence of the parameter C and the parameter Sigma on the on this accuracy With and without the model reduction so Thank you for your attention Thank you. Any quick question? What's the next one can prepare? Next one Next one any questions in the meantime So in general what did you think about the practical sessions that you did you learn something? From it did you get a different insight and how to do it? use the microphone It was the first time we we used the machine learning and we found it really interesting So we encourage anyone who hasn't used it before to to take a look to it because we really liked it Okay, so we go to the next group Just go to the presentation Sorry to spoil So so hi everyone. Good afternoon. I will be presenting the second the second Hands-on project, which is called Amodynamic lumped models using CML and open-corm delivered by Eric So this project have mainly as objectives to create a lumped model to create So to use lumped models to simulate the cardiovascular system in general and also to simulate the functioning of the ventricle and the output of the ventricle in the blood circulation and for that so The wind castle model was used as a base model like the conceptual model and also Other features which will be explained later on So the hands-on basically focus on two problems The first problem was to use a lumped system based on the wind castle model as explained just to model the blood circulation in general Sorry, and for that It took into account certain parameters such as the resistance at the aortic artery the the compliance of the aortic artery Which is like the amount of blood that it can take in More or less and also the peripheral resistance in which is the peripheral the the resistance at the other blood vessels where the blood will flow and also Takes into account an inertial term because which tries to to Simulate the defect of the blood only coming out outwards of the heart and not inwards So this was already explained in during some of the talk. So you're I guess already familiar with it so don't need to for further explanations and This can be translated into some let's say simple equations which were then applied into the model Second the second problem was a bit more complex and It used again the wind castle model alongside with a PCS model and some other constitutive equations which attempted to Incorporate the effect of the contraction of the of the cardiac muscle which is translated into this By the sarcomere behavior and calcium dynamics, which are what we'll consider the main factors affecting the contraction and Also takes into effect an actual geometry of the ventricle which in this case was assumed to be spherical for simplicity reasons So As I mentioned this project were simulated and model in using open car, which is an open source platform for solving Audis and to simulate Such as in this case lump systems, but also can see can be used to simulate cells and other types of biological systems This is how it looks like the platform. It was developed at the University of Auckland has also has been mentioned before So in this platform But this what we've done on the hands-on was basically to Code to create a code by defining declaring some variables, which will be the model per meters and model constants then writing the constitutive and all the equations and then running the simulation so compile and save and Then out output the results in graphs nice graph nice looking graphs And see a CML just as a matter of fact is Kind of a text file Where this this code is written and it can be translated into basically an XML file Which can also be used for another application. So it's one of the advantages of using this platform So moving on The results of the first exercise as I explained first exercise was just a simple model of the blood circulation using that simple lumped lumped model and In this exercise we included a sinusoidal sinusoidal flux flux signal, let's say and Here it's the result of the output So also it follows more or less a sinusoidal shape, so it's it makes sense and So the exercise asked us to change some parameters and see what happens to what happens to the signals. So firstly We for example, we can change the brief real resistance, which is RP Was RP in the system and what happens is that we see that there is a change in value here, so You cannot really read what is written there. Sorry, but This will increase because of the increased resistance and also when you change a heart rate The the peaks the peaks of the pressure will also come further together Because well the cycles increase. So this is pretty What was expected? from the from the code On the second exercise we had to test other parameters because the model was more complex and So here's just a first overview of what is like the output of a normal cycle so and the things that we will be looking at so this is the PV look this is the Flux along and this is the pressure along the cycle Sorry, and this is like the pressure the pressure in the atrium the pressure in the artwork You can pressure in ventric and how they are related so things that we change we change the heart rate and as expected so by So by increasing the heart rate, which created a decrease in the Qt interval and which can be seen here as expected and also Here Yeah, you see also the pressure follows the same So you have you get the same number of peaks on both the flux and pressure. So as expected Also on Another further later on we also changed this parameter Which is the rate of calcium uptake. So as I explained the model tries to Compense the effect of the calcium dynamics on the model So this calcium dynamics is translated by this by this parameter here And when you change it like you can increase it or decreasing it in this case We decreased it because we were simulating beetle hearts And what happens is that when you decrease the the calcium rate uptake this signal becomes Well, let's say slower. So there is The it takes a lot a lot of time and there is like a smoothing here of the signal and also This big this big increases relative to the normal to the normal cycle Lastly there was another exercise where we had to reproduce this This Echo from the from a disease patients whose disease we didn't know yet So we had to guess and to try to replicate this and just can anyone guess what what this could be I think it was already mentioned anyway in one of the talks, but Okay, so this is a signal from a patient with an arctic stenosis and And So we had like to understand what's going on and change the necessary parameters in the model to try to replicate this behavior so for that We could basically use to approaches so either to Increase the peripheral resistance Which as you know the when you have a vortex the noses there is kind of a blockage So the there will be a greater resistance in doubt out of love of the blood from the arctic valve so you can increase this this parameter in the model and There's well conversely also an increase in our take pressure so you can also Multiply the constitutive equation by by a value and what you see is that the PV look from the normal side from the normal from the normal cycle it becomes a little bit more narrow and The pressure increases, so you sorry you cannot it's not really possible We could not really put them both on the same graph because so that you could see them on the same scale so we We had to you have like to look at the value so that you can actually have a comparison between The two the two loops, but what happens is that this loop will become a little bit more narrow and will The maximum value will increase Because of these of these effects of the increase resistance and also what you observe on the velocity or flux Output is that This This phase here, so the feeling phase becomes more symmetrical and less less Cheap compared to them to the normal to the normal to normal cycle because of the the heart needs to make a great effort and Therefore the feeling phase Take more time So this is basically the results we had was very very sorry was a very short overview there was Unfortunately, not much time to actually look into detailing Look at these things into detail. So this is a very shallow overview But anyway, the hands-on was hands-on and We really liked it the exercise or the people that were coordinating it everything And so thank you for your attention Okay, thank you very much the fetal next Can we switch to the other computer? Okay Are there any questions in the meantime? So the fetal person Come on guys, you have to learn to be efficient with presentations also Normally presenters come and sit in the front row in order to get ready immediately and not have to crawl around Okay next please Okay, good afternoon to everybody So I'm going to talk about the third hands-on session, which is which is Leading modeling the fetal circulation and it's safe with presential abnormalities How does this work? Okay then the main purposes of this hands-on session was first of all to study global hemodynamics in the fetal circulation using a Zero-lampest parameter models, which is based on the on the fact that the flow in a compliant vessel can be as my partner said before that Can be an all can be analogous to a to the cover not of an elastic of an electrical circuit Then we can change several parameters in order to in order to simulate the fetal circulation And then we will have an electrical circuit which we somehow simulate this Somehow simulates this this flow and the and the fetal circulation through it And Once we have the the circuit and the simulations we will we will investigate some critical parameters of flow of flow Distribution in health and very specific diseases And then we will compute subject specific parameters basis on in vivo measurements We have the here the equivalent circuits of our fetal circulation. We have simplified Simplified somehow because we because it is it is really hard to simulate of the fetus of the fetal circulation We told the orders capillaries and so on but somehow we have sequel we have divided the The real circuit in five In five main compartments, which are the ascending out the silver arteries The descending order and the corresponding vascular beds for each one in order to do so We have modelled by means of by means of simulink and then Voila, we have the blood flow for a head for a healthy fetus We have the brain flow represented represented as blue and then we have the lower body flow represented as red then We have extrapolate the blog the blood flow for a for the last bit in order to ensure that the flow has been Has been clearly stabilized Established around the circuit and then as an extra we can we have calculated the pulse activity in the index Which is of relevant importance for the for a clinicians because she's a because she's a miser of the variance of the of the variance of the blood flow in the in the fetal circulation By the way in the engineering point of view is no more that the maximum maximum value and Minus the minimum value over the mean of that and then and then We will calculate the pulse activity in the pulse activity index and we will do a several compact several comparison which is the healthy fetus and and very specific diseases Because here everything is wonderful and the and the fetus is right and he will have very Consistent results, but what happens what when there are some placenta abnormalities and very specific diseases for example in traveling love restrictions Concretely in these in these diseases in interupting love restrictions There are there is some kind of placenta insufficiency which restrict somehow the diffusion of oxygen of nutrients to the to the fetus As a consequence the placenta resistance increases and the blood flow in the circulation is Redacted and redistributing between the brain blood flow and the peripheral organs and the peripheral organs because when the blood flow in circulation is is redacted the The heart will try to increase the blood flow into a brain because it is the more in is the more important organ and Because blood flow has to be has to be constant with among the circuit when I was up the other course the other goes down Is no more than that Then in order to do so we have increased the placenta resistance up to one hundred percent of this original value which is Increased the placenta resistance twice as normal and then we have the blood flow for we have extrapolated as Before the blood flow for the for the last bit We have here the block the brain flow and the lower body and our body We have seen as a result the blood that the blood flowing brain has increases and the blood flow in lower body decreases According to what to what expected before the before taking the measurements Then we will have gone as one step further and simulated the one cerebrovacillation In which the set of the radius of cerebral arteries and capillaries have increased And 10% and 10% of these maximum value We have changed we have changed the this parameter of the brain vascular beds in this in this circuit And here we are the blood the blood flow which corresponds to that And here we have seen that the than the brain flow because of the cerebrovacillation has increased quite a lot Whereas the lower body flow has has decreased as a consequence consequence there then we will have We have simulated very specific scenarios in which we have several types of bassoil engines and increases of placenta resistance And here we have seen that the more bassoilated and the more and the more Placenta resistance increase The more flow goes to the brain and the less goes to peripheral organs as expected before then we will have and recorded the The five More specific measurements of each or at least the most the most common ones in which placenta resistance decrease Up to these percentage and the cerebrovacillation in increase up to this percentage Then we will have simulated the 25 possible scenarios scenarios corresponding to that and Then we will have we have and extracted the more specific one specific ones Which are the 25 percent placental resistance increase and 10% bassoilation 25 placental 50 bassoilation, I think and one hundred and 25 placental and 10% bassoilations Here we can see the how blood flow is is distributed According to the parameters that we change then as Talk before before because Pulsatility index is as important for clinicians We have extracted a 3d plot in which we in which we have extracted the more the values of pulsatability index as a function of the increase of placental resistance and presentation of bassoilations And here we can see that pulsatility indexing increase with the more that we increase placental resistance as expected Where are bassoilation decreases? Implies an increase of pulsatility index And as an overall effect we have we have concluded that bassoilation effect is greater than placental resistance in at least in the brain Whereas in the lower body because because the blood flow is decreasing the more we the more we change the parameters according to the diseases We have seen the other way. We have seen the other way around that the pulsatility index increase increase whereas We increase the placental resistance and the more and the more we increase the bassoilation but And in this case the bassoilation effect is also greater than placental resistance effect well Here we have calculated the more simulated the most possible scenarios and the most practical ones but But in reality this we have we have to take into account the the Real clinical date datas in order to show we have simulated a Real Doppler measurement of the of the blood flow in which we have in which we have included some kind of noise and then by means of a minimization algorithm we have we have Calculated the Optimizes and how they mean square error between the simulated data and the values corresponding to the real do the real flow and then we have included these parameters to change and This minimization algorithm we will calculate the parameters of fetus articulation and we will have a clue about What parameters of fetus articulation have changed according to the according to that of a healthy fetus? Then you know as a conclusion we have we have include that these analogies with between electrical circuit and and fetus articulation Can can be so set can successfully improve the understanding of a modern image changes and the different condition for a specific passion And we'll allow us to for compute to compute parameters that cannot be missed or experimentally And I think that's all. Thank you for your attention Thank you very much And what did you think about the hands-on or what did your group think about the hands-on? What did your group think about the hands-on? Also that the trainer was handsome or Okay, the next one so last but not least I'm gonna present the last hand-on project the musculoskeletal one so Thank you our project aim was aimed to study the Mechanical and biological effects that also that are involved in the process of austerity is also our treatise specifically austerity is involves effects a big part of the population especially in increasingly elder population and Is expected that the amount of people and the resources Involved to treat this disease will increase in time also treat is a disease that affects cartilage and bone and Develops in time leading to a thinner cleaning of the cartilage an inflammation process Pain in the patients and especially age related mobility problems So we were giving a complex finite element me total me model which was composed of two rigid bodies simulating the tbl head and the feet and the femur and Several deformable bodies including the cartilage the miniscape and the ligaments So first we Visualize this model in F5 be a which is an open source model software for finite element analysis and Once we got we got to know this the software we moved to To study what is the mechanical properties of the cartilage? So how to implement? realistic model realistic equations for the properties of the cartilage and how Correlate the mechanical effects on the biological behavior of cells within the cartilage especially we want to see if loads within physiological range or both would lead to either a degeneration of the cartilage or Increasing matrix production The bifasic model was the most representative one because the cartilage has a really high water content and it's made of Collagen fibers and protocol icons the protocol icons will show what will Present a fixed charge which will lead to an increased concentration of electrolytes And therefore an osmotic pressure within the cartilage the increasing pressure is balanced by the force within the fibrils and the protocol icons and So we wanted to model this bifasic structure with a neo-alkan equation and a donan model to express the osmotic pressure Want to correlate then this two structure these two models and analyze the overall properties of the cartilage behavior We build a simulation with the fint element model starting from Building the equations getting the values from literature We included these values in the cartilage in the material properties in the in the software and then We run the finite element simulation From this model we managed to get the strain within the cartilage the is value and use it to analyze the biological effect This whole process it's iterative so the Changes in protocol icons and collagen content as well as cell viability can be used to change the parameters of the equations And therefore study the development either of a chronicle condition or a physiological model We run first simulation using hyper elastic model for the cartilage so here we have video of the total displacement of the joint on which was applied a load of 500 newtons and below You see What we got so far with the bifasic model. Unfortunately the second Part didn't really run as expected So we could only Visualize the free swelling of the cartilage. So what happens? When there's no load applied and There's a water intake with the cartilage till the point that the structure reaches unequilibrium So well from the First model we struck as I said the strain and this was used in the second group part of the project for the biological model Well In this part of the project we try to get the values of the properties of the cartilage Taking the data that they have obtained on the Low model so And for the terminate these values we take several equations we have And the questions are for cytokines for the GIG for collagen and for the growth factor and also In this kind of the match the MMPs has a main role so We include another equation for control the growing of the substance that Creates the generation of the collagen so In this first graphic you can see that when the MMPs are low The collagen and the growth factor are at a higher level But when the MMPs grow We get a decrease of the cartilage The collagen sorry and the growth and the growth factor So um the problem with this model was that we are getting a cyclical behavior And that's not the kind of behavior that really we get We get in the knee joint so This means that some of the parameters that we have tried to use for describing the process Given a negative aging value in the matrix. So after trying to intend we decide to make Correction factor for getting the correct Graphic and allow you to see what's the real behavior of the knee joint under this stress. So For simplify we just take a one-plus concentration division and This is the behavior that really should have this kind of model As you can see here we take a point And where we have Low value of the MMPs and The cartilage even sorry the collagen has a high level when we decrease the we increase the value of the MMPs We see that the collagen decreases And with these values We should take the results for The data that they should implement as the properties of the material and run again the simulation take another data and reintroduce them in the In these equations and the problem is we couldn't do such an interactive process. So these are the First step the initial step and the last step what we get in the last point So in conclusion Even though the old system was built to be an iterative model within between The mechanical structure of the knee and the biological behavior within the cartilage We only could make only a part of it and Well, taking it We want to thank Jerome and the rest of the group for Allowing us to visualize this model and try it with our with our hands And yeah, well that was as far as we got. Okay, perfect that I think all of the projects were challenging some were a little bit more simplified But I think all of them show what you need to do as a model of which are the challenges both In the software the equations how to implement things So, okay, I thank you all for participating in it. I hope you learned a lot from it And now the bus is waiting. So we have to run to go and visit the sync patrol