Using a neural network to learn regression in image processing

I have a camera system with some special optics that warp the field of view of the camera, dependent on two variables, $\theta_1$ and $\theta_2$. Given a specific configuration of these two variables, each pixel on my camera (which is 500x600 resolution) will see a specific coordinate on a screen in front of the camera. I can calculate this for each pixel, but it requires too many computations and is too slow. So, I want to learn a model that …
Category: Data Science

What should be the target vairable in CTR maximization problem?

I have a dataset that contains some user-specific detials like gender, age-range, region etc. and also the behavioural data which contains the historical click-through-rate (last 3 months) for different ad-types shown to them. Sample of the data is shown below. It has 3 ad-types i.e. ecommerce, auto, healthcare but the actual data contains more ad-types. I need to build a regression model using XGBRegressor that can tell which ad should be shown to a given new user in order to …
Category: Data Science

Combine multiple duplicate categorical variables into a single one for multiple linear regression

I am trying to create a regression model that predicts the box office success of a movie, with one of the explanatory variables being the actors who appear in the film. My problem is that I decided to do the first 4 billed actors, but in the model, it is taking it as 4 separate variables (Actor 1, Actor 2, Actor 3, Actor 4). For example, Jack Nicholson is the lead in "as good as it gets" so he would …
Category: Data Science

Linear Regression bad results after log transformation

I have a dataset that has the following columns: The variable I'm trying to predict is "rent". My dataset looks a lot similar to what happens in this notebook. I tried to normalize the rent column and the area column using log transformation since both columns had a positive skewness. Here's the rent column and area column distribution before and after the log transformation. Before: After: I thought after these changes my regression models would improve and in fact they …
Category: Data Science

How to fit a model on validation_data?

can you help me understand this better? I need to detect anomalies so I am trying to fit an lstm model using validation_data but the losses does not converge. Do they really need to converge? Does the validation data should resemble train or test data or inbetween? Also, which value should be lower, loss or val_loss ? Thankyou!
Category: Data Science

How to do multivariable regression in Orange3?

Orange3 contains a number of regression widgets, but they all seem to be univariable i.e. one independent variable that correlates to one dependent variable. When I have more independent variables that might influence a dependent variable, how to handle this in Orange3?
Category: Data Science

Dealing with diverse groups in regression

What happens if a certain dataset contains different "groups" that follow different linear models? For example, let's imagine that examining the scatterplot of a certain feature $x_i$ against $y$ we can see that some points follow a linear relationship with a coefficient $\beta_A<0$ while other points clearly have $\beta_B>0$. We can infer that these points belong to two different populations, population $A$ responds negatively to high values of feature $x_i$ while population $B$ responds positively. We then create a categorical …
Category: Data Science

Loss function to prevent estimator bias

I have a regression problem I'm trying to build a model for: Predicting sales per person (>= 0) depending on some variables. I'm running different model types and gave deep neural networks a try. The loss functions I'm using are mean squared error and mean absolute error (or sometimes a mix). I often run into this issue though, that despite mse and mae are being optimized, I end up with a very strong bias in the prediction, e.g. sum(training_all_predictions) / …
Category: Data Science

Neural Network is non deterministic on validation

We have a regression problem we are trying to solve. We are using Transfer learning by using resnet50 and adding a linear activation layer at the end of it. each image input is 3 layers of synthetic wavelet images (not RGB). since resent uses Relu as an activation function and the fact that the wavelet transformation produces negative values, we have shifted all the data of our images (3Dmatrix) to be positive our label data is between -5 and 5. …
Topic: cnn regression
Category: Data Science

Create features for each row or only for a specific value

I have a problem. I want to predict when the customer will place another order in how many days if an order comes in. I have already created my target variable next_day_in_days. This specifies in how many days the customer will place an order again. And I would like to predict this. Since I have too few features, I want to do feature engineering. I would like to specify how many orders the customer has placed in the last 90 …
Category: Data Science

Why my regression model always be dominanted by one feature?

I am working on a financial predict problem. which means it is a time series prediction problem. I have three features, which have high correlation(each two's corr is about 0.6) And I do the linear regression fit. I assume that the coefficient should be similiar among these three features, but i get a coefficient vector like this: [0.01, 0.15, 0.01] which means the second features have the biggest coff(features are normalized), and it can dominant the prediction result. I dont …
Category: Data Science

Machine learning with constraints on features

I am working on a learning to rank problem. I have queries and documents related to every query which I have to rank. I used lightgbm ranker to fit the model. Some of features are very important and if they are changed the fitted model predicts a better score for that document and thus a better rank. Lets say, for a single query id, I have a group of documents d1....d5 each having features f1...fn. I change the features f1,f2,f3 …
Category: Data Science

Regression sequence output loss function

I am fairly new to deep learning, and I have the following task. Based on an audio sequence of shape (200, 1024), I have to predict two sequences of shape (200, 1) of continuous values (for e.g 0.5687) that represent the emotion at each timestep (valence "v" and arousal "a"). So I've created the following LSTM: inputs_audio = Input(shape=(200, 1024)) audio_net = LSTM(256, return_sequences=True)(inputs_audio) audio_net = LSTM(256, return_sequences=True)(audio_net) audio_net = LSTM(256, return_sequences=False)(audio_net) audio_net = Dropout(0.3)(audio_net) final_model = audio_net target_names = …
Category: Data Science

Deriving Prediction Intervals for Orthogonal Distance Regression using `scipy.odr`

Questions How can I derive prediction intervals for predictions based on new observations from the output of scipy.odr? Is it also possible (or necessary) to take into account uncertainties in the new observations? Background I would like to perform a linear regression between two sets of variables, both of which have uncertainties associated with them, and also be able to derive prediction intervals as part of the output. I have identified Orthogonal Distance Regression (ODR) as a possible method by …
Topic: regression
Category: Data Science

Need term or method name for evaluation of CNN without ground truth using e.g. a regression model

I have the following problem, I have trained a CNN and I can evaluate the network in-sample. I want to use the trained model for the class prediction of images for which I have no ground truth. However, there are other features referenced to these images that I can implement in a regression model along with predicted labels to predict Y. The only way to evaluate somehow the CNN is to infer if the predicted labels have an effect on …
Category: Data Science

Determine the effect on margins of a price increase

I hope you can help guide me in the right direction! Any advice is appreciated! Situation I'm currently analyzing the effect of a price increase from a retailer on a few 100 products. I'm interested in understanding the effect of the price increase on volume, sales value, and margin. The data I have available is weekly product-level data in terms of sales value, volume, and margin for products that had a price increase and for products that did not have …
Category: Data Science

CNN 3D line angles prediction regression - results of training of phi depend on theta

I am a beginner in "deep learning". What I am trying to do, is to predict two angles of a 3D line projected on a 2D image. The toy model is that I create a line going out from the centre of 48x48 array. The angle phi is the angle of the line in the image plane, angle theta is the angle of the line in the plane perpendicular to the image. Theta is just used to calculate each line …
Category: Data Science

How to train regression model with multiple dataset

The datasets I am working with correspond to individual time series signals. Each signal is unique, with differing total number of data points. here I want to simulate dataset A using dataset B. dataset A: dataset B : Spliting Dataset Code: x = SmartInsole[:,0:178] y = Avg[:,0] y = y.reshape(-1,1) scaler_x = MinMaxScaler() scaler_y = MinMaxScaler() scaler_x.fit(x) xscale = scaler_x.transform(x) scaler_y.fit(y) yscale = scaler_y.transform(y) X_train, X_test, y_train, y_test = train_test_split(xscale, yscale, test_size=0.25, random_state=2) The dataset after splitting and normalized: [0.83974359 …
Topic: regression
Category: Data Science

Regression problem with Deep Learning

I'm working on the Housing Price dataset, where the target is to predict the housing price. The price of the house will always be positive and according to me, it's possible that the model can predict a negative outcome for some of the samples. If it's correct, is there any way to control the training such that the model always predicts at least the positive value. As in the case of the classification case we use the Sigmoid/Softmax activation function …
Category: Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.