Hot answers tagged

4

To see clearly why the procedure of upsampling before CV is mistaken and it leads to data leakage and other undesired consequences, it is useful to imagine first the simpler "baseline" case, where we simply upsample (i.e. create duplicate samples) without SMOTE. The first reason why such a procedure is invalid is that, this way, some of the ...


2

Extra-random Trees needs a target variable, so Isolation Forest generates a random target (sklearn, solitude). At prediction time, no y values are used, and the ExtraTrees doesn't actually make a prediction; instead, the samples are propagated to the leaves and the depth is extracted (sklearn). As for the tree-building process, sklearn at least doesn't make ...


2

The mixture distribution can be obtained in the following way. Let $f(x)=w_1p_1(x) + w_2p_2(x) + ... + w_np_n(x)$, where $p_i$ are density functions and $w_i>0$. Note that $f(x)$ is a density function if the sum of all weights is one. Then, we use the following two-stage process. Stage 1. Draw a random variable $X$ (selector, if I remember correctly), ...


2

Some of your hyperparameter values aren't allowed (colsample_bytree and subsample cannot be more than 1), so probably xgboost errors out and sklearn helpfully moves on to the next point, recording the score as NaN. Half of your values for colsample_bytree are disallowed, which supports seeing half of your scores as NaN; and that will happen regardless of the ...


1

You need to apply two regexes: first, get r'^test:.*$' with m option, then your original regex on the result of the first.


1

As far as I'm aware, deep learning on hypergraphs is still a relatively new area, so I don't think there's any ready-made solution for hypergraphs. I did find this repo, which implements some models in keras to accompany a recent paper on hypergraph learning, but it is hardly a library. You may also check out this paper, which cites a pair of techniques for ...


1

When used with loss="hinge" The SGDClassifier gives a LinearSVM, so they should be the same. This is matter of choosing the same hyperparameters for both. Can you check that you using the exact same parameters? As a side note (I don't know your dataset), 41.1 and 41.5 looks pretty similar, this also might be about splitting the training/testing ...


1

You look at loss at every batch. You should average your loss over all batches. When you look at different batches your loss may increase simply because one batch is harder to predict than the other one. That's why it's not really interpretable. So start with that. If the problem persists it's probably exploding gradients. In that case lower your learning ...


1

You can access the GPU by going to the settings: Runtime> Change runtime type and select GPU as Hardware accelerator.


1

If you are using pandas, all you need to do is: import pandas as pd import seaborn as sns import matplotlib.pyplot as plt corrMatrix = df.corr() Then you can print the correlation matrix and also plot it using seaborn or any other plotting method. sns.heatmap(corrMatrix, annot=True) plt.show() Hope this helps.


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