# Tag Info

0

This is called multiclass classification, and the encoding needed for the target variable depends on what package and model you're using. You may be expected to one-hot encode (e.g. neural networks usually have an output neuron for each class), ordinal encode (e.g. most(?) sklearn multiclass classifiers), or leave them as strings (most R models, I'd guess?)....

0

With only 5 samples per class you probably should not be using any Neural Network. If you can find a way to summarize your long time-series into a couple of numerical features, then you can try with a simple Logistic Regression model. Exploring the data is the key here, as well as understanding the problem domain. What is the physics of the process for ...

1

It is hard to know what is happening from just that screenshot and no code. The training and validation plots are usually separated on the page, not lines on the same graph. If you are using Tensorflow 2.0, there is a known issue, regarding the syncing of TB and the tfevent file (where logs are stored). A couple of things to try: Try adding the ...

0

clf = SVC() clf.fit(X, y) print(clf.get_params())

0

To expand on fuwiak's answer, you can cluster the current loan group, declare clusters to be classes, and see whether a good fraction from your default set gets classified in one of the classes/clusters. If yes, this class is predictive of default. Another take would be to do anomaly detection: use you default set to train the detector and apply it on the ...

1

Assuming I can’t use external datasets, what’s the solution to this problem? How can I best understand those who have defaulted if I don’t have something to compare them to? If you wanna use this only this data as classification task, you can't perform this task. You could way this around, by generated fake data with label 0(you think about which value of ...

2

What 2 annotators or observers does Cohen Kappa use in classification problems when you compute the score in scikit learn? The two annotators are exactly the two parameters you fed the method with: cohen_kappa_score(y_test, predictions), i.e. the truth/labels and your predictions. And these are then measured in terms of their "inter-rater" agreement.

0

The less data you have, the less complex your model can be. Otherwise you will overfit your data. There is not really a good way for me to judge what model is appropriate for you without knowing a lot about your dataset, but I doubt you will get anything sensible from 200 data points with a deep learning model. Try some simpler models like bag-of-words and ...

1

They all start from the same assumption: time series forecasting can't be treated as a regression/classification problem. It is time dependent, which means our target y at time t depends on what the value y was at t-1. Time series forecasting must take into account time dependency, but it doesn't have to be the only source of information. Many complex ...

0

for sure this is too late for you but as i used mnist some days ago and could not get good results for my own handwriting... maybe someone else is in search for a solution: MNIST does represent american handwriting and will not achive good results in recognition of european writing.

0

If you have a disproportionate amount of zeros, it means you models doesn't have enough data in order to learn how to correctly classify observations. Because it sees zeros almost all the time, it probably has learned to output zeros. The main thing you can do to solve this problem is to train your model using mini-batches, and build them by sampling 0- and ...

0

I get your problem, the point is that its correct what the model does, but you have to build a look-up table for its answer. Your ground-truth, looks somethink like that [0,0,0,0,1], a one-hot vector for example. You, the human know what this code stands for, for example cats. just like that you have to build an numpy array, listing the word-embeddings in ...

0

Actually this equation is not quite right. The actual minima occurs at In the derivation this BetaM is the solution to the equation Notice how in the function we are scaling the weights of wrong predictions up by exp(BetaM) and scaling down the weights of correct predictions by multiplying exp(-BetaM). But in the code that I have written (also in ...

1

Do you think I implemented the code in the right way? Code is correct, but he is minimal possible. The features (X) have low correlation with the labels (Y). It's could be the biggest problem, features have to have correlation with labels. Do you have any suggestion to enhance the accuracy? Make transformation of labels(X). Preparing of labels its ...

1

So, the direct answer here is clearly NO. The answer comes from the definitions of classification and regression. In a classification task what a model predicts is the probability of an instance to belong to a class (e.g. 'image with clouds' vs 'image without clouds' ), in regression you are trying to predict continuous values (e.g. the level of '...

-1

Yes, you can go this route, using regression rather than classification, but you should one-hot encode your classes. This means that your model will have 4 outputs (alternatively, you can think of it as having 4 models). The first output will be the certainty that label1 applies, the second output label2, etc. for example, if you have 10 datapoints with ...

0

First build the min-max normalization on the entire data set. Then apply different workloads to your train and test split(s) separately. If you believe your data set will change over time you could consider estimating the extreme min and max if you are still interested in this min-max normalization.

0

Generally, the best method to find optimal send time is A/B testing. Send the same emails/notification at different times to different people. Then see if one group tends to open the emails more than another group.

0

No: the trees' results are added together to produce the final score, so combining two models would produce outputs roughly twice as large as desired. (Gradient boosted trees change the target labels being fitted by each tree, so the 101st tree has "reset" the targets when training.)

1

In short, AdaBoost works in that way that it trains in subsequent iterations and then measures the error of all available weak classifiers. In each subsequent iteration, the "validity" of incorrectly qualified observations is increased, so that classifiers pay more attention to them. So confusion matrix could be shown after each iteration(after 13). In case ...

0

You will want to have many diverse examples of the high variance classes and pick a model that has a high learning capacity. In other words, a large number of samples and a big model to capture the properties of the data. After training the model, look at the confusion matrix by class for the hold-out dataset to see if the model is learning to generalize ...

1

Do I use the mean vector from my training set to center my testing set when dimension reducing for classification?: Yes. Test set must not be combined with training set in any step of calculating the reduced dimension space. Characteristics of final space is determined by training set and test set just follows that i.e. the mean-adjusting step uses ...

0

I'm no expert myself, but recently (i.e. this is true to 2019), I've heard (at a meetup from an expert) that Node2Vec is the SOTA. Here's a link to a post on Medium explaining it - basically, Node2Vec generates random walks on the graph (with hyper-parameters relating to walk length, etc), and embeds nodes in walks the same way that Word2Vec embeds words ...

1

You’ve asked two questions: 1) Do you make decisions about model superiority based on training or testing performance? 2) Which model should you prefer? I’ll answer both. 1) First, come over to Cross Validated (the Stack Exchange site for statistics and similar topics, with some overlap to this site) and check out what Frank Harrell has to say about ...

1

The 1176 is the number of neurons in the layer before the last layer, which is the number of pixels in the convolutional layer but flattened (height*width*n_filters, i.e. 7*7*24=1176). The 3 comes from the number of neurons in the final layer, since you have 3 classes your final layer has 3 neurons, 1 for each class (which will output zero or one). This then ...

0

The ROC curve is built by taking different decision thresholds, and should be built using the predict_proba of your estimator. In particular, in your multiclass example, the ROC is using the values 0,1,2 as a rank-ordering! So there are four thresholds, the one between 0 and 1 being the most important here: there, you declare all of the samples the model ...

6

Test accuracy better reflects generalization error, so you want the one with higher test accuracy. In your first setup, the higher train accuracy indicates overfitting, as it's significantly higher than train accuracy. This is also kind of why it generalizes less well than the second one.

-1

I guessing why are you scaling the feature before the model. as far as a know feature scaling is applied only on those algo's where a distance is calculated (e.g. k-means). Maybe this could be a improving for you accuracy model. I totaly agree with @CrazyElf , switching to XGBOOST or other algo's could increase the accuracy. then last but not least, missing ...

2

To summarize from the comment thread: there are two "weird" things going on here. 1. The zig-zag. As I addressed in the comments, and @BrianSpiering in an answer, this is probably a parity effect, arising from tied votes among the nearest neighbors when $k$ is even. 2. Training accuracy not decreasing (toward test accuracy) with increasing $k$. This was ...

2

Single or multi label doesn't make the difference. Cross validation is only split methodology. It just divides records in your data set to separate train and test splits. Python wrapper implements scikit API, so it'll work with any of the selection methods. Metrics will work too. Just remember to one-hot encode your labels. Is using cross validation for ...

0

Given that several correlation measures are in vogue. A high correlation does not guarantee a substantive relation. Test it before inclusion in model 2. Linear or nonlinear relationship needs an examination of individual variables. All variables are unlikely to have a linear or nonlinear relationship with target variable. Further, ...

0

For me triplet loss function (as mentioned by Neil Slater as well), is used for object recognition i.e. identify the similar object. Face-recognition is one of the use case. This function is based upon Siamese Network, which will provide us the feature vector as an output. During recognition, we compare the feature-vector of the new image with the ...

0

That is called an Elbow-Curve! You need to look for the lowest train accuracy, or highest test accuracy, where the curve doesn't bend much more (y-axis), for a given increase in K (x-axis). In your case, it's around 7, but you could make an argument for 10, I suppose. As you increase your 'K' the accuracy improves, but only incrementally, and the cost (...

1

As the model is not trained to recognize an image from this new specific class, the only thing it will do, is to give a probability-or similarity measure for each of the classes for which the model has been trained on. Hence in a Classification problem, the class with the highest probability for this testing image will be the classification output.

0

There are several things you can do, even though giving a detailed descripton of your datasets would help a lot: The first thing is that you should is to thoroughly compare the two datasets: Are the same features present in both datasets? Is the data collected in the exact same way? As an example, if age is a feature make sure that it is not recorded ...

2

Calibration, agreement between observed and predicted risk, is more important in prognostic settings, because we would like to predict future risk of the target population, and the intercept (disease prevalence) is very important Discrimination, separating people with disease from without disease, is more important in diagnostic settings, because we want to ...

2

Discrimination is the separation of the classes while calibration gives us scores based on risk of the population. For example, there are 100 people that we’d like to predict a disease for and we know that only 3 out of 100 people have this disease. We get their probabilities from our model. Due to good predictability power, our model predicts probabilities ...

2

If you want to reduce the number of classes you are predicting over, then you could manually map them to a simpler set (i.e. map poodle, greyhound to dog ) OR if you don't have the domain knowledge you can cluster your data and predict the cluster instead of their original labels. You could use PCA or t-SNE to reduce the number of dimensions before ...

3

No. t-Distributed Stochastic Neighbor Embedding (t-SNE) and Principal Component Analysis (PCA) are dimension reduction techniques, aka fewer columns of a tidy dataframe. Clustering will reduce the number of observations, aka fewer rows of a tidy dataframe. In particular, you might be looking for hierarchical clustering.

0

Is there a customary approach to this problem? Yes, its called feature selection. We use them to remove irrelevant or partially relevant features which could negatively impact model performance. Example of one of easiest methods: Univariate Selection Feature Importance Correlation Matrix with Heatmap You could find examples of implementation of these ...

1

If $(\beta, \beta_0)$ satisfies the inequality $(4.47)$, then for any positive $k$, $k>0$, $(k\beta, k\beta_0)$ would satisfies the inequality as well. Also, $(\hat{\beta}, \hat{\beta}_0)=\left( \frac{\beta}{M\|\beta\|}, \frac{\beta_0}{M\|\beta\|} \right)$ satiesfies the inequlity as well since y_i(x_i^T\hat{\beta}+\hat{\beta}_0)=\frac{y_i}{M\|\beta\|...

0

There is exactly one thing you can check by examining the predictions on your training data. That is the numerical convergence of your model training routine. Any validation of model accuracy can only use holdout data or test data - that is the entire point of cross validation. Once the model architecture and hyperparameters have been optimized through n-...

0

Depending on the amount of data, any classification algorithm can be suitable. LSTM, however, are likely to be an overkill, considering that you probably won't be having much variation in the time series for each object. Instead of pondering about the algorithm, you'd better think of useful features you can extract from your data. My guess would be that ...

0

Classification task: Predict (guess, estimate) a class (a nominal variable) based on some predictor variables, which can be of any type. Example: Based on the videos a user has watched over a video streaming platform, predict whether this user is a male or female. Regression task: Predict (guess, estimate) a continuous value (a numerical variable) based ...

3

Understanding the difference with an example will be very easy. Classification:- When you are asked to predict whether a patient will survive or no from a disease X given all the necessary data of the patients who survived or died due to the same disease X in the past and also given data for predicting the same on the current dataset. Regression:- When you ...

0

Try pooling in between, that will reduce size so that its compactible. Have a look here

0

I might be a little bit late to the party, but I did exactly what you need in the follow-up challenge of CinC2017, where our algorithm gained the 2nd best score on the hidden test set. Our code is available at https://github.com/martinkropf/ecg-classification Paper is available at https://iopscience.iop.org/article/10.1088/1361-6579/aae13e

0

Given a confusion matrix: predicted (+) (-) --------- (+) | TP | FN | actual --------- (-) | FP | TN | --------- we know that: Precision = TP / (TP + FP) Recall = TP / (TP + FN) As can be seen in the images, as the threshold is increased there's a certain point it stops predicting ...

0

Sure, its called cross validation. Have a look

1

There's several ways that you can choose your k value for kNN - You can use the common formula k = sqrt(n) where n is the number of data points in your training set or you can try choosing k where there is a good balance between computation expense vs noise. Consider your what fits your problem: Do you care about runtime? The higher the k, the more ...

Top 50 recent answers are included