class: center, middle ### W4995 Applied Machine Learning # Imputation and Feature Selection 02/12/18 Andreas C. Müller ??? Alright, everybody. Today we will talk about Imputation and Feature selection, look to do this in general, and how to do it with scikit-learn. We're also going to look into a couple of other Python libraries that help doing these two things. FIXME random forest code is confusing because I tried to simplify it. Also: we haven't seen those yet?! FIXME mutual information needs better explanation --- class: spacious # Dealing with missing values - Missing values can be encoded in many ways - Numpy has no standard format for it (often np.NaN) - pandas does - Sometimes: 999, ???, ?, np.inf, “N/A”, “Unknown“ … - Not discussing “missing output” - that’s semi-supervised learning. - Often missingness is informative! ??? So first we're going to talk about imputation, which means basically dealing with missing values. Before that, we're going to talk about different methods to deal with missing values. The first thing about missing values is that you need to figure out whether your dataset has them and how they encode it. If you're on Python, numpy has no standard way to represent missing values while Pandas does and it's usually nan. But the problem is usually more in the data source. So depending on where your data comes from, missing values might be encoded as anything. They might be differently encoded for different parts of the data set. So if you see some question marks somewhere, it doesn't mean that all missing values are encoded as question marks. There might be different reasons why data is missing. If you look into like theoretical analysis missingness, often there you can see something that's called missing at random or missing completely at random, meaning that data was retracted randomly from the dataset. That's not usually what happens. Usually, if the data is missing, it's missing because something when differently in a process, like someone didn't fill out the form correctly, or someone didn't reply in a survey. And very often the fact that someone didn't reply or that something was not measured is actually informative. Whenever you have missing values, it's often a good idea to keep the information about whether the value was missing or not. If a feature was missing, while we're going to do imputation and we're going to try to fill in the missing values. It's often really useful information that's something was missing and you should record the fact and represent it in the dataset somehow. We're only going to talk about missing input today. You can also have missing values in the outputs that are usually called semi-supervised learning where you have the true target or the true class only for some data points, but not for all of them. So there's the first method which is very obvious. Let's say your data looks like this. All my illustrations today we'll be adding randomness to the iris data set. FIXME: Better digram for feature selection. What are the hypothesises for the tests --- .center[ ![:scale 80%](images/img_1.png) ] ??? So if my dataset looks like something on the left-hand side here, then you can see that there are only missing values in the first feature and it's mostly missing. One of the ways to deal with this is just completely dropped the first feature, and that might be a reasonable thing to do. If there are so few values here that you don't think there's any information in this just drop it I always like to compare everything to a baseline approach. So your baseline approach should be if there's only missing values in some of the columns, just drop these columns, see what happens. You can always iterate and improve on that but that should be the baseline. A little bit trickier situation is that there might be some missing values only for a few rows, the rows are data points. You can kick out these data points and train the model on the rest and that might be fine. There's a bit of a problem with this though, that if you want to make predictions on new data and the data that arrives has missing values you'll not be able to make predictions because you don't have a way to deal with missing values. If you're guaranteed that any new test point that comes in will not have missing values then doing this might make sense. Another issue with dropping the rows with missing values is that if this was related to the actual outcome then it might be that you biased how well you think you're doing. Maybe all the hard data points are the ones that have missing values. And so by excluding them from your training data, you're also excluding them from the validation. So it means you think you're doing very well because you discarded all the hard data points. Discarding data points is a little bit trickier and it depends on your situation. --- .center[ ![:scale 100%](images/img_2.png) ] ??? The other solution is to impute them. So the idea is that you have your training data set, you build some model of the training data set, and then you fill in the missing values using the information from the other rows and columns. And you built a model for this and then you can also apply the same imputation model on the test data set if you want to make predictions. Question is what if it has all missing values? Then you have no choice but drop that. If in the dataset that happens, you need to figure out what you are going to do. Like, if you have a production system, and something comes in with all missing values, you need to decide what you're going to do. But you probably cannot use this data point for training model. You could like use the outputs and train to find the mean outcome of all the values that are missing. --- class: spacious # Imputation Methods - Mean / Median - kNN - Regression models - Probabilistic models ??? So let's talk about the general methods for data imputation. So these are the ones that we are going to talk through. The easiest one is me doing a constant value per column. Imputing the mean or the medium of the column that we're trying to compute. kNN means taking the average of KNearest Neighbors. Regression means I build a regression model from some of the features trying to rip the missing future. And finally, elaborate probabilistic models. They try to build a probabilistic model of the dataset and complete the missing values based on this probabilistic model --- # Baseline: Dropping Columns .smaller[ ```python from sklearn.linear_model import LogisticRegressionCV from sklearn.model_selection import train_test_split, cross_val_score X_train, X_test, y_train, y_test = train_test_split(X_, y, stratify=y) nan_columns = np.any(np.isnan(X_train), axis=0) X_drop_columns = X_train[:, ~nan_columns] scores = cross_val_score(LogisticRegressionCV(v=5), X_drop_columns, y_train, cv=10) np.mean(scores) ``` 0.772 ] ??? Here’s my baseline, which is dropping the columns. I used iris dataset where I had to put some missing values into the second and third column. Here, x_score has like some missing values, I split into test and training test data set and then I drop all columns that have missing values and then I can train logistic regression, which is sort of the model I'm going to use to tell me how well does this imputation work for classification. For my baseline, using a logistic regression model and 10 fold baseline, I get 77.2% accuracy. --- # Mean and Median .center[ ![:scale 100%](images/img_4.png) ] ??? The simplest imputation is mean or medium. Unfortunately, only one is implemented in scikit-learn right now. If this is our dataset, the imputation will look like this. For a column, each missing value is replaced by the mean of the column. The imputer is the only transformer in scikit-learn that can handle missing data. Using the imputer you can specify the strategy, mean or median or constant and then you can call the method transform and that imputes missing values. --- .center[ ![:scale 100%](images/img_5.png) ] ??? Here is a graphical illustration of what does this. So the iris dataset is four-dimensional, and I'm plotting it in two dimensions in which I added missing values. So, there are two other dimensions which had no missing values, which you can't see. The original data set is basically blue points here, orange points here, green points here, and it's relatively easy to separate. But here you can see that the green points they have a lot of missingness, so they were replaced by the mean of the whole dataset. So there are two things about this. One, I kind of lost the class information a lot. Two, the data is now in places where there was no data before, which is not so great. You could do smart things like doing the mean per class, but that's actually not something that I've seen a lot. --- ```python from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScalar nan_columns = np.any(np.isnan(X_train), axis = 0) X_drop_columns = X_train[:,~nan_columns] logreg = make_pipeline(StandardScalar(), LogisticRegression()) scores = cross_val_score(logreg, X_drop_columns, y_train, cv = 10) np.mean(scores) ``` 0.794 ```python mean_pipe = make_pipeline(Imputer(), StandardScalar(), LogisticRegression()) scores = cross_val_score(mean_pipe, X_train, y_train, cv =10) np.mean(scores) ``` 0.729 ??? Here's the comparison of dropping the columns versus doing the mean amputation. We actually see that the mean imputation is worse. In general, if you have very few missing values, it might actually not be so bad and putting in the mean might work. --- class: spacious # KNN Imputation - Find k nearest neighbors that have non-missing values. - Fill in all missing values using the average of the neighbors. - PR in scikit-learn: https://github.com/scikit-learn/scikit-learn/pull/9212 ??? In terms of complexity is using Nearest Neighbors. So the idea is for each data point, we find the kNearest neighbors and then fill in the missing values as the average of the features of these neighbors. The difficulty here is measuring distances if there are missing values. If there are missing values, I can't just compute Euclidean distances. --- # KNN Imputation .smaller[ ```python # Very inefficient didactic implementation distances = np.zeros((X_train.shape[0], X_train.shape[0])) for i, x1 in enumerate(X_train): for j, x2 in enumerate(X_train): dist = (x1 - x2) ** 2 nan_mask = np.isnan(dist) distances[i, j] = dist[~nan_mask].mean() * X_train.shape[1] neighbors = np.argsort(distances, axis=1)[:, 1:] n_neighbors = 3 X_train_knn = X_train.copy() for feature in range(X_train.shape[1]): has_missing_value = np.isnan(X_train[:, feature]) for row in np.where(has_missing_value)[0]: neighbor_features = X_train[neighbors[row], feature] non_nan_neighbors = neighbor_features[~np.isnan(neighbor_features)] X_train_knn[row, feature] = non_nan_neighbors[:n_neighbors].mean() ``` ] ??? So first for nearest neighbors, I need to compute all the distances between all the data points in a training set. The way I do this is I compute element wise differences and square them, then I look at only the ones that are not missing and I compute the sum of all the ones that are not missing divided by the number of the ones that are not missing and multiply it by the number of total features. This is sort of like a mean Euclidean distance. So I re-weighted based on how many features were missing. If there's only one feature that's not missing, I'm just going to take the distance in this feature and multiply it by the number of features. It’s kind of heuristic to make all of them be on sort of the same scale. That seems to work pretty well in practice. Otherwise, if you have fewer features in common, the distances would be smaller, which doesn't really make sense. Now, you have computed some distances between all the data points in the training set. Now I look at the neighbors for each data point and I look at the 3 closest neighbors. I’ll look at all the data points that have missing values, iterate over all features, overall samples and if I have a missing value, I compute the nearest neighbors and when I compute the nearest neighbors, I want to look only at those data points that have the feature not missing because I need to complete a feature, I only need to look at the data points that have the feature that I want to fill in not missing. In this case, 3 nearest neighbors that have the feature not missing and take their average. Important thing is to look at the neighbors that have the feature and then take the K closest ones and complete with the mean. It's a little bit slow because you need to compute all distances between all data points. The question is, am I subtracting nans? I just mask out everything that's not a nans. --- .smaller[ ```python scores = cross_val_score(logreg, X_train_knn, y_train, cv=10) np.mean(scores) ``` ``` 0.849 ``` ] .center[ ![:scale 70%](images/img_9.png) ] ??? --- class: spacious # Model-Driven Imputation - Train regression model for missing values - Possibly iterate: retrain after filling in - Very flexible! ??? The next step up in complexity is using an arbitrary regression model for imputation. I mean, arguably, the kNN is also a regression model, but there's like some intricacies that make it a little bit different. So the idea with using a regression model is you do the first pass and impute data using the mean. And then you try to predict the missing features using a regression model trained on the non-missing features and then you iterate this until stuff doesn't change anymore. You can use any model you like, and this is very flexible, and it can be fast if you have a fast model. --- class: smaller # Model-driven Imputation w RF .smaller[ ```python rf = RandomForestRegressor(n_estimators=100) X_imputed = X_train.copy() for i in range(10): last = X_imputed.copy() for feature in range(X_train.shape[1]): inds_not_f = np.arange(X_train.shape[1]) inds_not_f = inds_not_f[inds_not_f != feature] f_missing = np.isnan(X_train[:, feature]) rf.fit(X_imputed[~f_missing][:, inds_not_f], X_train[~f_missing, feature]) X_imputed[f_missing, feature] = rf.predict( X_imputed[f_missing][:, inds_not_f]) if (np.linalg.norm(last - X_imputed)) < .5: break scores = cross_val_score(logreg, X_imputed, y_train, cv=10) np.mean(scores) ``` 0.855 ] ??? In the example, my regression model is Random Forest, I expect that need to be at most 10 iterations. For each feature that I want to complete, I look at all the other features, suppose it’s feature three and so I'm going to look at the features 0, 1, and 2. I'm going to look at the ones that have feature three not missing, I built the model on the ones that are not missing and I take all the features that are not the feature I want to complete, as my dataset. And as a target, obviously the feature I want to complete. Basically, I just take the subset of the data where I observed the feature and try to predict that feature that I observed from all the rest. Then I can use the prediction of the regression model to fill in these missing values. In the first iteration, I fill them in with the mean and now in each iteration, I built a better model of it, and I try to fill it in a better way using, for example, a random forest. If it doesn't change anymore, or if it doesn't change by much anymore then I stop. This works even better than the nearest neighbors. --- class: spacious # Comparision of Imputation Methods .center[ ![:scale 100%](images/mean_knn_rf_comparison.png) ] ??? Here's a comparison against the iris dataset. --- class: spacious # Fancyimpute - pip install fancyimpute - Has many methods – but no fit-transform paradigm - MICE is iterative and works well often - Try different things in practice, MICE might be best ??? If you want to use any of these or other imputation methods, I think the best solution in Python right now is Fancy Impute. Fancy Impute has a couple of the probabilistic modeling techniques. The problem with this is it doesn't have a fit transform paradigm. And so what I mean by this is it takes a training data, it just fills in the training data. That's a little bit problematic because in Fancy Impute it’s not possible to build the model on the training data and apply the same data on the test data. What you could do is take your whole dataset before you split it into training and test and then use fancy impute on the whole data set. But if you do that you’re cheating and leaking information from the test set into your imputation model, which is not great for evaluation. In particular, it has two models. MICE and soft impute, both are probabilistic models. MICE is the thing that works most often in practice. So that's probably a good default value. It's based on some Bayesian regression model. So it’s similar to the regression model but it takes care of uncertainty and propagates uncertainty during all the iterations and does everything like Bayesian inference. Even though it’s a more complicated model to use, it performs pretty well in practice. --- .center[ ![:scale 60%](images/fancy_impute_comparison.png) ] ??? Soft impute basically does matrix factorization, it does SVD and then uses the matrix factorization to impute missing values, similar to what you would do in recommender systems. The question was, what if the missing values are informative. I usually expect it to be informative. So one way to encode the data is to basically add a separate feature for each feature it has a missing value and it says if the is a feature missing or not. The question is, is this more prune to Huber fitting or do you think it’s more prune to Huber fitting? Possibly, it depends on what model you use for imputation. You mean the imputation model or the model that you apply afterward? The comment was this might create collinearities in the data because you use some features to impute the other features and that’s definitely true. The approach of soft impute is it does a low range approximation basically. This definitely might add dependencies in data that were not before, if you use a non-linear model there’s not going to be collinearities, but there will be dependencies. Will this make your model overfit more? From a machine learning perspective, you should be able to deal with collinearities and you should regularize the model and you should be fine. With feature selection, you should probably do a model selection on your whole pipeline. So you should do a model selection on your imputation strategy together with your model. So it might be but I don't think there's a general answer. So you should just like do cross-validation search over it. And that's usually the answer. The question is when can you use fancy impute? The answer is when you don't care about leaking information from the test set during imputation. --- class: spacious # Applying fancyimpute ```python import fancyimpute mice = fancyimpute.MICE(verbose=0) X_train_fancy_mice = mice.complete(X_train) scores = cross_val_score(logreg, X_train_fancy_mice, y_train, cv=10) scores.mean() ``` 0.866 ??? Using MICE from fancy impute is a pretty good strategy but you might introduce some biased value information from the test set. Here, in this case, doing MICE works pretty well. But you can also see that I did the completion of the whole training data set and then did cross-validation on it afterward. I did the same thing for the others, but for the others, I could actually fix this. If I use fancy impute I can't really fix this because I don't have a transformer, I can put in the pipeline. If you use scikit-learn imputer, you could put it in a pipeline easily and then you can have no issues with leaking information. The question is, can I spot what they're missing this is informative and there might be tests. I'm actually not quite sure. But I think there are tests to show whether it's missing completely random, but the thing that I would always add the features that encode this and then you can look into your model and see does your model use that feature? Like if you have a linear model, and the coefficient for this feature is big, then probably means it was informative. If yours random forest and it relies on this feature, then at least for this model it was informative, that's probably the way I would approach it. - This is allowed for the homework because the current tools make it hard to do the right thing. --- class: center, middle # Feature Selection ??? Alright, so let's talk about automatic feature selection. I want to talk about what methods are there to determine what features are important for your dataset, what features are important for a particular model. --- class: spacious # Why Select Features? - Avoid overfitting (?) - Faster prediction and training - Less storage for model and dataset - More interpretable model ??? There's a couple of reasons why you might want to feature selection. One is to avoid overfitting and get a better model. In practice, I have rarely seen that happen. It's not usually what I would try to do to increase performance. If I’m only interested in performance I probably would not try to do automatic feature selection unless I think only a very small subset of my feature is actually important. There's a lot of increasing performance just by selecting only important features. What I think is more commonly, the reason to do automatic feature selection is you want to shrink your model to make faster predictions, to train your model faster, to store fewer data and possibly to collect fewer data. If you're collecting the data or to feature from some online process, maybe it means you need fewer features, you need to store less information. I think actually the top reason to do feature selection is to have a more interpretable model. If your model is smaller, if your model has 5 features instead of 500, it's probably much easier for you to grasp what the model does. If you can have a model that is as good with way fewer features, it will be much easier to explain and most people will be happy with it. --- class: spacious # Types of Feature Selection - Unsupervised vs Supervised - Univariate vs Multivariate - Model based or not ??? There's a couple of different types of feature selection that I want to talk about. You can have supervised and unsupervised feature selection. Depending on whether you consider the target or not. You can have Univariate versus Multivariate feature selection. Whereas Univariate looks at each feature at a time and determines if it’s important. Multivariate looks at interactions as well. And you can have a feature selection based on a particular machine learning model or not. --- class: spacious # Unsupervised Feature Selection - May discard important information - Variance-based: 0 variance or few unique values - Covariance-based: remove correlated features - PCA: remove linear subspaces ??? So the simpler thing that you might try is to do unsupervised feature selection which means just discard some features based on the statistics. For example, you could remove features that are mostly constant or that have zero variance. Like if they're always constant, then definitely they're not going to help you and you can remove them. If they have very small variance, on the other hand, that might only mean the scale of the features is small and you should just re-scale the feature. So just because it has a small variance, it doesn't really mean anything. People often discard covariance features. But maybe just the difference between these two correlated features was the thing that's important for prediction. If you use any unsupervised method, then you don't know what are the things that are actually important are. Similarly, with PCA, it’s not really feature selection, because it doesn't select subsets of the original feature. PCA will always use all original features. But it will remove linear subspaces of the feature space. And again, a lot of people like this to reduce the dimensionality and you will get the same things like a smaller model, maybe not more interpretable. It might be that the information you discarded is just the information that's important. In a covariance sense, just because the data doesn't extend a lot in a particular direction doesn't mean that this direction isn't the most important one for your prediction problem. --- # Covariance .smaller[ ```python from sklearn.preprocessing import scale boston = load_boston() X, y = boston.data, boston.target X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0) X_train_scaled = scale(X_train) cov = np.cov(X_train_scaled, rowvar=False) ``` ] .center[ ![:scale 32%](images/img_17.png) ] ??? Here's what the covariance matrix looks like for the Boston housing data set. The way you could do covariance based feature selection is you look at the features that have the highest covariance and just drop one of them or you could sum over all the features and look at which features most correlated with the other ones and drop that. --- ```python from scipy.cluster import hierarchy order = np.array(hierarchy.dendrogram( hierarchy.ward(cov),no_plot=True)['ivl'], dtype="int") ``` .center[ ![:scale 90%](images/img_19.png) ] ??? So if you look at covariance, it should probably try to sort your features using some clustering. Here I'm using hierarchical clustering from scipy. On the right, it’s the covariance matrix and on the left, it's also the covariance matrix where I reordered the columns and rows. You can see that there are three correlated blocks. You could do this automatically, or you could look at it and see what you think how many features are there, and how many of them are correlated. I really urge you, whenever you look at correlation, never look at correlation without resorting the columns. On the right-hand side here, maybe I can see that these two are correlated, but I can't see anything else. Whereas on the left hand I can see much more clearly what the structure of the data is. What it did just was, it did clustering on the rows and columns to resort them. --- class: center, middle # Supervised Feature Selection ??? --- # Univariate Statistics .smaller[ - Pick statistic, check p-values ! - f_regression, f_classsif, chi2 in scikit-learn ```python from sklearn.feature_selection import f_regression f_values, p_values = f_regression(X, y) ``` ] .center[ ![:scale 60%](images/img_20.png) ] ??? So the simplest way is univariate features selection without models. The most classical one is to use statistical test and see the ones that are significantly related to the target. Depending on whether you look through classification or regression, you can add a t-test, f-test or chi-squared test and you can say which are the features that are significantly related with a target and I'm just going to select these. So this is again here for the Boston housing dataset, using F regression and F test. You can see here F values and the P values and you could use either of them to select a subset of the features. So for example, the number of rooms and LSTAT had very high F values, very small P values. These are certainly the most important features. While this one here doesn't seem very important. One reason why this is not very important is because this is the binary variable and so this assumes linear regression model and the linear regression model is not very good at exploiting the binary variable. This is a super quick test to do. It's very fast, it's probably something you want to look at. But it assumes a linear model, which you might not want to assume. --- .smaller[ ```python from sklearn.feature_selection import SelectKBest, SelectPercentile, SelectFpr from sklearn.linear_model import RidgeCV select = SelectKBest(k=2, score_func=f_regression) select.fit(X_train, y_train) print(X_train.shape) print(select.transform(X_train).shape) ``` ``` (379, 13) (379, 2) ``` ] -- .smaller[ ```python all_features = make_pipeline(StandardScaler(), RidgeCV()) np.mean(cross_val_score(all_features, X_train, y_train, cv=10)) ``` 0.718 ] -- .smaller[ ```python select_2 = make_pipeline(StandardScaler(), SelectKBest(k=2, score_func=f_regression), RidgeCV()) np.mean(cross_val_score(select_2, X_train, y_train, cv=10)) ``` 0.624 ] ??? If you want to use these univariate statistics in scikit-learn there’s a couple of tools to select features based on this. In feature selection, there's a whole bunch of them. There select k best which selects the K best feature, you can specify the number of features you want. Select percentile, which selects a percentile that you want and then there's select FPR, it controls for the false positive rate, it basically does the multiple hypothesis testing adjustments to make sure that you false discovery rate of thinking the features are significantly important is low. These are scikit-learn transformers, you can instantiate them. By default, the parameter they all use a score function for classification. So if you want to do regression, you need to set the score function to F regression because you need different tests for regression classification. I said linear regression is not for binary features, maybe I shouldn't have formulated in that way. Linear regression doesn't allow you to do interactions, which is if you have multiple binary features would be the only issue. It's more sort of that this linear test will not put a lot of emphasis on a binary feature because the way the test works. I can obviously also put this in a pipeline. Here, I’ve used a centered scale for ridge in a pipeline for a Boston housing data set and here, I’ve used two best features. You can see it actually got much worse because two features are not enough to select or to express all the information. --- # Mututal Information ```python from sklearn.feature_selection import mutual_info_regression scores = mutual_info_regression(X_train, y_train, discrete_features=[3]) ``` .center[ ![:scale 90%](images/img_22.png) ] ??? Another univariate statistics that you can use which is a little bit more complicated, which is called Mutual Information. There's a version for regression classification in scikit-learn. This doesn't use a linear model. It uses a non-parametric model using nearest neighbors. So basically, this also works if the interaction is nonlinear and it works on discrete and continuous features, but you have to tell us which features are discrete. So here, in this case, I tell it the feature number three is discrete and then this gives me some scores telling me what's the mutual information between this feature in the target. Here I'm comparing the F values off the standard regression tests with the mutual information and they are sort of similar, but not entirely. If you think there are nonlinear interactions, and you have a model that can capture nonlinear interactions, then doing feature selection like taking these nonlinear features into account is good. This is much more computationally intensive than doing the F statistics. But this is still Univariate, looking at one feature at a time. --- class: spacious #Model-Based Feature Selection - Get best fit for a particular model - Ideally: exhaustive search over all possible combinations - Exhaustive is infeasible (and has multiple testing issues) - Use heuristics in practice. ??? So now let's look at multiple features at a time. Most of the things that look at multiple features at a time are model-based. Usually, model-based feature selection finds the subset of features on which this model performs best. So giving them a particular model like a linear model, or random forest, I want to find a subset of features for which this model performs best in terms of cross-validation performance. Ideally, to do that, I would do an exhaustive search over all possible subsets of the features. But that's like exponentially many. Also, if I do so many models fits I might overfit. So instead, there are several heuristics you can use to basically shrink or grow the sets of features that you're using. So first you fix the model. For models that give you some measure of feature importance, there's a very simple technique which just looks at how important the models feature is. --- # Model based (single fit) .smaller[ - Build a model, select features important to model - Lasso, other linear models, tree-based Models - Multivariate - linear models assume linear relation ] .smaller[ ```python from sklearn.linear_model import LassoCV X_train_scaled = scale(X_train) lasso = LassoCV().fit(X_train_scaled, y_train) print(lasso.coef_) ``` [-0.881 0.951 -0.082 0.59 -1.69 2.639 -0.146 -2.796 1.695 -1.614 -2.133 0.729 -3.615] ] .center[ ![:scale 55%](images/img_23.png) ] ??? Using, say, a linear model, you fit the single model, and you discard all the features that the model doesn't think are important. So this works for linear models really well and for tree-based models. This allows you to take linear interactions into account and with trees it allows you to take arbitrary interactions into account. So for example, I can use lasso, I can fit the lasso on my model, and I can look at the coefficients and the things that have small coefficients are less important in some sense, and so I could discard some of them. Here again, I plot the F values versus the coefficients of lasso. For example, here you can see for this variable, Lasso thinks its way less important than Univariate selection. Maybe because it was explained already by a combination of the other features. So if you have very co-related features Univariate selection will give all of them the same importance whereas lasso will usually pick only one of them. If you have many co-related features lasso picks only one of them at random. So it doesn't mean that other features are not important. Question is what does this purple don't represent? It represents that both the points are overlapping entirely. Here I use lassoCV which means it adjusted the regularization parameter in Lasso to make the optimum predictions. --- # Changing Lasso alpha .smaller[ ```python from sklearn.linear_model import Lasso X_train_scaled = scale(X_train) lasso = Lasso().fit(X_train_scaled, y_train) print(lasso.coef_) ``` [-0. 0. -0. 0. -0. 2.529 -0. -0. -0. -0.228 -1.701 0.132 -3.606] ] .center[ ![:scale 80%](images/img_24.png) ] ??? If I look at the different alpha, it might be quite different. For example here with a default alpha of one, a lot of the coefficients are exactly zero and you can see it would only select five. How to select the alpha in lasso is important for the feature selection and so you might want to grid search. Now, let’s say we want to use this and so we want a scikit-learn estimator that does this. So we can put it in a pipeline. --- class: smaller # SelectFromModel ```python from sklearn.feature_selection import SelectFromModel select_lassocv = SelectFromModel(LassoCV(), threshold=1e-5) select_lassocv.fit(X_train, y_train) print(select_lassocv.transform(X_train).shape) ``` ``` (379,11) ``` -- ```python pipe_lassocv = make_pipeline(StandardScaler(), select_lassocv, RidgeCV()) np.mean(cross_val_score(pipe_lassocv, X_train, y_train, cv=10)) np.mean(cross_val_score(all_features, X_train, y_train, cv=10)) ``` ``` 0.717 0.718 ``` -- ```python # could grid-search alpha in lasso select_lasso = SelectFromModel(Lasso()) pipe_lasso = make_pipeline(StandardScaler(), select_lasso, RidgeCV()) np.mean(cross_val_score(pipe_lasso, X_train, y_train, cv=10)) ``` ``` 0.671 ``` ??? The way to do this SelectFromModel. SelectFromModel is a meta-estimator model that gives you feature importance. So that’s any linear model or tree based model. It uses this to select the features. So this will fit lasso and then if you call transform, it will discard all the features that lasso thought are not important. And you can change the threshold here, for example, so in this case, here I want to discard everything that lasso put to zero so I put a very small threshold in there. I could also set the threshold to be the median which selects 50% of the features. Here we are possibly discarding multiple features at once. SelectFromModel fits a single model, gets the feature importance was from this model and then drops according to the feature importance. And so here is how it looks in the pipeline, for example, you can see here that lasso with these parameters, drop two of the features and 11 after 13 remains. If I put it in a pipeline the performance is about the same. --- class: spacious # Iterative Model-Based Selection - Fit model, find least important feature, remove, iterate. - Or: Start with single feature, find most important feature, add, iterate. ??? But maybe dropping multiple features at once is not a good idea because the importance of the features might change once we dropped some of them. What we can do is, we can iteratively build models. And we could either start with a single feature then add more important ones or we could start with all features and discard some. We'll talk about these two strategies which are slightly different. --- class: spacious # Recursive Feature Elimination - Uses feature importances / coefficients, similar to “SelectFromModel” - Iteratively removes features (one by one or in groups) - Runtime: (n_features - n_feature_to_keep) / stepsize ??? So the next step from what we just saw would be recursive feature elimination. So if we use SelectFromModel it will drop all the unimportant features at once, in a recursive feature elimination usually drops one feature at a time or as a parameter step size it drops step size features at a time. So you fit the model, you discard the least important feature, you fit the model, you discard the important feature and so on until you have as many features left as you want again. Again, this needs the model to meet some measure of feature importance so you can use this with the linear model or tree-based model. An example where you cannot use this is, at least not in scikit-learn is Kernel SVM or neural networks, because they don't really give you a measure of feature importance easily. For each step feature that we remove, we need to train a new model. So this is much more expensive because we need to retrain the model many times, but we're sort of being more careful in how we remove the features. --- .smaller[ ```python from sklearn.linear_model import LinearRegression from sklearn.feature_selection import RFE # create ranking among all features by selecting only one rfe = RFE(LinearRegression(), n_features_to_select=1) rfe.fit(X_train_scaled, y_train) rfe.ranking_ ``` array([ 9, 8, 13, 11, 5, 2, 12, 4, 7, 6, 3, 10, 1]) ] .center[ ![:scale 95%](images/img_27.png) ] ??? This is implemented in RFE, for recursive feature elimination, it works similar to SelectFromModel. To do RFE, then the model that you want to use and then you can specify how many features you want to select. Here I'm comparing the ranking according to RFE. So when it dropped out the features to the linear regression coefficients, which is basically what I would use if I drop them off all at once, and you can see that they're sort of similar. So there's probably not a whole lot of difference, at least in this case. You need to specify how many features you want to select. But if you want to select only one feature, you have to build many models and drop all the other features and so on the way you tried out the model for keeping five features and so on. So if you want a grid search this, doing this independently would be a whole waste of time because they would do the same thing over and over again. --- # RFECV .smaller[ ```python from sklearn.linear_model import LinearRegression from sklearn.feature_selection import RFECV rfe = RFECV(LinearRegression(), cv=10) rfe.fit(X_train_scaled, y_train) print(rfe.support_) print(boston.feature_names[rfe.support_]) ``` ``` [ True True False True True True False True True True True True True] ['CRIM' 'ZN' 'CHAS' 'NOX' 'RM' 'DIS' 'RAD' 'TAX' 'PTRATIO' 'B' 'LSTAT'] ``` ```python pipe_rfe_ridgecv = make_pipeline(StandardScaler(), RFECV(LinearRegression(), cv=10), RidgeCV()) np.mean(cross_val_score(pipe_rfe_ridgecv, X_train, y_train, cv=10)) ``` ``` 0.710 ``` ] ??? So there's a thing called RFECV that allows you to do efficient grid search for the number of features to keep. This basically has built-in cross-validation, provides the number of features to keep. I’ve done RFECVC with linear regression and set it to do 10 fold cross-validation and then it will do the recursive feature elimination inside cross-validation and so it goes down from all features to just having one feature and with cross-validation, it will select the best number. --- .smaller[ ```python pipe_rfe_ridgecv = make_pipeline(StandardScaler(), RFECV(LinearRegression(), cv=10), RidgeCV()) np.mean(cross_val_score(pipe_rfe_ridgecv, X_train, y_train, cv=10)) ``` ``` 0.710 ``` ```python from sklearn.preprocessing import PolynomialFeatures pipe_rfe_ridgecv = make_pipeline(StandardScaler(), PolynomialFeatures(), RFECV(LinearRegression(), cv=10), RidgeCV()) np.mean(cross_val_score(pipe_rfe_ridgecv, X_train, y_train, cv=10)) ``` ``` 0.820 ``` ] ??? If we want to predict with the same model as used for selection, RFECV can be used as the prediction step. Could also use RFECV as transformer and use any other model! --- class: spacious # Wrapper Methods - Can be applied for ANY model! - Shrink / grow feature set by greedy search - Called Forward or Backward selection - Run CV / train-val split per feature - Complexity: n_features * (n_features + 1) / 2 - Implemented in mlxtend ??? So as I set recourse to each elimination. So this is more careful and it requires the model that gives you feature importance. There's sort of more general reprimand sets that are, in a sense, even more careful, but also more expensive, but it can be applied to any model. These are sequential feature selection. The idea is to either start with zero features, and add the most important feature, or start with all features and remove the least important feature at a time. And you do this by not using a feature importance by the model. But actually each step you basically do like one step looking at search. So let's say I started with all the features, I leave out the first feature, build the model and but I don't only build a model, I do cross-validation of the model on the subset so I get some accuracy or R squared value. And I do this for every single feature. So I leave each feature out and look at the cross-validate accuracy. And I dropped the one that gives me the highest cost-validated accuracy. So now basically, this is even more expensive than doing the recursive feature elimination because I do a one step, look ahead. So now the runtime is quadratic in the number of features. Also for each iteration, I not only need to train a single model, I need to do cross-validation. This is like a pretty standard method, because it's like very general, and you can apply it to any model. It's like a brute force search. Right now it's not in scikit-learn, but it's in a package called mlxtend which has a couple other tools. Mlxtend is luckily fully scikit-learn compatible, so you can put it in a pipeline and everything's fine. --- # SequentialFeatureSelector .smaller[ ```python from mlxtend.feature_selection import SequentialFeatureSelector sfs = SequentialFeatureSelector(LinearRegression(), forward=False, k_features=7) sfs.fit(X_train_scaled, y_train) ``` ``` Features: 7/7 ``` ```python print(sfs.k_feature_idx_) print(boston.feature_names[np.array(sfs.k_feature_idx_)]) ``` ``` (1, 4, 5, 7, 9, 10, 12) ['ZN' 'NOX' 'RM' 'DIS' 'TAX' 'PTRATIO' 'LSTAT'] ``` ```python sfs.k_score_ ``` ``` 0.725 ``` ] ??? So from mlxtend, you get feature selection, sequential feature selector, you put into the model, you tell it whether you want to do forward or backward. Forward equal to false means I started with all and I prune features one by one. Forward equal to true means I start with zero features and I use the one that gives me highest accuracy and then I add one by one. As I said with sequential feature selector, you need to specify the number of features and it does internally cross-validation and it optimizes accuracy for classification models and r square for regression models and does this stepwise selection. One thing I should have mentioned if you do feature selection this way, theoretically, you can have a model for feature selection that's different from the model for prediction. In here, if you look at the top for the recursive feature elimination, I use linear regression. But actually, the model I fit in the end was a ridge model. So I could also use, let's say, a tree-based model for feature selection and then the linear model for prediction if I wanted to. It's not entirely clear if that helps or makes sense, but it's sort of an additional degree of freedom. And for example, if I want a very interpretable model, I want my model that does the predictions to be linear so I can explain to my boss what it means. But I can also still do the feature selection using a more complicated model and just tell my boss “Oh, only these features are important and here's how I make the prediction” --- class: center, middle # Questions ? ??? The question is if I do forward method or backward method with the same number of features will the same happen? They both are sort of one step look ahead approximations to trying out all subsets and there's no guarantee we would get the same thing. ---


Methods
addFieldValidator(validatorName, fieldValidator) → {FormValidator}
Stores a reusable field validator for use by rules contained within
this validator.
Parameters:
| Name | Type | Description |
|---|---|---|
validatorName |
string | Name by which to retrieve validators. |
fieldValidator |
function | Field validator to store. |
- Source:
Returns:
- Type
- FormValidator
arrayField(fieldName) → {ArrayField}
Creates an array field if it doesn't exist.
Returns field by its name.
Parameters:
| Name | Type | Description |
|---|---|---|
fieldName |
string | Name of field to create. |
- Source:
Returns:
- Type
- ArrayField
field(fieldName) → {Field}
Retrieves a field by its name.
Parameters:
| Name | Type | Description |
|---|---|---|
fieldName |
string | Name of field to retrieve. |
- Source:
Returns:
- Type
- Field
fieldNames() → {Array.<string>}
Retrieves a list of all field names stored by this validator.
- Source:
Returns:
- Type
- Array.<string>
fieldValidator(validatorName) → {function}
Retrieves a reusable field validator by its name. The validator returned
will retrieve the internal validator upon calling it, allowing rules to
evaluate validators added after the rules were created.
Parameters:
| Name | Type | Description |
|---|---|---|
validatorName |
string | Name of validator to retrieve. |
- Source:
Returns:
- Type
- function
hasFieldValidator(validatorName) → {Boolean}
Checks of the form validator contains a field validator.
Parameters:
| Name | Type | Description |
|---|---|---|
validatorName |
string | Name of validator to retrieve. |
- Source:
Returns:
- Type
- Boolean
validate(form) → {Validation}
Validates all rules on all fields stored in this validation, using only
the reusable validators stored in this validation, against form data
structured as: {
"fieldName": "fieldValue"
}.
Parameters:
| Name | Type | Description |
|---|---|---|
form |
Object | Form data to validate. |
- Source:
Returns:
- Type
- Validation


--- layout: default title: 'Bryan D Martin' ---
I am a PhD candidate in the Department of Statistics
at the University of Washington. My current research is focused on model development for compositional data applied to the
microbiome, advised by
Daniela Witten and
Amy Willis.
More generally, my research objectives emphasize the development of user-friendly, statistically sound, and open-source software that addresses practical scientific challenges and empowers non-statisticians/data scientists to work more directly with their data.
My research is supported by an
NSF Graduate Research Fellowship.
Outside of research, I prioritize statistics education and initiatives related to equity.
My teaching objectives emphasize undergraduate statistics education and teaching statistical literacy and best practices to non-statisticians.
Inside and outside of my teaching, I actively try to leverage my position to advocate for and work towards building more equitable communities and cultures within statistics, as well as STEM and academia more broadly, at all levels.
Before coming to UW, I was an undergraduate at Macalester College
where I received degrees in statistics and economics.


Faith No More hint at return in new cryptic teaser image
The band last played live together in 2016
Faith No More have hinted at an imminent return to action with a cryptic post on social media.
The San Francisco band last played live together in 2016, with frontman Mike Patton admitting on the Full Metal Jackie radio show in September 2017 that Faith No More were taking an “extended break”.
That hiatus now appears to be coming to an end, with the official Faith No More Twitter account making only its fourth post this year on Saturday afternoon (November 23) to share a cryptic new image with the caption “psssst…”.
The image in question sees the eight-pointed Faith No More logo printed over a picture of a snow-capped mountain. No further details have been revealed since that post on Saturday, but fans of the band have been voicing their hopes that this is the beginning of the build-up to a new album release.
Back in November 2018, keyboardist Roddy Bottum revealed in an interview with The Ring, the Cage, and the Stage that he had been “periodically going to San Francisco” to make music with some of his bandmates.
The last Faith No More album, ‘Sol Invictus’, was released in 2015. That LP marked their first full release since 1997’s ‘Album of the Year’.


Confirm Delete
Are you sure you want to delete {{confirmDeleteCtrl.objectType}}
{{confirmDeleteCtrl.objectName}}
?


Select messages file
Browse
Messages Statistic Summary
monthly
weekly
Filter Calls
Start Filter
Open Folder


Read the task carefully and inspect the video.
Choose the appropriate label that best suits the video.


Books Read by Ben Bederson
Books that
Ben Bederson
has read since Oct 1991 (data from
GoodReads)
.
Book list is incomplete and includes primarily non-work-related books. Blog post relating to this browser is at
HCI user advocate blog
.


{% include "electoral_data/header.html" %}
Choose the Assembly Constituency below
No LS seats are available.


[journals]
[conferences/workshops]
[books]
[editorials]
[book chapters]
[theses]
[technical reports]
Journals
- J. Becktor, E. Boukas, and L. Nalpantidis, “Re-annotation of training samples for robust maritime object detection,” Machine Learning with Applications, p. 100411, 2022.
- R. E. Nielsen, D. Papageorgiou, L. Nalpantidis, B. T. Jensen, and M. Blanke, “Machine learning enhance- ment of manoeuvring prediction for ship digital twin using full-scale recordings,” Ocean Engineering, vol. 257, p. 111579, 2022.
- R. Güldenring and L. Nalpantidis, “Self-supervised contrastive learning on agricultural images,” Computers and Electronics in Agriculture, vol. 191, 2021.
- F. E. T. Schöller, L. Nalpantidis, and M. Blanke, “Buoy light pattern classification for autonomous ship navigation using recurrent neural networks,” IEEE Transactions on Intelligent Transportation Systems, 2021.
- J. B. Becktor, E. Boukas, M. Blanke, and L. Nalpantidis, “Reweighting neural network examples for robust object detection at sea,” Electronics Letters, vol. 57, no. 16, pp. 608–610, 2021.
- R. E. Andersen, L. Nalpantidis, O. Ravn, and E. Boukas, “Simultaneous regression-based spatial coverage estimation and object detection with deep learning,” Electronics Letters, vol. 57, no. 16, pp. 605–607, 2021.
- T. Kounalakis, G. Triantafyllidis, and L. Nalpantidis, “Deep learning-based visual recognition of rumex for robotic precision farming,” Computers and Electronics in Agriculture, vol. 165, 2019.
- T. Kounalakis, G. Triantafyllidis, and L. Nalpantidis, “Image-based recognition framework for robotic weed control systems,” Multimedia Tools and Applications, vol. 77, no. 8, pp. 9567–9594, 2018.
- A. S. Polydoros and L. Nalpantidis, “Survey of model-based reinforcement learning: Applications on robotics,” Journal of Intelligent and Robotic Systems, vol. 86, no. 2, pp. 153–173, 2017.
- V. Krüger, A. Chazoule, M. Crosby, A. Lasnier, M. R. Pedersen, F. Rovida, L. Nalpantidis, R. Petrick, C. Toscano, and G. Veiga, “A vertical and cyber-physical integration of cognitive robots in manufacturing,” Proceedings of the IEEE, vol. 104, no. 5, pp. 1114–1127, 2016.
- I. Kostavelis, E. Boukas, L. Nalpantidis, and A. Gasteratos, “Stereo based visual odometry for autonomous robot navigation,” International Journal of Advanced Robotic Systems, vol. 13, no. 1, 2016.
- M. R. Pedersen, L. Nalpantidis, R. S. Andersen, C. Schou, S. Bøgh, V. Krüger, and O. Madsen, “Robot skills for manufacturing: From concept to industrial deployment,” Robotics and Computer-Integrated Manufacturing, vol. 37, no. 282–291, 2015.
- I. Kostavelis, L. Nalpantidis, E. Boukas, M.
Rodrigalvarez, I. Stamoulias, G. Lentaris, D.
Diamantopoulos, K. Siozios, D. Soudris, and A.
Gasteratos, “SPARTAN: Developing a vision system for
future autonomous space exploration robots,” Journal of
Field Robotics, vol. 31, no. 1, pp. 107–140, 2014.
- I. Kostavelis, L. Nalpantidis, and
A. Gasteratos, “Collision risk assessment for
autonomous robots by offline traversability learning,”
Robotics and Autonomous Systems, vol. 60, no. 11, pp.
1367–1376, 2012.
- D. Chrysostomou, A. Gasteratos,
L. Nalpantidis, and G. C. Sirakoulis,
“Multi-view 3D scene reconstruction using ant colony
optimization techniques,” Measurement Science and
Technology, vol. 23, no. 11, 2012.
- C. Smith, Y. Karayiannidis,
L. Nalpantidis, X. Gratal, P. Qi,
D. V. Dimarogonas, and D. Kragic, “Dual arm
manipulation - a survey,” Robotics and Autonomous
Systems, vol. 60, no. 10, pp. 1340–1353,
2012.
- L. Nalpantidis, G. C. Sirakoulis, and
A. Gasteratos, “Non-probabilistic cellular
automata-enhanced stereo vision simultaneous
localisation and mapping (SLAM),” Measurement Science
and Technology, vol. 22, no. 11, 2011.
- L. Nalpantidis and A. Gasteratos,
“Stereovision-based fuzzy obstacle avoidance method,”
International Journal of Humanoid Robotics, vol. 8,
no. 1, pp. 169–183, 2011.
- L. Nalpantidis, A. Amanatiadis, G. C.
Sirakoulis, and A. Gasteratos, “Efficient
hierarchical matching algorithm for processing
uncalibrated stereo vision images and its hardware
architecture,” IET Image Processing, vol. 5,
no. 5, pp. 481–492, 2011.
- L. Nalpantidis and A. Gasteratos,
“Biologically and psychophysically inspired adaptive
support weights algorithm for stereo correspondence,”
Robotics and Autonomous Systems, vol. 58,
no. 5, pp. 457–464, 2010.
- L. Nalpantidis and A. Gasteratos, “Stereo
vision for robotic applications in the presence of
non-ideal lighting conditions,” Image and Vision
Computing, vol. 28, no. 6, pp. 940–951,
2010.
- L. Nalpantidis, G. C. Sirakoulis, and
A. Gasteratos, “Review of stereo vision algorithms:
from software to hardware,” International Journal of
Optomechatronics, vol. 2, no. 4,
pp. 435–462, 2008.
- G. Fikos, L. Nalpantidis, and
S. Siskos, “A compact APS with FPN reduction and
focusing criterion using fgmos photocell,” Sensors and
Actuators A:Physical, vol. 147, pp. 419–424,
October 2008.
Conferences / Workshops
- J. Becktor, F. E. T. Schöller, E. Boukas, M. Blanke, and L. Nalpantidis, “Bolstering maritime object detection with synthetic data,” in IFAC Conference on Control Applications in Marine Systems, Robotics and Vehicles (CAMS), IFAC-PapersOnLine, 2022.
- M. Rudolph, Y. Dawoud, R. Güldenring, L. Nalpantidis, and V. Belagiannis, “Lightweight monocular depth estimation through guided decoding,” in IEEE International Conference on Robotics and Automation (ICRA), (Philadelphia, USA), 2022.
- E. Lopez, J. Dominguez, D. Abia, F. van Evert, A. Nieuwenhuizen, M. Sytsma, L. Nalpantidis, R. Güldenring, H. Koonstra, H. Pekkeriet, L. Struik, and J. Fradin, “GALIRUMI project: Galileo-assisted robot to tackle the weed rumex obtusifolius and increase the profitability and sustainability of dairy farming,” in ICRA Workshop on “Agricultural Robotics and Automation”, 2022.
- S. Lopez Alaguero, A. Chirtoaca, D. Chrysostomou, and L. Nalpantidis, “Lessons learned from user experiments with a socially-aware mobile robot,” in ICRA Workshop on “Social Robot Navigation: Advances and Evaluation”, 2022.
- R. Güldenring, E. Boukas, O. Ravn, and L. Nalpantidis, “Few-leaf learning: Weed segmentation in grasslands,” in IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), (Prague, Czech Republic), 2021. (Finalist, Best Paper Award on Agri-Robotics)
- R. E. Andersen, L. Nalpantidis, and E. Boukas, “Vessel classification using a regression neural network approach,” in IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), (Prague, Czech Republic), 2021.
- J. Hornauer, L. Nalpantidis, and V. Belagiannis, “Visual domain adaptation for monocular depth estimation on resource-constrained hardware,” in ICCV Workshop on Embedded and Real-World Computer Vision in Autonomous Driving, 2021.
- B. Kovács, A. D. Henriksen, J. D. Stets, and L. Nalpantidis, “Object detection on TPU accelerated embedded devices,” in 13th International Conference of Computer Vision Systems (ICVS), 2021.
- R. Kajatin and L. Nalpantidis, “Image segmentation of bricks in masonry wall using a fusion of machine learning algorithms,” in ICPR 2020 workshop on Pattern Recognition in Construction and the Built Environment (PRAConBE 2020), (Milan, Italy), 2020.
- R. E. Andersen, L. Nalpantidis, O. Ravn, and E. Boukas, “Investigating deep learning architectures towards autonomous inspection for marine classification,” in IEEE International Symposium on Safety, Security, and Rescue Robotics (SSRR), (Abudhabi, UAE), 2020.
- J. B. Becktor, F. E. T. Schöller, E. Boukas, M. Blanke, and L. Nalpantidis, “Lipschitz constrained neural networks for robust object detection at sea,” in International Conference on Maritime Autonomous Surface Ship (ICMASS), (Ulsan, Korea), 2020.
- F. E. T. Schöller, M. Blanke, M. Plenge-Feidenhans’l, and L. Nalpantidis, “Vision-based object tracking in marine environments using features from neural network detections,” in IFAC World Congress, (Berlin, Germany), 2020.
- R. T. E. Dvinge, A. Stalmach, and L. Nalpantidis, “Connection-based Bluetooth mesh network as a low energy solution for off-grid data networks,” in 8th International Conference on Modern Circuits and Systems Technologies (MOCAST), 2019.
- F. N. Rasmussen, S. T. Andersen, B. Grossmann, E. Boukas, and L. Nalpantidis, “Planar pose estimation using object detecion and reinforcement learning,” in 12th International Conference of Computer Vision Systems (ICVS), Lecture Notes in Computer Science, Springer, 2019.
- T. Kounalakis, L. Nalpantidis, G. Triantafyllidis, M. J. Malinowski, and L. Chelini, “A robotic system employing deep learning for visual recognition and detection of weeds in grasslands,” in IEEE International Conference on Imaging Systems and Techniques, (Krakow, Poland), 2018.
- J. Spranger, R. Buzatoiu, A. Polydoros, L. Nalpantidis, and E. Boukas, “Human-machine interface for remote training of robot tasks,” in IEEE International Conference on Imaging Systems and Techniques, (Krakow, Poland), 2018.
- P. Valentin, T. Kounalakis, and L. Nalpantidis, “Weld classification using gray level co-occurrence matrix and local binary patterns,” in IEEE International Conference on Imaging Systems and Techniques, (Krakow, Poland), 2018.
- M. Kapoor, E. Katsanos, S. Thöns, L. Nalpantidis, and J. Winkler, “Structural integrity management with unmanned aerial vehicles: State-of-the-art review and outlook,” in Sixth International Symposium on Life-Cycle Civil Engineering (IALCCE 2018), (Ghent, Belgium), 2018.
- E. Boukas, A. S. Polydoros, G. Visentin, L. Nalpantidis, and A. Gasteratos, “Global localization for future space exploration rovers,” in International Conference in Computer Vision Systems (ICVS), vol. 10528 of LNCS, (Hong Kong), Springer, 2017.
- T. Kounalakis, G. Triantafyllidis, and L. Nalpantidis, “Vision system for robotized weed recognition in crops and grasslands.,” in International Conference in Computer Vision Systems (ICVS), vol. 10528 of LNCS, (Hong Kong), Springer, 2017.
- A. S. Polydoros, E. Boukas, and L. Nalpantidis, “Online multi-target learning of inverse dynamics models for computed-torque control of compliant manipulators,” in IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), (Vancouver, Canada), 2017.
- F. Rovida, V. Krueger, L. Nalpantidis, A. Charzoule, A. Lasnier, R. Petrick, M. Crosby, C. Toscano, and G. Veiga, “A cyber-physical systems approach for controlling autonomous mobile manipulators,” in Proceedings of the International Conference on Climbing and Walking Robots and Support Technologies for Mobile Machines (CLAWAR),(London, UK), pp. 169–177, 2016.
- A. S. Polydoros and L. Nalpantidis, “A reservoir computing approach for learning forward dynamics of industrial manipulators,” in IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), (Daejeon, Korea), 2016.
- T. Kounalakis, G. Triantafyllidis, and L. Nalpantidis, “Weed recognition framework for robotic precision farming,” in IEEE International Conference on Imaging Systems and Techniques, (Chania, Greece), 2016.
- A. S. Polydoros, B. Gromann, F. Rovida, L. Nalpantidis, and V. Krüger, “Accurate and versatile automation of industrial kitting operations with SkiROS,” in 17th Conference Towards Autonomous Robotic Systems (TAROS), (Sheffield, UK), 2016.
- N. Rofalis, L. Nalpantidis, N. A. Andersen, and V. Krüger, “Vision-based robotic system for object agnostic placing operations,” in International Conference on Computer Vision Theory and Applications (VISAPP), (Rome, Italy), 2016.
- A. S. Polydoros, L. Nalpantidis, and V. Krüger, “Advantages and limitations of reservoir computing on model learning for robot control,” in IROS Workshop on Machine Learning in Planning and Control of Robot Motion, (Hamburg, Germany), 2015.
- A. S. Polydoros, L. Nalpantidis, and V. Krüger, “Real-time deep learning of robotic manipulator inverse dynamics,” in IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), (Hamburg, Germany), 2015.
- G. Lentaris, I. Stamoulias, D. Diamantopoulos, K.
Maragos, K. Siozios, D. Soudris, M. A. Rodrigalvarez, M.
Lourakis, X. Zabulis, I. Kostavelis, L. Nalpantidis, E.
Boukas, and A. Gasteratos, “SPARTAN/SEXTANT/COMPASS:
advancing space rover vision via reconfigurable
platforms,” in 11th International Symposium on Applied
Reconfigurable Computing (ARC), vol. 9040 of Lecture
Notes in Computer Science, (Bochum, Germany), pp.
475–486, Springer, 2015.
- B. Großmann, M. R. Pedersen, J. Klonovs, D. Herzog, L.
Nalpantidis, and V. Krüger, “Communicating unknown
objects to robots through pointing gestures,” in 15th
Conference Towards Autonomous Robotic Systems (TAROS),
vol. 8717 of Lecture Notes in Computer Science,
(Birmingham, UK), pp. 209–220, Springer-Verlag, 2014.
- A. S. Polydoros, L. Nalpantidis, and V. Krüger,
“Towards an intelligent robotic manipulator for
industrial object-placing tasks,” in IAS International
Workshop on Intelligent Robot Assistants, (Padova,
Italy), 2014.
- A. S. Polydoros, L. Nalpantidis, and V. Krüger, “A
roadmap towards intelligent and autonomous object
manipulation for assembly tasks,” in ICRA Workshop on
“Autonomous Grasping and Manipulation: An Open
Challenge”, (Hong Kong), 2014.
- L. Nalpantidis, D. Kragic, I. Kostavelis, and A.
Gasteratos, “Theta-disparity: an efficient
representation of the 3D scene structure,” in 13th
International Conference on Intelligent Autonomous
Systems (IAS), Lecture Notes in Computer Science,
(Padova, Italy), 2014.
- J. Klonovs, D. Herzog, M. R. Pedersen, B. Großmann, L.
Nalpantidis, and V. Krüger, “Robotic system capable of
identifying objects indicated by pointing gestures,” in
Proccedings of the 2nd AAU Workshop on Robotics,
(Aalborg, Denamrk), AAU Press, 2014.
- N. Skordilis, N. Vidakis, G. Triantafyllidis, and L.
Nalpantidis, “Depth camera driven mobile robot for human
localization and following,” in Proccedings of the 2nd
AAU Workshop on Robotics, (Aalborg, Denamrk), AAU Press,
2014.
- R. S. Andersen, L. Nalpantidis, V. Krüger, O. Madsen,
and T. B. Moeslund, “Using robot skills for flexible
reprogramming of pick operations in industrial
scenarios,” in International Conference on Computer
Vision Theory and Applications (VISAPP), vol. 3,
(Lisbon, Portugal), pp. 678–685, 2014.
- M. R. Pedersen, L. Nalpantidis, A. Bobick, and V.
Krüger, “On the integration of hardware-abstracted robot
skills for use in industrial scenarios,” in IROS
Workshop on “Cognitive Robotics Systems: Replicating
Human Actions and Activities”, (Tokyo, Japan), 2013.
- I. Kostavelis, E. Boukas, L. Nalpantidis, and A.
Gasteratos, “Visual odometry for autonomous robot
navigation through efficient outlier rejection,” in IEEE
International Conference on Imaging Systems and
Techniques, (Beijing, China), IEEE, October 2013.
- L. Nalpantidis, B. Großmann, and V. Krüger, “Fast and
accurate unknown object segmentation for robotic
systems,” in International Symposium on Visual Computing
(ISVC), vol. 8034 of Lecture Notes in Computer Science,
(Rethymnon, Greece), Springer, July 2013.
- G. Lentaris, D. Diamantopoulos, K. Siozios, I.
Stamoulias, I. Kostavelis, E. Boukas, L. Nalpantidis, D.
Soudris, A. Gasteratos, and M. A. Aviles, “SPARTAN:
efficient implementation of computer vision algorithms
for autonomous rover navigation,” in 7th HiPEAC Workshop
on Reconfigurable Computing, (Berlin, Germany), European
Network of Excellence on High Performance and Embedded
Architecture and Compilation, January 2013.
- I. Kostavelis, A. Gasteratos, E. Boukas, and L.
Nalpantidis, “Learning the terrain and planning a
collision-free trajectory for indoor post-disaster
environments,” in IEEE International Symposium on
Safety, Security and Rescue Robotics, (College Station,
Texas, USA), November 2012.
- L. Nalpantidis, M. Björkman, and D. Kragic, “Yes - yet
another object segmentation: exploiting camera
movement,” in IEEE/RSJ International Conference on
Intelligent Robots and Systems (IROS), (Vilamoura,
Algarve, Portugal), 2012.
- I. Kostavelis, E. Boukas, L. Nalpantidis, and A.
Gasteratos, “Path tracing on polar depth maps for robot
navigation,” in Cellular Automata for Research and
Industry (ACRI), (Santorini, Greece), 2012.
- E. Boukas, I. Kostavelis, L. Nalpantidis, and A.
Gasteratos, “Graph based localisation refinement by
orbital images,” in International Symposium on
Artificial Intelligence, Robotics and Automation in
Space, (Turin, Italy), 2012.
- I. Kostavelis, L. Nalpantidis, and A. Gasteratos,
“Object recognition using saliency maps and HTM
learning,” in IEEE International Conference on Imaging
Systems and Techniques, (Manchester, United Kingdom),
2012.
- I. Kostavelis, E. Boukas, L. Nalpantidis, A.
Gasteratos, and M. Aviles Rodrigalvarez, “SPARTAN
system: Towards a low-cost and high-performance vision
architecture for space exploratory rovers,” in 2nd
International Workshop on Computer Vision in Vehicle
Technology: From Earth to Mars, in conjunction with
ICCV, (Barcelona, Spain), November 2011.
- M. Aviles, K. Siozios, D. Diamantopoulos, L.
Nalpantidis, I. Kostavelis, E. Boukas, D. Soudris, and
A. Gasteratos, “A co-design methodology for implementing
computer vision algorithms for rover navigation onto
reconfigurable hardware,” in FPL 2011 workshop on
Computer Vision on Low-Power Reconfigurable
Architectures, (Chania, Greece), September 2011.
- I. Kostavelis, L. Nalpantidis, and A. Gasteratos,
“Supervised traversability learning for robot
navigation,” in 12th Conference Towards Autonomous
Robotic Systems, vol. 6856 of Lecture Notes in Computer
Science, (Sheffield, UK), pp. 289–298, Springer-Verlag,
2011.
- K. Siozios, D. Diamantopoulos, I. Kostavelis, E.
Boukas, L. Nalpantidis, D. Soudris, A. Gasteratos, M.
Aviles, and I. Anagnostopoulos, “SPARTAN project:
Efficient implementation of computer vision algorithms
onto reconfigurable platform targeting to space
applications,” in 6th International Workshop on
Reconfigurable Communication-centric Systems-on-Chip,
(Montpellier, France), pp. 1–9, June 2011.
- L. Nalpantidis, J. Kalomiros, and A. Gasteratos,
“Robust 3D vision for robots using dynamic programming,”
in IEEE International Conference on Imaging Systems and
Techniques, (Batu Ferringhi, Penang, Malaysia), pp.
89–93, May 2011.
- D. Chrysostomou, L. Nalpantidis, and A. Gasteratos,
“Lighting compensating multiview stereo,” in IEEE
International Conference on Imaging Systems and
Techniques, (Batu Ferringhi, Penang, Malaysia), pp.
176–179, May 2011.
- L. Nalpantidis, G. C. Sirakoulis, A. Carbone, and A.
Gasteratos, “Computationally effective stereovision
SLAM,” in IEEE International Conference on Imaging
Systems and Techniques, (Thessaloniki, Greece), pp.
453–458, July 2010.
- I. Kostavelis, L. Nalpantidis, and A. Gasteratos,
“Comparative presentation of real-time obstacle
avoidance algorithms using solely stereo vision,” in
IARP/EURON International Workshop on Robotics for risky
interventions and Environmental
Surveillance-Maintenance, (Sheffield, UK), January 2010.
- L. Nalpantidis, D. Chrysostomou, and A. Gasteratos,
“Obtaining reliable depth maps for robotic applications
with a quad-camera system,” in International Conference
on Intelligent Robotics and Applications, vol. 5928 of
Lecture Notes in Computer Science, (Singapore), pp.
906–916, Springer-Verlag, December 2009.
- L. Nalpantidis, I. Kostavelis, and A. Gasteratos,
“Stereovision-based algorithm for obstacle avoidance,”
in International Conference on Intelligent Robotics and
Applications, vol. 5928 of Lecture Notes in Computer
Science, (Singapore), pp. 195–204, Springer-Verlag,
December 2009.
- Y. Baudoin, D. Doroftei, G. De Cubber, S. A. Berrabah,
C. Pinzon, F. Warlet, J. Gancet, E. Motard, M.
Ilzkovitz, L. Nalpantidis, and A. Gasteratos,
“View-Finder: Robotics assistance to fire-fighting
services and crisis management,” in IEEE International
Workshop on Safety, Security, and Rescue Robotics,
(Denver, Colorado, USA), pp. 1–6, November 2009.
- I. Kostavelis, L. Nalpantidis, and A. Gasteratos,
“Real-time algorithm for obstacle avoidance,” in Third
Panhellenic Scientific Student Conference on
Informatics, (Corfu, Greece), September 2009.
- L. Nalpantidis, A. Amanatiadis, G. C. Sirakoulis, N.
Kyriakoulis, and A. Gasteratos, “Dense disparity
estimation using a hierarchical matching technique from
uncalibrated stereo vision,” in IEEE International
Workshop on Imaging Systems and Techniques, (Shenzhen,
China), pp. 427–431, May 2009.
- G. De Cubber, D. Doroftei, L. Nalpantidis, G. C.
Sirakoulis, and A. Gasteratos, “Stereo-based terrain
traversability analysis for robot navigation,” in
IARP/EURON Workshop on Robotics for Risky Interventions
and Environmental Surveillance, (Brussels, Belgium),
2009.
- L. Nalpantidis, G. C. Sirakoulis, and A. Gasteratos,
“A dense stereo correspondence algorithm for hardware
implementation with enhanced disparity selection,” in
5th Hellenic conference on Artificial Intelligence, vol.
5138 of Lecture Notes in Computer Science, (Syros,
Greece), pp. 365–370, Springer-Verlag, 2008.
- G. De Cubber, L. Nalpantidis, G. C. Sirakoulis, and A.
Gasteratos, “Intelligent robots need intelligent vision:
Visual 3D perception,” in IARP/EURON Workshop on
Robotics for Risky Interventions and Environmental
Surveillance, (Benicàssim, Spain), 2008.
- L. Nalpantidis, G. C. Sirakoulis, and A. Gasteratos,
“Review of stereo matching algorithms for 3D vision,” in
16th International Symposium on Measurement and Control
in Robotics, (Warsaw, Poland), pp. 116–124, 2007.
- I. Pappas, L. Nalpantidis, V. Kalenteridis, S. Siskos,
A. A. Hatzopoulos, and C. A. Dimitriadis, “A threshold
voltage variation cancellation technique for analogue
peripheral circuits of a display array using poly-Si
TFTs,” in IEEE International Symposium on Circuits and
Systems, (Kos, Greece), May 2006.
- G. Fikos, L. Nalpantidis, and S. Siskos, “A
low-voltage, analog power-law function generator,” in
IEEE International Symposium on Circuits and Systems,
(Kos, Greece), May 2006.
- I. Pappas, L. Nalpantidis, and S. Siskos, “A new
analogue driver using poly-Si thin-film transistors for
active matrix displays,” in XX Conference on Design of
Circuits and Integrated Systems, (Lisboa, Portugal),
November 2005.
- I. Pappas, L. Nalpantidis, V. Kalenteridis, S. Siskos,
C. A. Dimitriadis, and A. A. Hatzopoulos, “A study of
different types of current mirrors using polysilicon
TFTs,” in Second Conference on Microelectronics,
Microsystems and Nanotechnology, vol. 10 of Journal of
Physics: Conference Series, (Athens, Greece), pp.
373–376, November 2005.
- A. A. Hatzopoulos, S. Siskos, C. A. Dimitriadis, N.
Papadopoulos, I. Pappas, and L. Nalpantidis, “A built-in
current sensor using thin-film transistors,” in Second
Conference on Microelectronics, Microsystems and
Nanotechnology, vol. 10 of Journal of Physics:
Conference Series, (Athens, Greece), pp. 289–292,
November 2005.
- L. Nalpantidis, G. Fikos, and S. Siskos, “A
low-voltage, low-power generalized power-law function
generator,” in XX Conference on Design of Circuits and
Integrated Systems, (Lisboa, Portugal), November 2005.
- G. Fikos, L. Nalpantidis, and S. Siskos, “A 32x32
smart photo-array with minimum-size FGMOS for
amplification and FPN reduction,” in IEEE Workshop on
Signal Processing Systems Design and Implementation,
(Athens, Greece), pp. 199–203, November 2005.
Books
- M. Vincze, T. Patten, H. I. Christensen, L. Nalpantidis, and M. Liu, eds., Computer Vision Systems, ICVS 2021, vol. 12899 of Lecture Notes in Computer Science. Springer, 2021.
- L. Nalpantidis, V. Krüger, J.-O. Eklundh, and A. Gasteratos, eds., Computer Vision Systems, ICVS 2015, vol. 9163 of Lecture Notes in Computer Science. Springer, 2015.
Editorials
- L. Nalpantidis, R. Detry, D. Damen, G. Bleser, M. Cakmak, and M. S. Erden, “Cognitive Robotics Systems: Concepts and Applications,” Guest Editorial, Journal of Intelligent and Robotic Systems, 2015.
Book Chapters
- L. Nalpantidis, “On the use of cellular automata in
vision-based robot exploration,” in Robots and Lattice
Automata (G. C. Sirakoulis and A. Adamatzky, eds.), vol.
13 of Emergence, Complexity and Computation, ch. 11, pp.
247–266, Springer, 2015.
- K. Charalampous, I. Kostavelis, E. Boukas, A.
Amanatiadis, L. Nalpantidis, C. Emmanouilidis, and A.
Gasteratos, “Autonomous robot path planning techniques
using cellular automata,” in Robots and Lattice Automata
(G. C. Sirakoulis and A. Adamatzky, eds.), vol. 13 of
Emergence, Complexity and Computation, ch. 8, pp.
175–196, Springer, 2015.
- L. Nalpantidis, “Review of real-time stereo 3D imaging
techniques,” in Interactive Displays: Natural
Human-Interface Technologies (A. K. Bhowmik, ed.), ISBN:
978-1-118-63137-9, ch. 6, Wiley-Blackwell, 2014.
- I. Kostavelis, E. Boukas, L. Nalpantidis, and A.
Gasteratos, “A mechatronic platform for robotic
educational activities,” in Interdisciplinary
Mechatronics: Engineering Science and Research
Development (M. K. Habib and J. P. Davim, eds.), ISBN:
978-1-8482-1418-7, ch. 20, pp. 543–568, ISTE Wiley,
2013.
- L. Nalpantidis, I. Kostavelis, and A. Gasteratos,
“Intelligent stereo vision in autonomous robot
traversability estimation,” in Robotic Vision:
Technologies for Machine Learning and Vision
Applications (M. A. Cazorla Quevedo and J.
Garcia-Rodriguez, eds.), IGI Global, 2012.
- L. Nalpantidis and A. Gasteratos, “Stereo vision depth
estimation methods for robotic applications,” in Depth
Map and 3D Imaging Applications: Algorithms and
Technologies (A. S. Malik, T.-S. Choi, and H. Nisar,
eds.), ISBN: 978-1-61350-326-3, ch. 21, pp. 397–417, IGI
Global, 2011.
Theses
- L. Nalpantidis, “Study and implementation of stereo
vision systems for robotic applications”, PhD thesis,
Xanthi, 2010.
- L. Nalpantidis, “A design technique for power-law
circuits”, Master thesis, Thessaloniki, 2005.
- L. Nalpantidis, “Study and design of a photosensitive
analogue circuit array using Floating Gate MOS
Transistors (FGMOS)”, Graduation thesis, Thessaloniki,
2003.
Technical Reports
- M. Kapoor, E. Katsanos, L. Nalpantidis, J. Winkler, and S. Thöns, “Structural health monitoring and management with unmanned aerial vehicles: Review and potentials,” Tech. Rep. BYG R-454, DTU Civil Engineering, 2021.


PETSc DMNetwork provides a powerful flexible scalable framework for simulation of multiphysics phenomena over large-scale networked systems such as power, water, gas, transportation, and telecommunicaiton. It eases the application development cycle by providing the necessary infrastructure through simple abstractions to define and query the network components.
PETSc DMNetwork provides data and topology management, parallelization for multiphysics systems over a network, and hierarchical and composable solvers to exploit the problem structure. The key features of DMNetwork include creating the network layout, partitioning for efficient parallelism, parallel data movement, utility routines for extracting connectivity information, and linear, nonlinear, and time-stepping solvers. The steps for using DMNetwork is illustrated in the figure below and they include: (i) Create network graph, (ii) Add physics components, and variabeles to the network elements (edges and vertices), (iii) Distribute the poplulated network to multiple processors, and (iv) decompose the domains and associate them with their respective linear, nonlinear, time-stepping solvers.


Canvas
Home
About
Contact
Dropdown
Action
Another action
Something else here
Nav header
Separated link
One more separated link


Vita Bella takes great pride in crafting a superior class of pizza. We hand-make our dough and sauce daily, exclusively use 100% real Wisconsin cheeses, and pile-on premium ingredients. Our pizzas are guaranteed to entice and satisfy any pizza enthusiast.
Traditional Thin Crust: Our specialty. The light, flaky crust is always crispy and golden brown
Double Dough Pizza: This Vita Bella creation features a hand-rolled edge that is twice as thick as the traditional thin crust.
Chicago Style Deep Dish: A family specialty. Our pan-cooked, thick, buttery crust is smothered with cheese, your toppings, and our gourmet chunky tomato sauce.
Pan Pizza: This option features a thick and tasty crust topped with your favorite ingredients and mounds of cheese.
Stuffed Pizza: Baked like a pie, our stuffed pizza contains two layers of crust stuffed with cheese and your toppings. Our delicious sauce covers the top crust.


Introducing Play 2.0
by Guillaume Bort, Play project’s lead developer.
Since 2007, we have been working on making Java web application development easier. Play started as an internal project at Zenexity and was heavily influenced by our way of doing web projects: focusing on developer productivity, respecting Web architecture, and using from the start a fresh approach to packaging conventions - breaking so-called JEE best practices where it made sense.
In 2009, we decided to share these ideas with the community as an open source project. The immediate feedback was extremely positive and the project gained a lot of traction. Today - after two years of active development - Play has several versions, an active community of 3,000 people, with a growing number of applications running in production all over the globe.
Opening a project to the world certainly means more feedback, but it also means discovering and learning about new use cases, requiring features and un-earthing bugs that we were not specifically considered in the original design and assumptions. During the two years of work on Play as an open source project we have worked to fix all of these kind of issues, as well as to integrate new features to support a wider range of scenarios. As the project has grown, we have learned a lot from our community and from our own experience - using Play in more and more complex and varied projects.
In the meantime, technology and the Web have continued to evolve. The Web has become the central point of all applications. HTML, CSS and Javascript technologies have evolved quickly - making it almost impossible for a server-side framework to follow. The whole Web architecture is fast moving towards real-time, and the emerging requirements of today's project profiles mean SQL no longer works as the exclusive datastore technology. At the programming language level we've witnessed some monumental changes with several JVM languages, including Scala, gaining popularity.
That's why we think it's now time to move on, and to consider the next major version of Play. Welcome Play 2.0
Native support for Java and Scala
In Play 1.1, we started exploring the possibility of using the Scala programming language for writing Play applications. We initially introduced this work as an external module to be able to experiment freely without impacting the framework itself
Properly integrating Scala into a Java-based framework is not trivial. Considering Scala’s compatibility with Java, one can quickly achieve a first naive integration that simply uses Scala’s syntax instead of Java’s. This, however, is certainly not the optimal way of using the language. Scala is a mix of true object orientation with functional programming. Leveraging the full power of Scala requires rethinking most of the framework’s APIs. After several versions we now have a clean Scala module that allows the use of most of Play's features from Scala, in a Scala-ish manner.
Now, we are reaching the limits of what we can do with Scala support as a separate module. Initial design choices we made in Play 1.x, relying heavily on Java reflection API and byte code manipulation, have made it harder to progress without completely rethinking some essential parts of Play’s internals. Meanwhile, we have created several awesome components for the Scala module, like the new type-safe template engine and the brand new SQL access component Anorm. So we have decided that, to fully unleash the power of Scala with Play, we are moving Scala support from a separate module to the core of Play 2.0, which will be designed from the beginning to natively support Scala as a programming language.
Java, on the other hand, is certainly not getting any less support from Play 2.0; quite the contrary. The Play 2.0 build provides us with an opportunity to enhance the development experience for Java developers. Backed by our experience throughout the project we have a clear idea of what we need to achieve and what mistakes we have to avoid.
Powerful build system
From the beginning we have chosen a fresh way to run, compile and deploy Play applications. At the time it may have looked like an esoteric design - but it was crucial to providing an asynchronous HTTP API instead of the standard Servlet API, short feedback cycles through live compilation and reloading of source code during development, and promoting a fresh packaging approach. Consequently, It was difficult to make Play follow the standard JEE conventions.
Today, this idea of container-less deployment is more and more accepted in the Java world. It's a design choice that has allowed the Play framework to run natively on platforms like Heroku, which introduced a model that we consider the future of Java applications deployment on elastic PaaS platforms.
Existing Java build systems, however, were not flexible enough to support this new approach. Since we wanted to provide straightforward tools to run and deploy Play applications, in Play 1.x we created a collection of Python scripts to handle all build and deployment related tasks.
But developers using Play for more enterprise-scale projects, which require build process customization and integration with their existing company build systems, were a bit lost. The Python scripts we provide with Play 1.x are in no way a fully featured build system and are not easily customizable. That's why we've decided to go for a more powerful build system for Play 2.0.
As we need a modern build tool, flexible enough to support Play original conventions and able to build Java and Scala projects, we have chosen to integrate sbt in Play 2.0. This, however, should not scare existing Play users who are happy with the simplicity of Play build. We are leveraging the same simple play new, run, start experience on top of an extensible model: Play 2.0 will come with a preconfigured build script that will just work for most users. On the other hand, if you need to change the way your application is built, deployed, etc., a Play project being a standard sbt project will hand you all the power to customize and adapt it to your special needs.
This also mean better integration with Maven projects out of the box, the ability to package and publish your project as a simple set of jar files to any repository, and especially live compiling and reloading at development time of any depended project even for standard Java or Scala libraries projects.
Focused on type safety
One benefit of using Java as programming language for writing Play applications is that the Java compiler can check certain parts of your code. This is not only useful for detecting mistakes early in the development process, but it also makes it a lot easier to work on large projects with a lot developers involved.
Adding Scala to the mix for Play 2.0, we will clearly benefit from even stronger compiler guarantees - but that’s not enough. In Play 1.x, the template system is dynamic, based on the Groovy language, and the compiler can’t do much for you. As a result, errors in templates can only be detected at runtime. The same goes for verification of glue code with controllers.
We really want to push further this idea of having Play check most of your code at compilation time in the 2.0 version. Accordingly, we have decided to use the Scala-based template engine as the default for Play applications - even for developers using Java as the main programming language. This doesn't mean that you have to become a Scala expert to write templates in Play 2.0, just like you were not really required to know Groovy to write templates in Play 1.x. Scala will be mainly used to navigate your object graph in order to display relevant information with a syntax that is very close to the Java one. However if you want to unleash the power of Scala to write advanced templates abstractions, you will quickly discover how Scala, being expression-oriented and functional, is a perfect fit for a template engine.
And that's not only true for the template engine: the routing system will also be fully type-checked. Play 2.0 will check all your routes' descriptions, and verify that the everything is coherent, including the reverse routing part
As a nice side effect, being fully compiled, the templates and route files will be easier to package and reuse and you can expect high performance gain on these parts at runtime.
Built for asynchronism
Today's web applications are integrating more concurrent realtime data, so web frameworks need to support a full asynchronous HTTP programming model. Play 1.x was initially designed to handle classic Web applications with many short lived requests. But now, the event model is the way to go for persistent connections - though comet, long-polling and WebSockets.
Play 1.2 already provides great asynchronous HTTP support and WebScokets using continuations. Play 2.0 will be architected from the start under the assumption that every request is potentially long living. We want, for instance, to generalize Controller and WebsocketController concepts into one single simple model that fits all needs.
But that’s not all: we also need a powerful way to schedule and run long running tasks. Although the original Play 1.0 Jobs model was introduced for this, we really need something more powerful and robust. The Actor based model is unquestionably the best model today to handle highly concurrent systems, and the best implementation of that model available for both Java and Scala is Akka - so it's going in. We will be introducing native Akka support for Play applications, making it possible to write highly distributed systems.
Datastore and Model integration
Datastore is no longer synonymous with "SQL database", and it probably never was. A lot of interesting models of datastores are becoming popular, providing different properties for different scenarios. For this reason it has become difficult for a Web framework like Play to make bold assumptions regarding the kind of datastore that will be used by developers. A generic play.db.Model concept in Play no longer makes sense, since it is almost impossible to abstract over all these kinds of technology with a single API.
We want to make it really easy in Play 2.0 to use any datastore driver, ORM, or any another database access library without any special integration with the Web framework. We simply want to offer a minimal set of helpers to handle common technical issues, like managing the connection bounds. We also want, however, to maintain the full-stack aspect of Play framework by bundling default tools to access classical databases for users that don't have specialized needs.
Today, the preferred way for a Play Java application to access an SQL database is the Play Model library that is powered by Hibernate. But since it's annoying in a stateless Web framework like Play to manage stateful entities such as the ones defined in the official JPA specification, we have provided a special flavor of JPA keeping things as stateless as possible. This forced us to hack Hibernate in a way that is probably not sustainable in the long term. To address this, we plan to move to an existing implementation of stateless JPA called EBean. If you don't care too much about what is used under the hood then it will change almost nothing for you, but if you really want to use Hibernate or even another official JPA implementation you will be able to do it without any special integration with Play. And if you are using Scala we will continue to bundle Anorm.
Changes for current Play users
Play 2.0 will be a major release so it is unlikely that it will be compatible at the API level with previous versions. Of course at the architecture level you will find the same set of components, organized in the same way, and most importantly, you will live the same 'Play experience'.
What about my existing Play applications? How difficult will it be to migrate?
Don't worry, we don't expect you to migrate your existing applications to Play 2.0. The Play 1.x versions will continue to be maintained and you don't need to move to Play 2.0. We ourselves have many Play 1.x web applications running and we will of course continue to support them.
Remember: Play 1.2.3 is still the best way to write Web applications in Java while Play 2.0 is still under development, and will continue to be maintained and developed by the core team and contributors. Play 2.0 is an opportunity to move to for your next project, or the next major rewrite of your application.
Getting started
Play 2.0 is still under heavy development and APIs are likely to change, but you can already have a look to our preview versions.
Download the first preview version, or follow the development directly on GitHub.


Co., Ltd. 1102 / 1201 3. Aditya Bi
Changzhou Tianhe International Trading Co., Ltd. 1910. 73. . Jiaxing Longshine Carbon Fiber Products Co., Ltd. . Wuxi Gelinda International Trade Co., Ltd.
http://www.chinacompositesexpo.com/upload/Attach-20110903132121.pdf
Treatment for Herniated or Bulging Discs
Cycling Gloves Products - EO21 China suppliers directory
. socks,cycling sports wear, suppliers and related trade leads .
http://www.zsqts.com.cn/Cycling-Gloves-suppliers
China Fiber - Buyers - Alibaba.com
We are a chemical fiber manufacturer, which located in Wuxi, China, with more than 10 years experience in the . Wuxi Longshine International Trade Co., Ltd.
http://importer.alibaba.com/china-fiber-importer.html
wux longshine international trade Herniated or Bulging Discs
Yogurt Processing Line By Wuxi Longshine International Trade Co ...
Components list: 1.50L filtrate, mix and preheating tank. 1set 2.KSS-150-25 Hydraulic homogenizer. 1set 3.KSS-100B dairy cooling and sterilize pulper. 1set 4.
http://www.tradekey.com/product-free/Yogurt-Processing-Line-1595813.html
Wuxi Longshine International Trade Co., Ltd. - Sleeping bag, face ...
Sleeping bag, face mask, working glove and more... See info for all products/ services from Wuxi Longshine International Trade Co., Ltd..
http://wuxilanxiang.en.alibaba.com/
List of Companies banned According to the decision
LTD RM 2011, INTERNATIONAL TRADE MANSION, NO 999 CHOUZHOU NORTH ROAD YIWU . WUXI. 12 ZHUHAI PROFOUND ENTERPRISE CO., LTD 15-E FLOOR TAI HE . 29 TONGXIANG LONGSHINE PRINTING AND DYEING CO.
http://www.goeic.gov.eg/Decisions/921.pdf
Official Impairment Listing for Spinal Disorders
Eye Washer - Made-in-China.com
86 Products . Wuxi Longshine International Trade Co., Ltd. [Province:Jiangsu, China]. Pedestal Mounted Safety Shower and Eye Washer [Aug 25, 2008]. Pedestal .
http://www.made-in-china.com/products-search/hot-china-products/Eye_Washer.html
- massage therapist schools in bristol tn (narrowing of the spine)
100% Polyester Dope Dyed Spun Yarn - Buy Recycled,Ring Spun ...
Contact Supplier · Place Order. Verified Supplier - Wuxi Longshine International Trade Co., Ltd. [ Jiangsu, China (Mainland) ].
Wuxi Longshine International Trade Co., Ltd is a special and reputed supplier of medical items and safety products as well as various of fibers and textile yarns.
http://www.tradeboss.com/default.cgi/action/viewcompanies/manufacturers_exporters_wholesalers_sellers/blood+bag/
Sand Beach Tent - Alibaba.com
154 Products . RelatedKeywords: Beach & Fishing Tent | Beach Tent. Gold Supplier 4th Year Wuxi Longshine International Trade Co., Ltd. [ Manufacturer, Trading .
http://www.alibaba.com/showroom/sand-beach-tent.html
Polyester Staple Fiber 7d*64 Three-dimension Hollow Conjugated ...
Contact Supplier · Place Order. Verified Supplier - Wuxi Longshine International Trade Co., Ltd. [ Jiangsu, China (Mainland) ]. Online Showroom: 258 Products .
http://www.alibaba.com/product-gs/285940414/Polyester_staple_fiber_7D_64_three.html
Medical-Vocational Allowance for Herniated Disc
7d*64 Hollow Conjugated Polyester Staple Fiber(manufacture) - Buy ...
Contact Supplier · Place Order. Verified Supplier - Wuxi Longshine International Trade Co., Ltd. [ Jiangsu, China (Mainland) ]. Online Showroom: 258 Products .
http://www.alibaba.com/product-gs/280877451/7D_64_Hollow_conjugated_polyester_staple.html
Brown Fiber - Buyers - Alibaba.com
We are a chemical fiber manufacturer, which located in Wuxi, China, with more than 10 years experience in the . Wuxi Longshine International Trade Co., Ltd.
http://importer.alibaba.com/brown-fiber-importer.html
Appealing a Denial of Benefits
Wuxi Longshine International Trade Co., Ltd. - Made-in-China.com
Wuxi Long shine International Trade Co., Ltd is a professional company which was developed from the export department of a polyester PSF producer and now .
http://www.made-in-china.com/showroom/wuxilongshine
Textile Chemicals Importers - Buyers - Alibaba.com
We are a Textile chemical Trading Company in Karachi, Pakistan and we should be obliged if you would give us . Wuxi Longshine International Trade Co., Ltd.
http://importer.alibaba.com/textile-chemicals-importer.html


Customize Cell
The GridControl provides you with the capability to customize the appearance of individual cells based on specified criteria. To do this, handle the CustomizeCells event. This event’s parameters allow you to identify the cell and set its background and foreground colors.
In this demo, cells in the Total column with values greater than 500 are colored in green, and cells containing values less than 100 are colored in red.
Related APIs:


--- layout: post title: Congrats Ian! html: True image: /img/team/ian_hoskins_new.jpg bigimgasas: /img/team/ian_hoskins_new.jpg summary: Ian passes his Ph.D. qualifying exam. ---
Ian Hoskins was one of the first students in the program to use Zoom for their qualifying exam. Congrats!!!