have been better to talk about clustering after regression or before regression. Or maybe it doesn't make that much of a difference. Even though the problem seems very well defined, what you're doing regression analysis is not trying to fit. What you have to realize is what you're really doing is you're taking an abstract theoretical ideal model. So it's actually statistical modeling. Even something as simple as a linear regression is statistical modeling that tries to figure out how nature behaves in principle and asks, how then is your data a representation of that data? So there is some idea of an idealized process that underlines how these data were generated in the first place. And this is what you're really interested in. You're really interested in the idealized model, the idealized parameters of the model. So once again, the question is, what is this scatterplot? It's got values and y values. And what's interesting about this? What's obviously different from this than what you would expect simply from a uniform random distribution of points in this group? What do you notice? Yes, there's a direction in this. So the direction arises from a kind of correlation. Correlation means that if a point on the x axis is small, there's a rather high probability that the coordinate on the y-axis is also going to be small. And if the coordinate on the x-axis is large, again, there's a rather high probability that the coordinate on the y-axis is also going to be large. So the two measurements we have here are apparently not completely independent. But they're slightly dependent on each other. If you have one in a certain way, the other will turn out in some kind of a predictable fashion, not independently. Now, if the dependence were 100%, all the information in your data could be represented just by the points in one dimension with the x of y-axis, the other dimension could be perfectly calculated. And in that case, the points would all fall on a straight line. But that's not the case here. There's some variability. And the question is if there's this variability, how do we then go about and fit this? So here's some examples that I just came across. These are impact of SNPs of so-called tall alleles. Apparently, we have a number of alleles associated with tall body size. And what the researchers did was to take something of all the alleles that are associated with difference in body size and look how the number of tall alleles in the set of SNPs were correlated with an approximate height difference between people who have these alleles. And it turns out it's a very, very linear relationship. If you know the number of tall alleles, you can very well predict diversity. If you know the height difference, figure out the number of tall alleles. Which is, you know, for looking at alleles and SNP distributions, this is a surprisingly tight relationship. Nature genetics May 2008. Here's another example of correlations. People were looking at those responses. They were looking at whether they could make antibodies that they would be focused on HRV1, on particular epitopes, by boosting the immune system first with the entire protein and then only with particular epitopes and actually get neutralizing epitopes. And the evidence that this works, this immune system refocusing approach is in this kind of a plot here to have points. And if you add more antibody concentration to get a tighter percentage of neutralizing activity, so this is an indication that antibody actually neutralizes the virus. In this case it doesn't. This is thin. So, once again, like this morning, I'd like you to think about it. Because once again, when you do regression analysis of points and plots, and try to figure out whether something in this is significant or not significant, you have to have some idea of what to expect from the first place. So, once again, like this morning, I'd like you to think about it. Because once again, when you do regression analysis of what to expect from the first place. So, again, stick your heads together and define a scenario as a point, as a thought experiment where you would have data where you measure one thing and you expect that one parameter to influence another parameter. How many samples do you have? What's the domain? I.e., what is the possible values that one parameter can take up? What's the range? What's the possible set of values that can be taken up? What could an uncertainty in the independent variable look like? I.e., if I use x as my dependent variable and I can't measure it very accurately, what would that possibly look like? Finally, of course, what's the question that we would like from the data? I would like to have at least one thoughtful example of some kind of data where you have some dependence between two variables that you're trying to figure out through linear analysis. So think about what you would contribute. Number of data points, variability. I have one example that we'll then go through, but basically take this as a motivation to be able to come up with your own test examples and simulate your own data. Okay? Five minutes. All right. All right. The question is just trying to ask is whether or not there So, were you all able to come up with some interesting example? I hope. You want to share yours? Come on. So the problem that we wanted to set up is actually a really important one for all of us. It's about Louis Blanche tonight. So the question that we wanted to ask is what's going to predict the success of a particular exhibit? And the independent variable we thought might be interesting to look at is the distance of the exhibit from a public transport stop. So, if the exhibit is a long way from a streetcar stop or from a train stop, maybe it will be a distance centre for people to go and visit. So the thing we'd like to measure the independent variable is the number of visits per exhibit. Is that all right? Perfect example, yes. So, you're trying to find out what the correlation is, how tightly these two assets are formed. So, the range we thought was obviously number of visits is zero to some very large number? We don't know what the range is. Well, no. The range is the distance. So basically the range is for a function of what is it defined for? So it's defined as zero if it actually happens at the subway stop to the distance where the next subway stop would be short. Short. Did I just get this wrong? No, sorry. I've just described the domain. So the domain is what functions defined. The range is the kind of numbers that you get as a function of applying your function to the values. The question I have, though, is the popularity of the event proportional to the success of the model? Exactly. And that would be an interesting question here because the kind of linear analysis would allow you to see. Do we have random variation overlaid on that? Or is there something more to it? Are, for instance, do we have outliers only for venues that are far away from subway stations or that are close by to subway stations and so on? So that's the kind of exploratory analysis that you could add on top of that. If you have a relationship, could you use it to predict something? Well, the question my answer is, you know, even if you had a crampy exhibit, you might get a lot of visits if you were very, very close to public transport. So the team of curators would make sure that, you know, the exhibits that they're not as excited about at least have them in the subway stations. Okay, that's a great, great example. Not the quality of the exhibit, the number of visitors, something that you can measure. Or if you have a metric that defines quality of the exhibit in a different way than the number of visitors. It would be interesting, you know, to see if we have something that's very, very good. Does that information spread through the population? Do we raise the number of visitors during the night? Many different types of analysis. So this is, as I said, these regression analysis are types of modeling analysis. You start by specifying some model. In that case that we've heard about, the model is that there's some relationship between proximity to a public transport station and the number of visitors that you can get, which is a reasonable assumption to me. And then you start estimating parameters for that model and you ask, do my parameters describe my, you know, does the model, given the parameters of the model, describe my observed data well? Is it, is it adequate? And if yes, we can use the model to make predictions in the future, for instance, or define outliers and look at these more closely. And if no, we need to specify a different model. Now when statisticians speak about model, it's a little different. For instance, computer scientists speak about model. Computer scientists model something they'd like to line up the numbers so that their algorithms represent, you know, some representation of what actually goes on in age. Molecular modeling is a good example of that. You have these virtual atoms that bounce around in your computer memory and try to behave as if they were real molecules from their behavior you can make. A statistician's model is actually merely a device to explain data. And it's not obvious. Linear regression is maybe one of the better examples where it's possible. But it's not obvious that a good model actually need to have anything at all to do with physical, biological or chemical reality. It's not designed to be explanatory. It's simply designed to represent the mathematical reality behind the distribution of the data. So a statistician's model is not necessarily explanatory. Linear regression assumes a very particular model. And this says the y-values of our observations i are linear function, some parameter alpha, which defines the intercept of the slope, some parameter of beta, which defines how shallow or how steep the slope is, plus a set of error values that are in some way associated with your data. So the reason why your data don't actually all lie on one purpose at a time. In this terminology we call x the independent variable. It's the one that you choose, and y is the dependent variable, the one that you get after taking x and multiplying it by beta, adding alpha and adding some x along the term. But in different contexts these terms are also called differently, even though they all mean the same thing. Here's the little selection. The independent variable can also be called the predictor, the regressor, the control, the manipulative variable, the explanatory, the exposure variable, the input variable. It's all the same thing. Now these excellence are errors, and error is not in the sense that they're wrong. If you measure your data precisely and well, there is as much a reflection of physical reality as the ideal value that you would be expecting under a linear model. So these epsilon don't mean they're measurement errors, for instance. It can be that there are other factors which are contributing to your data points that are simply not in your model. And thus, since they're not explained by the model, we just pack them all into error terms. Say, well, we're not speaking about them. They're not in our linear model errors, as we call them there. But actually they might be something interesting in these so-called errors. There might be interesting questions to ask why the errors come out in the way they do. They might be simply random and uniform, which says probably we have small differences in measurements. Sorry, not uniform. They might simply be Gaussian distributed, which might mean that they're smaller. Actually, do you realize why the Gaussian distribution is so often observed in terms of errors in measurements or so-called random variation in measurements? Who here has ever heard of the central limit theorem? The central limit theorem. Now, that's something that you can really easily try out in R at some point. But the central limit theorem states that if you start from a certain value and you add and subtract randomly chosen small increments of a positive or of a negative sign. So essentially you have a random walk starting from one point going left, right, right, right, left, left, left, right and so on for a long time. And then you measure the point where you end up. The resulting probability distribution is going to be the normal distribution centered on the starting point. So the normal distribution is the expected distribution that you get if a large number of small random variations influence your measurement. And since that is a situation that very often happens in real biological processes, you often get the normal distribution as a good approximation of what the underlying reality is. So it all goes back to the central limit theorem. Simulating that in R is really trivial. You just set up a loop. You define one point and to that point you randomly add or subtract an increment say 100 times. And then you put the result into a vector and you plot the vector and you'll see that it has a Gaussian distribution. Something you can write in a minute or two and it's really fun to do. Nice homework exercises. Okay. So simple linear regression is useful when there's actually only two variables that you're interested in. If there's more than two variables, you need multiple regression. One variable is a response and one is predictor. It doesn't matter which one is which. You can formulate it this way or that. And you don't need a adjustment for confounding or other between subject variation, i.e. the samples are truly independent. There are some assumptions. One assumption is that the linear model is actually right. That's a non-trivial assumption because especially in noisy data you might have the bottom part of an exponential function which you don't realize is an exponential function because it looks much like a linear function to begin with. And the data doesn't really tell you that it's not one or the other or it could be a polynomial function of a higher degree or it could be a superposition of an exponential plus a linear function and so on. So sometimes it's not easy to show that something is truly linear because the data is noisy but linearity is the simplest, most economical explanation. So according to Occam's razor, the one that you should go with unless your data forces you to do otherwise. For instance because the residuals look systematically different. We'll get to that in a minute. The variance should be independent of x. So the variance should be independent of whether your data are large and small. So not small variance for small data and large variance for large data. The error terms should be independent and for proper statistical inference especially p-values for prediction the error values should actually be normally distributed because for prediction again we'll get to that in a moment. If you're trying to make an inference about how probable it is that a data point is an outlier or part of the model you have to make an assumption about how the errors are distributed and in the case in standard cases the assumption is they're normally distributed. So there are really two parts in the analysis that's the estimation of the parameters which is easy to do and the characterization of how good is our model anyway. And then the third part is using it for prediction. So parameter estimation is simply the question of how do we choose parameters in this case to intercept and slope parameter in the best that really depends on what best possible means. There's many possible interpretations of what best possible is. In the normal statistical sense the criteria for best possible choice is to minimize the sum of squared errors. But that's not the only criteria. In special circumstances you can use other parameters, other criteria of quality of fit. But here usually sort of gloss over this but the sum of squared errors is a good piece for a university used metric that we can use to distinguish good from poor estimates. So in the general sense what does this mean? Simply for a sample of points x1, y1, x2, y2, and so on we take the observed response coordinate or the observed y-values and we subtract from that the model applied to the x-value. So we take the x-value, we apply our model and that means it's predicted y-value and we subtract the predicted from the observed y-value and that deviation, that difference is a characterization of how good the model has predicted our observations. And we take that difference, we square that sum over that and that is the sum of squared errors SSP that abbreviations use a lot. So sum of squared. Now it turns out that if you use the sum of squared errors that's the same formulation you should get the wireless. The same formulation as before but now in the explicit terms of the linear model so yi minus a minus b times h squared in the parameters a and b is sum of squared estimates. And this is nice because this method of least squares has an analytic solution, closed form solution for the linear case. What does that mean? What's an analytic solution or closed form solution? You're looking across that? So if the mathematical formula that you're trying to do has that property that's what it means. You can derive a formula into which you can plug your data and you immediately get the answer. So an analytical solution is one for which you can write down a formula and get the right answer. The opposite to that is a numerical solution. So with a numerical solution you have to optimize things numerically, come up with guesses, improve your guesses in an iterative fashion and so on. So analytic solutions are fast, numeric solutions are slow as very generally speaking. But this one has an analytic solution, you just plug in the data, you immediately get the parameters, you can draw a curve and then you can define so-called residuals that define how different our observed values are from the predictive values. I'll get to that residual part a little further down the line again just to introduce it here. Okay, how does that work in R? So again, let's work with a synthetic data scenario. Of course, we can take any data set and just apply linear modeling to that, linear regression analysis and get a number but that's not so interesting. What's more interesting is if we come up with a synthetic model, can that kind of analysis actually recapture the parameters which we put in? Because as I said before, if we can't do that, we can't expect that we get meaningful results from our own results. So I'm defining a function here which I call make data and I just go through the syntax here. Oh yeah, what I'm trying to do is to model the correlation between height and weight of humans with reasonable parameters, not too sophisticated but just in a linear way. So I say there's going to be a vector x and a vector y to which I assign an empty set simply to initialize them. So x and y then are initialized empty and I define a matrix. And for our height and weight model, oh yeah, that's fine. First of all, I take random samples of heights and I take random samples of heights by generating numbers between 1.5 and 2.3 and multiplying these by 3. So the model here is that height in meters between 1.5 meters and 2.3 meters, which is pretty cool. Simply multiply by 40 and adding 1 to it as a linear model would be the prediction for weight. So that would give you extreme values. This is why I'm thinking about domain and range before that. So this is our domain. We're looking at human beings from 1.5 to 2.3 meters. And again, in order to simulate it, the range that I'm looking at here is between 60 kilos, well, you know, it could be a little less than that and that would come out to 92 kilos. It could be a little more than that. So the ratio could be a little steeper actually. What's the 1 per meter in our unit? What's the one here? What's the one here? Do it once, exactly. Give me just one sample, because I have it in a loop. I could also have generated them beforehand and then just use this index here to make it a little more explicitly. I have this in a loop and I just want one single sample of the uniform mediate between these two boundaries. Don't you need to use a seed? I could use a seed. I don't need to use a seed, right? Since I'm not using a seed, this will turn out slightly different every time I use it. And once I have this, and if I would plot this, of course, then everything would be on a perfect line. No point in analyzing this. But basically these are the numbers to remember the parameters of model B is 1 and A is 40. And then I add some uncertainty to this. And in fact, I'm violating one of the assumptions of the linear regression analysis because here I'm saying my standard deviation should actually depend on the data. Because here I'm saying my standard deviation is not an absolute number, but it's 1% of the height. Something like I can measure height to 1% accuracy. So I'm going to make, you know, on the order of 2 cm error for the really tall guys and just 1.5 cm error for them. And here, again, I'm violating this because I'm also saying my standard error for the weight is going to be not independent on the wide parameter. We'll see what influence this has on the data, if any at all. So my model is violating one of the assumptions of a pure linear regression analysis. And, you know, this is something that I might be interested in because I have a good reason to believe that people that are taller have a much broader variation in body weights than people that are smaller. You know, if you're only 1.5 cm tall, where can you go? You can be somewhere between 40 and 80 kilos, right? So that's a difference of 40 kilograms. But if you're a 2-meter guy, no problem to weigh 200 kilos. And the really lanky ones might only bring 90, but that's 110 kilos difference if you're 2 meters tall. So that variance is larger. So basically this dependence here is biologically motivated, even though it'll violate my assumptions. And that's kind of important. Many of the code examples of how to do things run samples on the same function or on the same type of function that they then use to analyze the data. I always think that's a bit of cheating because if you use the same function to generate and to analyze your data, there's no question that it will turn up since the same assumption. The interesting question is really, what happens if the assumptions are violated? How sensitive is my analysis going to be to these violations? Okay, so I put that into a file, I store the file, I call the file makedata.r, I type the command source makedata.r, or I could just copy and paste it into the r window. That's the same thing, console window. And remember what that file does is it's an associated with that name makedata, which is a function of n and n is the loop variable here. So it's a positive parameter n, I go through that loop and I spit out a number of data points with these properties. Okay. So here I have my data vector. I run makedata with parameter 40, so I get 40 x and y coordinates and I plot that here. That's what the data looks like. You can kind of see the relationship here, sort of something like that. The variance, yeah, you might be able to see that it's somewhat smaller here than there. The values are kind of positive 70 kilos here and I'm going up to 110 kilos here. So for a simple model it doesn't capture all of human variability, obviously. Now, estimating the linear model is, you see, as this called, this says, get me linear model that supposes that my data column two, now this is the tilde, this is not a minus. This is the squiggly thing that on my Mac keyboard is way to the left of the screen. So this is the way to the tilde. The tilde in our syntax means data two is modeled by data one. So data column one plus a model generates data two. And if I do that, I get the following information. First I get this, do I actually have this? Okay. So the first thing I do is I get this column LN formula of data two is modeled by data one. So in this line, R only summarizes what I told it to do. So I can check again that what R did was actually what I thought it should be doing. I passed it to the right set of parameters and the computer didn't just do what it did, but it didn't do what I say, what I said, but it did what I thought. And it gives me two coefficients, an intercept and that's the value of linear model where X is zero. And so, you remember what the parameters were that we put into the model? Yes, but the parameters. 40 and 1. 40 and 1, right? That's what I get back, 39.7 and 1.1. For noisy data like that, that's not too bad. Why does it turn out so well? Well, that's because a lot of the other modeling parameters, it is noisy, but to a very large degree, the noise that we added was just randomly distributed. There was not a trend in the noise and the linearity of the model is rigorously corrected. There's no quadratic term that we've added here, exponential hyperbolic function, which is really underneath the data. This is a pure linear model and if we analyze it in that way, we get three degree estimates back for the data. Now, we can take these here, the intercept and slope, and we can plot a line, an A B line, basically a line of intercept and slope, the parameter A and B, of these two values, and we'll call that an overlaying curve. But these two values of intercept and slope are also the return values of the linear modeling function. So when the linear modeling function returns, it basically spits out these two values so we can plot this expression into A B line, open parenthesis, run the linear model and it will do the same thing. So basically, you don't need to type out the parameters to get this line. Now, what's the significance of the line? Well, the line is basically the line that would give us the right y value or the ideal y value for every x value that we give up. So this is the idealized model that we suppose is behind these data. And there are a number of statistical parameters to characterize that. I think Raffler mentioned a little bit about the coefficient of correlation and regression, and whether the parameters are significant or not. The standard error in the parameters, for instance, is interesting to look at. The slope has a mean value of 30, an estimated value of 39 points. And the standard error of 6.78. So the data says, you know, you could fit in different slopes and the fit wouldn't be too bad. It's just that this value is the best one that we can have. But, you know, within slopes of, say, plus or minus five, we would still get reasonable fits. Actually, I think it is a good time to have a break. Because now we're going to look at whether the parameter estimates are good and look at confidence limits. And before we do that, I have some coffee. When do you want to be back? Oh, right, it's exactly three now. So, 3.30? Okay. Yeah.


Kiwana Tato, I'm Jennifer Taylor-Moore, Curator of Collections at the Sargent Gallery Te Wariwarehua Wanganui. And I'm Paul Rowe, the CEO of Vernon Systems, and we're here to tell you about how we made the most out of our online collection project with limited resources. So the Sargent Gallery has a small team of about 11 staff with no in-house IT or design staff. The Gallery Building, which opened in 1919, is a category one listed heritage building. The Sargent Gallery is in the midst of a major $35 million redevelopment programme, which includes seismic strengthening of this iconic century-old building and construction of a new wing to allow for greater exhibition space, a far larger collection storage area, an education area and dedicated spaces for events. The Sargent Gallery's nationally significant collection comprises of over 8,000 artworks and archival items, spanning four centuries of European and New Zealand art history. It is one of the country's most comprehensive surveys of New Zealand art history and a regional centre. Following the Canterbury earthquakes, the Gallery's heritage building was identified as an earthquake-prone building and was closed to the public in 2014. We relocated to a smaller temporary site called Sargent on the Key to maintain public programmes during fundraising for earthquake strengthening of the heritage building. The exhibition space is significantly more restricted at our temporary premises and this lessens opportunities for us to display the collection. As a result, there was an urgent need for online access to the collection during this redevelopment period. We set a goal of launching a website for the online collection within four months of the start of the project and with a budget of $23,000. We were keen to build a website that provided open access to the collection and offered a variety of options for visitors to explore the collection online. A particular focus was to make the site easily accessible for online visitors who had no prior knowledge of our collection. The Gallery's operating budget is very modest and any large funds that might have been available for this project had already been channeled towards the fundraising for the redevelopment. The budget constraints meant that there were not enough resources to spend hours retrospectively inputting data and keywords into the collection records. So we had to look for ways to quickly clean up the data and prioritise gaining copyright clearance with the artists in order to display their images on the site. Our collection was already cataloged in Vernon Systems' Collection Management Database and Vernon Systems offered to work in partnership with us to develop the new site. This site was built on top of an existing online collection platform built by Vernon Systems and this allowed us to make better use of our budget focusing on improving the catalogue data, adding new innovative features and incorporating our gallery branding. We made the decision to put the entire collection online including records where the image was not yet available. The full collection provided many more records to connect across the collection and online access is now helping us to spot data that can be improved. The online access is also helping us reach copyright holders who we weren't previously able to contact. The images have been put online even if they're not perfect as in this example where the image will be cropped when we have the time to do so. We've allowed reuse of images wherever possible and clearly mark images for which there are no known copyright restrictions. We made it easy to find images that are available for reuse and search results to be filtered by the current rights for each artwork and here you can see our main rights categories. The site uses responsive templates to provide layouts for mobile tablet and desktop screens. Visitors and staff can easily look up the details of an artwork from any device. On smaller screens we automatically display smaller image sizes to improve the speed over slower connections. We would first give a quick thank you to Shanoi Sam, our developer at Vernon Systems who built this website. The first thing we did is we used John Fawkes existing research on typical museum visitor types and we used that as a way of assessing the potential features within the website and seeing how they might fit the people we were trying to target. For example, we've ended up with a home page where it provides a number of simple links into the collection by things like colour, object types, but we've also considered adding in an advanced search page so that we could still meet the needs of researcher types so people that knew in advance exactly what they were looking for. We also made a commitment to using computer vision so tools where we could automatically analyse the images and the artwork image. So a couple of the different tools that we made use of were Google Cloud Vision and Color Thief. We also looked at what we could do quickly with the limited staff time that we had available. So for example we just spent an hour adding nationalities for the 40 countries of birth that were listed in the Artist Database and that means now that for almost all of the artists in the collection of the search filters. So for example if the country was Japan for the country of birth, Japanese appears as one of the nationality options. Most of the catalogue records didn't have descriptions in the original database so we looked at ways that we could generate a natural sounding description by combining the object type, the production place and the production date. So it automatically does a look up to see how many other works there are online of the same type to give the visitor a sense of scale for the online collection. And it also embeds links to allow you to easily jump to all the things that are made in the same place or are of the same object type. And so here we see a typical example. This is one of 1800 photographs in our collection. It was made in Whanganui in 1907. We also spent a couple of hours adding links for the most prominent artists in the collection to Wikipedia and to Te Ara, the Encyclopedia of New Zealand. So that provided a way for almost a third of the whole collection to connect through to these additional resources. So we thought it was essential, absolutely essential that the website didn't exist in isolation from the rest of the web. Similarly, we looked at pages that already existed in Wikipedia and if the gallery had significant holdings of that artist, we've placed links back from Wikipedia into the website and those links either go to an artist page or a specific artwork if it's a particularly famous work. The gallery's also looking at adding in Wikipedia pages where they're missing for artists that they hold in their collection. So we made the decision to build the website as a standalone online collection website apart from the main gallery content management system and that allowed us to build on an existing working online collection product and not have to try and rebuild those features within the main content management system. It also let us focus on a layout that best suited the online collection. So for example using the full width of the web browser to display the content piece of a whole range of different features that we couldn't have built within the main website and so that allowed us to do more within the budget that we had. The online website's also less likely to be affected by changes in the design in the main website over the longer term. Prototyping was an essential step for us to assess potential features that we had look at how we might build those and see whether they were actually viable or not. Here we see an early example where we used our product but just as an unbranded wireframe essentially to explore the data and see how it might work on the website. In an early design we showed the dominant colours of each artwork in round circles to evoke an artist's palette but through our testing we found that not all visitors realised that those were things they could click on to navigate to other artworks so that was changed later on in the design. Even in the smallest projects you'll benefit from user testing. We made use of staff at Sargent Gallery and at Vernon Systems that weren't otherwise involved in the project and we asked for volunteers from outside of our organisation and so those testers covered a range of ages and interests and they helped us find problems on the website and suggest potential improvements. So one of the things we were encouraged to do was to use planar language within the design. So for instance on the rights page where you can see what rights apply to a specific image we've introduced an open and closed padlock symbol to make it easy to see which images are actually available for reuse. The website provides a number of different ways to explore the collection such as browsing by colour, looking up the highlights of the collection going by object types but not everybody realised those options were there so we added shortcuts at the top of the home page and new menu options so that those options were always above the fold. We also had to make use of the data that we had not the data that we wished we had and so one example is that the object type field in the database was fairly consistent and so we've provided that as one of the entry points on the home page but we also did an automated look up again to see how many works fell into each of those categories so immediately on the home page you get a sense of scale as to how many items there are so we can easily see that there's 1800 drawings within the online collection. We also made use of that data on the collection detail page to ensure that there were no dead ends so provide links to easily jump from one artwork to other related artworks. We wanted people to linger on the site and browse and make serendipitous discoveries we also looked at ways that features could serve more than one purpose so on the site there's a directory of all the artists that are represented within the Sergeant Gallery's collection but that page also provides a way for search engines to get to every single artist page and every single artwork page from there. Lastly we looked at what we could do with automated image analysis so one easy thing we could do was pull out the orientation of the image was it landscape, portrait or square and provide that as one of the filters on the search page so here for example are all of the artworks by Gretchen Orbrach that are in landscape orientation and then we made use of Google Cloud Vision to automatically add subject tags to the artworks now computer vision is a complex field and the results aren't always perfect and so we had to develop strategies for dealing with that. We've added administrator tools where the staff at Sergeant Gallery can remove a tag that isn't appropriate for an artwork or can remove a tag across the whole website so one example is that Google Cloud Vision tagged almost all of the photographs as stock photography and that wouldn't have gone down particularly well with the artists and so that's an example of a tag that got removed from the whole website but even though those tags aren't always perfect they do provide some interesting results and new connections so these are a bunch of works that have been tagged as circle none of them are strictly circles but they are providing a new connection between those works because they've got similar shapes and lines. We used an open source tool called colour thief to extract what the most dominant colours were from the original 16 million colour palette that's in the image however unless you've got a really enormous collection hardly any of the works will share the same precise colour and so what we had to do was map those colours down to a smaller palette and we used the official named web colours 140 colours and because of that much more of the objects now share the same matching colours the only disadvantage is that the colours are moving slightly away from the original precise image colours because we used named colours we could also index the words for those colours and so we index the precise colour name which might be Crimson for example and the colour group such as red and that means people can now include a word for a colour as part of a tech search and they'll find the works even though those words weren't in the original catalogue record we also looked at complying with accessibility guidelines so making sure that the website worked on a number of different device sizes adding alternative texts for images allowing people to zoom within the web browser to size the content to a size that made sense for them accessibility compliance is important because it makes sure that your content is usable by the widest range of people as possible through the prototype there are a number of ideas which we decided not to keep so I was just going to give a couple of examples of those we did originally look at changing the background colour of the artwork page to match the artwork so we already knew the colour through our colour analysis and here's a typical result however we found that for some artworks that background colour just became distracting and it was impossible to write generic enough code to avoid that being a problem in some cases we also considered making a diagram that showed how the colours in the artworks changed over the decades but what we hadn't considered is that almost all artworks included some common neutral colours and that's the colours that ended up bubbling up to the top so we ended up with a graph which was essentially 50 shades of beige and an idea which we ended up keeping to come back to later to see if there was a way we could implement that better and lastly we also looked at whether we could generate full sentence captions for the images now I think this is the hardest part for computer analysis and it's where we saw the most variable results we looked at a test website that a company called COGAP had put together using the National Museum of Sweden's photo or painting collection and from that we decided that it just wasn't really good enough for us to use in the project at this stage with the finished website we've embraced the concept of create once publish everywhere and we're using the online collection to engage the public in different ways such as this example where we shared via social media feed a set of works featuring mistaches as part of the Movember event and the tag which was being searched on as facial hair we've also included simple options for visitors to share a page on common social media platforms and this is done using the open graph metadata standard which ensures the correct title, description and image from the page are carried over into the user's social media post one of the most exciting outcomes has been using the new site to engage with the collection in different ways than were possible previously particularly using the highlight section of the website and we've developed several initiatives as a result that involve digital as well as linked exhibitions the collection focus series highlights a group of works by a featured artist from the collection online but also as a physical exhibition in the gallery the works currently on display highlight feature allows people to see at a glance which collection works are available to view in the gallery at any moment and also provides access to additional information beyond the traditional exhibition labels and we have a kiosk in the gallery where people can do that next year the gallery will launch a new initiative called my choice and this gives the public opportunities to make their own selections of works for display in a virtual exhibition online the person making the selection will also add their own personal comments about why they selected these works this series will be launched in May next year with a physical exhibition of our own choice he can't wait followed by online selections by members of the community which will upload on a monthly basis we're also wanting to make available to the general public the chance to submit their own selections via social media and will select a few of those to also feature on the site we're now planning what we can do next and Google analytics is a valuable tool for assessing the use of the website we can see that we're reaching a much wider audience with a third of visits coming from outside of New Zealand Wikipedia has proven to be a key website and helping people to discover our collection and we're continuing to work steadily through requesting copyright permissions from artists and copyright holders to increase the number of images that can be displayed almost every artist approach so far has responded positively we've had some ideas that didn't make it pass a prototype stage such as presenting more visual displays of the breakdown of the collection and this is a concept we hope to look at further in another development phase we're poised to launch a new feature on the website called Sergeant Mosaic this provides an overview of all the collection images on one screen sorted by either the production date or the artist's surname is pictured here in a distinctive style such as Gretchen Albrecht's ovals in the third row and this kind of view provides yet another way for visitors to zero in on a work that interests them by clicking on a small thumbnail it brings up a larger preview and then takes them to the detail page if they want to look further early next year this facility will be installed in the gallery on a large 65 inch touchscreen there's been very positive feedback from artists and visitors and we're excited to win the NDF 2017 Best New Digital Exhibition Collection Award we're also invited to speak about the project at the North American Museums and the Web Conference in Vancouver in April and we're also named runner up for the Best Digital Service Award at the recent Association of Local Government Information Managers Spring Conference the online collection has generated new interest in the gallery people have discovered works they did not know were in our collection members of public have contacted us with information about artworks on the site and as a result we've gained new knowledge about our collection the site has also been extremely helpful when visitors arrive at the gallery expecting to see a specific work on display right at that moment that they visit and usually more often than not it is not on display when they want so our staff are able to direct them to the online terminal on the gallery and they leave much happier we've focused our staff time on a few areas where data could be improved to the maximum with minimal effort and on the larger task of rights clearance which provides a better quality visual experience for visitors by carefully selecting and testing potential features we've completed the project on time and within budget computer vision has made it easier to discover the images and has opened up new connections within the collection we've connected with a far wider audience than would have been possible previously and the public are more actively engaging with the collection and the information that it contains thank you for your time just one question for me obviously you got the shout out from digital New Zealand but other than digital New Zealand where else are you finding your images appearing now almost all of the traffic comes through Google search so they're appearing everywhere and through Google analytics we can see those visitors are just coming from all over the world there is a large amount of traffic coming from Wikipedia as Jennifer noted so that's made it more obvious to try and make better connections there, there's still probably more artist pages that we could be linking through there to try and create a better network I guess there sorry you're getting a leachman one too here have you ever thought about allowing the public to tag your art on your website did you consider that that is something I think our main problem is the resources that we would have to manage that and at the moment our resources are extremely limited like I'm doing this alongside everything else and there's no other people in the team you'd have to curate it and make sure that the tags weren't inappropriate and I think that will be a problem but definitely it will be something that we'll be interested in doing but just not at the moment okay thank you this is a really simple one are the links to Tiara and Wikipedia in Vernon or on the website they're on the website and not in Vernon they're in the person record so where the artists details are they're in Vernon just as an external file link and marking whether it's public or not thank you you offer a residency to is it two artists a year are you going to post their work on there as well or is it yeah that's one of the highlights that I want to build which is all about the tidy residency and the artists have been featured on there but this site is very much focused on the collection and at the end of every residency we always acquire an artwork from the artists so I would like to build one of that definitely there's endless scope for topics that we could cover in those highlights so yeah it's just a matter of building up the I want to have like a brief paragraph interpretive description for each work in it and things so yeah it's just about the ideal in managing it with our limited time and resources so yeah thank you


How are you doing, man? I'm doing good, man. Thanks. Gentlemen, a lot of people have been waiting for this night, so let's get going. Mr. President, the Supreme Court will hear a case a week after the election in which the Trump administration, along with 18 state attorneys general, are seeking to overturn Obamacare, to end Obamacare. You have spent the last week. Because they want to give good health care. If I may ask my question, sir. Well, hold on a second here, because if you compare your, you know, what you set up here to Canada, they've figured this out a long time ago. And I mean, if you look at the rest of the world, there's a lot of countries that have this universal health care. And of course, certainly maybe there's some areas that it could use some improvement. But you know, I mean, we could always just do something like what Canada did. I would like you to let me ask my question, and then you can answer. So sorry, my bad. So my question, sir, is what is the Trump health care plan? Well, first of all, I guess I'm debating you, not him, but that's OK. I'm not surprised. Let me just tell you something that there's nothing symbolic. I'm cutting drug prices. I'm going with favorite nations, which no president has the courage to do because you're going against big pharma drug prices will be coming down 80 or 90 percent. You could have done it during your 47 year period in government, but you didn't do it. Nobody's done it. Excuse me. So if I may just jump in here for a second, though, you know, I think the conversation that nobody's really having here is actually regarding the essential nature of drugs in general. And I mean, who's the president to like personally cut the drug prices? I don't know that that's a thing. But first of all, if you attend to the root of the problem, the reasons for people's lack of health, then you can actually solve the problem outright. You don't even really need drugs.  But if we really look at why we're unhealthy and we relate it with our food and we relate it with our overall sense of happiness and we relate it with even our outlook towards each other and the world and recognize that all of this fighting, this infighting between ourselves amongst each other and lack of social systems that brings us together for harmony and compassion. This is the real problem, the root of the problem. And if we can address this like the way that we eat and what we're eating and our general lack of exercise and this kind of stuff, then disease can just go away and I think excuse me, excuse me, don't interrupt me now. Please don't interrupt because you've interrupted a lot. And I think it's my turn to talk. Thank you very much. OK, so we just got to heal that up. You know, we got to heal the connection to our souls. And if we can do that using all of the medicine that we have available, and I mean like plant medicine, I mean like exercise, I mean like organic food, then the world would change overnight.   Like what if we took the taxpayer money and built genuine, organic, beautiful grow ops with vertical farming, super organic, run by the people, created for the people and we put one in every city. And then every single city could create its own food in this, you know, internal greenhouse beautifully created for the benefit of all kind of place. Why don't we do something like that? Wouldn't that be amazing? But no, Mr. Trump's going to start talking over me again. So that's fine. I guess it's your turn again anyway. Of our country. And by the way, now it's being built again. See, he's going to get to the economy in the next segment, sir. OK, Vice President Biden, you have been much more reluctant than President Trump about reopening the economy and schools. Why, sir, because he doesn't have a plan. If I were running, I know what the plan is. You've got to provide these businesses the ability to have the money to be able to reopen with the PPE, as well as with the sanitation they need. You have to provide that to Nancy Pelosi. Well, he's just just for a minute. Tell it to Nancy Pelosi. Wait, what are you talking about? Nancy Pelosi, what are you talking about? Why do you what are you talking about? But he he sits, he sits in his golf course. And I mean, literally think about it. You probably play more than I do, Joe. I like to go golfing question of reopenings and the fact he wants to shut down this country. And I want to keep it open. More jobs were created, a million and a half more jobs that in the first three years of your presidency. They had the slowest recovery since 90 economic recovery since 1929. It was the slowest recovery. Also, they took over something that was down here. All you had to do is turn on the lights and you pick up a lot. But they had the slowest economic recovery since 1929. Let me tell you about the stock market. When the stock market goes up, that means jobs. It also means 401ks. If you got in, if you ever became president with your ideas, you want to terminate my tax, my taxes, I'll tell you what, you'll lose half of the companies that have poured in here will leave and plenty of companies that are already here. They'll leave for other places have they will leave and you will have a depression, the likes of which you've never seen. Look, we handed him a booming economy. He blew it. It wasn't a balloon. Yeah, but because what he did, even before COVID, manufacturing went in the hole. You know, I think can we just can we let's let's talk about jobs? Yes, let's talk about the economy, because this is one of those things that I just feel like both of you guys listen, I mean, bless your hearts. I know that you mean well or well, I'd like to think that you do, but I really have no idea. But here's the thing, you throw around these words like, well, we're just going to create some jobs, you know, and I've got seven million more jobs than you did. But the thing is, it's like, is that really?  And I mean, like, what are you going to do to create these jobs? Because job creation is specifically finding something for someone to do and being able to pay them for it. And that's the thing is, I don't know exactly what it is that you're actually creating, like, what are you creating these jobs? What are these jobs that people are doing? Is it desk jobs? Is it teaching? Is it health care? What exactly are people doing? Are people learning how to become Reiki masters in mass? Because I don't see that being a part of the conversation. Now, looking back at our discussion of health care before, we could really make a massive difference in this country if we just decided to do something that was awesome. I mean, take a look at some of these really rich entrepreneurs here. You know, Elon Musk, he's building electric cars, trying to get everybody to Mars. Jeff Bezos, he's talking about building this massive multimillion inhabitant space station as well as, you know, places to live on the moon. Why are neither of you guys talking about innovation? Let's invest in our future.  Isn't that something that we can all just do? Can't can't we do that? Can't we just at least talk about making something that's really neat? He's done very little. His trade deals are the same way. He just feels so ignored right now. Trade deals, you know, he talks about the art of the deal. China has made perfected the art of the steel. We have a higher deficit with China now than we did before. We have the highest trade deficit with Mexico. All right, gentlemen, in China, eight year lunch, Joe, and one of his son goes in and he takes out, he takes out billions of dollars, takes out billions of dollars to manage. He makes millions of dollars. And also, while we're at it, why is it just out of curiosity? The mayor and everybody's just interrupting, interrupting all the time. Maybe I should just jump in here, too. Why is nobody talking about psychedelics? Why is nobody talking about meditation? Why is nobody talking about building cool things? This is driving me mad. Oh, my God, you know what? OK, something's going to change. And if you guys don't, the world will change around you. So that's all I got to say. It's an open discussion, please. It's a fact.


Let's talk about the three worst fasting trims. All right, fasting is the health trend to juror no doubt, and that's why there's a lot of misinformation out there about this ancient health practice and a cornerstone of almost every religion to achieve enlightenment. Everyone is talking about it, but not everyone knows the dangerous side effects if you don't fast correctly. Don't get me wrong, fasting is one of the keys to longevity and vitality, but you need to know how to do it properly in order to reap the maximum benefits. So today I'm going to address the top three fasting trends to avoid at all costs and what you can do instead. All right, number one, cutting your window of eating too drastically. If you read any of my books, my favorite way to fast is intermittent fasting or time-controlled eating. Now that basically says that we're going to shorten the period of time during the day that we consume our food. That's intermittent fasting. Time-controlled eating means we shorten that window preferably down to about six to eight hours a day. So I talk about a lot in unlocking the keto code. Unfortunately, if you're eating, used to eating, 12 to 16 hours every day, and the average American, believe it or not, eats 16 hours a day, literally from the minute they get up to the minute they go to bed. And as I show in my last two books, most of us are insulin resistant and metabolically inflexible. That means when you stop eating normally, you should be able to, instead of using glucose as a fuel, sure, use free fatty acids, fat as a fuel. But the vast majority of us can't do that. And when we stop eating, within a few hours, our glucose stores fall dramatically.  So we crash. We get headachey. We get grouchy. We get dizzy. We get worse. And that's why so many people fail at time-restricted eating.  So, for instance, if you eat breakfast at 7 o'clock in the morning, this next week, let's eat breakfast at 8 o'clock in the morning. I just want you to wait one more hour. Accomplish that.  The next week, we'll do 9 o'clock in the morning. That's just one more hour. Gradually work your way out to about a 6 to 8 hour eating window. That means eat breakfast at 11 o'clock in the morning, finish dinner at 7 o'clock at night. That's an 8-hour window. Want to compress it to 6? Eat breakfast at noon, finish dinner at 6 o'clock. Fantastic health benefits, but you don't jump off a 10-story building to do that. I've seen it fail so many times. Just avoid that at all costs. All right. How about a prolonged water fast? Now, of course, this is the most well-known, historically speaking approach to fasting. Even Jesus is said to have done it for 40 days and 40 nights. And almost all great religions have some form of prolonged water fasting. There's clearly benefits in ancient times to water fasting, but not so fast, excuse the pun. Most of us store our heavy metals and organo-pesticides in our fat cells. So when we stop eating anything for a continued period of time, we release not only fat from our fat cells, but those heavy metals and organo-pesticides. We have a horrible detoxification system in our liver to eliminate these problems. In fact, Ray Wolford, the famous UCLA professor who was the doctor on the Biosphere 2 experiments in the Arizona desert, documented in that group of people who literally starved for six months. Their levels of heavy metals and organo-pesticides went up dramatically and remained dramatically high for a year following re-eating. That's because they put them into their bloodstream and they couldn't get rid of them. So right now for Americans, water fasting is dangerous because of that fact. Now if you want to do that, understanding the risks, you want to absorb those heavy metals and organo-pesticides by taking chlorella tablets and activated charcoal. That will bind those heavy metals and prevent them from being reabsorbed into your system, but you don't need a prolonged water fast. Instead, time-controlled intermittent fasting will have just as good an effect, or as my friend and colleague Dr. Walter Longo has shown, a fasting-mimicking diet which uses a five-day low-calorie vegan fast once a month has been shown to duplicate the ability of a water fast in terms of health benefits without the danger of the heavy metal and organo-pesticide release. So a lot better and safer ways than a water fast. Alright, and the drum roll please for the worst fasting mistake that I have seen, the fruit fasting detox diet. Most of you have heard of this. It's basically all you do is for three to seven days, drink or eat lots and lots of fruit, lots and lots of fruit juices. I know it's touted to clean out your system, help you lose weight, and reset your digestive system. But I think this is actually the worst idea. Just remember, fruit is loaded with fructose, fruit sugar. Fructose is the best way to cause uric acid to increase in our blood, which causes gout and kidney stones and high blood pressure and diabetes. I've had several patients recently go on these fasts for fun as an experiment, and we looked at their blood work before and after, and they were shocked, every one of them, to look at their triglyceride numbers go sky high, to look at their liver enzymes go sky high. These were liver detox diets, and yet their liver enzymes got worse. Their uric acid levels went sky high, and one of them, doing it for a month, became a diabetic. So please, you do not need a fruit detox. This is the worst way, in my opinion, to toxify your diet. If you want to do a vegan fast, like I write about in all my books, you're going to be much better off and much safer. Now, I highly recommend that you check out chapter 5 in my new book, Unlocking the Keto Code, for the latest studies on the most effective fasting practices. So, that's it for now. We'll see you next week. In fact, the evidence is that it's exactly the opposite. Eating constantly, eating multiple small meals a day, as I show in the Energy Paradox, is one of the best ways to deplete your energy.