class: center, middle ### W4995 Applied Machine Learning # NMF; Outlier detection 04/02/18 Andreas C. Müller ??? Today, I want to talk about non-negative matrix factorization and outlier detection. FIXME matrix factorization should be approximately equal, not equal FIXME list KL divergence loss for NMF FIXME related gaussian model and Kernel density to GMM? FIXME talk more about all outliers are different in different ways vs classification (add example where outlier is better?) --- class: center, middle # Non-Negative Matrix Factorization ??? NMF is basically in line with what we talked about with dimensionality reduction but also related to clustering. It’s a particular algorithm in a wider family of matrix factorization algorithms. --- #Matrix Factorization
.center[ ![:scale 90%](images/matrix_factorization.png) ] ??? So matrix factorization algorithm works like this. We have our data matrix, X, which is number of samples times number of features. And we want to factor it into two matrices, A and B. A is number of samples times k and B is k times number of features. If we do this in some way, we get for each sample, a new representation in k-dimensional, each row of k will correspond to one sample and the columns of B will correspond to the input features. So they encode how the entries of A correspond to the original data. Often this is called latent representation. So, these new features here in A, somehow represent the rows of X and the features are encoded in B. --- #Matrix Factorization
.center[ ![:scale 90%](images/matrix_factorization_2.png) ] ??? --- #PCA
.center[ ![:scale 80%](images/pca.png) ] ??? The one example of this that we already saw is principal component analysis. In PCA, B was basically the rotation and then a projection. And A is just a projected matrix. This is just one particular factorization you can do. I have the sign equal, but usually, more generally, you're trying to find matrixes A and B so that this is as close to equal as possible. In particular, for PCA, what we're trying to do is we try to find matrices A and B so that the rows of B are orthogonal, and we restrict the rank of k. K would be the number of components and we get PCA, if we restrict the columns of B to be orthogonal, then the product of matrixes A and B is most close to X in the least square sense is the principal component analysis. --- class:spacious # Other Matrix Factorizations - PCA: principal components orthogonal, minimize squared loss - Sparse PCA: components orthogonal and sparse - ICA: independent components - Non-negative matrix factorization (NMF): latent representation and latent features are nonnegative. ???  They basically change the requirements we make in matrices A and B and what is the loss that we optimize. As I said, PCA wants the columns of B to be orthogonal, and minimize the squared loss to the data. In sparse PCA you do the same, but you say the entries of B should also be sparse, so you put an L1 norm on it, and then that maybe gives you more easily interpretable features or definitely more sparse features. Independent component analysis tries to make sure that the projections given by B are statistically independent. NMF is used more commonly in practice. In this, we restrict ourselves to the matrices being positive, what I mean by that is, each entry is a positive number. --- #NMF
.center[ ![:scale 80%](images/nmf.png) ] ??? In NMF, we compute X as a product of W and H. W stands for weights, and H stands for hidden representation. We want to find W and H so that their product is as close as possible to X. --- class: spacious # Why NMF? -- - Meaningful signs -- - Positive weights -- - No “cancellation” like in PCA -- - Can learn over-complete representation ??? Since everything is now positive, you have meaningful signs. In, PCA the signs were arbitrary so you could flip all the signs and component and it would still be the same thing. In NMF, everything is positive so there's no flipping of signs. All the weights are positive, this makes it much easier for us to conceptualize. So you could think about, as each data point is represented as a positive combination of the columns of W, so positive combinations of these basic parts. This is often thought to represent something like part. So you basically build up each data point out of these columns in W that has like positive contributions. If you have like positive and negative coefficients it’s usually much harder to interpret. In PCA, you can get the cancellation effect. Basically, you can have components that vary a lot in different directions and so once you add them all up, the variation vanishes. Since you have positive weights, you can think of NMF a little bit like soft clustering, in the sense of slightly related to GMMs, you can think of the columns of W as being something like prototypes and so you express each data point as a combination of these prototypes. Since they're all positive, it's more similar to clustering. Another thing that’s quite interesting is that you can learn overcomplete representations. What that means is that you can learn representations where you have more components and features. So before we had this k and it was drawn as being smaller than number of features, if you have more than number of features, you can always trivially make W the identity matrix, and so nothing happens. But if you add particular restrictions to W and H, then you can learn something, where actually the H is wider than X, which might be interesting if you're interested in extracting interesting features. In NMF, you can do this by, for example, imposing sparsity constraints. - positive weights -> parts / components - Can be viewed as “soft clustering”: each point is positive linear combination of weights. - (n_components > n_features) by asking for sparsity (in either W or H) --- .center[ PCA (ordered by projection, not eigenvalue) ![:scale 70%](images/pca_projection.png) ] .center[ NMF (ordered by hidden representation) ![:scale 70%](images/nmf_hid_rep.png) ] ??? Here's an example of what this looks like in practice. Here we have NMF and PCA. This is the digit dataset, so the images are 28x28 grayscale images. I have these the digits, 0 and 1, and I tried to express them as a linear combination of the PCA components and as a linear combination of the NMF components. Here, I ordered them by which component is the most important for each of these data points. For both, 0 and 1, the most active component is this one, which is a guess either 0 or 1, depending on whether it's positive or negative. You can see that neither of these latter components looks a hardly like a 0 or a 1. What you’re seeing here is the cancellation effect taking place. The idea with NMF is that in NMF, hopefully, you got something that’s more interpretable in particular, since everything is positive. Usually, we can't actually look at our data this easily and so being able to interpret the component might be quite important. Often, people use this for gene analysis, for example, where you have very high dimensional vectors, and if you want to see which genes act together and so having these positive combinations really helps with interpretability. --- # Downsides of NMF - Can only be applied to non-negative data -- - Interpretability is hit or miss -- - Non-convex optimization, requires initialization -- - Not orthogonal -- .center[ ![:scale 60%](images/nmf_downsides.png) ] ??? There's a couple of downsides. The most obvious one is it can only be applied to non-negative data, if your data has negative entries, then obviously, you can't express it as a product of two positive matrices. Also, 0 needs to mean something. 0 needs to be in the absence of signal for this to make sense. So obviously, you could always make your data positive by subtracting the minimum of the data and just shifting the 0 point. But that's not going to work very well. 0 really needs to mean something in NMF to make sense. One kind of data where NMF is commonly used is text data. In text data, you look at word counts, and they're always positive so they’re a very natural candidate. As with all things interpretable, the interpretability of a model is a hit or miss. So it depends a lot on the application and on the data, whether you actually get something out that you can understand. This is an unsupervised model and so the outcome might be anything. Another issue is that this is a non-convex optimization and it requires initialization. So often this is initialized with PCA, or you could actually think about initializing it with KMeans or something else, there's no direct formula to compute W and H. So in PCA, we can just do an SVD and it gives us the rotation and it gives us the representation of the data. In NMF, we basically have to do something like gradient descent. There are several different ways to do this but basically, all of them come down to some form of optimizing minimization problem and trying to find a W and H. So depending on how you initialize them, and what kind of optimization you run, you'll get different outcomes, and you will get some local optimum, but you're not going to get the global optimum. So that’s a bit disappointing. Even if you did compute this for a dataset. So you have your data matrix X, you decompose it into W and H and now you might want to take new data and projected it into the same space. In PCA, you can just do the rotation to new data. In an NMF, you actually have to run the optimization again. So there's no forward process that can give you H given W. So you need to keep W fixed and then run the optimization over H. So the only way to get the hidden representation for any data is by running optimization, given the weights W doing the optimization is convex, though, so it's not really problematic, and the outcome will always be the same, but it takes a lot longer to run optimization for something, than just do rotation. The components are not orthogonal as in PCA which can make sometimes be a bit confusing because you can't really think about it in terms of projections. Finally, another thing that's quite different in NMF than PCA is: A) They're not ordered B) If you want fewer components, there will not be a subset of the more components solution. So here, is a solution for this positive dataset. If I do NMF with two components, I get these two arrows, they basically point towards the ends of the data which has the extreme points so it can express everything in there as a positive combination of the two. And if I do only one component, I get the mean of the data, because that's the best I can do with one component. If I change the number of components, I might get completely different results every time. So picking the right number of components is quite critical because it really influences what the solution looks like. So if compute 20 components, and then I compute 10 components, the 10 will be just completely different from any subset of the 20 components. --- .center[ NMF with 20 components on MNIST ![:scale 60%](images/nmf_20_mnist.png) ] .center[ NMF with 5 components on MNIST ![:scale 60%](images/nmf_5_mnist.png) ] ??? Here's another illustration of this. If I do 20 components, I get the top, if I do 5 components, I get the bottom. And you can see these are quite different. And if I would use more components, they would probably be even more localized, and be just like, sort of small pieces of strokes. With 5 components, you get something like digits out there and all of these together seems to sort of cover space somewhat. --- class:spacious # Applications of NMF - Text analysis (next week) - Signal processing - Speech and Audio (see
librosa
) - Source separation - Gene expression analysis ??? This is often used in text analysis. It's also used in signal processing, particular for speech and audio. It's often down for separating the sources, when there are multiple speakers, and you want to separate out one of the speakers or if you want to remove the singer’s voice and keep the music intact. This can be done using the library librosa. There are also plugins for common audio players, where you can just remove the voice with NMF. Also, it's commonly used gene expression analysis. --- class:center,middle #Outlier Detection ??? The idea in outlier detection is to find points that are different. There are two quite related kinds of outlier detection summarized under outlier detection. There's outlier detection and novelty detection. --- #Motivation .padding-top[ .left-column[ ![:scale 100%](images/outlier_detection.png) ] .right-column[ ![:scale 100%](images/novelty_detection.png) ] ] ??? Both are unsupervised methods. The idea is to find things that are different. In outlier detection, usually, your training dataset also contains outliers which makes it a bit dirty, while in novelty detection, you get a dataset and then, later on, someone gives you new data and asks you what is new here. So in novelty detection, your dataset would be clean. But in both, you want to identify something that's sort of different from the standard distribution. Only, in the outlier detection case, there are already different samples in your training dataset. This is one of the rigidly few unsupervised problems that are pretty heavily used in practice. - Find points that are “different” within the training set (and in the future). - “Novelty detection” - no outliers in the training set. - Outliers are not labeled! (otherwise it’s just imbalanced classification) - Often outlier detection and novelty detection used interchangeably in practice. --- class:spacious # Applications - Fraud detection (credit cards, click fraud, ...) - Network failure detection - Intrusion detection in networks - Defect detection (engineering etc…) - News? Intelligence? ??? - usual assumption: all outliers are different in a different way. - Often people use classification datasets for outlier detection: that's a bit strange. See homework results. --- class:spacious # Basic idea - Model data distribution $p(X)$ -- - Outlier: $p(X) < \varepsilon$ -- - For outlier detection: be robust in modelling $p(X)$ ??? The main idea is, you model your data distribution, p(X). And then you look at the data points that are unlikely under the model. So if it's unlikely under the model, then it's probably an outlier. If you’re doing outlier detection that means your sample is going to be contaminated. So they're outliers in the dataset X already if that is the case, you want to be robust in modeling p(X), so you want to model p(X) in a way that is robust to outliers. Both of these tasks are generally ill-defined. So unless you actually know the real data distribution, how good something does is hard to measure. Usually, you don't have ground truth of what the outliers are if you have the ground truth what the outliers are, you could just do an imbalance classification task. So similar to clustering, what we're doing here is building a model, trying to find some outliers, and then check if they're actually outliers. If we are satisfied with the things that our model finds, then we can put into production. But there's no guarantee that it's going to find like x fraction of the outliers and since we don't have labeled data, usually, we can't really measure our recall. We won't ever know about the samples that we didn't find. So maybe with respect to the homework and in the homework actually have ground truth data. And it's similar to the clustering setting, where researchers are basically cheating and evaluating methods that are unsupervised in a supervised manner. So once you have ground truth label, you can evaluate your outlier detection, using, for example, AUC, which is what you're going to do your homework. But in a real-world setting, if you had the labels, you would never use outlier detection. Again, similar to clustering, what makes an outlier in a particular dataset is ill-defined. So depends on the application, what do you want to consider an outlier or not. So in the homework, it’s ill and healthy, and the ill people are the outliers. But it could also be that the people that are much older and everybody else are the outliers. If there's sort of a very clear density model, and so you don't know what the density of the data is supposed to look like and then, you know, things that don't share this density, then you can sort of define this. But usually you don't know what the density supposed to look like and so there's no clearly defined notion of what is an outlier. Similarly only, there's no clearly defined solution of what should be a cluster. So we're going to talk through a couple of different algorithms that make different assumptions about what makes a data point an outlier. So here, I said, we start usually with a data distribution p(X). - Task is generally ill-defined (unless you know the real data distribution). - Task is generally ill-defined (unless you know the real data distribution). --- #Elliptic Envelope `$$p(X) = \mathcal{N}(\mu, \Sigma)$$` .center[ ![:scale 60%](images/elliptic_envelope.png) ] ??? This leads to the elliptic envelope outlier detection. Basically, it fits a Gaussian into the data, and then it looks at the points that are not fit well by the Gaussians and those points are the outliers. Since this is meant for the outlier detection task, what we're trying to do is actually trying to find a robust estimate of the mean and covariance matrix so that we can tolerate some outliers in the training dataset, and still sort of recover the real covariance matrix. In this illustration, the black points, inliers, are what you expect the data to look like and the outlier distribution is plotted in red. They overlap, so usually in unsupervised methods, you will never label any of these red points as outliers but we could try to figure out that these points here are outliers. The way that elliptic envelope works are that it finds a robust version of the variance matrix. Basically, it finds the covariance matrix with the smallest determinant that still covers a large portion of the data. In most outlier detection methods, you have to specify how many outliers you expect. So here, let's say we specify 10% of the data to be outliers, then it will try to construct the covariance matrix that covers 90% of the data, but holds the lowest possible determinant. If you do this, you get the red dotted circles, which are the contours covariance fitted with the robust estimate and the blue circles are the covariance fitted with the maximum likelihood estimates, using all the data. Obviously, these outliers can disturb the covariance matrix and so the blue is sort of too thick in one direction whereas the red is not. So now, if you have this red model, you can basically say, all the data lies within these two standard deviations and so everything outside here is an outlier.  The way we do this in scikit-learn. The covariance module has all the robust covariance methods. As I said, you have to specify the contamination, which is how many outliers do you expect. Here, I set it to 10%. If I predict I get 1s and -1s. All the outlier models in scikit-learn use 1 for inliers and -1 to outliers. The mean of the prediction tells me that about 10% of the training data was labeled as an outlier, which is what we would expect, given that we set it as 10%. You could also get a continuous score saying how much of an outlier is each point with the score samples methods. Here, in the elliptic envelope, contamination parameter changes how the model is fit, for some other models, this will actually only change the threshold. It’s important here to have the right contamination parameters for the right covariance fit. For real-world model, set it based on what your expectations are. --- # Failure-case: Non-Gaussian Data .center[ ![:scale 80%](images/elliptic_envelope_plot.png) ] ??? If the data is not Gaussian, we get this. In this dataset, my intuition was that the isolated three points are the outliers and the rest are the normal data. Since the data is non-Gaussian, it gives you 10% as outliers that are furthest away from the mean. And this is not what I wanted at all. So if your data is very non-Gaussian, then the method will not clearly work well. Now, we could obviously use a more complicated density model. So we talked about Gaussian mixture models, we could use a Gaussian mixture model. Instead of fitting a single Gaussian, we could try to fit multiple Gaussian. If you just use the Gaussian mixture models in scikit-learn, they will not do a robust fit, so that might make more sense in the novelty detection than in the outlier detection sense because it will try to fit all of the data. You can still try to do it on the outlier detection task and just fit, so if I fit three Gaussians here, it'll probably give me the right outliers. But then again, I need to know what the number of components is for my GMM, for this to work well. So I still to make the assumptions about what the density is. Another approach is instead of having a parametric density model like this, we can do a non-parametric density model like a kernel density estimate. Could do mixtures of gaussians obviously! --- class: center, spacious #Kernel Density ![:scale 80%](images/kde_vs_histogram.png) ??? KDE is a most simple non-parametric estimate for probability distributions. The ticks at the bottom in the left plot are data points. One way to visualize the distribution is to do a histogram. For the KDE estimate in the right, we put a small Gaussian blob around each data point. So here, each data point here at the bottom corresponds to one of these Gaussians and then we just sum them all up and this gives you sort of this smooth density here. So this a little bit like a GMM where we have as many components as data points. You could also use other kernels. The word kernel here means slightly different than in SVMs. Kernel here means kernel in the sense of signal processing. So another commonly used kernel here is the top hat kernel, which is a kernel in the signal processing sense but it's not a kernel in the support vector machine sense, the Gaussian kernel was the kernel in both senses. A kernel can mean a lot of different things. And here, it means basically windowing function. And so any windowing function would work for this, you kind of put a little bit of probability math around each data point. An obvious problem with this is that you need to pick the bandwidth. - Non-parametric density model - Gaussian blob on each data point - Doesn’t work well in high dimensions --- class:center # Kernel Bandwidth ![:scale 50%](images/kde_bandwidth.png) ??? So depending on what bandwidth you pick, you can either over smooth or under smooth the data. Here, in red, you’ve picked too small of bandwidth while in green, you’ve picked two large of bandwidth and black is probably a decent bandwidth. Again, this is an unsupervised problem. So it's very hard to do this. You can actually use cross validation to adjust the bandwidth. So you can look at what's the score of the held out data. This is also not a robust estimate. So if you have outliers in your data, the outliers in your data might influence your estimate. The other problem with this is that KDDs don't work in higher dimensions. You can obviously not only do this 1-dimension, but you can also do this in any number of dimensions. But here, you get the curse of dimensionality. Basically, if you have higher dimensional space, you need more and more data points to actually fill the space with these small Gaussian blobs. If you would want to do a histogram, in like 10 dimensions, and you don't have enough data, then most of the histogram cells will be empty. And here, this is only like a smooth version of the histogram so it has the same problem. So if your space is in high dimensional, most of the space will be empty and this is not going to work very well. - Need to adjust kernel bandwidth - Unsupervised model, so how to pick kernel bandwidth? - cross-validation can be used to pick the bandwidth, but if there's outliers in the training data, could go wrong? --- .smaller[ ```python kde = KernelDensity(bandwidth=3) kde.fit(X_train_noise) pred = kde.score_samples(X_train_noise) pred = (pred > np.percentile(pred, 10)).astype(int) ```] .center[ ![:scale 70%](images/kernel_density_bw3.png) ] ??? If your space is low dimensional, and you can plot it, it might work nicely. So here, I might have used the cross-validation to find out the bandwidth of 3 is good. And then I can look at the scores. So here, KDE is not an outlier detection method in scikit-learn, but I can use it as an outlier detection method by just looking at score samples, which are the log probabilities of all the data points under this probability model. And I say that everything that's higher than the 10th percentile is an inlier. So basically, now I label 10% of the data as outliers and I actually get the right three points that I wanted and a couple more points. Obviously, I get more points, because I told them I want 10% of my data to be outliers. So this is a really is a very simple method. But it doesn’t work well in higher dimensions and it gets very slow since you have a lot of these kernels that you need to evaluate. So you need to compute the distance between all pairs of points mostly. --- # One Class SVM - Also uses Gaussian kernel to cover data - Only select support vectors (not all points) - Specify outlier ratio (contamination) via nu .smaller[ ```python from sklearn.svm import OneClassSVM scaler = StandardScaler() X_train_noise_scaled = scaler.fit_transform(X_train_noise) oneclass = OneClassSVM(nu=.1).fit(X_train_noise_scaled) pred = oneclass.predict(X_train_noise_scaled) ```] ??? A more sophisticated variant of this is the one class SVM. This also uses Gaussian kernels to basically cover the data. But it selects only support vectors, not all points as basis points. You get a similar function, in KDE. But the density function is supported only by some support vectors. Again, you need to specify the bandwidth parameter gamma. So this only makes sense with an RVF kernel. It’s quite similar to what KDE does, but only, it selects support vectors and does it in a more robust way. You also have to set the number of outliers you expect as nu. Again, nu is part of the optimization process. So setting the outlier fraction differently will change how the models fit. - Need to adjust kernel bandwidth - nu is "training mistakes" --- .center[ ![:scale 80%](images/one_class_svm_plot.png) ] ??? So here, this was with a particular setting of gamma, and you can see that it seems like a somewhat reasonable model. If I made gamma a little bit smaller, it would probably have found the right points. But here, it's even harder to adjust the gamma parameter because there's no way to really do it. So for KDE, I can do cross-validation to see how good of a probability model this is, while the SVM doesn't have a probability model. So I can't do cross-validation or anything. So I just need to pick gamma in some way that makes sense to me, which is not great. If you can visualize data, obviously, that helps. But in higher dimensions, you need to look at projections or other things to see how to set gamma. So in a sense, is also sort of a non-parametric density estimate. But it doesn't really have a probabilistic model. --- class:center,middle #Isolation Forests ??? The final model I want to talk about is also a non-parametric estimate that also doesn't have a probability model and it’s called isolation forest By far, it’s my favorite since it has no parameters to tune. --- #Idea - Outliers are easy to isolate from the rest .center[ ![:scale 80%](images/isolation_forests.png) ] ??? So the idea of isolation forest is that if you build a random tree over a dataset, then if you want to figure out how easy is it to split up a particular point, it's much easier to split up a point that's an outlier, that’s on the outside of the data than a point that's like somewhere where the data is very dense. The idea is that you build many completely random trees, it's complete unsupervised, so it just keeps splitting the data in some way and we look at how deep do we need to go to isolate a data point from the other data points. If on average, we have to go very deep into the tree, it’s probably if some of our data is dense, it's not an outlier. So on average, if we split off the point very early, it's probably an outlier. - Measure as Path length! --- class:center,middle .left-column[ ![:scale 100%](images/isolation_forests.png) ] .right-column[ ![:scale 100%](images/avgpathlen_numtrees.png) ] ??? If you add more and more completely random trees, you get a relatively stable score that tells you is it an outlier or is it an outlier. You can think of this as sort of trying to model the density of the data. But there's no probabilistic model here. X1 has over 1000 trees, you need a very long path line so you go very deep into a tree before it's isolated from the other point. That means it's in a very dense region. Whereas, X0, on average is split up quite early from the rest of data points so it's probably an outlier. So basically, if you're on the outside of the data, no matter what feature is picked, you’re likely to be split off, given that you're an outlier with respect to any of these features. --- #Normalizing the Path Length Average path length of unsuccessful search in Binary Search Tree: `$$ c(n) = 2H(n-1) - \left(\frac{2(n-1)}{n}\right) \text{ (H = Harmonic number)}$$` `$$ s(x,n) = 2^{-\frac{E(h(x))}{c(n)}} \text{ (h = depth in tree)}$$` - s < 0.5 : definite inlier - s close to 1: outlier ??? So to make this more coherent, we need to normalize the path lines. And so depending on how many data points there are, you expect to go deeper to the tree to separate something. And so you can calculate what the average path length of an unsuccessful search is in the binary tree, which is similar to trying to isolate a point, and you can compute this number. And the score that we actually compute, the outlier score is 2 to the minus average path length over all the trees divided by the average path lengths for an unsuccessful search in binary trees. So this only depends on n which is the number of data points. So basically, we are only normalizing the score to make sense independent of the dataset size. If this score is smaller than 0.5 then definitely you’re an inlier. If it’s closer to 1, it’s an outlier. Basically, the way you determine outliers is by threshold the score. So here, setting the number of expected outliers doesn't change the algorithm at all, it only changes the threshold for this core function. So here, picking the number of outliers in advance is not as important. --- class:spacious # Building the forest - Subsample dataset for each tree - Default sample size of 256 works surprisingly well - Stop growing tree at depth log_2(sample size) – so 8 - No bootstrapping - More trees are better – default 100 - Need to specify contamination rate ??? It has no parameters, it’s quite simple to do this. So what we're doing is actually we subsample the dataset for each tree and we picked 256 samples. The default value of 256 samples always works, no matter what the dataset size is. And we stopped growing the tree at depth log_2 (sample size), which is 8. So you repeatedly draw, without replacement, 256 samples from your data and grow trees of depth 8 and then you look at the average path length to isolate a point. Obviously, as with all random forest, more trees are better but the default in scikit-learn is 100. In principle, these are free parameters of the algorithm, like, how much to subsample for each tree, and how to prune each tree. But people don't tune these parameters and it just works well. The contamination rate only picks the threshold on this final score. FIXME all the text --- .center[![:scale 90%](images/building_forest_1.png)] ??? Here is what the algorithm produces and it worked as good as I thought. Remember, this is a toy dataset. It doesn't really tell you that much about how works in the real world. --- .center[![:scale 90%](images/building_forest_2.png)] ??? Here, I plotted the score for each data point. You could do this for data models too. Here, since it’s tree-based, it’s not nice and smooth as it is for support vector machine or the KDE. I didn't have to tune any kernel bandwidth or anything and so that's kind of nice. Again, it also depends on what your assumptions are about outliers. This will not work very well for the homework. And you can think about why this does not work very well from your homework. --- class:spacious # Other density based-models - PCA - GMMs - Robust PCA (not in sklearn :-() - Any other probabilistic model - “robust” is better. ??? You can use other density based models. You can use just PCA which is also like a higher dimensional Gaussian model in some sense, where you drop some of the directions. You can use GMMs. There’s a robust variant of PCA that is, unfortunately, not on scikit-learn. You can use any probabilistic model that you want. But you need to think about if the model is appropriate for the data that you’re trying to model. And if you expect there's a lot of outliers in your training dataset already, then you might need to think about how to make the model robust. So PCA is not robust, while robust PCA is robust. And so if you have very big outliers in your dataset, it will skew your PCA results and so that might not work as well. robust only needed for outlier detection, not novelty detection. --- .center[ ![:scale 60%](images/other_density_models_1.png) ] .center[ ![:scale 60%](images/other_density_models_2.png) ] .center[ ![:scale 60%](images/other_density_models_3.png) ] ??? Here is a comparison of the three of the four models that we talked about. So here, we're looking at isolation forest, one class SVM, and robust covariance. Basically, the robots covariance works perfectly for isotropic Gaussian, because that's what it fits. If you have multiple Gaussians it kind of breaks down. So if they're close enough together, maybe it makes sense to model them as joint Gaussian. But if you put them further apart, basically, it will change the covariance shape and so it will have a bad model of your data. So the isolation forest does kind of reasonably well in all cases. I mean, this is a 2D dataset and so it can just find dense regions without a problem. Whereas the one class SVM, gives slightly strange results, probably because it picked some support vectors to cover the data. Ideally, the one class SVM is supposed to be robust to contamination in the training set, but as we can see, it's not that robust to contamination. The one clause SVM might work better when you have a clean training dataset. There's no definition of true outliers, obviously. But here, we have drawn very densely from either one or two Gaussian models, the inliers are white and then we have random uniform over this whole square some outliers. The idea is basically, there's 3 different distribution that the data is drawn from. There's like some Gaussian points and some points that are just uniform. And you want to isolate the very dense points from the uniform that not very dense points. --- class:spacious # Summary - Isolation Forest works great! - Density models are great if they are correct. - Estimating bandwidth can be tricky in the unsupervised setting. - Validation of results often requires manual inspection. ??? As with all unsupervised methods, for outlier detection, validating the model and tuning the parameters are really hard. So the more your model depends on parameters, like the one class SVM depends a lot on parameters, it's just very tricky to do that. As with the clustering, validation often means looking into the data, looking at single data points, why are they outliers and trying to interpret the results. Because if you have two labels, why don't you learn a classifier. One possible approach that I didn’t talk about is if you have a big dataset that's not labeled, you can run an outlier detection algorithm, you can find like 10% most outlier things according to your algorithm, you can confirm manually whether they are outliers or not and then you could run a classifier. It depends a little bit on whether the outliers are all outliers in a similar way or outliers in different ways. So if all your outliers are outliers in a different way, then running a classifier will actually not work. So in that setting, you might actually be better off with an outlier detection method. Even if you have labels, if all of your outliers are outliers in a very different way, it might be better to just build the model off the non-outlier data and then call everything else that’s an outlier instead of trying to learn a classifier. If there's no dense region of outliers, then you can’t learn a classifier for that. --- class: middle # Questions ?


:: com :: sun :: star :: linguistic2 ::
|
| struct DictionaryListEvent |
- Base Hierarchy
DictionaryListEvent
┗ ::com::sun::star::lang::EventObject
|
- Description
- structure representing a dictionary-list event.
This structure is used by the dictionary-list to inform
its listeners about certain events.
Since the dictionary-list is able to collect several single
events before broadcasting them to it's listeners the
integer argument may be a combination (logical or) of several
event types.
If more specific information about the events is requested by a
listener, a sequence of all dictionary-list events since the
last broadcasting will be supplied. Otherwise, that list will
be empty.
- See also
- DictionaryList, XDictionaryListEventListener, ::com::sun::star::lang::EventObject
|
Top of Page
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


Iran vice-president warns of consequences if regional states are involved in unrest
DUBAI (Reuters) - Iranian Vice-President Eshaq Jahangiri on Saturday warned regional countries of unspecified dire consequences if it is proven that they meddled to stoke unrest in Iran, the semi-official news agency Fars reported.
“Some countries in the region should know that they will be not have an easy life in the region if clues are found that show they intervened to create unrest in Iran,” said Jahangiri, quoted by Fars.
Iran has blamed “thugs” linked to exiles and foreign foes - the United States, Israel and Saudi Arabia - for stirring up unrest following hikes in gasoline prices.


Scaling, scrolling, and panning.
UI explained:
- Use Scale X and Scale Y to zoom in the chart. You can scale the chart anisotropically.
- Use Offset X and Offset Y to move the origin of the chart.
- You cannot move the chart outside its boundaries.
- Example: if both scale factors are 1, you cannot move the origin — you should zoom in first.
- After applying scale/offset to the chart, sliders' positions change to reflect actual values.
- When you zoomed in, you can grab chart with mouse and move around (pan).


The audio for this story is currently not available.
Granmaa gyaadn did nais-nais, fol a sogm, milet, an kasaava. Bot di bes a did di banaana dem. Alduo Granmaa did av nof granpikni, mi di nuo anda di kwaiyat se mi a did ar fievarit. Shi mek mi kom a ar yaad aal di taim. Shi tel mi likl siikrit tingz. Bot shi did av wan siikrit we shi no tel mi: which paat shi mek ar banaana dem raip.
Grandma’s garden was wonderful, full of sorghum, millet, and cassava.
But best of all were the bananas.
Although Grandma had many grandchildren, I secretly knew that I was her favourite. She invited me often to her house. She also told me little secrets.
 Wen mi aks ar se a we it fa, di onggl ansa mi get a did, “a mi majik baaskit.” Said a di baaskit, a di nof banaana liif we Granmaa ton uova evritaim. Mi did wel waahn nuo a wa. “We di liif dem fa, Granmaa?” mi aks ar se. Di onggl ansa mi get a did, “Dem a mi majik liif dem.”
One day I saw a big straw basket placed in the sun outside Grandma’s house. When I asked what it was for, the only answer I got was, “It’s my magic basket.”
Next to the basket, there were several banana leaves that Grandma turned from time to time. I was curious. “What are the leaves for, Grandma?” I asked. The only answer I got was, “They are my magic leaves.”
wan dɪɛ mi si wã @big @schraa @baaskit @inna di @son @outsaid a @granmaa ɔus @wen mi @aks aɹ se a @we it @fa di oŋgl̩ ansa mi @get a @did a mi @majik @baaskit @said a di @baaskit a di nof @banana @liif @we @granmaa ton @uova @evritaim mi @did @wel @waahn nuɔ a wa @we di @liif dem @fa @granmaa mi @aks aɹ se di oŋgl̩ ansa mi @get a @did dem a mi @majik @liif dem
It did intrestin fi wach Granmaa, di banaana dem, di banaana liif dem an di big schraa baaskit. Bot Granmaa sen mi go tu mi mada fi go du sopm. “Granmaa, du, mek mi wach we yu a go mek…” “No bi aadiez pikni, du we mi tel yu fi du,” shi se siiros. Mi ron go.
It was so interesting watching Grandma, the bananas, the banana leaves and the big straw basket. But Grandma sent me off to my mother on an errand.
“Grandma, please, let me watch as you prepare…”
“Don’t be stubborn, child, do as you are told,” she insisted. I took off running.
it @did @intrestin fi @wach @granmaa di @banana dem di @banana @liif dem an di @big @schraa @baaskit bot @granmaa @sen mi @go tu mi mada fi @go @du sopm̩ @granmaa @du mek mi @wach @we ju a @go @mekno @bi @aadiez pikni @du @we mi tel ju fi @du @shi se @siiros mi ɹon @go
Wen mi kom bak, Granmaa did a siddong outsaid bot sho neva av no baaskit ar no banaana. “Granmaa, which paat di baaskit de, we aal a di banaana dem de, an we…” Bot di onggl ansa mi get a did, “Dem de inna mi majik plies.” Mi did disapaintid!
When I returned, Grandma was sitting outside but with neither the basket nor the bananas.
“Grandma, where is the basket, where are all the bananas, and where…”
But the only answer I got was, “They are in my magic place.” It was so disappointing!
@wen mi kom @bak @granmaa @did a @siddong @outsaid bot @sho @neva @av @no @baaskit aɹ @no @banana @granmaa @which paːat di @baaskit de @we aːl a di @banana dem de an @we bot di oŋgl̩ ansa mi @get a @did dem de @inna mi @majik plɪɛs mi @did @disapaintid
Tuu die afta dat, Granmaa sen mi inna ar bedruum fi ar waakin stik. Az suuhn az mi uopm di duor, wahn schrang raip banaana smel lik mi. Pan di insaid a di ruum a di Granmaa majik schraa baaskit. It did wel aid wid wahn uol blangkit. Mi lif it op an tek iihn di nais-nais smel.
Two days later, Grandma sent me to fetch her walking stick from her bedroom.
As soon as I opened the door, I was welcomed by the strong smell of ripening bananas. In the inner room was grandma’s big magic straw basket. It was well hidden by an old blanket. I lifted it and sniffed that glorious smell.
tuː dɪɛ afta dat @granmaa @sen mi @inna aɹ @bedruum fi aɹ @waakin @stik @az @suuhn @az mi uɔpm̩ di duɔɹ wã @schrang ɹaɪp @banana @smel lik mi @pan di @insaid a di @ruum a di @granmaa @majik @schraa @baaskit it @did @wel @aid wid wã uɔl @blangkit mi @lif it op an tek ĩː di @nais-nais @smel
Granmaa vais fraitn mi wen shi kaal mi, “We yu a du? Ori op an bring mi stik kom.” Mi ori op an kom out wid ar waakin stik. “We yu a smail bout?” Granmaa aks se. A wen shi aks mi riyalaiz se mi stil did a smail bout ou mi fain out ar majik plies.
Grandma’s voice startled me when she called, “What are you doing? Hurry up and bring me the stick.”
I hurried out with her walking stick. “What are you smiling about?” Grandma asked.
 Wahn wel raip bonch did de de. Afta mi kova di baaskit agen, mi go biyain a di ous an it wan kwik-kwik. A did di swiitis banaana mi eva ties.
The following day when grandma came to visit my mother, I rushed to her house to check the bananas once more.
 I picked one and hid it in my dress. After covering the basket again, I went behind the house and quickly ate it. It was the sweetest banana I had ever tasted.
di @neks dɪɛ @wen @granmaa kom @visit mi mada mi @buolt @go a aɹ jaːd fi @chek di @banana agen wã @wel ɹaɪp @bonch @did de de afta mi @kova di @baaskit agen mi @go bijaɪn a di ɔus an it wan @kwik-kwik a @did di @swiitis @banana mi @eva tɪɛs
Di neks die, wen Granmaa did inna di gyaadn a pik vejitebl, mi sniik go iihn an luk pan di banaana dem. Nieli aal a dem raip.  Mi bieli manij fi aid di banaana dem anda mi frak an waak paas ar.
The following day, when grandma was in the garden picking vegetables, I sneaked in and peered at the bananas.
Nearly all were ripe.
As I tiptoed towards the door, I heard grandma coughing outside.  Granmaa wiek op orli. Shi alwiez kyari raip banaana an kasaava go sel a di maakit.  Bot mi kudn avaid ar fi lang.
The following day was market day. Grandma woke up early. She always took ripe bananas and cassava to sell at the market.
I did not hurry to visit her that day. But I could not avoid her for long.
di @neks dɪɛ a @did maːkit dɪɛ @granmaa @wiek op @orli @shi @alwiez kjaɹi ɹaɪp @banana an kasaːva @go @sel a di maːkit mi @neva @ori op fi @go luk fi aɹ @da dɪɛ de bot mi kudn̩ @avaid aɹ fi laŋ
Lieta inna di iivnin mi mada an faada kaal mi, an Granmaa. Mi did nuo a fi wa. Da nait de az mi lie dong fi sliip, mi nuo se mi kudn tiif agen, no fram granmaa, no fram mi pierens an fi shuor no fram nobadi els.
Later that evening I was called by my mother and father, and Grandma. I knew why.
That night as I lay down to sleep, I knew I could never steal again, not from grandma, not from my parents, and certainly not from anyone else.
lɪɛta @inna di iːvnin mi mada an faːda kaːl mi an @granmaa mi @did nuɔ a fi wa @da naɪt de @az mi @lie doŋ fi sliːp mi nuɔ se mi kudn̩ tiːf agen @not @fram @granmaa @not @fram mi @pierens an fi ʃuɔɹ @not @fram @nobadi @els


--- layout: demo title: Congress Twitter Feed category: demo permalink: /demos/congress-twitter tagline: View a feed of Tweets from congress members. author: name: Nicholas Deas email<EMAIL_ADDRESS>--- The linked site shows a feed of Tweets from Congress members, as used in the Political Tweets Project. Tweets such as these were used create and train attack classifiers and issue classifiers to better understand why messages spread on Twitter.
The site was created using the Django backend framework and is hosted on Google Cloud Platform. The Django backend connects to an IBM databases which constantly retrieves new tweets from Congress members using the Twitter Education API.


Phoenix is the backend that runs the publisher. It has two main parts:
- phoenix-api
provides an object that contains the current status of the publisher overall. It emits events that you can subscribe to so that you can keep the UI updated.
- phoenix-ui
is a sample utilization of the event system in phoenix-api
that updates the publisher frontend.
In order to start using the API, you will need to import the javascript file in your project. From there the Phoenix
object becomes exposed. However, you cannot do much with the API until you “login”. After you have logged in, you then will be able to see more information specifically about the user inside the Phoenix object. For example, you can use Phoenix.artifacts
(after the artifacts have been loaded) to access all of the currently logged in users
Here are a list of the events currently used by the phoenix-api
:
- onLogin
- onLoginSuccess
- onLoginFail
- onArtifactsLoad
this event is sent out after the user has logged in and the aftifacts have been successfully retreived from LibraryD
- onArtifactValidation
called when the validation completes, contains pass/fail information for each artifact field.
- onPublish
called when the publish process is started
- onPublishSuccess
called every time there is any progress happening with a publisher
- onPublishFail
called every time there is any progress happening with a publisher
- onPublishProgress
called every time there is any progress happening with a publisher
- onPublishFee
called when the publish fee is calculated
- onIPFSUploadStart
- onIPFSUploadProgress
- onIPFSUploadSuccess
- onIPFSUploadFail
- onAutosave
called on every autosave (happens every 30 seconds when working on publishing an artifact if anything has changed.)
- onError
called every time an error happens
- onTradebotStart
- onTradebotProgress
- onTradebotSuccess
- onTradebotFail
-
-
-
-
The UI has the following methods in addition to implementing events from the PhoenixAPI event system.
PhoenixUI.generateArtifactJSONFromView(selectorObject) // Pulls from all the available fields on the UI to return just the JSON for the artifact.
PhoenixUI.loadArtifactIntoView(artifactJSON) // Calls the three methods below, you can overwrite any of them in case your UI needs different code.
PhoenixUI.loadArtifactMetadata(artifactJSON)
PhoenixUI.loadArtifactPaymentTable(paymentJSON)
PhoenixUI.loadArtifactFileTable(filesJSON)
PhoenixUI.updateValidationStatus(validationStatus) // Updates the metadata fields based on the results
PhoenixUI.
PhoenixUI.
The API exposes the following methods.
PhoenixAPI.login() // If you attempt to login with blank then it will attempt to load credentials from the HTML5 LocalStorage
PhoenixAPI.login(identifier, password)
PhoenixAPI.login(floPubAddrPrivateKey) // This login method has not yet been implemented, but in the future it would allow you to login just using your wallet private key. Currently Phoenix requires users to use FLO Vault.
PhoenixAPI.setIPFSProvider(host, port, protocol) // formats: {host: 'ipfs.alexandria.io', port: '443', protocol: 'https'}
PhoenixAPI.uploadFilesToIPFS(files[]) // Uploads all the files to IPFS and wraps them in a directory. This method is called by `publishArtifact`
PhoenixAPI.publishArtifact(artifact)
PhoenixAPI.validateArtifact(artifact) // Returns information about if every field is valid, and if not, returns info object on what specifically failed/passed the validation.
PhoenixAPI.calculatePublishFee(artifact)
PhoenixAPI.resumePublisherQueue()
PhoenixAPI.pausePublisherQueue() // This entirely pauses all uploads/other.


| 002:193 Khan | : |
And fight them until there is no more Fitnah (disbelief and worshipping of others along with Allah) and (all and every kind of) worship is for Allah (Alone). But if they cease, let there be no transgression except against Az-Zalimun (the polytheists, and wrong-doers, etc.) |
| 002:193 Maulana | : |
And fight them until there is no persecution, and religion is only for Allah. But if they desist, then there should be no hostility except against the oppressors. |
| 002:193 Pickthal | : |
And fight them until persecution is no more, and religion is for Allah. But if they desist, then let there be no hostility except against wrong-doers. |
| 002:193 Rashad | : |
You may also fight them to eliminate oppression, and to worship GOD freely. If they refrain, you shall not aggress; aggression is permitted only against the aggressors. |
| 002:193 Sarwar | : |
Fight them so that there will be no disbelief in God and God's religion will become dominant. If they change their behavior, there would be no hostility against anyone except the unjust. |
| 002:193 Shakir | : |
And fight with them until there is no persecution, and religion should be only for Allah, but if they desist, then there should be no hostility except against the oppressors. |
| 002:193 Sherali | : |
And fight them until there is no persecution, and religion is professed only for ALLAH. But if they desist, then remember that no hostility is allowed except against the wrongdoers. |
| 002:193 Yusufali | : |
And fight them on until there is no more Tumult or oppression, and there prevail justice and faith in Allah; but if they cease, Let there be no hostility except to those who practise oppression. |
Concepts/Themes Covered: أركان الإسلام > التوحيد > الكافرون > التشدد معهم Pillars of Islam> Islamic> The Disbelievers> Strictness Against them الدعوة إلى الله > حدودها > التشدد مع الكفار المقاتلين The Call for Allah> Its Limits> Strictness with the Fighting Unbelievers الجهاد > الجهاد في سبيل الإسلام > الدعوة إلى الجهاد Jihad> The Call to Jihad>The Call for the Holy War
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


Completo
the procrastination antidote
What do you want to accomplish?
Break it down into smaller steps required to complete your goal


HistoQc
Table
Chart
Image
Current Dataset: reslut.tsv
About
Instruction
Reset
View Results
switch
back
file name
Click to go back to overview


Order received, but there’s one last step!
To complete your transaction, please see one of our friendly customer service representatives at the front of the store to pay for your items and complete the order.
Once you've done that, your items will be in our store in 3 – 5 days, and you'll be notified by phone as soon as they arrive.
Got It!


 Wyatt was born in San Diego, California and this has had no effect upon his overall behaviour.
Seriously.
Andrew
Andrew Halverson is a 15 year old sophomore in high school. He likes to install, uninstall, and break the Arch Linux on his computer, as well as submit the occasional bug fixes to GNOME, and is constantly on the forums for his favorite game of all time, Freelancer. Andrew is the main programmer for the team, and wants to be a Linux SysAdmin when he graduates college.
 He is one of the main builders for the
team, and has done FLL for three years and FTC for two. Zac enjoys tinkering with things, playing video games, and blaring
loud music. He plans on becoming either a mechanical engineer or architect, but he doesn't know for sure yet.
Nathan
Nathan Pomles is a 17 year old junior at CEC. He is on an FRC team and helps coach an FLL team. On both the FRC and FTC teams, he is involved with CAD.
Besides robotics, he likes camping, backpacking, and climbing. His favorite band is Demon Hunter.
He plans to be a mechanical engineer or architect.
Caedyn
Caedyn Skiff is a high-school junior who is in her second year in FTC.  Her main passion is for elephants, and volunteers with the elephants at the Louisville Zoo every
week. She is planning on majoring in either zoology or biology in college.
Amelia
Amelia Winrich is a 16 year old junior at CEC. This is her first year on the team.
Although she's not a future engineer, she enjoys the robot building process. She works on the design aspect of the robot
attachments. Some of the things she has learned on this FTC team is gratious professionalism, CAD design, and teamwork.
Austin
Austin Aldrich is a 15 year old sophomore at CEC. This is his first year in FTC. He was born in Wisconsin, and moved to Louisville when he was nine. He is working on the sweeper/forklift. He likes video games and hanging out with friends.
Hunter
Hunter Lewis is a 14 year old freshman at CEC. He is on his first year of FTC. He has done FLL for three years and was an honorary member
of the FTC team last year. He is a programmer and builder on the team. He likes to swim and dreams of working at SpaceX.


Laura Whitmore reveals inspiration behind screenwriting debut
Laura Whitmore has said she wanted to use her screenwriting debut to tackle the pressure people put on themselves to have a perfect life.
The TV star has written and stars in the short film Sadhbh, about a young mother who is struggling with life but putting on a mask for the rest of the world, which will screen at the Irish Film Festival London.
The 34-year-old told the PA news agency: “I have a lot of friends who have kids now and, even without kids, you’re kind of trying to have a perfect life, or what you think life should be, and what you think you should be able to cope with.”
She added: “Every interview I was doing, social media would constantly come up, not even with people in the public eye.
“We talk about press and media and paparazzi but I think everyone deals with elements of that now because of social media, we are constantly comparing ourselves, constantly feeling like we are not good enough and struggling with who we are and what we should be, so it kind of came from that a little bit.”
She continued: “It is hard, you have to realise whatever you’re feeling, everyone else is feeling as well, no matter who you are.
“Everyone is comparing, even the person who looks like they are living the best life, they are looking at someone else going ‘Oh, I should be doing that’.
Whitmore described the short film as her “passion project” and admitted she did not think anyone would ever see it.
She said: “When I did it, I didn’t really tell anyone, so even my friends were like ‘Hold on, when did this happen and when did you do that?’
“I was like ‘You know the time I disappeared a little bit, at the beginning of the year, and I had red hair? That is what happened.’
“It wasn’t even a secret film but I didn’t Instagram it, so that is secret, isn’t it?”
Discussing the decision to take on the lead role of Claire, the Irish broadcaster and actress said: “You kind of wonder when you play a role, will people go ‘Oh, is that part of you?’
“The part I play is very different to me but based on a few people that I know and different things that I’ve seen.”
The Irish Film Festival runs from November 20 to 24 at The Regent Street Cinema.
Sadhbh will be screened on November 22.


T-REX 64
The jumping dino game for Commodore 64.
Help this little green monster in reaching the end of each level. Avoid deadly obstacles such as cactuses, birds, snakes and scorpios. Don't even ask why she is constantly running.
The game is available at Itch.io:
Download preview (PAL Only)
Instructions
Jump or duck to avoid obstacles. Any contact is deadly and decrements your precious spare life amount.
Title screen options
- F1 - game control method; joystick port 2 or keyboard.
- F3 - ingame music or just SFX.
- F5 - selection of starting level.
Start the game with either FIRE or SPACE key press.
Game controls
- Joystick: up or fire - jump; down - duck.
- Keyboard: SPACE - jump, CBM key - duck.
Running the game
Easiest way to run the game on PC is to use Vice emulator to run PRG executable:
x64 rex.prg
Use D64 image to run T-Rex on real Commodore 64. Copy the file to the USB drive / SD card and use it with Ultimate 1541 or SD2EIC. Once mounted, the game can be loaded simply by:
LOAD"*",8
RUN
For really classy experience you can also transfer D64 directly into 5.25 floppy disk and run it from 1541.
Building from sources
You need JDK (Java) 11 or higher in order to build T-Rex from sources. Checkout sources from GitHub, enter the project directory and execute from command line:
gradlew build
Assembled PRG and D64 files can be found in src
directory.
Authors
- Maciek (code, music, gfx)
- Zuza (gfx, level design)
- Ola (gfz, level design)
Acknowledges
T-Rex project uses KickAssembler, Charpad, Spritepad, GoatTracker2 and Retro Assembler gradle plugin for build automation.
I (Maciek) would like to thank to Paul Hocker for his KickAssembler plugin for Visual Studio Code.
Big thanks to Skoe: The EasyFlash3 makes the cross development process neat due to Easy Transfer software and PRG execution directly on real Commodore machines.
GDPR - privacy policy
This page is hosted on GitHub/GitHub Pages.
GitHub, as any other hosting company, can have full insight in visitor data, like connecting IP addresses, visited pages, etc. Note that Github is not known to actively profile visitors. By using a VPN you can (try to) prevent this.
Google Analytics
This website uses Google Analytics. This happens only if you accept third party cookies. I have configured Google Analytics so that IP addresses are anonymized.
Use the following option to grant or revoke collecting data and using cookies.
Enable Google Analytics
© 2020-2021 The Lockdown Studio


{% extends "wagtailadmin/base.html" %} {% load wagtailimages_tags %} {% load i18n %} {% block titletag %}{% trans "Cannot delete image" %}{% endblock %} {% block content %} {% trans "Canot delete image" as del_str %} {% include "wagtailadmin/shared/header.html" with title=del_str icon="image" %}
{% trans "This image cannot be removed because it is used by the following content items." %}
{% for model_meta, instances in dependants.items %}


Home
About
Fruits
Vegetables
My Basket
MY Account
FRUITS
Apple
Apple
Rs 100 per Kg
Add To Cart
Banana
Banana
Rs 30 per Kg
Add To Cart
Black Currant
Black Currant
Rs 120 per Kg
Add To Cart
Custard Apple
Custard Apple
Rs 50 per Kg
Add To Cart
Grapes
Grapes
Rs 70 per Kg
Add To Cart
Guava
Guava
Rs 50 per Kg
Add To Cart
Mango
Mango
Rs 60 per Kg
Add To Cart
Orange
Orange
Rs 60 per Kg
Add To Cart


%%Member_Busname%%
%%Member_Addr%% %%Member_City%%, %%Member_State%%, %%Member_PostalCode%%, %%Member_Country%%
Copyright © %%=v(FormatDate(Now(),"YYYY"))=%% SDSU Global Campus - All Rights Reserved
Update Communication Preferences |
Unsubscribe


Welcome to the New Crisis game. Choose your faction.
Sadducees
Rome-supported authority
Wanted to maintain status quo.
Objective:
Don't say anything bad about the Romans.
Pharisses
Reformists, wandering teachers
Wanted to reinterpret Judaism to be more modern.
Objective:
Gain followers; avoid Roman gov't
Monastics
Religious communists
Wanted to self-purify to prepare for divine liberation.
Objective:
Gain 50+ Prayer Points
Zealots
Rebels!
Wanted to violently resist Roman control.
Objective:
Defeat Romans in battle


This page has been replaced
The replacement page is IEEE-754 Analyzer
What’s Here
- Enter decimal numbers and see the hexadecimal values of its single and double precision floating-point representations.
- Enter a 32-bit value in hexadecimal and see it analyzed as a single-precision floating-point value.
- Enter a 64-bit value in hexadecimal and see it analyzed as a single-precision floating-point value.
- Some reference material on the IEEE-754 Floating Point Standard.


Validator 1.3.0 Release Notes
The main aspects of this release are:
- This is a maintenance release which includes a number of bug fixes
since the last release. See the Changes Report for full details.
- Introduction of new date, time and number validators - see the
Routines Package JavaDocs for more details.


[1]
only oddity was the choice of vinyl-record placemats.
[2]
something was fine with good staff and a good choice of food.


DataONE is a collaboration among many partner organizations, and is funded by the US National Science Foundation (NSF) under a Cooperative Agreement. Acknowledgement: This material is based upon work supported by the National Science Foundation under Grant Numbers 0830944 and 1430508. Disclaimer: Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.


the authors make a point about the need for a functional approach to beauty, seeking to re-assert it from a philosophical perspective.
in classical western philosophy, socrates says that beauty is being well adapted to some end: fitness is only one kind of beauty among others. it is about looking fit for function, rather than being fit for function (and not just about a sense of harmony in proportions). it is about not making too sharp a distinction between senses and reason.
for hume, the feeling of beauty arises when we perceive an object (what kind of object is software??) that we know to serve a useful purpose, or that raises in us an idea of utility -> beauty is produced by an object conveying the idea of some benefit or utility, not just by appearing fit. thus, the observer has to be aware of the function.
ref:
and then burke and kant show up with the idea of the sublime, of disinterestedness (really, fitness is not the only sort of beauty, but it can conjugate with other forms of beauty -> all the names of god, montfort). kant also says that beauty is separate from reason. according to kant, the pure judgment of taste “affords absolutely no cognition (not even a confused one) of the object”. nonetheless, one must know the end of the object to be able to emit a judgment about its perfection -> this is adherent beauty (function is not a source of beauty, but a constraint on it, or beauty is merely aligned with the function) (p.24)
function and beauty as congruent
one of the question is: given we cannot always know the function, a priori, does learning about the function alter our perception? aka create aesthetic pleasure.
as a response to the autonomy of art: code can hardly be separated from what it does
ref: benedetto croce, aesthetic: a science of expression and general linguistic: he defines beauty in terms of expression, by which he means a particular mental process which results in a clear, distinct and particular idea.
the decline of disinterestedness and the rise of cultural theories of appreciation. these cultural theories are cognitively rich insofar as they also depend on knowledge about the object of appreciation to be an essential component of its appropriate identification and appreciation. this sets the stage for more knowledge in aesthetic appreciation. for instance, in the appreciation of nature, there is a thing called “scientific cognitivism” in which the appreciation of the beauty of nature varies with knowledge of its function.
overall, there is a disdain for functional things as objects of aesthetic inquiry
louis sullivan, modernism -> architecture must be ‘sincere’, ‘honest’, ‘authentic’ (in functional beauty) in architecture, functionalism is inherently good, valuable (even though the function of a building is often contested)
problem of translation: how does awareness of function alter or influence aesthetic judgment? if something is functionally beautiful, something about its function should translate in its appearance (shifts in priorities and attention?). syntax highlighting semantics? how is function translated in form? perhaps in affordance. why is the arch looking better at holding than, say a scaffoding? (i’d say because less material, less space taken) finally, it is also about the fact that we are aware that the object is signalling that our needs are going to be met by its function. (it looks nice cause we know it’s going to do the job well)
problem of indeterminacy: how do we know what the function of an object is? they say it depends not on the designer but on “the market” (aka the designation of function by broad masses, p.68). psychologically, we decide what the function is, how it fits our purpose. but normatively, it is a bit more complex to define the one true function. socrates comes back and says that yes, functional beauty can be relative, that’s fine.
important: comprehensiveness is a virtue in aesthetic theory
code has a specific function, computing, dictated by its medium. but it also has different application domains. function related to effectiveness (is it bug-free?)
it lifts function from the exclusive realm of intention, and into the broader realm of use.
definition i like:
an artefact function is any role played by an artefact in a use plan that is justified and communicated to prospective users (w.n. houkes, p.e. vermaas, action versus function: a plea for an alternative metaphysics of artefacts)
-> aka intention + effects, highghlighting that there are some functions that are more “proper” than others.
this also relates to hacking, détournement de la fonction
reflective equilibrium rawls and goodman on how to balance intuition with inquisition
how does knowledge of function affect form perception?
by employing a category in perceiving an artwork, then, we implicitly impose a kind of structure upon its various perceptual qualities.
understanding the function of an object could mean
according to Best, functional entities appear graceful when they are free of features that are extraneous, or irrelevant in relation to their function.
it becomes obvious that, if we were to look at the same object with a different functional framework, it would look different.
appearing economical or efficient (more unified), is a matter of degree, rather than kind.
there is also visual tension: the fact that an object might not look the part, but actually is doing such part (example of the graceful but powerful crane)
john hospers:
we enjoy not merely the black and shininess of the automobile, but also these surfaces and forms as expressing life-values, adaptation to certain life-purposes
the above ^ means that adaptation of purpose is a legitimate object of aesthetic experience.
shift of the definition of beauty:
[…] we are describing a pleasure that is not grounded in the look or appearance of the object, but in something else, and ‘beauty’ means no more than good, or excellent. (p.103)
because things can be gratifying and pleasurable, on other grounds than aesthetic ones! (example of swiss watch shows we can take pleasure merely in the perception of a thing looking fit)
and let us not forget the aesthetics of dysfunction!
buildings, like people and nature, are more than their surface, consisting of much that is not revealed, and actually obscured by their sensuous surfaces (that’s actually the challenge/double edged sword). there is an ethical problem in that, because, while art mystifies, things that are functional have a bigger/worst consequence when they mystify (cf. geoff scott)
as gordon graham puts it, the goal of architecture is not simply to design buildings, but to ‘create a conception of living’. the modernists thought of function as engineering function: airflow, heat exchange, etc., rather than that of the occupants, such as eating, sleeping, etc.
re: problem of indeterminacy. the changes in proper function of a building takes place only as our collective behaviour changes over time.
re: problem of translation: experience teaches us that many forms can equally fit a given function; there are multiple ways for function to translate into perceptible form. (it’s not about picking one form, but about highlighting these multiple ones). there are also ways you can change form and not affect function (or detract, actually)
the style of a building should so correspond its use that the public can at once grasp the purpose for which it was erected. pugin, contrasts: a parallel between noble edifices.
gordon graham uses the example of the gothic spires, which reach into the heavens, as an expression of function through form.
these translations of function into appearance are:
functional beauty accords:
things are functionally beautiful where their perceptual appearances are altered by our knowledge of their function
(ruins can charm the eye, but not awe the mind)


|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |
| Packages that use org.apache.ecs.vxml | |
| org.apache.ecs.vxml |
Classes in org.apache.ecs.vxml used by org.apache.ecs.vxml| Assign
|
This class implements the assign element Audio
|
This class implements the audio element Block
|
This class implements the block element Break
|
This class implements the break element Catch
|
This class implements the catch element Choice
|
This class implements the choice element Clear
|
This class implements the clear element Div
|
This class implements the div element Dtmf
|
This class implements the dtmf element Elseif
|
This class implements the elseif element Emp
|
This class implements the emp element Field
|
This class implements the field element Filled
|
This class implements the filled element Form
|
This class implements the form element Goto
|
This class implements the goto element Grammar
|
This class implements the grammar element If
|
This class implements the if element Initial
|
This class implements the initial element Link
|
This class implements the link element Menu
|
This class implements the menu element Meta
|
This class implements the meta element Nomatch
|
This class implements the nomatch element Object
|
This class implements the object element Option
|
This class implements the option element Param
|
This class implements the param element Prompt
|
This class implements the prompt element Property
|
This class implements the property element Pros
|
This class implements the pros element Record
|
This class implements the record element Return
|
This class implements the return element Sayas
|
This class implements the sayas element Script
|
This class implements the script element Subdialog
|
This class implements the subdialog element Submit
|
This class implements the submit element Throw
|
This class implements the throw element Transfer
|
This class implements the transfer element Value
|
This class implements the value element Var
|
This class implements the var element Vxml
|
This class implements the vxml element VXMLElement
|
This class creates a generic <> tag. |
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |


I'm A Celebrity's John Barrowman throws shade at Adele Roberts over 'Jane Gate'
John Barrowman has thrown shade at Adele Roberts on I’m A Celebrity…Get Me Out Of Here as he claims we are starting to see her ‘true colours’.
The former campmate appeared on the Extra Camp sofa with Alison Hammond as they discussed ‘Jane Gate’.
Roman Kemp and Adele Roberts had the first clash of the series over the iconic Jane McDonald photo, which Adele brought in as her luxury item.
Alison started by telling Emily Atack and Joel Dommett that taking a photo of Jane into the jungle was ‘random’.
‘It’s a bit awks,’ Alison began.
‘It was random and he was just stating a fact maybe she is embarrassed or maybe she has been caught out a little bit.’
John Barrowman, who is not one to hold back accused Adele of bringing the photo in ‘to get a vote from a certain community’.
Advertisement Advertisement
He continued: ‘She has been caught out a little bit because she used the word prejudice, and he was just a young man asking a question.
‘If you brought a picture of Jane McDonald on you should probably know the songs she sang.
‘She probably brought it on to get a vote from a certain community and it’s all backfired on her a little bit, I think you are seeing her true colours right now.’
Roman and Adele had a disagreement when Capital FM DJ made a joke about the Loose Women host, causing his radio DJ rival to get offended by his critique.
Talking together in the main camp, Kate Garraway and Roman are talking about the picture, which Adele brought in as her ‘luxury item’.
While Adele’s girlfriend Kate Holderness has since cleared up why she brought in the framed photo, the campmates where nonethewiser.
But Kate saw the plus side, as Kate asked: ‘Jane McDonald is looking over us, can you think of a song of hers?’
Admitting she didn’t know any, Adele said: ‘I know her off Loose Women, I don’t know her actual songs but I know her from the cruising show when she does covers.’
Advertisement Advertisement
Adele then feels cornered by Myles and Roman who laugh at her, with Roman declared: ‘No one knows what she does.’
As Kate backed up Adele and Jane, Roman put her on the spot, and asked her: ‘She’s a legend is she? Name a song?’
I’m A Celebrity… Get Me Out Of Here! airs weekdays at 9pm on ITV.
Got a showbiz story?
If you've got a story, video or pictures get in touch with the Metro.co.uk Entertainment team by emailing us<EMAIL_ADDRESS>calling 020 3615 2145 or by visiting our Submit Stuff page - we'd love to hear from you.


Totally Trivial Trivia
Start
Time Remaining:
120
Done
All Done!
Correct Answers:
0
Incorrect Answers:
0
Unanswered:
0


Gemma Collins ‘axes plans to release Christmas single with producer pal'
She's too busy to complete it!
by Nancy BrownIt's been reported that former TOWIE star Gemma Collins won't be hitting the charts any time soon.
The Diva Forever star has apparently pulled out of the race to the Christmas number one after axing plans to release a festive single.
Gemma had been due to team up with producer Naughty Boy on the track Come Home.
The song was reportedly inspired by her on/off romance with boyfriend James Argent.
It came about after Gemma met Naughty Boy at the BRIT Awards back in February.
Read more: X Factor favourites JLS set to "reunite for a comeback tour"
At the time, the producer told The Sun of Gemma's vocal prowess: "She was born to sing."
He added: "I think Gemma is going to have one of the biggest songs of the year. I can say that with my hand on my heart."
Now, however, it's been reported that the track has been put on the back burner due to the stars' busy schedules.
Read more: Strictly stars share an epic selfie as they get ready for Blackpool
The Sun reports: "The project has been put on ice until they find time in their schedules to complete it."
Rumours of Gemma making it as a pop star started to emerge last Christmas, when she appeared on BBC One's All Together Now.
Gemma wowed viewers with her impressive rendition of Dame Shirley Bassey's Big Spender.
However, it appears this year fans of the GC will instead have to watch her lace up her skates as she returns for the Dancing On Ice Christmas special.
Head to our Facebook page @EntertainmentDailyFix and let us know what you think of our story.


Example of creating Modals with Twitter Bootstrap
×
This is a Modal Heading
Text in a modal
You can add some text here.
Launch demo modal


public abstract class Model
extends java.lang.Object
An abstract class for implementation by BoardModel
and
ViewModel
to inherit from.
This Abstract Model class has both ViewModel
and
BoardModel
inherit from it. By doing this, it saves a lot of
time with repeat coding as both of the classed use very similar methods in
the way they work.
As an Abstract class, both classes can use the same methods and fields as this class that they similarly share, while also having their own methods.
I did not require any abstract methods as all the methods were either identical or completely different to one another.
| Modifier and Type | Field and Description |
|---|---|
protected int |
frameNo |
protected char[][] |
grid |
protected static int |
MAX_RGB_VALUE |
protected java.util.ArrayList<char[][]> |
projectFrames |
protected int |
projectSize |
| Constructor and Description |
|---|
Model()
First constructor is blank for
ViewModel . |
Model(int rows,
int columns)
Constructor creates a new
grid using
newGrid(int, int, MyColor, char) . |
| Modifier and Type | Method and Description |
|---|---|
void |
clear(char c)
Doesn't necessarily 'clear' but fills the
grid with a single
particular MyColor char . |
char |
getColor(int row,
int column)
Returns the character at the position in the
grid requested. |
int |
getFrameNo()
Returns the
frameNo , referring to what place in the
animation sequence the current grid is. |
int |
getGridDimensions()
Returns the amount of characters along a single side of a
grid . |
int |
getTotalFrames()
Returns the total amount of frames held within
projectFrames ArrayList , minus 1 to not include the buffer. |
void |
newGrid(int rows,
int columns,
MyColor passedColor)
Creates a new
grid based on the current project size (or new
size) and with whatever colour requested by the call. |
void |
nextFrame()
Jumps to the next frame in the sequence (supposing there are more after
the current).
|
void |
openFile(java.io.File file)
Opens a
File based on one chosen by
JFileChooser in SuiteDirector/SuitePlayer . |
void |
populate(MyColor color)
Passes the requested colour onto
clear(char) in
char form. |
void |
previousFrame()
Changes the active display to the
grid previous to the
current active (if there is one). |
protected char[][] grid
protected java.util.ArrayList<char[][]> projectFrames
protected int frameNo
protected int projectSize
protected static final int MAX_RGB_VALUE
public Model()
First constructor is blank for ViewModel
.
public Model(int rows, int columns)
Constructor creates a new grid
using
newGrid(int, int, MyColor, char)
.
The constructor takes parameters for the size of the grid. The default is 30. Other sizes are determined by imported files and users.
Once the rows/columns for this particular project are stored, a new
grid
based on it is created, using these dimensions and
passing the RGB code for black with the character 'Z' (Which refers to
'Blank', 'Clear' or what the user will believe to be 'White').
If the input is somehow less than 1 or greater than 100, the parameters will be ignored and set as 30 instead. This scenario should not happen.
rows
- Amount of rows of project.columns
- Amount of columns of project.public final void newGrid(int rows, int columns, MyColor passedColor)
Creates a new grid
based on the current project size (or new
size) and with whatever colour requested by the call.
When creating a new grid
, we add two extra elements to the
desired size of the array. This is to make later calculations easier by
adding 'buffer' zones around the edges of our grid
.
These buffer zones are to stop NullPointerException
s by
searches.
After creating a new 2D char
array and setting it as the
active grid
the method calls populate(MyColor)
to fill it with the requested colour, then adds it into the
ArrayList
that holds all of the current project's frames.
If the amount of frames stored is currently less than two, another grid
(a copy of the first) is added to the ArrayList
in order to
give the application a 'buffer'. This is required in order for the
application to not commit JRE suicide if a user tries to remove a frame
later.
rows
- Amount of rows for the new grid
.columns
- Amount of columns for the new grid
.passedColor
- The colour to be used to fill the new grid
with.public final void populate(MyColor color)
Passes the requested colour onto clear(char)
in
char
form.
color
- A MyColor
to get the char
from in
order to correctly fill the grid with the requested colour.public final void clear(char c)
Doesn't necessarily 'clear' but fills the grid
with a single
particular MyColor char
.
Fills every space in the grid
/every element in the array
with the passed character. This works for Clear, Fill Grid with
Left/Right color and creating new grid
s.
If the character passed is somehow out of the bounds of what my custom 36 character set uses, the method will instead use 'Z' for blank/white.
c
- MyColor
character representation to fill all
elements of the grid
array.public final char getColor(int row, int column)
Returns the character at the position in the grid
requested.
row
- Location in rows.column
- Location in columns.public final void openFile(java.io.File file)
Opens a File
based on one chosen by
JFileChooser
in SuiteDirector/SuitePlayer
.
The method reads the file and takes the first two integers (on separate
lines) as the amount of frames (grid
s) in the project and
the amount of squares per row/column.
After clearing out any currently opened project from the
ArrayList
the method runs through a number of
for
loops which translate to the amount of frames in the
project, get the lines of rows, one by one, and add them correctly to the
array.
The current active grid
is set to the first in the sequence
of the opened project.
file
- A File
the user selected from
JFileChooser
.public final void nextFrame()
Jumps to the next frame in the sequence (supposing there are more after the current).
nextFrame()
checks to see if the next frame is earlier in
the animation than the very last frame. If it is, then that is set as the
new active grid
. The frameNo
field is then
updated, in order to reflect this change to the rest of the application
the user.
public final void previousFrame()
Changes the active display to the grid
previous to the
current active (if there is one).
The final part of this method is the same as the nextFrame()
method above, except with '-' rather than '+'.
The difference lies in that it requires an if statement to start with in order to correctly function within the application.
The algorithm for the extra code runs simply: "Before changing to the previous frame, check if the active frame is the last frame in the sequence. If yes then add this frame to the ArrayList/animation at the frame number it should be registered to, then remove the frame above this frame (to stop frame duplication in the sequence)."
The reason for this is similar to the way that the
newFrame()
(in SuiteDirector
works, whereby
when a frame is added by newFrame()
, it is not currently
saved in the ArrayList
until another new frame is added
ahead of it. Therefore, if the last frame were not added to
ArrayList
before the previous grid
was copied
over to the active frame display, it would be lost/the display would be
replaced with another frame (usually the first frame in the animation).
This if
statement ensures that the final frame in the
sequence is not lost.
This extra bit of code is not required for nextFrame()
as it
will not let you skip past the last frame and all previous frames have
already been added into the ArrayList
.
public final int getFrameNo()
Returns the frameNo
, referring to what place in the
animation sequence the current grid
is.
grid
position in terms of the
animation order sequence.public final int getTotalFrames()
Returns the total amount of frames held within
projectFrames ArrayList
, minus 1 to not include the buffer.
public final int getGridDimensions()
Returns the amount of characters along a single side of a
grid
.


Diego Costa to need surgery
by BeSoccerAfter several weeks of tests, Diego Costa now knows that he will need surgery. According to 'Marca', the Atlético striker will have an operation on Thursday in Madrid for his cervical disc herniation.
Confirmed: Diego Costa will need an operation. The Atlético striker, who went to Brazil to consult a trusted doctor, has now returned to Madrid with the final decision: he will need surgery to solve his cervical disc herniation, according to 'Marca'.
The Atlético striker will go to the Clínica Centro in Madrid on Thursday and is estimated to be out for 3 months. With the return date set for February, Costa should be back in time for the last 16 of the Champions League (all going well).
Atlético announced on 14th November that Diego Costa suffered a cervical herniation. Since then, the striker has been seen by several people to get a diagnosis and precise treatment. Finally, he went to Brazil and they have determined he needs surgery.
Featured links
- BREAKING NEWS: Mourinho replaces Pochettino at Tottenham
- The latest football transfers news and rumours
- Wales, golf, Madrid... in that order
- Luis Enrique returns to Spain national team
This setback is another injury in his career. The discal herniation operation will be his 2nd important operation in less than a year, as on 4th December 2018 he had to get a toe operation.
Injuries have plagued Costa since his return to Atlético Madrid. A multitude of injuries, with the culmination of operations, have prevented the forward from playing the same as he did to help Simeone's side win the league in 2014.