Most Popular
1500 questions
8
votes
3 answers
Is a "curve" considered "linear"?
In linear regression, we are fitting a polynomial to a set of data points. In Bishop's book of Pattern Recognition & Machine Learning, there are a few examples where the fit is a curve or a straight line. I am a bit confused if a curve is linear or…

Srishti M
- 471
- 4
- 9
8
votes
4 answers
How to handle features which are not always available?
I have a feature in my feature vector that is not always available respectively sometimes (for some samples) it makes no sense to use it. I feed a sklearn MLPClassifier with this feature vector. Does the neural network learn by itself when the…

jochen6677
- 591
- 2
- 4
- 9
8
votes
3 answers
Are there any actual, commercial uses of GANs already?
Doing research on the internet, I found many scientific papers, ideas, and experiments concerning GANs. But I was unable to find a single example of it being already used commercially.
Q1 can you give examples of companies already using GANs in…

Przemysław Czechowski
- 181
- 4
8
votes
1 answer
How does dropout work during testing in neural network?
The below paragraph is picked from the textbook Hands-On Machine Learning with sci-kit learn & Tensorflow. I couldn't understand what the author is trying to convey. It would be really grateful if someone can provide an explanation for below…

James K J
- 457
- 1
- 5
- 15
8
votes
1 answer
How to handle preprocessing (StandardScaler, LabelEncoder) when using data generator to train?
So, I have a dataset that is too big to load into memory all at once. Therefore I want to use a generator to load batches of data to train on.
In this scenario, how do I go about performing scaling of the features using LabelEncoder +…

Jim
- 181
- 3
8
votes
2 answers
Is empirical risk the same thing as loss function?
I am reading the article Stochastic Gradient Descent Tricks by Léon Bottou (avaible here) and on the very first page they introduce empirical risk
$E_n(f) = \frac{1}{n} \sum_{i=1}^{n} l(f(x_i),y_i),$
where $l(f(x),y)$ is a loss function, that…

user84946468
- 81
- 1
- 3
8
votes
0 answers
Training value neural network AlphaGo style
I have been trying to replicate the results obtained by AlphaGo following their supervise learning protocol. The papers specify that they use a network that has two heads: a value head that predicts the winner of the game and a policy head that…

Phaune
- 101
- 4
8
votes
1 answer
How to implement a Fourier Convolution layer in keras?
I'm currently investigating the paper FCNN: Fourier Convolutional Neural
Networks. The main contribution of the paper is that CNN training is entirely shifted to the Fourier domain without loss of effectiveness. The proposed architecture looks as…

deepsnow
- 83
- 1
- 3
8
votes
2 answers
Obtaining a confidence interval for the prediction of a linear regression
The data I am working with is being used to predict the duration of a trip between two points. There are about 100 different trips in the data and ~90k observations.
I am using the standard pattern:
feature_cols = df_features.columns.drop( […

ericg
- 181
- 1
- 1
- 2
8
votes
5 answers
In a binary classification, should the test dataset be balanced?
I have a dataset with 4519 samples labeled as "1", and 18921 samples labeled as "0" in a binary classification exercise. I am well aware that during the training phase of a classification algorithm (in this case, a Random Forest) the number of 0/1…

Irene
- 193
- 1
- 5
8
votes
4 answers
Determining size of FC layer after Conv layer in PyTorch
I am learning PyTorch and CNNs but am confused how the number
of inputs to the first FC layer after a Conv2D layer is calculated.
My network architecture is shown below, here is my reasoning using
the calculation as explained here.
The input images…

Into Jo
- 83
- 1
- 1
- 5
8
votes
1 answer
How to use SMOTE in Java Weka API?
I am trying to build classification model using Java Weka API. My training dataset have class imbalance problems. For this reason, I want to use SMOTE to reduce class imbalance problem. But, I do not know how to use it in Java Weka API.

Sagor Ali
- 83
- 3
8
votes
2 answers
How do I use a custom stopwords filter in the Java Weka API?
I am using the Java Weka API to build a classification model. I can use the builtin stopwords filter. However, I need to use a custom filter for my problem. I do not know how to use a custom stopwords filter in the Java Weka API.

Radia Karim
- 158
- 4
8
votes
1 answer
How can I calculate AUC from the ROC curve for the classification?
Based TPR and FPR, I have generate ROC curve for my binary classification model. I do not know, how to calculate AUC value. I would be very help for me if you can help me to calculate AUC value.

Reja
- 898
- 1
- 9
- 21
8
votes
1 answer
How does exactly class_weight in Keras work?
I'm working on a multi-label problem in Keras, using binary-cross-entropy loss function with sigmoid activation. Let's say I have 4 classes, so a response might look like this:
[1, 0, 0, 1]
Though a vast majority of the responses will actually be…

Kári Gunnarsson
- 81
- 3