4

Just to clarify (and I think you've got this right, but I'm just being careful), it is best practice to: 1: Split your data into train and test 2: Split train into train and eval 3: Grid search over hyperparameters, for each combination, train on train, evaluate on eval. Select the hyperparameters which allow you to get the best score on the eval set ...


3

However Root Mean Square Error seems similar to MSE and is the root of it, gradient of RMSE with respect to $i^{th}$ prediction differes from that of MSE. $$\frac{\sigma{RMSE}}{\sigma{y_i}} =\frac{1}{2}\frac{1}{\sqrt{MSE}}\frac{\sigma MSE}{\sigma y_i}$$ Gradient of RMSE equals to the gradient of MSE multiplied by this $\frac{1}{2}\frac{1}{\sqrt{MSE}}$ ...


3

If you expect that all zeros is a result of error in the measuring of the features (i.e. the observations should not be all 0s but they are), then I would say: Keep all the data, but increase k (from k-means) by 1. This extra one will hopefully become the class of all these wrong observations. If you expect that all zeros is correct (i.e. these observations ...


3

It's a matter of data quality so it depends how the dataset was built: Either these instances are meaningful, i.e. it makes sense that an observation would have zeros for all the features and that it would happen that often. Or these are the result of an error, typically the complete absence of measurement for these observations. Naturally one wants to ...


3

You need to set bootstrap=False in the random forest to disable the subsampling. (I originally commented because I expected there to be more impediments [in addition to your already-coded random_states and max_features=None], but I guess there aren't any!) You probably don't want to do this in general; by stripping out all the randomness so that the first ...


3

Training GANs is only a partially unsupervised task, IMHO. It's certainly unsupervised for the Generator, but it's supervised for the Adversarial Network. So it might be useful to test the Disciminator's ability to distinguish fake and true cases on new data it has never seen before. In other words, it makes sense to split your dataset in train(-validation)-...


2

Yes there is, let's take $F_1$ score base definition, with : $$ F_1 = 2 \times \frac{precision \times recall} {precision + recall} \\ F_1 = \frac{2 \times TP} {2 \times TP + FP + FN} $$ And this is the same as the Sørensen-Dice coefficient, also known as Dice coefficient or Bray-Curtis distance. This is a statistical indicator that measures the similarity ...


2

The main problem I see here is that OHE is almost never a good idea with that many categories. With neural networks you will usually get better performance by using embeddings. So instead of X1 -{OHE}-> 10,000 -> {..} -> 1,000 you could go straight to X1 -{embedding}-> 50, where the embedding dimension should probably a lot lower than 1,000. ...


2

There cannot be a unique answer to your question. There is a discrepancy in your question though - I am aware that this is a classification problem on which I am working on. Could you please help me with the right step by step guide that I should follow in order to achieve an efficient clustering at the end? However, I am assuming that you are ...


2

Edit: oh, now I think I see why @CarlosMougan said no. You said ...start the same GridsearchCV with the same parameter and just change... If you mean use the optimal values for all hyperparameters except n_estimators and now search only on that one hyperparameter, then Carlos is right, and for the right reason. Below, I interpreted your suggestion as ...


2

First my understanding of your problem. You want to find the best hyperparameters for a Random Forest. For that, you want to first adjust n_estimators parameter and then the rest of parameters in different runs. Before answering to your question, you will only want to do a thorough search of hyperparameters when you want to have an improvement of around 1%...


1

There can be no objective answer to this question. Obviously the more one understands the better, but the field of ML is vast, quite specialized and ranges from very theoretical to very applied research, so it's perfectly reasonable to publish in ML without a strong background in maths. A better way to estimate your own ability to publish papers in a ...


1

Lasso stands for ´least absolute shrinkage and selection operator´. It has a penalty that is the absolute value and makes a lot of variables converge to cero. There is a ton of blogs that explain really well Lasso on the internet, have a look! Elastic Net is a combination of Ridge and Lasso. So it will also reduce the variables a lot. Ridge is a quadratic ...


1

Start with some natural thresholds : >3* average, >4* good, >4,5*: excellent, 4,9+* perfect. Then you can correct your rating based on some averages, other metrics or even text (but that's hard). Honestly I am not sure it will work as ratings should be viewable and giving different status to customers with same average rating will get noticed. Leave them ...


1

Check the values of train_new. You'll see that the columns mentionned are not of the expected types. Another suggestion, i'm not sure of xgboost's handling of nulls. Might be that in those columns aswell.


1

Most modern implementations do both, at least optionally. sklearn has max_features and bootstrap. ranger has mtry and replace/sample.fraction. xgboost's random forest has colsample_bynode and subsample. h2o has mtries/col_sample_rate_per_tree and sample_rate (and a couple modifiers).


1

You are looking for a local minimum, instead of a global minimum value. The local minimum has $\frac{dL}{dW} = 0$, there is no direction of $W$ in which you can further reduce the loss. If you are near the local minimum, you want to take small steps, not to 'overshoot'. If you are further away, you can take larger steps to speed up things, because you do ...


1

The purpose of the test split is normally to evaluate the performance of your model in data it has not seen before. While the available performance measures for GAN generators have their problems, they do exist. For images, you have Inception Score and Frechet Inception Distance. For text, you have quality vs. diversity plots. The evaluation measures ...


1

When I undersample and train my classifier on a balanced dataset and test on a balanced dataset, the results are pretty ok It's not surprising that the results are good since the job is easier in this case. It's actually a mistake to test on the artificially balanced dataset, since it's not a fair evaluation of how the system will perform with real data. ...


1

Statistical programs, such as R, typicall use Least Squares estimation. It's a deterministic algorithm that makes a linear model find its optimal tuple of parameters. Because of this, you don't have to worry about the choice of a loss function. In case you wanted to train your linear regression with a gradient descent algorithm, instead, you'd have to ...


1

o(t) is not the result of concatenation of h(t-1) and x(t), but a simple matrix multiplication. See wikipedia for further details: https://en.wikipedia.org/wiki/Long_short-term_memory


1

Sorting data won't affect the training of your model, it is similar to changing the random seed. It can affect the validation that you are doing. In case you do time series you can do sliding window or roll-out-window, that they need the data to be sorted before the splitting. It seems that you want to do time series regression with supervised learning so ...


1

It doesn't seem that non_negative is an argument in some versions. Try using decode_error = 'ignore'. If you're working with a large dataset, this error could also be resulting from hash collisions, which can be solved by increasing the number of features: vect = HashingVectorizer(decode_error = 'ignore', n_features = 2**21, ...


1

There is plenty of material on the internet in the form of blog posts. This, together with the philosophy of learning by doing, leads me to the following advice: google "python XXX tutorial" where XXX stands for a basic machine learning algorithm and, for a few of the first results, use Google Colab to mimic what the tutorial explains. Whatever you don't ...


Only top voted, non community-wiki answers of a minimum length are eligible