www.nanohub.org Online simulation and more for nanotechnology. Welcome everybody to the sixth workshop in our hands-on data science and machine learning seminars. Today I'd like to introduce Professor Ali Strakhan, who will take over the first part of the lecture to kind of introduce us to sequential learning and this idea of design of experiments. And then we'll follow it up with Juan Carlos, who will walk us through a hands-on example to work through each of these problems. Thanks, Zach. I hope you can hear me okay. Yeah, so Juan Carlos and I will tag team to deliver this our last installment, at least the last of the first series of hands-on sessions on data science and machine learning. And we're going to talk about sequential learning and the design of experiments. So the entire workshop has been dealing with data science, machine learning, and this is learning from data. We know that the first thing you need to learn from data is data. And over the last decade or so there's been a big effort in cyber infrastructure development. We're all using nanohub that delivers online simulations and we're getting data from a bunch of repositories that have been designed specifically so they're queryable. Data is easy to find. It's easy to mine. And Zach led a couple of sessions on APIs and interacting with these repositories. So once we have data, we learned from the lectures that Saquette Desai gave on machine learning. We learned that we can develop models out of that data, predictive models. We can do classification that's also very important in engineering and science applications. And Michael Sakano told us that showed us how we can use data science tools for dimensionality redaction. What we're going to do today is talk about the design of experiments. Often in science or engineering applications, we're doing experiments or running maybe physics-based simulations with a design goal in hand. Maybe we're trying to discover material with new properties or we're trying to optimize a process to minimize time to produce something. In all of these cases, what we have is a multi-objective optimization. And often the number of knobs that I can turn is a very, very large number. So a brute force exploration of space to find optimal parameters is very inefficient. And so traditionally we rely on intuition to figure out how to move these knobs. And we're going to discuss today a tool, a technique in which we can use, put together what we've learned in terms of machine learning to try to solve this problem. So we're going to do that. I'm going to give you a little overview of sequential learning for design of experiments. And then Juan Carlos is going to walk you through hands-on just like every other session of our tutorial. Actually, walk you step-by-step how to actually get this done. And after we're done, we'll be happy to discuss with you if you have your own problem, your own research that you're working on. We'll be happy to discuss how these tools can be tuned to fit your need. So let's talk a little bit about what's the idea, the overall idea of sequential learning for design of experiments. So the goal is can we find this optimal material, optimal process with the fewest number of iterations, with the fewest number of experiments or with the fewest number of simulations. So that's my goal. And given that this is machine learning and data science, I need to start with whatever I know. So I always start with some data. I have existing data. And what I'm going to do is use the tools that we learned, things like random forests, or I could use neural networks to develop predictive models for this data. And then with these models that are trained with my existing data, and by the way, this current existing data may come from different sources and then you have to aggregate information from different sources. You have to do this with quantified uncertainties. But once you have that model, then you can ask yourself, out of all the next experiments that I could run, which one is the one that I expect to give me the most bang per buck. So for the next experiment, which is the experiment that I'll learn the most. And we're going to see that there's this goal information acquisition function. Depending on your goal, there's different ways that you can select what the next experiment is that is going to be expected to be the one that provides the most information.  And that could be an experiment. That could be a simulation in Nanohub, for example. And whatever it is, you go and actually do the experiment that you decided was the most effective one. And then you ask yourself, well, am I done? Have I met my criterion? If you're done, awesome. You go and have a drink. If you're not done, you add your new data to your existing data and you start all over. But now you're going to start with more data. So your models are going to be better and the guess of the next experiment will be more accurate. And so the more data as you iterate, you get more data, you get better models, more predictive power, and you're moving faster towards your design goal. We're going to show you with an example that you can actually reduce the number of experiments that you need to conduct in order to achieve your goal very dramatically by using this technique. So we're going to do this with an example of our own research. This is an example that Juan Carlos has actually been working on. And it's the data and all the tools are available in nano hub in a tool that you're going to run in a minute. Our goal for this particular project is to find solid state lithium ion conductors that we could use in batteries to replace our current liquid or gel type materials. And we're going to explore a set of oxides called garnets that show promising lithium ion conductivities. So our design process is to find, to maximize, fund the oxide that will maximize the lithium ion conductivity. And we talked about the need for data and these repositories and data resources that are available. When we started this project with Juan Carlos, that data was not available for these oxides. So Juan Carlos and other members of our team spent literally months coming through the literature and getting the data, putting them in a repository. And this data is now available for every single one, every single experiment that has ever been conducted on an oxide for lithium ion conductivity. All this data is available in Citrination. And what we're going to do is when we get to the hands on part of the lecture, we're going to download this data and we're going to do a little exercise. Okay. Now, so to demonstrate sequential learning without actually running more experiments because obviously we won't be able to do that. In a demo in Nanahub within an hour, we're going to imagine the following. So after we come through the literature, we found 100 oxides for which we know the lithium ion conductivity. And so we're going to do demonstrate sequential learning in the following way. I'm going to hide all of these data, the 100 data points. And I'm going to start by selecting at random 10 data points. Okay. And so in this little graph that I'm showing on the left, what you see is every single one of those 100 data points for lithium ion conductivity. And you can see that there's a maximum right above there at 17.5. And that's the highest known, the best known conductor. Okay. So our problem is going to be the following. We're going to start by revealing only 10 data points chosen at random, making sure that the top performer is not there. And I'm going to start my sequential learning there. I'm going to develop a model for these 10 oxides. And I'm going to use this model to then predict what I would expect the ionic thermal conductivity to be for the 90 oxides that I have not that have not been revealed. And then for those 90, I'm going to decide what is the predicted ionic thermal conductivity, lithium conductivity with uncertainties. And based on that prediction of the model, I'm going to decide which one to reveal next. It would be equivalent to going to the lab and running, synthesizing and measuring that specific composition. And instead of going to the lab, what I'm going to do is just reveal that specific data point. Now, when we, let's say that my predictions look like this, like what you see on the picture there with uncertainties. And so which one should given this information, which let's say each one of these dots is our possible next experiment. Which one of those would we go after? And this is where the information acquisition function comes into play. Should we go for the maximum expected improvement, the one where the mean prediction is the highest? Should we go with the maximum likelihood of improvement where the mean plus the uncertainty tells me that there's the one that could be potentially the winner? Or should I go to the one where the maximum uncertainty exists? Because that's the place where I know the list. So we're going to do in the hands-on session is compare all of these different information acquisition functions. And I learn which one is the one that gets me to the highest performer, the one at the top faster. So once I do that and I decide which information source to reveal next, I'm going to color whatever data point I selected. I'm going to turn it from gray to black. And we're going to iterate and show you how fast you can get to the highest performer performance with the fewest amount of experiments. So with that, I'm going to hand it over to Juan Carlos, who's going to walk us through the tool. We're going to get our hands dirty as we always do. We're going to go step by step through the tool and show you all the steps to going from getting the data to doing the sequential learning. So Juan Carlos, take it away. So hi everyone. As we move into the hands-on activities, I'll ask everyone to follow me to this link. You have it here in the presentation and you have it in your handout too. And I'm going to go there too. So once you're in the tool, you're going to end up here in the landing page. The landing page includes some information about the tool, particularly how we're conducting this test of sequential learning and how to run these tools. The first thing that we're going to ask from you is to get your C3N API key in this box. So you just have to paste it and press enter. And then we're going to head on to the second notebook of the tool. Once you've done that, you're going to end up with a success, hopefully a success message in your API key. And then we can head down to the second one. So in this notebook, we will be exploring how can we use mined data, the data that we created to inform experiments in our ongoing effort to optimize materials. These materials, the ceramic garnets, oxides that we mentioned before, have an application in building battery systems that replace liquid counterparts with some solid components. What we'll be trying to do is to find how many experiments do we have to run before we can reach the maximum of our known database. So let's start. The first thing in any Python script, you need to import your libraries. Remember to run any of the cells is shift enter. So let's shift enter. You know a cell is done when this changes from a star to a number. Then, as we saw in part two of this series, the token squaring repository, we can access data from Citronation in this particular example using an identifier for the database, which is this number. So we can run this too. And you can see that we're using a function from that library that it's going to give us a pandas data frame with the data. Okay, so with the data frame, we can see that we have some properties for each of these compositions. The composition being the first column. In this data set that are curated, I also included some preparation steps as metadata and references to just point to the papers where I took the data. But the idea is that from this information, we're going to get the formula and we're going to get the ionic conductivity that we need. This is a function that we'll need after in a couple cells below to get that descriptors for compositions. So let's just run that. And if you recall, or from part one of this series, we can use binary filters with pandas to filter our data. If not, it's pretty simple. We have a condition here. So for this column of the data frame, if it's this value, we keep it. If it's not, we drop it. So we're going to use these binary filters to reduce the number of measurements that we have to only measurements that were made at room temperature, because that's the property that we are after room temperature and conductivity. So we can run these two. I'm going to go to a function that we have not seen before. It's also from pandas called duplicated. This method here, duplicated, would return a data frame that contains only the rows with values that are repeated in a particular subset of the columns. So let me explain a little bit more about that. So we have a subset here and we're feeding it the name of the first column. So this duplicated method is going to return the data frame, the data frame of rows that have the same composition basically. What we're trying to do is remove the duplicate so we have one measurement for one material. Machine learning algorithms struggle when you have the same inputs and different outputs. So we want to present it with single pair inputs and outputs. This first line keeps the indexes where in the data frame we can point to rows that are repeated and this one keeps the entire data frame. What we will do as we have some around 80 repeated values, what we are going to do is replace the measurement that we found from the paper. We're going to take all of the measurements for the same material and we're going to keep them medium. So in here in these two rows we're creating empty containers. This is going to be a dictionary of lists and we're going to take advantage of a property of dictionaries that is that we cannot have two keys with different values. So if we put the materials as the keys being strings, we can actually list all of the measurements in a list. Assigned to that value. So again dictionaries are key value pairs. If we have a key, a string, the name of a material, we can put the value to be a list of all of the measurements that we can, that we find from the data frame. And that's what we do in these couple four loops. Here we're replacing the measurement so we have a list of measurements for the repeated materials and we're just replacing with the median. Then plugging it again to the main data frame that we're working on data. And then we're dropping all of the rows. Here we're dropping all of the rows that are duplicated so we don't have to worry about them anymore. And we're resetting the indexes and just dropping this column index that gets generated here. So we can get a new data frame with unique values and they are all in the same filters that we put before. So we can start working. Okay. So here you can see that the cell already finished running so we can move on. In this section in obtaining features and descriptors from MathMiner. So machine learning models cannot would not work just by plugging in the stoichiometric formula to get an output as complex as ionic conductivity. So the way we're doing this is we're turning the formula, the chemical formula for the material. Into the descriptors using a library called MathMiner. In which we're not only putting the stoichiometry of the formula but we're plugging in information about the elements and the properties of the elements that compose the material. Some properties on valence and some elemental fractions at the end. To try and describe each of these materials uniquely to try and match it with their corresponding output. Another thing that we're doing is adding the measuring temperature. So most of the literature when they're reporting ionic conductivity, they report the value and they report at what temperature did they measure it. Temperature has a strong relationship with ionic conductivity.  So if you measure the same material at a higher temperature, you would get higher values of ionic conductivity. So we want to keep track of that too. And we are going to put that in the descriptors that we'll be using. Here we're separating descriptors as X and values labels or conductivity as Y. And another important thing to note is when we created these descriptors, we just put them in. Like we have a formula, let me get all of these descriptors. But in machine learning, you want the differences on the materials to actually help your network. So here we're dropping from the data frame all of the columns that have a standard deviation of zero. So we're only keeping the ones that are different to zero. This is because if every single material in your database has the same value for some property, then the value is not giving anything back to your model. It's just going to learn anything from that particular descriptor if all of the materials have the same value, basically. So we can generate these descriptors. So after all of our wearing of the data and then filtering and removing duplicates and getting descriptors, we end up with 100 unique points with 108 descriptors for each of these points. Then we can move on to processing and organizing data. For the sake of time, I'm going to skip some of these cells. In this particular notebook, we had, let's run that one, so you can see the split. So we're separating, first we're separating descriptors and labels, so inputs and outputs, and then we're separating training and testing. And you can see that we have a split of 10%, where we're keeping 90, 90% of the descriptors, 90 or out of 100 for training and 10 for testing. But we're going to, for the sake of time, move past this comparison of irrigation models. So you saw in part four of this series how to create a neural network. So here's a neural network that we created to compare. And here's the training of that neural network. We're not going to run it right now, again, for the sake of time. And here's a plot of the model. So I need to stop here a little bit, because as we're skipping cells and Jupyter notebooks are, our Jupyter notebooks are designed to run from top to bottom. But we also cannot. We also can just skip some cells. I'm going to copy this cell. So I need you all to copy this cell too. If you were here in the first part, the first session of the first part, when I was explaining how to plot with Plotly, you remember that we needed a trace and a layout. So if we're skipping these cells and we need a Plotly plot, you can see here that we have a trace, but we don't have a layout. So we're going to log it in here. And then I can go back and explain what all of this is. So we're keeping random forests just for the sake that we can get a sample-wise uncertainty for each of the points. So again, we're processing the data. We're separating in training and testing. We're importing a regressor, a tool to make a regression with random forests from this library. And what we're going to do is make predictions. So here we're training with values, and here we're testing. And what we're going to see, hopefully, if I copy that correctly. Okay, this is a really big plot in this zoom, but you can see that we can get a really good capture of the values of the points. Here green are the training points, and red are the testing points. And you can see the error bar as the uncertainty. You can see that the uncertainty is lower when we have a lot of points here. There are a lot of bad conductors. But as the points get more sparse, their uncertainties increase because the model is not quite capturing the really high ionic conductivity if you have these few points. But sequential learning works by choosing an initial set. So sequential learning or active learning is creating these kinds of models, but with few entries which then we can query with experiments to see how many experiments we can actually run. So for this section, the sequential learning, we're going to start by, again, creating a new model, a new random forest. And we're going to start with an initial set of 10. This will represent the 10 black points that you saw at the beginning in the graph. The 10 black points that are revealed are these 10. So to keep track of which point is revealed and which point isn't, we're going to create this variable here. The train is going to be a list of zeros, but these zeros are going to be Boolean. So it's going to be a list of false values. And to pick this initial set, we're going to make a random choice out of all of them, the length of the data, which is going to be 100 total points, we're going to choose 10 randomly, and then we're going to change it to true. So it's only going to train with the points that are listed as true. As we know, the maximum value that we're trying to get in this particular example, we will assert, this is a Python operator, we will assert that the maximum value is not in the initial set. Okay, we can run this, and we can see that we picked 10 training entries. The following, I think it's three or four cells, it's three cells. I'm just going to show you how the model is predicting with this initial set. So this model.fit is making a prediction using the descriptors of the values that are true and the labels of the values that are true. And then we're going to make predictions out of those. Here we move into information acquisition functions. So here we have predictions for everything. So yeah, we have predictions for everything and we have uncertainties for everything. And these acquisition functions are going to choose different points depending on these formulas, these utility functions, on how they choose the next point. MEI, maximum expected improvement, would choose the one, the index of the value that has the highest prediction. MLI would be the same thing over the uncertainty and you would be the maximum uncertainty and UCB is the upper confidence bound. It would be the mean of the prediction plus a constant times the uncertainty. The idea is that they're really easy to implement in Python. So you can see here how each of the acquisition functions would choose the next point. This function nprmax, you will return the maximum of this value. This is a list of values, the maximum of this value. And we're going to return the index of where it is. So if we have a list and the maximum is element 10, this nprmax will return 10 instead of the maximum. So we can run this and then we can print what they're choosing. So for each of the different acquisition functions, we can see that the predicted and activity of material in this case is 54. Based on this acquisition function is this value plus or minus this uncertainty. You can see that, for example, the last one, operator confidence bound would choose the one where if you add those two values up, you would get the maximum and maximum uncertainty. You can see that the uncertainty is keeping track of where the uncertainty is highest. Now we're going to go into a code cell that is really big, but I summarized the repeating points. I summarized the repeating snippets of code that you will see in this cell. And they should be in your handout. So we're running a comparison of the different acquisition functions, but each of the acquisition functions is the only thing that changes with the code. So to iterate on that, we're going to start by describing the initial values. So sequential learning works by creating, by querying different values up to certain conditions satisfied. It could be give me the maximum value in 50 experiments that I'm going to give you. This is important when your experiments are really expensive or time consuming. You can also stop the sequential learning process once you find a material that is good enough, for example. If I want the property to be only conductivity higher than 1 to 10 to minus 3, Siemens per centimeter. And I find a material that is better than that. I can just stop the sequential learning. Right now we're going to do it with experiments. We're going to give them this algorithm 50 attempts to find the maximum. And here, so these 50 is the number of experiments here. This list all ends. It's going to give me the indexes of the entire data set. So 100 indexes. So we're going to start each of these variables here. This random, it would be the acquisition function underscore train. This is the list that contains the training indexes. So we're going to start with the initial set. So NP dot where in train. So in train weather initial set NP dot where is where this is true. We're going to create a list of that. We're going to return the indexes of where this initial set is true for all of them. And then we can move on to the iterative part of sequential learning. So what we're doing right now is we're assigning the training values. We're assigning the training values out of the last iteration of these variables. These variables are basically where we're keeping track of what the model is training on. So this is the current iteration. So the last of these would be the current iteration. And what we'll be doing is we already have the ones that are true. Now we want to offer them all of the ones that are false. So this random search ends. It's going to be the difference between all of the integers minus the ones that we are already training on. And this is going to be the space that the model will be exploring. Now we'll do a training with the descriptors of the set that we have right now and the labels of the set that we have right now. And we're going to get a prediction for all of them. You can see here that we are training with the train and we're predicting for all of the search. So the ones that we're not trained on. Then we are going to append. This is an acquisition function. This particular snippet was our baseline. So it's just randomly choosing one of the indexes. But if we go down to this acquisition function, maximum expected improvement, you can see that it's the same code that I described before. It's giving me the index where here the prediction is maximum. And then we're going to append this entire... This is a list. We're going to append this entire list back to our history. So once this runs again, it's going to be our current iteration. So let's not show how this sequential learning algorithm work. We can run this. It's going to take about a minute to run. So I'm going to start explaining something else with these runs. Remember, this is going to turn into a number once it finishes running. Now for the plot. So if you can move a little back in your handout so you can see the plot and try to understand what I'll be explaining. So we created plots that are animated. So we want plots that in each experiment we can see how the colors, how the grayed out circles are being colored. That means how the algorithm is exploring this compositional space. So again, in your handout, you have a summary on how to do this without repeating all of the acquisition functions. But the basic idea is we want to create an empty plot and then overlay it over our current plot. So imagine you have a plot and you're going to do all of your formatting. So I'm going to go through some of these steps pretty fast, but I'm going to explain how to animate it basically. Map to Live is a really popular library for research. So I would expect some knowledge of that, of most of you. But I'm going to spend maybe a minute explaining how to do it. So first you create a figure. Here we're using subplots because it's six different plots for each of the acquisition functions. It's five acquisition functions and one to keep track. You're going to see it in a minute. And what we're trying to do is we're going to create these empty plots. So if I go back to this plot, this is the plot that you're seeing in your handout. We want to create these empty plots. You have it here. So it's just an empty X and an empty Y and we're coloring it basically. So this initial set is going to be the black points that we have right there. And these all samples values are the great points that you see in your plot. The difference between this empty plot and this plot is in this syntax of Map to Live. You can see that this is just variable equals subplot. To make it animated, we need a function and we need to update the data on each of these plots for every experiment. So we're putting a comma as we're unpacking more values. So important thing for these animated plots is the comma. We're in the plot that we're trying to make animated. All of these commands here are just formatting. So you can set the axises. You can set the different, here I'm removing the labels on the X axis. I'm changing label sizes. So this is just formatting. The idea is that you create an empty plot. You create your initial set here and then you create all of the great points, sorry. You create the black points and then you create the color points which are empty if you don't have any experiment. Now to make an animation, you need an update function. You also have a summary of that. And this update function, what it's going to do is none here would be the experiment. The number of experiments that you have run so far. So if the number of experiments is greater than zero, what we will be doing, so here I'm trying to get the values for the indexes that we have right now. And if we find the maximum, what I'm doing is stopping the animation. I'm putting here a star and I'm setting the lines and the check mark in the graphs to some value that it's not going to change. So to update this function, we're using num. So the number of experiments and num is not in this. So once we find the maximum, we're going to stop updating the plots. But while we're finding the maximum, we're setting data. So we're setting data to this line that we created. This is the line for the first plot. You're going to see it in a minute. And this is the data for all of the points that are getting colored. And you can see that we're doing, after we color the first 10, the first 10 never changed. So in this list, after we color the first 10, we're going to color every point represented by a new experiment in a different color for each of the acquisition functions. Okay. And then to basically put together this animation in this figure, we're going to use this command for animation. So we're going to close our figure, and then we're going to turn it into a video. Some important things about the animation. We have to provide it with a figure. We have to provide it with an update function. Here, our frames are the length, are the experiments. So the length of the experiments that were run. So it's 50. And then it's going to turn into a video. Convenience. And you can see here. You can see here. The different compositions that are being explored by each of these different acquisition functions. So as mentioned before, once they find the maximum value here, they're going to stop. And you can see that we ran a comparison for all of these acquisition functions, and they all found it before random. So this first plot that I was mentioning is keeping track of where the maximum is for each of the other plots. So you can see here that our maximum is here. It got found, the algorithm found it, maybe experimented like 11. And then it never found something higher. So the line never went higher. So this is an interesting way to see how these algorithms can explore the compositional space. Let's see it again now with the first plot. So you can see how it's moving. You can see that all of them, all of the acquisition functions perform better than random. So a random sample of 90 experiments that we have possible would yield an unexpected value of 45. So in average, she would take randomly choosing these samples 45 experiments, but we can reduce it dramatically using these acquisition functions.  So you can see here the results of the sequential learning where we can find our best performing candidate using as little as 30% of the experiments of what it would take to just randomly choose from the pool that we have. And that's the idea with sequential learning. You want to reduce the number of experiments that you want to run.  And these acquisition functions and these machine learning models can help you with that. If you have a model that can capture some, it doesn't have to be a perfect model. If you have a model that captures some of the trends of your data and captures some of the values and it's able to predict within some reason the values that you're trying to get with your descriptors, it can really help you increase the number of experiments So with that, I'm going to again leave you with this information on why we're doing these workshops. So we're trying to get all of you to use machine learning and data science to inform your experiments, to create your models and use this cyber platform so we can create better science faster. Thank you. Thank you Juan Carlos and Professors at this time I'd like you all to unmute your mics and give a round of applause for both of our speakers. Thank you. And then we'll turn it over to a Q&A so we'll address some of the questions that are in the chat log but then also feel free to ask questions verbally as well. So first question that we have, there's a question earlier from Juan Claudio about moving the duplicates. I lost my chat log about halfway through the session my internet went down for a second. So if you can resend that question we can just do it. You're assuming the conductivity for duplicates are all at the same temperature and conditions, right? I am keeping the temperatures within a range of the room temperature, so from 18 to 30 and then I'm getting the median of that. So I am making an assumption that the temperatures around the room conduct the room, the temperatures I mean the conductivities around the room temperatures are comparable from 18 to 30 degrees but then I am feeding back again the measuring temperature for the for the materials. I see a lot of questions here in chat. Okay, general question, when to use Matlodlib and when to use Plotly? So Plotly is a library created to basically show plots interactive interactive plots show plots interactively. Plotly is really good when you're trying to demonstrate things in these kinds of Jupyter notebooks and keeping a publication quality. So if you want to zoom in for example in data or you want to explain complicated data and just play around with it, you would want to use Plotly and Matlodlib is just this other port of Matlab plotting to Python. So it's a really popular tool to create graphs for publications. So if you want a static plot, you will Matlodlib if you want an interactive plot, use Plotly. So one question here that I think can be answered pretty quickly. So Biswath asked 10 number of data points for the test case isn't it a small number of data to train on? I think maybe we can clarify how we're splitting our training testing data? No, I mean for the sequential learning it is starting with 10 points and it is a small number of data to train on at the beginning. So the idea with sequential learning is not that we have a perfect model at the beginning with all of the nuances of your data. The idea is that you can provide the model with some points, some guiding points basically. So we can make accurate, somewhat accurate predictions that I'm just going to try and get you closer to optimizing a property. It's not like when we're optimizing for a property that we just have to we just want to draw all of the data and get a number for one of the examples of the testing set. This is more like I want to capture the information from this data and I don't have enough data to just log it into the model. What we're trying to do here is not optimizing how we predict the properties. It's optimizing how we conduct the experiments that would lead to a higher property. Let me paraphrase that a little bit. The idea is you may start with so little data that your first guesses are as good as random. That's okay because you're going to add data and as you add data your model is going to get better and better. So you start with let's say 10 data points and 10 data points is probably too little for any predictive model. But then you're going to have 11 and then 12 and then 13 and every time you add an experiment you add it to your training data and the predictive the predictive power of your model improves. So at some point you're going to start getting some traction and your predictions are going to get better and that's going to mean that you make better choices and then the next data will be more important and so on and so forth. So you can see how if you look at the animations of these movies that Juan Carlos was showing you can see that at the beginning all of these models tend to expose the information acquisition function and with time you have more and more data you start narrowing down on the area with an accident. So I think one of the things that is a good one for opening up a discussion. What is or how to choose the proper model to do the active learning process? Carlos can chime in. I think the important thing is it depends what's important is to have a model with uncertainties. If you don't have uncertainties in your predictions then you lose the ability to implement a lot of these information acquisition functions. So random forests lend themselves easily to doing uncertainty quantification in a very simple way because they're based on a bunch of parallel decision trees. So you can calculate the variability of those. There's ongoing research in doing uncertain quantification in neural networks. You can use Gaussian process regression and basically whether it's for sequential learning or not the model that you choose will depend a little bit on your problem how high the dimensionality is. If you're very, very high dimensionality problems Gaussian process tends to not be ideal so it depends on your problem and the bottom line is implementing these models is reasonably inexpensive. So you can always try to different models and see how well they work for your problem. I have a question I would like to know if you have seen someone who is using neural networks in active learning in the sense that I am not sure if we can get uncertainty quantification of the prediction. I think there's a discussion there about how do dropout to do uncertainty quantification neural networks and so they are used in active learning for sure. There's research in doing Bayesian calibration of neural networks. The way we do this calibration where with back propagation is very efficient computationally basically neural networks is just a model with parameters so you can do the calibration in any way that you want including stochastic calibration with Bayesian approaches with other types of approaches that will give you a distribution of parameters from which you can do uncertainty quantification the challenges at what expense you can do it. Professor Ilias Pilionis here in Purdue in mechanical engineering is doing very nice research on Bayesian calibration of neural networks. Are there any other questions for our speakers? I see that some have been addressed in the chat. If there are important questions addressed in the chat maybe we want to discuss them Juan Carlos just so that we're recording these and we're going to make these recordings available so we may want to just go over the questions outside of the chat so there's record of the questions and the answers. Okay I can do that so one of the questions that I addressed in the chat was that my predictions were still contained within the 100 compound set that I started with so how can you expand beyond for example just garnet and the question is basically what are the constraints of the prediction the answer is basically that right now we're creating this example with values that we already have because we're testing the sequential learning algorithm we're still not quite there on trying to predict new materials but the idea is you can create a new data set with the same descriptors as the original data set on materials that you actually don't have the values for as long as you trust that your model is good enough to capture the properties that you want you can use that is a sequential learning and you might not get just the most accurate predictions but you will get for example the order in which the algorithm would query this particular materials so if you have 10 materials that you think are really good and you have a model that can make somewhat accurate predictions you will not tell you with super accuracy what the value is going to be for all of your materials but it will tell you if you test material 7 before material 3 for example so the constraints is you have to provide the model with some sort of normalcy as in you want to plug into the model things that are explained by your model basically you don't want to train in oxides and then give materials like nitrates because it's not going to work the idea is you can create these data sets of actually unknown values and then you can plug in your sequential learning and see what you get from it but what you will get is an order on how to test your new materials not a prediction on what the materials are going to be and is there any other question that I should discuss in the chat versus plot way I think we generally invest the answer in neural networks any other questions yeah so again just to answer Rick we'll go back to this question that it's in the chat can you put unknown garnet the answer is yes you just need to make sure when you exercise your model you exercise it within the bounds where you believe it's predictable right so you cannot extrapolate with your model very far away from where you trained it because obviously your uncertainties will grow but the idea is that this information acquisition functions will catch that that's what's important to have uncertainties and be able to tell you this is an area that you need to narrow down I have a question if I may this is Juan it's more materials based is there a particular set of structure descriptions that have been used or are repository for that so for example if we're looking for conductivity like in this case maybe we want some open-ended structures so just giving the chemical formula may not be the way I'm just saying you know the space group may not be enough or just saying FTC versus BCC may not be enough but I presume that that has been looked at by others so I'm trying to describe the different structures and compounds and 10,000 compounds by the databases in different ways for different problems does that make sense so in this particular case what matters for conductivity is the occupancy of the sub lattice that the lithium ions leave occupy and by changing the dopant you can change the partial occupancy of that sub lattice this is always the case in transport solids that it's mediated by vacancies so that is actually one of the descriptors that we have what is the partial occupancy of that sub lattice so that information is there if you have telegraphic information you have all the crystal sites and you have what you also know what is the occupancy of each of those sites and as you mentioned the occupancy of that sub lattice for the lithium ions is that makes sense yes thank you in general for materials there's Pimadgen that's a library from the materials project it's a lot of these descriptors and I know that Juan Carlos and second they're much more knowledgeable that I am in those libraries but there are many descriptors that not like a specific one but you can use a lot of standard descriptors right out of the gate from using in the chat links one for descriptors and another for tuning external networks with these Bayesian processes for those of you that are interested perfect maybe we want to capture that in the recording yeah I can put it in there I have another question have you tried to sample more than one point at each iteration like let's say that you have one to perform parallel computing so you can use more than I don't know you can sample more than one so that you can arrive earlier to the best point have you tried that so we have not tried that yet how to use these acquisition functions is still on the research because you saw that we're using the same formula as we move through the experiment you can also make combinations of these acquisition functions like let's do let's start first the maximum of prediction and then do some exploring of the uncertainty and you can do what you were saying doing it in batches and see how many batches of experiments you need to run before you find the maximum but the idea with sequential learning is you want to run experiments you want to run simulations and these are time consuming and really expensive so if your acquisition functions are giving you a hundred different values that might be the maximum that you want to find it gets really expensive once you start adding more points but it's an interesting question to try and add toward a time or two with different acquisition functions and there's more to it often in research efforts, development efforts you have more than one source of information so for example you can have an effort where you can run a simulation or you can run an experiment and maybe there's more than one experiment that you can run that will give you maybe have a cheap experiment that's not that you can do very quickly but gives you an approximate answer and maybe there's an experiment that could take a month but give you the right answer and so we actually have a project supported by the National Science Foundation where we're developing these type of ideas to optimize what type of information acquisition you know is best given your budget so maybe you have to, maybe you can do three simulations and two quick experiments and one full scale experiment and that's why it's important to these models that we were developing here have a single source of information we assume that all these experiments have the same accuracy but it's interesting you can use neural networks, you can use Bayesian approaches to aggregate information from disparate sources of information to improve on your predictions and then you can say okay given the time constraint I'm better off running a bunch of simulations than one experiment or I really need to run one experiment because that's the ground truth Alright, so it looks like we're getting to the top of the hour, if you do have any other questions that come up in your head in the next you know hour or days please feel free to reach out to any of us and email us we'd be happy to address your questions these lectures like we say will be recorded and we will be posting them on the nano hub page so look for those when they come out and I'd like to request everybody give one last thank you to our speakers we're doing an excellent job today. Thank you


Hey everyone welcome to figure fantasy so we have our last stage for impressions which is visual fantasy and let's see my lineup. Okay guys so for our final lineup we have here this one and I've had different combinations for this lineup and so far this one has been the most successful clearing between 28 seconds and 30 seconds so hopefully this does the job for you guys and again if you don't clear this in one go please do make sure to repeat this stage because again of the rng we're down to 30 there you go so three start clears and hopefully you have the result as well so thank you very much stay safe take care and I'm out of here


We got it got it. Oh, I don't know how we made that without dying Hello, everybody. I'm evil rabbit. Welcome back to the channel. We are here on beam and G drive in Shinjuku Parking garage We can see if we can drift and not tangle the car up in a wall a little Tokyo drift Ask so make sure you guys follow me and all social media like found subscription box below You guys are new to the channel. Do me a favor hit that subscribe button if you like this video if you're returning I'd appreciate it if you hit that like button as well. So make sure you guys follow me on social media. Let's do it So this is probably not the best car to bring out to the track But we're gonna do it anyways because we are in a parking garage, so big body car Probably not the best option We'll send Don't know where I'm going, but it's gonna get all that gets tight up here. Oh, I should have got off clutch And just clutched out. I would have been fine Oh, love for break little chatter. We almost took the bumper off This is quite complicated doing this in this pretty garage wall in beam and G kind of got the flow That course goes that way. All right, so we're kind of getting the flow now It's a little wall tap doesn't major back hard this way Really want to test your drifting skills coming here to beam and G. It is definitely testing We got it got it. Oh, I don't know how we made that without dying how we're doing this without dying But honestly JVX 100 quite nice right now second-gear hero all the clutch kicks a little wall tap We managed to complete a lap we managed to complete a lap without dying now We're gonna just try to stay sideways the entire time. Oh, man. It's gonna be a bumper And a tail light I knew that was gonna happen at some point. I'm actually quite happy with how this is turning out We have to bring the roll out here as well. So smaller That was our first major Correction issue so far No, we're not gonna make that. Oh, okay Yeah, we didn't make that at least that was the passenger side. I Think the car could still be drivable though I guess his body is starting to look like a little like Mona Lisa up in here. Get back behind the car We're gonna go full-time Why not? personal drivable we didn't hit any of the big parts feel like Look your troops here that definitely hit something breakable Wheel wise maybe not. How did we not bend the wheel with that one? We hit that directly square on the wheel all my doors I feel like I would not be driving this out this all my trunks open Garbage doors hanging out broken. Oh We did break something and now we did All right, so we're gonna hit this button right here. We're gonna bring in the Corolla. We're gonna bring in the tofu Corolla This will be tofu Corolla probably my favorite Corolla. We got to get rid of that dinging Why would anybody want to speed chime on here? Thank you. Goodbye So now we're gonna go tofu Corolla up in here. We got to get flippin boys up Screw it up This car does not want to get as sideways as the JV 100 Yep, definitely not as much power Or lock is that JVX? Maybe we can add a turbo to it, but you can close the wall taps out. Oh Okay that Oh we popped the radiator. That's fine extra smoke. We're good. We had a rump umber we would have lost it there. Oh Yeah, yeah, something's really broke steering well definitely not centered Not sure what's broke.  All right. Well, so now we're back in the beginning Let's hit that button and restart it Try and get this Corolla through here Clutch damage. Got a little faint injury a little left of brake right on there. We got it. Oh Really close to that wall a little backwards entry for you Definitely having a lot of fun with this. Oh my gosh. We almost died. I need to get the head motion working and Figure out how to get in car head motion working so we can actually drift this game the first person But the game is so much fun to see In third person and see all the damage you take I guess you can do some replay angles and stuff, but oh We're gonna hit that. Whoa. Okay much smoother with ow Much smoother with the JVX Definitely gonna get some more drift cars in here and see if we can't have way more fun on here beam and G definitely Not the easiest game to drift on What it says you're drifting skills It's definitely the game to do it. We are on 1080 as well. I really I remember that after the fact We're not 1080 of rotation still So getting solid in 1080 not enough power Look what you can't says what I needed. Oh, that was almost a little drag. I I Flee I just touched him a wheel went all kinds of weird ways because of that tab We'll send so thanks for tuning in for this episode here on beam and G If you guys want to keep seeing beam and G here on the channel Let me know down in the comments section down below and as always I thank you guys for coming back and watching I'm your rabbit. See you guys on the track


Good evening, friends. Hope you all are doing good towards the preparation of J mains in advance and also for your boards exam. So in continuation with our video series, we are going to discuss exercise three of pair of straight lines today. So just time setting my screen and yes. So yes, we were discussing pair of straight lines and today we are going to discuss this exercise three. So let's check the first question. It is saying if coordinate axis are the angle by sectors of the pair of lines a x square plus two h x y plus b y square equal to zero, then following conditions are given and we have to answer which, which is true. So basically, if you see for this given second degree equation a x square plus two h x y plus b y square equal to zero. Now, what is the equation of the angle by sector for this, the equation of angle by sectors for the above pair of lines. We used to give it by this x square minus y square upon a minus b equal to x y upon each right now. The question is saying our coordinate axis are the angle by sector means our x axis right x axis and y axis are the angle by sectors. Okay, for this pair of straight lines. So basically x y x axis and y axis. This we used to represent it by y equal to zero and x equal to zero and combined Lee we used to denote it as x y equal to zero. So this is the combined equation of our coordinate axis. In this, we have to take, we have to see when this x y is coming out to be zero. Okay, so if you put our age equal to zero, if we put our age equal to zero, and see the symbolic representation of this equation. Okay, if we put our age equal to zero, and analyze this symbolic representation of the ever equation what, what do we get this thing will be multiplied into zero. So that will give us x y equal to zero. This is what we need right this is what we need x y equal to zero are the coordinate axis and these coordinate axis are the angle by sectors for this. So in this combination, we must have our age equal to zero right. So, after putting it equal to zero in this in this equation we are getting x y equal to zero means symbolic representation we are putting here. So yes, this option B is correct, that is a check one two zero. So, I hope everyone is clear on this. Now moving to the next one. Please check this question. If the line y equal to mx is one of the bisectors of the lines x square plus four x y minus y equal to minus y square equal to zero, then the value of it. Okay, so combined equation of a pair of straight lines is given here, that is, let me write the equation first. So this is x square plus four x y minus y square is equal to zero right. And what we have to find we have to find them. This will be basically angle by sector. Okay, this will be angle by sector it is saying by sector only. So the given line y equal to mx is one of the bisectors of the lines. So first let's write the equation of bisectors for this pair of straight line. So equation of bisectors is given by this equation x square minus y square upon a minus b what is a is the coefficient of x square here it is one minus be what is be coefficient of y square in this case it is minus one. So x square minus y square upon a minus b is equal to x y upon H, what is the value of H here to which is equal to four so our H will be equal to. Right. So, from here what do we get x square minus y square is equal to this to, and this to okay, let it let me first try it. So basically this to and this to will get cancelled out. So, our equation of bisectors comes out to be this x square minus x y x square minus x y minus y square is equal to zero. Okay, am I doing any mistake. Here it will be two here it will be a minus be it seems to be correct only. So let's check x square minus x y minus y square equal to zero. So, this is the equation of bisectors. Okay, for this pair of lines. Now what we can do from here. If you see, we can make a quarter take note, we can make a quadratic from here. So, if we divide it by. We can make quadratic also or we can simply put this y equal to mx in this equation, because this is one of the bisectors. So, I will put y equal to mx in this equation. So what we will get, we will get this x square minus x into y will be what mx and minus m square x square is equal to zero. So, from here we get x square. If I take x square common then it will be one minus m, okay, one minus m minus m square is equal to zero. And if we take m. So basically, we get this quadratic in m m square, plus m minus one equal to zero. So, from here we can find the value of our m. So, what will be the value of m m will be minus b is minus one plus minus under B square base where means one minus four a is one C is minus one upon to a so to so value of m is minus one right plus minus what is this five right. Oh, plus one five upon two. So yes, the value two values of him will be there the first value will be a root of five minus one upon two. Okay, and the second value of him will be minus root five minus one upon two. So I think this is multiple choice question so root five minus one upon two, this is an option a and root five minus one root five minus one upon two. Okay, if you take minus common here, what do we get a root of five plus one upon two. So yes, a root five plus one upon two so C is also correct. So option a and C both are correct for this particular question. So I hope everyone is clear on this. Now moving to the next one. Question number three. So, question is saying if one of the lines of my square plus one minus m a square x y minus m x square equal to zero is a bisector of the angle between the lines x y equal to zero CEO x y equal to zero means this equation what does it represent x y equal to zero means x axis and y axis right x axis and y axis. So this x y equal to zero, this is the combined equation combined equation of our coordinate axis. Okay. So, and this equation is given second degree equation m y square plus one minus m square x y and minus mx square is equal to zero. So one of the bisectors, right. One of the bisector of this pair of straight lines is a bisector of the angle between the lines x y equal to zero. Okay. So basically, y equal to x will be bisector right. This is our x axis, this is our y axis. So this will be the one of the bisector right. One of the bisector for this coordinate axis, the equation of this line we can give it as a y equal to x, having the slope of one means this angle will be how much 45 degree and slope of this will be one. So we will use this information in this question. Okay, so if one of the lines of this. Okay, one of the lines of this is a bisector. Okay, so this is basically a pair of straight lines passing through what is it. Okay, since because this is a homogeneous second degree equation right. Everyone agrees. Okay, so this will represent two lines and we can use this information. The slope of the two lines, the slope of these two lines will be equal to minus two h upon a and the product of these two lines will be what the product of these two lines, representing by represented by these two lines the product of the slopes of those two lines will be equal to a upon B. you all are aware of this AB and H. So A is the constant of X square B is the constant coefficient not constant is the coefficient of X square B is the coefficient of Y square. And this to H is what to achieve the coefficient of XY. So basically this will be minus two H no. And minus two H means this complete thing will be two H so minus of one minus M square and upon a coefficient of X square is what minus M. So this minus minus will get cancelled out, it will be one minus M square upon it right and M one into M two is equal to a upon B. So what is a A means coefficient of X square that is M minus M sorry, and what is the coefficient of Y square it's M. So this is coming out to be minus one. Okay. So what can we do here. If you see M one into M two is coming out to be minus one. So the information is given here that one of the lines is a bisector of the angle between the lines. So one of the slope will be one, one of the slope will be one. Right. So we can say our M two will be how much M two will be minus one and M one will be what our M one will be one. This is given in the question. Okay, it's given in the question. So from here we get the value of M two s minus one. Now I will utilize this equation one. I will utilize this equation one. So from equation one what we can say M one plus M two will be how much one minus one means that will the sum of the slopes will be zero only. The sum of the slopes will be equal to one minus M one minus M square by M. So from here we get what M square is equal to one or M will be equal to plus minus. So this is what we are getting the value of M. Now the question is asking to find cause inverse in cause inverse M. Okay, so it will be cause inverse of one. The second one, cause inverse and cause inverse of what minus. Now when does this cost data gives us one value. It's on the zero degree right. So the value of this will be zero degree and when does cause function gives minus one value. It's at pi cost pi is equal to minus one cost pi is equal to minus one if you see the graph of cost data. It is like this right. So this value is zero. This is pi by two and this is pi at pi the cost function is minus one and at zero So this is what this is a cause inverse of one will be zero and cause inverse of minus one will be five. So this also seems to be multiple correct question. Okay, so this option is correct. So P is in option say so both A and C will be correct pi by two no pi at pi by two it will be zero and three pi by two at three pi by two also it will be zero cost data gives zero value at or multiples of pi by two. So B and A will be incorrect. So correct option for this will be A and option A and C. So yes, let's take the fourth question. What it is saying the bisectors of the angles between the lines given by this equation where C is greater than zero are respectively parallel and perpendicular to the line and four options are given. So bisectors of the angles now. So first let's don't apply much brain on this. What we can do we can just write the equation of the bisectors for this given pair of equation. Given pair of straight line so the equation for this is a exit plus by a square is equal to C times B X minus a Y square. Okay, where C is greater than zero. So now we can open the square and expand it so it will be a square X square plus B square Y square. So this is two ABXY right to ABXY and that will be equal to what C times B square X square plus a square Y square minus two ABXY. Is it okay. Yes, so what we can do further. Okay, our target should be to represent it in the standard form. Okay, so this is what I'm targeting. So let's make it similar to our standard form. So this will be a square minus CB square right. This will be the coefficient of X square, then what will be the coefficient of Y square, it will be B square from this side and from here what we get C times a square. So C into a square C into a square. Yes. And what will be the coefficient of our XY. So coefficient of XY will be our to AB from this side. Okay, to AB from this side and to AB to ABC from this side. To AB plus to AB C to ABC. Is it okay to AB plus to ABC into XY equal to zero. Yes. So we have changed this equation into our standard form. Now what I will do I will write the equation of bisectors. Okay. So bisectors, I will, I'm going to write the equation of bisectors for this. So it will be X square minus Y square upon a minus B, or I can represent it with capital. A minus B is equal to XY upon pitch. Is it okay. Now I will substitute the value of a and B so X square minus Y square upon what is a coefficient of X square so it is a square minus CB square and minus coefficient of Y square. So here it will be minus B square plus C a square C a square is it okay. That will be equal to XY upon H what is H. So this complete thing is if you see this complete thing to H is equals to two times. Okay, we can take here to AB column. So to AB if we take common what we are left with one plus C. So that value of H is what so value of H is coming out to be this AB. Okay, AB into one plus C. Check it, whether I've done any mistake or what. So the coefficient of XY is basically two H. So, from here we got the value of this H as AB into a plus C. Okay, what else we can do whether we can simplify this. Yeah, it seems to. I've enumerate in denominator if you see the here it is a square minus B square a square minus B square. And if you take common C common from these two terms what we were left with a square minus B square. Okay. A square minus B square and that will be equal to XY upon AB into one plus C. Okay, if you take a square minus B square common from these two terms. We will have one plus C. So I'm writing here only. So it will be one plus C. Now if you see this C is greater than zero. So obviously this one plus C will be greater than zero. So we're just cutting this. So, finally, we get the equation of bisector as this X square minus Y square upon a square minus B square. Okay, is equal to XY upon AB. Right. So what can we do. We have to find the bisectors. Okay, this is these are the bisectors. And the bisectors of the angle between the lines are respectively parallel and perpendicular to the line. So this line is parallel and perpendicular to which line we have to identify that. So this is not a single line basically this is the equation of bisectors. So this is combined equation of two lines. So, let me see whether we can simplify it more. So AB X square, then minus of a square minus B square XY, and what minus AB Y square equal to zero. Basically, these two lines are perpendicular because X square coefficient of X square is equal to minus of coefficient of Y square and obviously the equation of bisectors will be at 90 degree means bisectors will be at perpendicular to each other. So now what we can do. We can find the slope for this, like M one plus M two for this if you see any of these are representing two lines. So M one plus M two for this will be what minus two H upon minus two H upon B, and minus two what is H here. H here is a minus of a square minus B square upon two and hold by B B is what minus of AB. So this minus minus gets cancelled out this to two gets cancelled out and we are left with this thing. A square minus B square means M one plus M two, we are getting a square minus B square upon minus AB. Or we can say, or we can say what minus B square upon AB will be B by a and minus a upon B. So this is the value of some of the slopes for these two lines. And what will be the product M one into M two will be obviously minus one because these are perpendicular lines. So if you see M one M two here. And we can find the value of M one and M two right, we can find the value of M one and M two from you. So, what can I do I can take this square M one minus M two square, that will be equal to this guy square B upon a minus a upon B guy square, and what minus of four times of this that will be plus four. Okay. So what we will get, we will get this thing B square. This is correct. Well, you know, AB B square minus. Okay, we have to just simplify it I my target is to find this value of M one and M two, so that then we can see these lines will be perpendicular and parallel to which given lines. So, four times of M one M two minus minus it will be four, and M one plus M two will be what M one plus M two guy square, that is, AB, or we can say B square minus a square, the whole square upon this plus four. Okay, and further what we get. Okay, why I'm finding this. Okay, to find the value of M one and M two. So, a B square if I take LCM. So this will be B square minus a square the whole square, and plus four times of a square B square. Okay. So, if you see, what can we do we are no space. Let me just copy this slide. So from here what we get. This will be B square minus a square, the whole square and so that will be be powerful. Let's write it in separate. So, plus, here from here we will get minus of two a square B square. So, is B square minus a square the whole square. Okay, let me write in this space. M one minus M two couple is square Joe. That will be B square plus a square couple is square upon AB couple is square that will be M one minus M two will be your distinct B square plus a square upon AB with plus minus sign, obviously. And what is the value of M one plus M two M one plus M two is B by a minus a upon B. So here also we can write it as we can write it as what B upon B upon a plus a upon. Right. So this is M one minus M two. And what is M one plus M two B by a minus a by B. So B by a minus of a by B. And here we are getting B by a plus a by B. So, if you see, if we add this, we will have two times M one will be two times of B by a. So M one will be B by a and once we get the value of M one is B by a what will be M two M two will be minus a by B. So, the slope of lines are coming out to be this. Now we have to check through the options. So which line is having the slope. A minus B by a minus a by B. Here we are having slope minus a by B and B by a. So minus B by a. So if you check here, if you see this option a option a is a slope is how much why we can write it as. B B X plus mu right B X plus mu. So our Y will be B by a B by a X plus mu by a. So this B by a, we are having one of the slope as B by a. So yes this one of the line will be parallel to this and the other slope is how much minus a by B. So minus a by B means yes the product of slopes will be minus one. So it seems to be correct if you see this option well. Right. So what I'm saying I'm taking this option a the equation of this is B X minus a Y plus mu B X minus a Y plus mu equal to zero. So here we can write a Y is equal to B X plus mu.  But what I mean to say slope of this line is B upon a and in our equation one of the lines is having this slope B by a. So this will be parallel to this line and obviously this will be parallel perpendicular to this. So it seems like option A is correct. Okay. Now let's see this option be a X plus B Y plus lambda a X plus B Y plus lambda equal to zero. So from here what we get B Y is equal to minus of a X minus lambda. So our Y we can write it as minus a upon B X minus lambda upon B.  Now we are having one slope as minus a by a P. So this line will be parallel to this line. And obviously the other line will be perpendicular to this line. So option B is also correct. Now let's see this option C option C is a X minus B Y a X minus B Y plus mu or plus gamma is equal to zero. Now here B Y is how much a X plus gamma. So why is a upon B a upon B X plus gamma upon B. No, none of the lines having slope a by B. So this will be. Similarly, I think here slope is how much minus B upon a so no we don't have any slope of that minus B by a so option B is also wrong. So I think both these options and B will be correct. So it seems like this is also a multiple choice question. So, yes, this option A and B both will be correct. Option A and B both will be correct and erasing this because we have done on the slide itself. So, yes, let's find the other question. Okay, we will, this one was question number four. So let's take this question number five. So the pairs of the straight lines a x square plus two h x y minus a square equal to zero, and B x square plus two g x y minus b y square equal to zero, be such that each by six the angles between the other, then prove that HG plus AB equal to zero. So first, if you see this first pair of equation, sorry, first equation, it is representing a pair of straight lines. So, okay, I'm just writing the equation first, then maybe talk. So this is a x square plus two h x y and what minus a square is equal to zero. This is one pair of straight lines and the other pair of straight lines is given by this equation. So B x square plus two g x y minus b y square is equal to zero. Okay. It is given that if the pair of history line this and this be such that each bisects the angle between the other. So basically I will, I'm going to write the angle by sector of these pair of straight lines. I'm going to write the angle by sectors of these pair of straight lines, and it will be equal to this equation only. So let me first write the angle by sector for this. So it will be x square minus y square upon a minus b. So a is a here B is minus a so it will be two way, and that will be equal to x y upon h. Okay. So from here if you see what we can get what we are getting h x square minus two a x y. Okay, h x square minus two a x y minus h y square is equal to zero. So this is the angle by sector angle pair of lines. This is also a pair of lines and these are the angle by sectors of these bear of straight lines. So that's per question these two lines are same. These two lines are same. Right. So we can compare it to coefficient of x square y square and x way. So from there what we can write, we can write this be upon each coefficient of x square. It will be equal to coefficient of x y that is 2g here. And what is here, coefficient of x y is minus two and coefficient of y square here it's minus p and coefficient of y square here is minus of h. Okay, so if you see this two and two will get cancelled out. So h g will be. Now I am doing this cross multiplication right. So h g is equals to minus of AB. Is it okay. Or we can say h g plus AB equal to zero. This is what asked in the question. So hence, it's proved. So basically the angle by sector of these pair of straight lines. As per the formula or as per the derivation what we have learned, we have written the angle by sectors for these pair of straight lines. Now we have compared the same line with this pair of straight lines because in the question it's given that both are same. Right. So from there, I have got this condition that h g plus AB equal to zero. And this is what we were asked to prove. So I think everyone got the got the solution and right. So this one was question number five needs. See this next question question number six prove that the lines this are equally inclined to the lines this. Okay, so two equations are given here to second degree equations for motion is second degree equation the first one is to x square plus six x y plus y square equal to zero. This is one equation and the second equation is for x square plus 18 x y plus y square is equal to zero. Now we have to prove that both these pairs of straight lines are equally inclined. Okay, so if we can say, if we can say that the angle by sector for this and the angle by sector for this comes up to be same then we can say both these lines are equally inclined. So I will write the angle by sector for this line angle by sectors for these pair of lines, it will be x square minus y square upon a minus be two minus one, and that will be equal to x y upon h, what is h h here is three. So three times x square minus y square, that is equal to x one. So this is the equation of angle by sector for this pair of straight lines. Is it okay. So I will write the same angle by sectors for these pair of straight lines. So it will be x square minus y square upon a minus be that is four minus what is be here. So here is one, and that will be equal to x y upon h h is how much h here is nine, because to which is it so it will be nine. So here if you see four minus a one is how much it is three basically. So three means three means from here we are getting the equation of angle by sector says three into x square minus five square is equal to x way. Both the angle by sectors are same. We are getting the same angle by sectors for both of these pair of straight lines. It itself prove that both these lines are equally inclined, means this pair of straight lines is equally inclined to this pair of equally inclined to this pair of lines. So given since the equation of angle by sectors are coming out to be same, we can say, therefore the given two pair of straight lines, two pair of straight lines are equally inclined, are equally inclined hence proved. Even two pair of straight lines are equally inclined and hence proved whatever is asking the question. So, yes, this is the solution for this question. Now, moving ahead, we will take question number seven. Okay. So question number seven is saying so that the lines bisecting the angle between the bisectors of the angles between the lines this this are given by. Okay, let me read the question first. So that the lines, okay, bisecting the angle between the bisectors of the angles between the lines. Okay, so first let me write this equation. Let's say x is square plus two h x y plus b y square is equal to zero. Okay, now what we have to write. We have to write the angle bisector for this. Okay, angle bisector. If we write the angle bisectors for this, it will be x square minus y square upon a minus b is equal to x y upon h. Is it okay. And now, so that the lines bisecting the angle between the bisectors of the angles between the lines means what I have to write the angle bisectors of this equation also. So angle bisector for this also. So how can we write, how can we write. We can write it as, first we have to modify this equation. So we can write it as h x square. Okay, and minus of a minus b x y, and minus of h, y square is equal to zero. Now I have to write the angle bisector for this. So the angle bisector for this line will be, let me change the color of the pen, the angle bisector for this will be x square minus y square upon h and minus of b minus a minus b no so a is h here b is minus h so minus h and that will be equal to x y upon h, right. So what is h here. It is minus of a minus b upon two. Okay, so if we can further. modify it, we will have x square minus y square, and minus sign is there, let it be as it is minus into a minus b, and that will be equal to this will be two, two, so two into two for h x y that will be equal to for h x y. So this is what given a minus b. And this minus sign we can write it here, so I can save this minus sign to this side, and x square minus y square into a minus b, and when I will take this thing to the left hand side it will be plus four h it's excellent. Okay, so this is as simple as this. So this is what we have to do. So yes, we have proved it. Basically, this is the, this is the homogeneous second degree equation, we have written the angle bisector of this line, and again we have to write the angle pi sector of the angle bisector. So this is what the question is saying, so that the lines bisecting the angle between the bisectors of the angle between the lines, right. So obviously it will be given by this equation. So we have applied the formula contains nothing else. So yes, we are done with this question. Let's next, let's see the next one, question number eight prove that the bisectors of the angle between the lines this and this are always the same. So I think we have to just write the angle bisector equation for the given pair of planes. So it is a x square plus AC AC x y plus what C y square is equal to zero. This is one pair of straight lines and the next one is three plus one by C. So this is one pair plus x y is also plus x y plus three plus one by a and y square is equal to zero. So let's first write the equation of angle bisector. So I'm writing the angle bisector as this AB. Let's write the angle bisector of these lines. So it will be x square minus y square upon a minus C, because coefficient of x square is a coefficient of B square is C. So that will be equal to x y upon H, what is H to H is AC, so H will be AC upon two. So AC upon two. So this will be the equation of angle bisector. Now let's try to find the angle bisector for this. So it will be x square minus y square upon a minus B that is three plus one by C minus coefficient of y square so minus three minus one by a, and that will be equal to x y upon H, what is H here to H is one so H will be one by two. Now this three and three will get cancelled out, we will have x square minus y square, and we can take NCM here so AC so this will be a minus C, right, and that will be equal to two times of x y. Now, what can we write here we can write x square minus y square upon a minus C, and that will be equal to two x y. Okay, this AC will be also so it will come in the numerator. So obviously both these lines are same only know both these lines if you compare they are same only. So this is what it is asked both these lines are seen. So obviously it is proved. Yeah, the equation will be always in, because this x square minus y square this AC you can put it in the denominator of the right hand side. So two x y upon AC. So yes, it is as simple as that. So this is question number eight. Question number nine. So I think only one question is left in this exercise. So, okay, we will finish it off. Question number nine is there. What is this, the lines represented by x square plus two lambda x y plus two y square equal to zero, and the lines represented by this are equally inclined, then find the value of lambda. Now see these pair of straight lines are equally inclined, right. So, basically the equation of angle by sectors for both these pair of straight lines should be same. This is the concept, which we are going to use you. So this is the first to x square plus two lambda x y plus two y square equal to zero. So, if you see the equation of angle by sector for this, it will be x square minus y square upon what one minus two that is minus one, one minus two, so minus one upon is equal to x y upon H. What is H here to H is equals to two lambda so H is lambda. So, this is for first and for second if you see for second pair of, okay, no need to write one and two. So, I'm writing here only. So one plus lambda into x square minus eight x y plus y square is equal to zero. So, angle by sector equation for this pair of straight line will be x square minus y square upon a minus b that is one plus lambda minus one, and that will be equal to x y upon H. What is H? H will be equal to minus four in this case. So basically these two are same, these two lines, these two lines should be same, means dot line, these two pair of straight lines are same. So, we have to just compare it. So what we can do x square minus y square upon x y, okay, that will be equal to minus one upon lambda. This is our first and here also we will write x square minus y square upon x y and that will be equal to how much this plus one minus one will get cancelled out so basically this will be minus lambda by four. So, on comparing one and two, what we can say on comparing one and two, we can say this minus one upon lambda is equal to minus lambda upon four. So minus lambda my sorry minus minus we will get cancelled out, we will have lambda square is equal to four, or you can say the value of lambda will be plus minus two. So this will be the answer to this question. So we got the value of lambda is plus minus two. So I think this is the last question for this exercise. So, yes, we have completed this third exercise. So, we will meet once again with the next exercise. Until then, ta ta goodbye, take care.