# Tag Info

0

It is very hard to beat gradient boosted trees with native support for categorical features such as https://catboost.ai/ on a tabular data set. Assuming you data has not temporal/spatial/order structure (like in speech/image/text) I am very doubtful you will get a better results with deep learning. Having said that, the no-free-lunch theorem states that ...

0

If you really just want to guess the sign, you should just build a new target : 0 if the sign is negative 1 if the sign is positive... That would fit with your binary classification approach and the metrics you want to use.

2

Question 1. Why do probabilities sum to 1: Probability theory. Probabilities sum 1 because that’s how we define them. It just so happens that, by forcing them to sum 1, they have an intuitive interpretation and also calculations end up being easier. But this is mere convenience. Probabilities (or, more specifically, probability measures) could have been ...

0

If you label your data using -1 and 1 as classes, then yes you can. However, there are two reasons why data scientists normally prefer Sigmoid activations: Loss functions, such as cross entropy based, are designed for data in the [0, 1] interval. Better interpretability: data in [0, 1] can be thought as probabilities of belonging to acertain class, or as a ...

0

I'd say the model 1 is performing really well. If you can use different colors while plotting for positive and negative classes, then you should be able to see the difference. When you are trying to do binary classification, the distributions of negative and positive classes should be dipping in the mid region where as Model 2 is the opposite.

0

Have a look at this competition organized by the European Spatial Agency (ESA). https://kelvins.esa.int/collision-avoidance-challenge/scoring/ Here they use a composed loss function. A binary classification whether two spatial are at risk of colliding or not. And in case that they collide a regression saying what is estimated risk between them. This is ...

1

Question 1) Is my calculation for each case above correct? No, it is not correct. The formula to calculate the spatial dimensions (height and width) of a (square shaped) convolutional layer is $$O = \frac{I - K + 2P}S + 1$$ with $I$ being the spatial input size, $K$ being the kernel size, $P$ the padding and $S$ the stride. For your two cases that is (...

1

This is indeed the expected behavior. (N.B. You should not balance test sets, since they are supposed to inform you about performance on unseen, original-distribution data. https://stats.stackexchange.com/a/258974/232706 In a binary classification, should the test dataset be balanced? ) A quick example may be clearer than being general. Let's fix a ...

0

I don't think test dataset should follow the ratio of classes of training one. Class ratio just follows that of real population s.t. test result properly reflects what'll actually happen with the actual predictions in the real world. Class balancing/sampling in training phase with training dataset is independently optimized to the evaluation performance ...

1

Yes, we can use the Discriminator of the GAN to classify images. But we should make sure that the images produced by the Generator are real looking. If you have trained your GAN on a large number of images and it is performing pretty well on the dataset then I insist you to treat the Discriminator model as a pretrained model ( like we do in transfer ...

0

Regarding #1: As you mentioned, the following amount of fitting you do on a pre-trained (PT) network depends on the relative size and similarity of your data and the data used to train the PT model. If our dataset is smaller than the PT data, we should unfreeze fewer layers to avoid overfitting. If our dataset is of a similar size as the PT data, we can ...

2

Both methods will be beneficial for different cases. If you think that dependencies in the text are more discriminative of the classes, then NLP apporach. Image approach in this case will need to be super complex to catch this kind of information. On the other hand layout and position could be very informative and this it could happen is not encoded in ...

2

Accuracy is commonly defined as total nbr of correct predictions / total nbr of predictions. Imagine a binary classification of color in: White or not White. Since it's binary, all the white Classifications - a True Positive classification are as important for accuracy as a - True Negative classification, after all, the classification is also correct, hence,...

0

T-SNE is not a clustering algorithm and should mainly be used for data visualisation as authors outline in the abstract of their paper (you should read it: http://www.jmlr.org/papers/v9/vandermaaten08a.html). It has been show that it can separate well-defined clusters, which is not the case here. There is no immediate separation between frauders and non-...

0

To have the intuition, let's make simplify the problem. Let's say that you are using PCA and that you are getting a linear function. If you don´t get any cluster it means that it is not possible to separate them by linear combinations of the features that you have. And since it is a linear function, as you move in this direction there is a change in the ...

2

Having consulted my professor, the person that wrote the question from the exercise book featured in the OP, here is their perspective: Groups of data points can always be separated. The exception is when two points are at the same location. However, the thing to consider is whether or not your decision boundary can separate unseen data, generated by the ...

0

Giving a single label in a model is not the thing i have heard ever before for labeled data, if you give like that also internally it is binary model only for eg : take log regression model example we have a loss function for all model and for log regression we have : J(w)=∑i=1_to_m y(i)logP(y=your label)+(1−y(i))logP(y= not your label)? you are not showing ...

1

In step 1, it's no need to use MCMC, instead, we can compute the posterior with some assumptions in closed form, it's $N(E(f_*),Var(f_*))$. In the second step, we use approximation method to compute the probs by sampling from the posterior distribution.

1

Improvement in the evaluation metric by rebalancing depends on the type of classifier algorithm. Certain algorithms are very sensitive to rate imbalances, thus adjusting the respective levels of support will change the algorithm's performance. One way to empirically verify that only under-sampling is driving the improvement is to run an experiment - ...

0

At the moment, you don't really know the performance of your model because you have quite a few wrong labels in your test set. You mentioned that you want to use the new probabilities to correct the validation and test sets. However, if you do that, you will of course get higher results because you are using the labels coming from your own model. However, ...

0

Not knowing your data in detail, my intuition is that you could go for dummy (one hot) encoding. You could split each day in (say) 10 min. intervals $x$ (144 columns) and attach labels (up/down) $y$. Each time interval $x$ would be one dummy encoded column (true/false). The model would be a binary classification (logistic) like: $$y = \beta_0 + \beta_1 ... 1 This is actually much more about feature engineering than just finding any representation. Therefore, I'd think through which variables might help your algorithm. Here are some more ideas for features based on your time ranges which might be helpful: duration start time end time morning, day time, evening or night activity (categorical, i.e. not for LDA) ... 1 Option 1 Convert range to numerical features. You can create 2 features from it. range ------------- 7:00 to 14:00 becomes percentage of day in school | hours in school ----------------------------|---------------- 0.29 | 7 Option 2 Convert range to a hot-encoding. You can create 24 features from it. range --------... 5 If you want to move from theory to application then I suggest to do exactly that: get your handy "dirty"! UCI Machine Learning Repository has some easier datasets to get started. Kaggle is great too but before going for any competition look for an easier dataset from their repository. If you prefer something with more guidance the book "Introduction to ... 4 Doing Kaggle problems is a good way to test your skills, and it is a good way to improve your skills. There are problems that don't require advanced techniques. For example, Titanic is an introductory problem. Also, solutions for many problems are available. You can do a problem yourself and then check how other people did it. 1 It sounds like a great opportunity for feature engineering. You're contemplating this in your last paragraph so you're on the right track, but I'll elaborate on a possible solution here. You could use the features that you know will exist in the test set to construct synthetic features based on the context information. For example, you could predict the ... 0 F1 score is my main metric for model comparison, especially when evaluating models using imbalanced datasets. Accuracy is clearly out of the question, and ROC-AUC is also skewed under class imbalance (1). If you favor higher precision or higher recall you can also adjust the beta parameter in the generalized F-beta score (2), but I'm usually looking for a ... 1 It would depend on use case that you are addressing. Say in a healthcare where you are using it for medical diagnosis recall might take precedence since false negatives can be quite detrimental there however in the use case you mentioend fraud detection both false positives and false negatives can have dire impact you would look at F1-score 0 Simple precision/recall/F-score is perfectly suitable for imbalanced data. It should be computed on the minority class of course. precision says how often the system is correct when predicting an instance in the minority class. recall says how often the system detects an instance which belongs to the minority class (this is usually the hardest part with ... 1 When implementing a model from a paper to reproduce their results, it is very important to pay attention to all the details. For this case there are some important differences when comparing to the CIFAR10 results of ResNet: You are using the Adam optimizer, while the ResNet paper uses SGD with a learning rate schedule. Adam is known to have issues ... 4 TL;DR Yes, with overfitting all data becomes (non-linearly) separable (as long as the points don't precisely overlap). Explanation The problem with your argument is that you are using circles on a 2D plane, which is very difficult to learn. However, I think your argument can be made stronger with a decision-tree. (0.2, 3.1)? --> yes -> star ... 0 Here is my stab at the answer: separation basially means that the types of cases are separated, but cases of the same type are not. In your case I presume that the stars in your graph are of the same type, so they shouldn't be separated from one another, but conneted. In this case the data is not separable If on the other hand you had eleven types of cases ... 0 Though most of the Libraries will through an error for this, even if we manage(let's assume) to create the features based on any logic e.g. Fill NAN, it will not work ML model just creates a pattern based on data. If it has created a pattern using some set of features and at the moment of prediction those features are unavailable it will definitely impact ... 1 Macro F1 calculates the F1 separated by class but not using weights for the aggregation:$$F1_{class1}+F1_{class2}+\cdot\cdot\cdot+F1_{classN} which resuls in a bigger penalisation when your model does not perform well with the minority classes(which is exactly what you want when there is imbalance) Weighted F1 score calculates the F1 score for each ...

2

Your data set is unbalanced since 28432 out of 28481 examples belong to class 0 (that is 99.8%). Therefore, your predictor almost always predicts any given sample as belonging to class 0 and thereby achieves very high scores like precision and recall for class 0 and very low scores for class 1. In the case of weighted average the performance metrics are ...

1

Just a couple thoughts: It looks like these "regimes" could be represented as a latent variable: you could probably design a bayesian model in which the OLS model depends on the value of this latent variable. This means that the model would still be trained only with the observed features, but would internally predict the value of the regime and this value ...

3

Thats not how it works, there is not juice to be extracted if the data is missing from the test set. You will have features in train that might be discriminative, but missing in test. Then when you try to predict there wont be any inputs that you can map to the outputs. This beeing said I should mention that NaiveBayesclassifier will not use missing ...

1

In simple terms: Linearly separable = a linear classifier could do the job. You could fit one straight line to correctly classify your data. Technically, any problem can be broken down to a multitude of small linear decision surfaces; i.e. you approximate a non-linear function with a high number of small linear boundaries. That's what Neural Networks are ...

1

Mutually exclusive classes are usually integers; in your case, win=0, draw=1, loss=2 (for instance). It is mostly a convention and is convenient for implementation.

1

So your goal is only feature importance from xgboost? Than dont focus on evaluation metrics, but rather splitting. I would suggest to read this. Using the default from tree based methods can be slippery.

5

Your information is not discriminative enough Why? Coefficients of polynomials dont give (alteast partially) discriminative information about roots of the polynomial. In other words different coefficients could give same roots. It does not matter how complex your network is it cant catch what is not there to be catched in the first place.

0

Use the segment embedding (idea from BERT) for the origin text classification model. For example: input ["apple", "Peking", "in summer"] += segment emb [1,2,3,3,0] input ["tomato", "New York", "in winter"] += segment emb [1,2,2,3,3] where 1,2,3 are something like the data source type for input. Another improvement: check out PCNN or PCNN+ATT

1

For a CNN layer with input of dimensions h * w * d, kernel size k * k and number of kernel filters as f, we have the number of parameters as k * k * d * f, if we ignore the biases. If use biases then the number of parameters becomes (k * k * d + 1) * f For e.g., the 1st conv layer has 5 * 5 * 2 * 20 parameters if we are ignoring the biases. With bias, the ...

2

You can leverage word-vector similarity in embedding models. TL;DR similiar vectors of words (for example fruits) will be clustered together in this high (vector) dimensional space. For every possible class-set you will have a class-set representative (centroid) that is actually a key (so in your case fruit, vegetable etc) all you need to do is train/find a ...

0

I found this slide very useful in understanding the rectangular decision boundaries generated by decision trees . Source: http://web.engr.oregonstate.edu/~xfern/classes/cs434/slides/decisiontree-4.pdf

-1

I found classification_report to be extremely helpful in understanding how my model is doing for each label. It generates a report detailing the f1-score, recall and precision for each label.

2

sklearn doesn't know that your feature is categorical; it's treating it as continuous, for which only splits of the form $x \leq \alpha$ are checked, so your second listed split candidate isn't actually a candidate. In general, sklearn doesn't support categorical variables (yet?), and you'll need to encode it differently (one-hot?) if you want different ...

1

Janez Demsar has published an article concerning comparison of different classifiers. When you're using multiple datasets to check which algorithm performs best, assuming, that quality measurements come from normal distribution can be risky, so ANOVA is not necessarily recommended. Non-parametric tests (such as Friedmann test) can be used to obtain F-score. ...

3

You mean first to second, not to third? In any case possible explanation: What are your parameters in decision tree. For example for different min_samples_split you can expect different GINI values. You got information gain values (very likely) calculated for all of the samples (rows) of your dataset, but thats not how decision tree calculates it (...

3

Second one but dont stop there. First of all you specifying if target_metric > x: engaged is just wrong and you have to let data tell you this x, not you choosing it. Second one seems nice I would start with that, do some extensive analysis and only then start finding x empirically. How? just of the bat you can pose it as minimization problem for different ...

Top 50 recent answers are included