New answers tagged

0

The training one-example-at-time (what you can online learning) will yield worse performance on the evaluation metrics than training with many-examples-at-time. One-example-at-time will encourage the model to overfit to each and every data example. Increasing batch size will encourage the model to learn generalizable patterns. You'll have to balance training ...


1

In Bias-Variance tradeoff theorem, aleatoric uncertainty is represented by the irreducible error (inherently and irreducibly random). The rest represents model mismatch due to imprecise knowledge of the generation of the problem. One way to quantify aleatoric uncertainty is as average uncertainty over various models for the same problem, as then uncertainty ...


0

Some unsupervised models use random functions and you might not have the same clusters as before. Nevertheless, you can apply some functions to know the clusters features'ranges and define them with specific labels, so that you can identify future clusters easily (but not the ones out of the ranges, in that case you migh group them in a label "other&...


0

There's no standard range of values because evaluation scores are never good or bad in absolute, they are relevant with respect to a reference. The standard way to report evaluation scores in a paper is to present them in the context of other methods for the same task: If there are other results about the same task (or a similar task) in the literature, ...


0

The degradation problem has been observed while training deep neural networks. As we increase network depth, accuracy gets saturated (this is expected). Why is this expected? Because we expect a sufficiently deep neural network to model all the intricacies of our data well. There will come a time, we thought, when the extra modelling power provided to us by ...


1

The main reason is that, normally, the tasks you pretrain and finetune the model are different, e.g. masked language modeling vs. sequence classification or tagging. This is because unlabeled data is abundant and labeled data is scarce, and pretraining on a language modeling task allows you to use a lot of data in a scarce data setup. This is, for instance, ...


0

Here is an issue in the github about Speech Generation that might answer your question: https://github.com/ibab/tensorflow-wavenet/issues/47 They manage to generate random speech, for example: https://soundcloud.com/user-952268654/wavenet-28k-steps-of-100k-samples https://soundcloud.com/user-731806733/generated-larger-1 Otherwise, I didn't found any code ...


0

it seems like scaling my data helped. I refer to the following thread on GitHub: https://github.com/keras-team/keras/issues/1727


0

Not sure what it meant -> rather than using [CLS] token for classification? The Authoer did use [CLS] for classification tasks. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding The first token of every sequence is always a special classification token ([CLS]). The final hidden state corresponding to this token is used as ...


0

RiderID can be hashed thus is constant time look-up. The features can be processed offline and stored as properties of each RiderID. Most RDBMSs (Relational Database Management System) should be fast enough. If a RDBMSs is too slow, then try a key-value store like Redis.


1

Is Random forest regression is a good method to approach this problem? Overall, decision trees tend not to be good regressors. But it can be that for your case it is working well. You need to evaluate the results corresponding to a metric and then compare different models. I like MAE in regression models because it's very intuitive. How can I improve the ...


4

Cross-validation is a method to obtain to obtain a reliable estimation of the performance. The performance is obtained as the average across the CV "folds" because this way it doesn't depend on a single test set, i.e. the impact of chance is minimized. In the case of hyper-parameter selection, the goal is not only to evaluate but also to select the ...


0

You could look at Linode: https://www.linode.com/ Here's Linode's GPU service: https://www.linode.com/products/gpu/


0

You can train and evaluate the model day-by-day. Something like this from pyspark import SparkContext from pyspark.mllib.recommendation import ALS from pyspark.mllib.evaluation import RegressionMetrics sc = SparkContext() for day in range(1, 7): # Load and parse the data data = sc.textFile(f"data/day_{day}.data") # Build the ...


0

The splitting criteria for float-type features is covered in paper in section "3.3 Weighted Quantile Sketch" and the Appendix. Quantile sketch divides the data into weighted percentages and does the split based on that approximation. The split value does not have to unique value in the feature because the algorithm uses approximations.


1

I don't think you can compress time series because there is a risk of losing valuable data. Rather than that, you can set a the max size as the default size, and set zeros to the left for smaller data. If the sampling is too high (ex: milli seconds), do not hesitate to reduce it for all data (ex: seconds) taking the average values, as long as the prediction ...


2

Here is the GPT-3 paper. The "shot" are the number of example question/answer pairs provided to the ML model, before it is asked to answer a question by itself. For each task, we evaluate GPT-3 under 3 conditions: (a) “few-shot learning”, or in-context learning where we allow as many demonstrations as will fit into the model’s context window (...


0

Ok, your methodology looks good, but you're on a typical problem showing why Data Scientist are true specialists, and not just "running some copied code" : You have to create your variables yourself using your knowledge about the problem. I'd say you first have to try to list the things you can measure about those devices, and that are worth giving ...


1

I guess there is no universal solution for that. But I can explain my roadmap as NLP scientist. Firstly, I try to find the most common dataset for my task (NER in your case). Then, I search for the leaderboard which shows the best papers/models for that dataset. Finally, I try to figure out which makes their models best in the leaderboard. For example, here ...


2

Text vectorisation is a good way to have a reliable classification. You have several libraries like doc2vec that you can use together with logistic regression or dimensional reduction technique like tSNE or UMAP. https://radimrehurek.com/gensim/auto_examples/tutorials/run_doc2vec_lee.html On the other hand, you can also use libraries like BERT or TF-IDF: ...


0

You have plenty of potential solutions, the easiest one is decision tree models like Random Forest. Then, you can try more complex models based on LSTM or Reinforcement Learning. Here are 2 code examples using RF: https://python.plainenglish.io/how-to-predict-stock-prices-change-with-random-forest-in-python-f707e101d5c4 https://tcoil.info/predict-stock-price-...


0

Try the following code from scipy import stats def chi_squared_test(df,college1,college2,alpha): contingency_table = pd.crosstab(df.loc[college1,:],df.loc[college2,:]) try: stat,p,dof,expected = stats.chi2_contingency(contingency_table) except: return None return p


1

some questions will help give better answers: When you say underfitting, I assume you mean that the low accuracy is on the train set, correct? I'm asking also because with that amount of parameters for such a small training set I would be far more concerned with overfitting 530 images is very small dataset, I would consider going with a pretrained ...


0

Well, the wording is pretty unclear, but my guess is that he wants you to encode the protein sequence into DNA codons and decode again into a protein and look at the similarity Admittedly, it's a very weird use case for autoencoder since there is a fixed mapping between codons and amino acids, and no real noise to clean I can think of (it would make more ...


1

You are correct that recommender systems that map similarity to distance is useful. Vector representations are useful because most machine learning learning tools are based on linear algebra. Vector representations encode raw data in form that amenable to machine learning. "Any" vector representation is more useful than no vector representation. ...


0

It depends on "differ from each other only slightly" means. One option is to use common data augmentation techniques to vary any images by: Horizontal and vertical shift Horizontal and vertical flip Rotation Brightness Zoom


0

Your model is overfitting to the training data. You are adding more data to training data but the model is overfitting to that additional data. To reduce overfitting, you need to increase regularization. Common options: Keep adding data to the training dataset until you cover all possible scenarios. Add data augmentation. Increase dropout.


0

The CLS token helps with the NSP task on which BERT is trained (apart from MLM). The authors found it convenient to create a new hidden state at the start of a sentence, rather than taking the sentence average or other types of pooling. However this does not mean that the BERT authors recommend using the CLS token as a sentence embedding. It 'could' be used ...


3

In fact, you want to translate "yellow that is glossy and sorta dark" by (170,173,11). A good way to solve this, is by using a neural machine translation model. Therefore, you can use a encoder/decoder system like many translation models, but with 3 digits as output. To achieve this, you will want to have training data with plenty of text to color ...


0

It seems very complex to me to give you a correct size of batch, time of sending and memory, because very high frequency problems depends on every small operation in the algorithm you use to detect anomalies. In addition to that, I don't know if the anomaly could be detected on a single or a multiple set of values (or both), and the minimum range of values ...


0

The problem you are are describing makes exactly with what a decision tree does. Decision trees find "hyperrectangle in feature space with all edges parallel to feature axes". A decision tree will automatically learn the range size of the hyperrectangle and learn conditional hyperrectangles. The goal is classification where there is purity in the ...


2

You do not need train a new model. You can find an existing neural network architecture that has been trained for "dog"/"not dog". One option for continuous video input is use Python's OpenCV package which has a VideoCapture class which can read from an input stream. Individual frames can be extracted the stream. The model would predict &...


0

Survival Analysis would be a common way to approach it. One way to model it would be to predict time-to-purchase where the prior is already purchased.


1

If you're getting 95% accuracy on training set, but only 75% on test set, this points to serious overfitting, which none of the measures you've listed are likely to address. It's also suspicious that validation result are so close to training, but far from test. This often happens when you change validation set during training, meaning there's effectively no ...


1

Assuming your goal is to infer whether a sentence is: positive already happened, positive likely to happen, negative already happened or negative likely to happen; you end up with a 4-classes classification problem, which you need to label in advance (this would be, if feasible, the tedious-human work). After that, you can also apply word embedding layers to ...


2

A possible cause of the problem is that you are using the mean-squared error (MSE) as loss function for a classification problem. Normally, for classification you would use categorical cross-entropy.


2

I suggest to apply a nonrandom weight initialisation in order to see the impact of random initialization. For instance, you can use the Nguyen-Widrow weight initialization. def initnw(layer): """ Nguyen-Widrow initialization function :Parameters: layer: core.Layer object Initialization layer """ ci = layer.ci cn = ...


0

Jupyter Notebook can be considered an integrated development environment (IDE). Amazon Web Services (AWS)'s SageMaker is a fully managed, cloud version of Jupyter Notebook.


1

Seems to me a good idea. KL divergence would give you a raw distance approximation of your distributions, but not all error values might have the same weight of importance: it highly depends on your error calculation method, and some kind of relative error calculation/weightening could be necessary. In addition to that, Cross Entropy could also be an ...


0

It might be framed as multi-label classification with the constraint that "winner take all" for certain labels.


0

From the Keras documentation: validation_data: Data on which to evaluate the loss and any model metrics at the end of each epoch. The model will not be trained on this data. Thus, note the fact that the validation loss of data provided using validation_split or validation_data is not affected by regularization layers like noise and dropout. validation_data ...


2

It's common to see some confusion about TFIDF so thank you for asking this question :) TFIDF is not a metric, it's a weighting scheme This means that it's a way to represent a document, not to compare documents. TFIDF assumes a bag of words (BoW) representation, i.e. a document or sentence is represented as a set of words (their order doesn't matter). The ...


0

df1['combined']=df.apply(lambda x:'%s' % (x['WEEK_START']),axis=1) df1['combined'] = df1.combined.str[:10] list = df1['combined'].unique() list.shape df1 = df1.assign(**{k: 0 for k in list }) df1.head()


1

There are many well-documented techniques to help you out with this. Collaborative filtering and even nearest neighbour search can help (given you have created good embeddings for the products using neural networks with multimodal input). You would initially want to sort the list by frequency then date. Once, you have that you need to find related items to ...


0

Are you using some data augmentation with random crops / rotations / zooms ? If you do, you might have some images with only background labels and if so I would suggest you to add a condition to only retain the patches with a ratio of non-background pixels above a certain threshold value.


1

I believe your dataset size is too small for 12 classes and some of them are not represented enough so that your model can distinguish them. You can give more weights for less represented classes in the loss function of the related model. Or, you may apply two step approach (not sure whether it is optimal or not). That means you can predict class 1 or class ...


0

This might be due to the fact that you are imputing missing values for one hot encoding but for pd.get_dummies you are not imputing. Hence you are getting worse results. Imputation without proper and careful domain as well as some stat knowledge usually worsens the performance. There are many alternatives to "imputation with mean" that might result ...


0

Scikit-learn has an impute module that supports many of those imputation methods.


0

You are training for very few epochs. The high variance could be a result of not running the training for long enough. As far as showing the effect of hyperparameters on performance by class, a table could work. The rows could be the classes, the columns could be hyperparameter values, and the cell values could be the evaluation metric.


0

Bayesian Optimization can be useful to find the optimal value for black-box functions without assuming a functional form.


Top 50 recent answers are included