New answers tagged

1 vote

Time Series clustering: clustering a dictionary of time series

Are you sure you want to do clustering? It sounds like you need to find consensus motifs among the wifi box users. It is easy to find them, see [a] [a] https://www.cs.ucr.edu/~eamonn/...
user avatar
  • 11
0 votes

Mathematical notation for number of samples of a predicted class that exceeds threshold of total number of samples

What i understand is you are doing is Bootstrap classification In general, What is Bootstrap Classification? Suppose you are doing Logistic Regression, (meaning a binary classification problem.) You ...
user avatar
  • 1
1 vote

How to use cosine similarity within triplet loss

Perhaps equation 9 in this paper1 is useful. Using your notation: $$ \begin{equation} L_{\text{cos}}(A, P, N) = -\log \frac{\exp\{s (f(A)^T f(P) - m)\}}{\exp\{s (f(A)^T f(P) - m)\} + \exp\{s f(A)^T f(...
user avatar
0 votes

Can precision and recall of a DNN trained on human-labeled data be higher than precision and recall of the humans who labeled the data?

a DNN classifier could be more accurate than the human experts who labeled the dataset on which it had been trained The bias-variance decomposition says this observation could be explained by exactly ...
user avatar
0 votes

Independent Samples T-test vs Paired Samples T-test for hypothesis testing (machine learning algorithms comparison)

You need to clearly state your hypothesis. For some reason, this is a step that is commonly overlooked by people who wish to make some kind of statistical inference, and instead the focus is on "...
user avatar
  • 5,036
2 votes

Is it possible to learn/separate this data?

I suspect that there is little you can do here as there isn't enough data of the minority class to properly characterise the underlying distribution. One of the problems with SMOTE is that the way ...
user avatar
0 votes

How to choose between ROC AUC and F1 score?

Lets start with some formula to see how each measure is calculated (see Wikipedia for a complete list): Precision: $\frac{TP}{TP+FP}$ ...
user avatar
  • 1
0 votes

If we reduce size of training dataset does it decreases bias?

The variance bias relationship is a causal relationship. For certain types of bias the variance can reduce when the bias increases. That means that the other way around does not work. If you reduce/...
user avatar
0 votes
Accepted

How to find a mapping to a higher dimension that separates the data, given a data set

An example approach Plot the points on a 2D axis. You have +1's on the x-axis at $x_1=1$ and $x_1=-1$. You have another +1 on $x_2=1$, but a -1 on $x_2=1$ on the y-axis. Now, you ponder about the ...
user avatar
  • 52.2k
0 votes
Accepted

Is it possible to predict on new data using PLS SEM?

Update: I think I found a solution for the problem (at least for predicting indicators). It seems a bit hacky but it should work. It is sufficient to set the values for all indicators in the testing ...
user avatar
  • 69
0 votes

Activation function in the mean and variance layer in VAE?

I read this description from the document of TensorFlow: Note, it's common practice to avoid using batch normalization when training VAEs, since the additional stochasticity due to using mini-batches ...
user avatar
  • 135
8 votes

If we reduce size of training dataset does it decreases bias?

You can only speak of 'inverse relation' when you change model complexity (including, to some extent, feature selection vs feature addition). As the number of samples grows, variance drops, bias is ...
user avatar
  • 226
9 votes

If we reduce size of training dataset does it decreases bias?

Now variance has an inverse relationship with bias Not necessary. A picture is worth a thousand words, so let me use the image below. (Check also the Intuitive explanation of the bias-variance ...
user avatar
  • 115k
0 votes
Accepted

Linear Separator in Higher Dimension - Theory Example Explanation

It's just mathematical intuition. The table says that if any of $x_i$ has absolute value $1$, the result is $1$, otherwise $0$. You can fit any other mapping to satisfy this condition. For example, $|...
user avatar
  • 52.2k
0 votes

MLE vs MAP estimation, when to use which?

Theoretically, if you have the information about the prior probability, use MAP; otherwise MLE. However, as the amount of data increases, the leading role of prior assumptions (which used by MAP) on ...
user avatar
2 votes

Does cross validation reduce underfitting?

The short answer is No. Cross validation does not "reduce the effects of underfitting" — or overfitting, for that matter. I agree with the comments that your question seems to miss the point ...
user avatar
  • 254
2 votes

Cross-validation by hand in R

My understanding is that when I build a model via CV, it should have a lower RMSE. But I find almost identical RMSEs with and without CV. Is this because I've coded too simple a problem? You've ...
user avatar
1 vote

XGBRegressor score (R2) vs. eval_metric (RMSE)

You said: scoring and using an evaluation metric is the same But I guess I would question this idea and suggest that, at least in a typical XGBoost workflow, the concepts behind 'scoring' and '...
user avatar
  • 254
0 votes

Machine Learning outcome with more than 2 categories-caret

Every model for binary outcomes that I know has a multiclass analogue. Logistic regression has multinomial logistic regression. Neural networks with sigmoid activation functions for the final layer ...
user avatar
  • 32.6k
0 votes
Accepted

Mutual Information larger than smaller one of both entropies?

To complete this topic I would like to share my final version which combines the idea provided by BioLiason with parallelized loops using foreach. On small data ...
user avatar
  • 21
0 votes

What type of model can be used to detect changes in periodic behavior?

If you know the original periodicity of the pulses, a simple approach would be to use any seasonal time series forecasting algorithm with this seasonal frequency. Fit the model to your data, holding ...
user avatar
2 votes

Cross-validation by hand in R

There is a design flaw here: you are fitting the true model. To be precise, you simulated (x, y) from a straight line and fit a straight line. You will "perfectly" recover the truth, so you ...
user avatar
0 votes
Accepted

Training loss after last epoch differs from training loss (same data!) during evaluation

In comments, OP writes that the network uses batch-normalization. This explains the observed behavior, because neural networks with batch norm change how statistics are computed, depending on whether ...
user avatar
  • 79.6k
3 votes

Does gridsearch on random forest/extra trees make sense?

To add a little to @Björn's answer, when the model selection criterion is noisy (or there is a random element to the classifier) grid search (or random search) actually makes more sense than some more ...
user avatar
3 votes

Does gridsearch on random forest/extra trees make sense?

You are right that randomness will play a role (like with many other algorithms including MCMC samplers for Bayesian models, XGBoost, LightGBM, neural networks etc.) in the results. The obvious way to ...
user avatar
  • 23k
2 votes

XGBRegressor score (R2) vs. eval_metric (RMSE)

This is a bit strange, but $R^2$ and $RMSE$ are just functions of each other, so they are, in some sense, conveying the same information. $$ R^2=1-\dfrac{ n\big(RMSE\big)^2 }{ \sum_{i=1}^n\big( y_i-\...
user avatar
  • 32.6k
0 votes

Where can I find pre-trained fully convolutional neural networks?

Some examples: image models from huggingface that can be used as image encoders, like clip-ViT from sentence-transformers in Pytorch/Tensorflow in Tensorflow/PyTorch you can manipulate CNN models by ...
0 votes

How do I access the p-values of individual predictors using caret::train?

This may be what you're after: summary(model$finalModel)
user avatar
1 vote
Accepted

How do I write the (multiple) linear regression equation with interaction term?

There's really no need to use any of the "reduced forms"; they are just different ways of combining the coefficients and predictors. All are correct. The "reduced forms" might help ...
user avatar
  • 64.5k
3 votes
Accepted

Why does data get so tangled up in high dimension?

Textbook examples are not meant to represent the likelihood of encountering particular situations. They are meant to cover a wide range, and give you the ability to recognize and solve certain special ...
user avatar
0 votes

Should I train my classifier with examples that are outside my classes of interest? And should I create an "others" class to handle them?

For sure, you should have other images in addition to cats and dogs in your training, validation and test. For the output layer, have a softmax output layer with three classes. In the two output node ...
user avatar
  • 52.2k
0 votes

Embedding data into a larger dimension space

I suggest that the datapoints of the 5-dimensional dataset are first classified in 13 types of classes(orbits) where these types of classes(orbits) have the following cardinalities: 1,10,32,40,80,160,...
user avatar
0 votes

What is the main purpose of Feature Selection?

What is the main purpose of Feature Selection? Feature selection is probably the most important topic in model building. Indeed asking clarification about the purpose of variables selection looks ...
user avatar
  • 4,124
0 votes

Mutual Information larger than smaller one of both entropies?

I've playing a bit more with this and the solution described above can still produce I(x;y)>max(H(x),H(y)). The reason is: in that nested loop for i!=j we can ...
user avatar
  • 21
1 vote
Accepted

Mismatch between the dimensions of Jacobian matrixes when calculating derivatives during backprop?

Using denominator layout notation, the order of the terms in the chain rule is correct. However, the multiplication is undefined because $\frac{\partial Y}{\partial X}$ is a 4D tensor. We don't have ...
user avatar
  • 52.2k
18 votes
Accepted

self study: why is my neural network so much worse than my random forest

By default, nnet is doing classification. You want to set linout=T to make it do regression. Then, increase the number of hidden ...
user avatar
1 vote

Should we always minimize squared deviations if we want to find the dependency of mean on features?

Yes, it is possible for estimators obtained by minimizing some different than squared deviation to give a better estimator of model parameters. The question of whether a given estimator can be beaten ...
user avatar
  • 642
1 vote

What are "volatile" learning curves indicative of?

This means that your optimization hasn't really settled, yet. There could be many causes for that. If you are sure that the validation set is from the same population as the training set, then the ...
user avatar
  • 3,683
0 votes

Should we always minimize squared deviations if we want to find the dependency of mean on features?

Your estimator is the OLS estimator in nonlinear regression Your problem is essentially just the OLS estimation problem in nonlinear regression. To see this, suppose you have nonlinear regression ...
user avatar
  • 97.6k
1 vote

Splitting medical dataset by patient

There's no whatsoever problem with unbalanced test folds (other than that you need to think how to properly aggregate the results - on scan vs. on patient level - but that's a consequence of the data ...
user avatar
2 votes

Should we always minimize squared deviations if we want to find the dependency of mean on features?

A similar question (if not the same) is: If the predicted value of machine learning method is E(y | x), why bother with different cost functions for y | x? The theoretical mean of a distribution ...
user avatar
8 votes

Why Logistic Regression is not a generative model?

To elaborate on @Bayesian's (correct) answer, consider a logistic regression model where cases of diabetes ($y$) are predicted by sugar intake ($x$). The model learns $P(y = 1 | x) = \text{logit}^{-1}(...
user avatar
  • 5,541
1 vote

Error in linear regression

Correlation is not sufficient to describe the distribution of the datapoints. You would need the full distribution in order to make predictions about the distribution of $y_{n+1}$ given $x_{n+1}$. ...
user avatar
15 votes
Accepted

Why Logistic Regression is not a generative model?

The fundamental difference between Generative Model and Discriminative Model is, one is learning about $ P(X,y) $ while discriminative model is learning $ P(y|X) $ According to this definition, ...
user avatar
  • 404
1 vote
Accepted

What type of prediction model will be suitable in this case?

This is a multidimensional problem in which the predictor variables $v_{ijn}$ have three indices: $i$ for subjects/individuals; $j$ for variables/measurements; $n$ for tissue samples. The variable ...
user avatar
  • 904
3 votes
Accepted

Dealing with very small and unbalanced data

Train/test split sounds like a bad idea indeed. I'd try jackknife resampling/LeaveOneOut cross-validation for this case.
user avatar
  • 226
5 votes

What is the main purpose of Feature Selection?

Allow me to be a contrarian and say that feature selection is overrated. My post here discusses feature selection when features are correlated, but the same bias-variance argument applies to ...
user avatar
  • 32.6k
1 vote

How to make a Neural Network(NN) learn when it is an input to an non-differentiable function?

Answering the general question, using back-propagation and gradient-based optimization algorithms is not the only possible way. There is a whole family of derivative-free optimization algorithms and ...
user avatar
  • 115k
0 votes

Machine learning & Nerual Network How to chosen the method?

Hyperparameters should be chosen to optimize the metrics that you're using. In general, you can look for some searching techniques or genetic algorithm, both are available in R. But the optimization ...
user avatar
  • 83

Top 50 recent answers are included