New answers tagged

0

I think shap values might be able to help you. Check this out link. You can check both local as well as global interpretability.


1

First be careful, looking only at accuracy in a multiclass problem can be misleading: with almost 75% of the data in the majority class, a dummy model which always predict the majority class achieves almost 75%. Measuring performance with micro or macro F1-score would be more informative. Now about designing your experiments: currently you seem to be trying ...


0

I did not find an existing algorithm, but I have since published an algorithm for "set cover rule mining" myself. It is called GIMO: https://doi.org/10.1016/j.eswax.2020.100040


1

I think there are three questions here: How to incorporate non-spatial information into the network? When combining different information modalities, a typical approach is to do it at the internal representation level, that is: the point where you lose the spatial information (normally with a flatten operation) after the convolutions. You can have your extra ...


0

I remember a friend of mine in high school said that programming was a dead end because very soon computers would be able to directly do whatever the user is asking just by talking. Turns out he was wrong on two counts: he massively overestimated the technological progress that can be made, and the possibility to automate every specific task. he didn't take ...


0

I'm going to give you my opinion on the topic. I am 5 years in to a career as a Data Scientist - this does not mean I'm an omniscient in the field so please take this with a grain of salt: As it stands: the cloud providers out there do a good job of providing APIs to generic problems likely to be encountered in many industries. For example image ...


0

Yes, it is the right way to proceed. Basically, you've got a map from $(X,Y)$ (e.g. latitude, longitude geographic coordinates), onto a value $Z$ (e.g. geographic altitude). K-nearest neighbours is an algorithm that helps efficiently to find out the K closest points to a given target, that can be any random $(X,Y)$ point different from the initial data set, ...


1

I am afraid that such situations are fundamentally inherent in predicting/forecasting contexts; quoting from the very recent paper by Taleb et al., On single point forecasts for fat-tailed variables (open access, para 3.7): 3.7. Forecasts can result in adjustments that make forecasts less accurate It is obvious that if forecasts lead to adjustments, and ...


0

A simple, practical approach would be to aggregate your data on each customer. The idea is that the repartition of credit usage / credit limit might not really matter for the overall bankruptcy. You might then want to build new features to avoid loss of information : the number of maxed out credit card, average interest on credit card. This is the general ...


0

In the Video I believe, in the video when it said that you have 5 models trained on 5 different datasets, it is a bit incorrect. You have one model trained on 5 datasets. Hence you have 5 trained models. Then it suggested to pick a model based on voting etc. This is how Ensemble models work but Cross-validation is not for the process of Ensembling the Models ...


2

It's impossible to answer this question in general, because the answer strongly depends on the content of the data. More precisely it depends if the relations between the features and the target class in the training data are sufficient for the parameters of the model to be estimated as accurately as possible. In the most simple cases a few instances might ...


1

Can I conclude that the error at my node is 60 +-13 i.e my values in this particular sample split ranges from 60-13 to 60+13. No you cannot, because the actual error values depend on the data. For example you might have 1 instance with error 41.11 and 9 instances with error 0: $$MSE=\frac{41.11^2+0^2+...+0^2}{10}=169$$ This example shows that the only ...


0

In case the con(text) is not too complex, you will not necessarily need a neural net to classify the text. Often a simple „bag of words“ with a ridge regression will do the job. This is more efficient (less code, less tuning). Find a minimal example of (binary) text classification here: https://github.com/Bixi81/R-ml/blob/master/NLP_regression_bag_of_words.R


1

Yes, the loss of a normal autoencoder is simply the difference between the input image and the decoded image. While encoder and decoder have different names, they are effectively part of the same neural network, so the prediction error is backpropagated through the decoder up to the encoder. In more sophisticated autoencoders, like variational autoencoders, ...


1

I didn't watch the linked video but based on your explanations: yes, your understanding is correct. A common confusion is to assume that cross-validation is similar to a regular training stage and therefore produces a model. This assumption is wrong: CV includes repeated training/testing for the purpose of evaluating the method/parameters. From this ...


0

You could do as the others users suggested, but you could also apply another solution which is unsupervised learning, then you can manually intervene in choosing which clusters represents the spam / ham label. I suggest K-Means or DBSCAN.


1

I think this paper just compares algorithms: https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.294.9414&rep=rep1&type=pdf If you want something specific, here's the white paper for SLIPPER: https://www.aaai.org/Papers/AAAI/1999/AAAI99-049.pdf Hope that helps.


0

In short: Cell state: Long term memory of the model, only part of LSTM models Hidden state: Working memory, part of LSTM and RNN models Additional Information RNN and vanishing/exploding gradients Traditional Recurrent Neural Networks (RNN) have the ability to model sequential events by propagating through time, i.e. forward and backward propagation. This ...


0

You may also try to employ labeling functions to programmatically build a labeled dataset that you can then use to train a classification model. There is a neat library called Snorkel from Stanford that deals with this problem by allowing you to manually define a set of heuristic labeling functions that output a label for some subset of the training dataset. ...


0

The amount of data you have will only limit the types of classifiers you can try out on the set. If you have 100 samples you might still be able to perform a Logistic Regression - but you can forget about a Neural Net (this would require 100,000+ samples). Take a look at this for more information on how much data is generally needed for ML.


1

It would seem that you are over-interpreting what is essentially just convenience shorthand names for the model arguments, and not formal terminology; here, "‘ls’ refers to least squares regression" should be interpreted as "'ls' is the loss function used in least-squares regression". Formally you do have a point of course - sse would be ...


1

Note that the algorithm is called Gradient Boostign Regressor. The idea is that you boost decision trees minimizing the gradient. This gradient is a loss function that can take more forms. The algorithm aggregates each decision tree in the error of the previously fitted and predicted decision tree. There you have your desired loss function. This parameter is ...


0

Including column of indices as predictor for model? No, don't include indices. They don't provide any meaningful information about the problem. They are just an enumeration. Take them away. Is there a reason why including this column of indices gets you to 100% F1 score or even accuracy? You probably get that when evaluating in train set, in test you wont ...


0

For those data points, a threshold just on x1 axis would perfectly separate the two distributions. You could fit a decision stump to calculate the single parameter of the decision boundary.


0

For every ML Scenario, there is a notebook section where you can upload/create files with code and/or Jupyter notebooks:


1

Each BERT variant is trained with text that has been prepared differently, e.g. as the name implies, BERT uncased is trained with text where all letters are lowercase. This means that the vocabulary extraction process has also use lowercase text as input, and therefore gives as result a different vocabulary than the same vocabulary extraction process used ...


0

This article looks like a good try to solve this problem: InfoGAN-CR and ModelCentrality: Self-supervised Model Training and Selection for Disentangling GANs


0

You are mixing various concepts: $L = \frac{1}{2N}\sum^{N}_{i=1}(e_i)^2$ is used only for regression problem and not for binary classification because MSE fits very well when your target distribution is normal You can use the latter formula for binary classification but will works really bad because your target data distribution is a Bernoulli, not Normal. ...


0

Try this. item_target_enc= df.groupby(['item_id'])['item_cnt_month'].mean().to_dict() df['item_id'] = df['item_id'].map(item_target_enc)


0

I read this article over the weekend that seems relevant to this question. It doesn't go over any code, just dataset theory and how you can include multiple classes in one image, and after a small number of images you can introduce a large number of classes. They acknowledge the difficulty in creating an accurately labeled dataset on which to train. A ...


0

I only have a guess, but I suspect it could be simply due to random initialisation. This would mean that after few training samples the models would still be very different. After 400k training samples the models all converge to the same learning path. I could be wrong of course!


1

n is the dimension of the vector x and also y, as you can see wT is a transpose of w with dimension (n,n), is the image z is y and a is x. and dont bother about l it indicates the index of layer.


0

You could try clipping the values of 0 and 1 and use very close values to them instead in order to avoid NaN instances, for example you could tweak lines of codes like this one: some variable= np.clip("some fuction",1e-15,1-1e-15)


1

It's a loss function applied to a regression with l2 penalty on the parameters. The first square brackets can be interpreted in the following way: $ - \frac{1}{n} $ has the minus because it wants to minimize. $\sum_{i=1}^{n}$ means for each data point. $\sum_{j=0}^{k-1} $ means for each class. $y_i == j$ means that the fraction after this term is calculated ...


0

If you apply the l2 norm to the vectors you loose a lot of informations, i think the best way to act is to evaluate these options: concatenate embeddings with/out a linear layer on top of that sum the embeddings with/out a linear layer on top of that


0

The simpler, more practical and more business oriented way to go would be to include advertising in your model. That would allow you to : Change your prediction accordingly, then your measured performance. The key is to be transparent about it, pedagogical even. Basically in your exemple you had 6 months to review your prediction and inform the CFO so that ...


0

A simple solution is to set importance weight in front of each class inversely proportional to the train set relative frequency of the class like $\frac{1}{freq}$ or $e^{-freq}$. The choice of the right formula depends on how much importance you would give to less frequent classes e.g. $e^{-freq}$ give more importance to less frequent classes than $\frac{1}{...


0

There are two ways to setup prediction depending on your dataset: If you have a row every minute/hour/day just find the rows with the right alarm and put 1 the observation 1/7/10 days ahead depending how much ahead of time you want to predict the alarm. Of course the less recent it is the more difficult to predict. If you have a row every event it is harder ...


0

The first step is to pick a target variable. What are you trying to predict "problem name", "severity", "sub category", …? Based on the target, it becomes either a conventional regression, ordinal regression, binary classification, multi-class classification, or multi-label classification problem. Another issue might be how the ...


1

If you have the time on hand, you could simply measure the time taken for all combinations of hyper parameter values in a Grid Search, preferably with repetition. It's unlikely that any theoretical analytical expression will provide adequate accuracy for predicting the compute cost, as there as so many factors that contribute noise to the compute time. You ...


1

Pipelines themselves don't generally carry the methods and attributes of the final estimator, aside from basics like predict, predict_proba, transform. If you need to access a method of a step, you should access the step itself using one of: pipe[-1] pipe['decisiontreeclassifier'] pipe.named_steps['decisiontreeclassifier'] However, in this case it's a ...


3

After you have finished with the model building process (in which it is assumed that you have used your test set once and only once for assessing the performance of your final model on unseen data), and before deploying your model, both common sense and standard practice say that you should re-train it on all the available data, including the portion that, ...


0

As soon as you train with data from a test set it is no-longer a testing set. What you are suggesting would lead to you flying blind: it's possible that you will have better results because you're using more data but you simply would have no way of knowing. This is not a recommended strategy. An alternative would be to change the train/test split to say 90/...


0

It depends by what you mean by the result of each round. In boxing after each round fighters receive from $7-10$ points in case if none of the fighters was KO, submitted or disqualified. An extract from Wikipedia : The 10-point Must System is the most widely used scoring system since the mid-twentieth century. It is so named because a judge "must" ...


0

I have had a first crack at coming up with a workaround, although its ugly and won't scale: alpha_candidates = (np.arange(0.0,0.5, 0.001)).tolist() alpha_accuracy_list = [] # Create Decision Tree classifer object for i in alpha_candidates: clf2_entropy_alpha = DecisionTreeClassifier(criterion = 'entropy', ccp_alpha= i,random_state=42) pipe = ...


1

It really seems like a signal processing question first. A rapid google search give : Automatic detection of epileptogenic video content. The main work is about signal processing techniques to detect brutal intensity changes in the image. Basically they create a time series that represent the overall difference in intensity between consecutive frames and ...


1

It looks like your indices for the predicted data are off by one. You could try to fix it with predicted = predicted[1:]


1

Yes they can. You would need a labelled dataset of the name of viruses and bacteria with each image. This can then be fed into a CNN with a softmax output. The model can predict the label of the image, and then you could use a database to recall a short description to accompany the prediction.


0

Sklearn allows you to build your own pipeline steps (and estimators if you so choose). If you get comfortable with how the Pipeline object framework works it's infinitely configurable. It also allows you to rely on pre-built algos. To operate this way you will need to be comfortable with object-oriented programming in python rather than a script-based ...


0

Perform a simple linear regression. Take your characteristic values as inputs (hot-encode the categorical ones or numerical-encode them if they're ordinal) and predict the target that is the player value (assuming it's a continuous variable target). Make sure before training you scale all your input values between 0 and 1. Once you've trained your linear ...


Top 50 recent answers are included