id
int64
1
141k
title
stringlengths
15
150
body
stringlengths
45
28.5k
tags
stringlengths
1
102
label
int64
1
1
text
stringlengths
128
28.6k
source
stringclasses
1 value
69,269
Python: forecast unevenly spaced time-series?
<p>My data has timestamps corresponding to the failure occurrences of a specific component in machinery. The timestamps are not uniformly distributed.&#xA;My question is:&#xA;1) what methods can I use to (almost) accurately to forecast future occurrences (timestamps) of Failure?&#xA;2)What other features can I derive?<...
python time series forecasting
1
Python: forecast unevenly spaced time-series? -- (python time series forecasting) <p>My data has timestamps corresponding to the failure occurrences of a specific component in machinery. The timestamps are not uniformly distributed.&#xA;My question is:&#xA;1) what methods can I use to (almost) accurately to forecast fu...
habedi/stack-exchange-dataset
69,277
How fbprophet cross validation works
<p>I am facing some issues to understand how cross_validation function works in fbprophet packages. </p>&#xA;&#xA;<p>I have a time series of 68 days (only business days) grouped by 15min and a certain metric : </p>&#xA;&#xA;<p>00:00 5 &#xA;00:15 2 &#xA;00:30 10 &#xA;etc &#xA;23:45 26 </p>&#xA;&#xA;<p>And I really don’t...
time series cross validation forecasting
1
How fbprophet cross validation works -- (time series cross validation forecasting) <p>I am facing some issues to understand how cross_validation function works in fbprophet packages. </p>&#xA;&#xA;<p>I have a time series of 68 days (only business days) grouped by 15min and a certain metric : </p>&#xA;&#xA;<p>00:00 5 &#...
habedi/stack-exchange-dataset
69,289
Do I need to convert strings before using LSTM?
<p>I have a dataset which includes one column with a URL and another column with value 0 or 1 indicating if it is a phishing link.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/9JL33.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9JL33.png" alt="enter image description here"></a></p>&#xA;&#xA;<...
keras tensorflow lstm
1
Do I need to convert strings before using LSTM? -- (keras tensorflow lstm) <p>I have a dataset which includes one column with a URL and another column with value 0 or 1 indicating if it is a phishing link.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/9JL33.png" rel="nofollow noreferrer"><img src="https://i.stack....
habedi/stack-exchange-dataset
69,290
Cross-entropy loss colloquially
<p>I have just made an MNIST classifier from a tutorial. It has 1 layer, no hidden layers. It uses PyTorch's <code>nn.CrossEntropyLoss</code> as a loss function. Plotting my losses after training, it starts out at around 2.25 and goes down to 0.5. What does this number mean, in a colloquial sense? Does a loss of 0.5 me...
classification
1
Cross-entropy loss colloquially -- (classification) <p>I have just made an MNIST classifier from a tutorial. It has 1 layer, no hidden layers. It uses PyTorch's <code>nn.CrossEntropyLoss</code> as a loss function. Plotting my losses after training, it starts out at around 2.25 and goes down to 0.5. What does this numbe...
habedi/stack-exchange-dataset
69,297
Understanding these probabilities, and reading the pdf and cdf
<p><strong>UPDATE:</strong> this is a math question but as i would like to codify it, I thought the DS SE might be appropriate.</p>&#xA;&#xA;<p>I am trying to sketch out this problem statement. Where am I going wrong since I don't see how they get </p>&#xA;&#xA;<ul>&#xA;<li>"6% chance of losing any money at all", </li...
probability
1
Understanding these probabilities, and reading the pdf and cdf -- (probability) <p><strong>UPDATE:</strong> this is a math question but as i would like to codify it, I thought the DS SE might be appropriate.</p>&#xA;&#xA;<p>I am trying to sketch out this problem statement. Where am I going wrong since I don't see how t...
habedi/stack-exchange-dataset
69,308
Does ridge regression always reduce coefficients by equal proportions?
<p>Below is an excerpt from the book Introduction to statistical learning in R, (chapter-linear model selection and regularization)</p>&#xA;&#xA;<p><em>"In ridge regression, each least squares coefficient estimate is shrunken by the same proportion"</em></p>&#xA;&#xA;<p>On a simple dataset, I obtained 2 non-intercept c...
regression statistics data science model regularization ridge regression
1
Does ridge regression always reduce coefficients by equal proportions? -- (regression statistics data science model regularization ridge regression) <p>Below is an excerpt from the book Introduction to statistical learning in R, (chapter-linear model selection and regularization)</p>&#xA;&#xA;<p><em>"In ridge regressio...
habedi/stack-exchange-dataset
69,311
Degree of Profanity in a Sentence
<p>Given a comment or a sentence and a list of profane words, How do I write a program to print the degree of profanity in that sentence?</p>&#xA;
nlp sentiment analysis
1
Degree of Profanity in a Sentence -- (nlp sentiment analysis) <p>Given a comment or a sentence and a list of profane words, How do I write a program to print the degree of profanity in that sentence?</p>&#xA;
habedi/stack-exchange-dataset
69,332
Would averaging two vectors in word embeddings make sense?
<p>I'm currently using the GloVe embedding matrix which is pre-trained on a large corpus. For my purpose it works fine, however, there are a few words which it does not know (for example, the word 'eSignature'). This spoils my results a bit. I do not have the time or data to retrain on a different (more domain-specific...
word embeddings
1
Would averaging two vectors in word embeddings make sense? -- (word embeddings) <p>I'm currently using the GloVe embedding matrix which is pre-trained on a large corpus. For my purpose it works fine, however, there are a few words which it does not know (for example, the word 'eSignature'). This spoils my results a bit...
habedi/stack-exchange-dataset
69,338
Building a tag-based recommendation engine given a set of user tags?
<p>Basically, the idea is to have users following tags on the site, so each users has a set of tags they are following. And then there is a document collection where each document in the collection has a Title, Description, and a set of tags which are of relevance to the topic being discussed in the document as determi...
nlp recommender system word embeddings information retrieval
1
Building a tag-based recommendation engine given a set of user tags? -- (nlp recommender system word embeddings information retrieval) <p>Basically, the idea is to have users following tags on the site, so each users has a set of tags they are following. And then there is a document collection where each document in th...
habedi/stack-exchange-dataset
69,352
No module named "" error when loading the pickle file
<p>I created a model and I saved it in a pickle file using the Algorithm SVR(Support Vector Regression)</p>&#xA;&#xA;<pre><code>import pickle&#xA;pickle.dump(model,open('carb patients data/Pickles/svr.pickle', 'wb'))&#xA;</code></pre>&#xA;&#xA;<p>In jupyter notebook it gives an error </p>&#xA;&#xA;<blockquote>&#xA; <p...
jupyter anaconda pickle
1
No module named "" error when loading the pickle file -- (jupyter anaconda pickle) <p>I created a model and I saved it in a pickle file using the Algorithm SVR(Support Vector Regression)</p>&#xA;&#xA;<pre><code>import pickle&#xA;pickle.dump(model,open('carb patients data/Pickles/svr.pickle', 'wb'))&#xA;</code></pre>&#x...
habedi/stack-exchange-dataset
69,357
Can we add other features along with Text in sentiment analysis
<p>Can we add other features along with Text to a ML model . Like giving text and other features as one input combining them and predict the output value. As model can learn some more better if given some extra features along with text from tf-idf vector matrix. Can we input other features along with tf-idf vector matr...
machine learning data mining lstm feature engineering data engineering
1
Can we add other features along with Text in sentiment analysis -- (machine learning data mining lstm feature engineering data engineering) <p>Can we add other features along with Text to a ML model . Like giving text and other features as one input combining them and predict the output value. As model can learn some m...
habedi/stack-exchange-dataset
69,358
Why does vanilla transformer has fixed-length input?
<p>I know that in the math on which the transformer is based there is no restriction on the length of input. But I still can’t understand why we should fix it in the frameworks (PyTorch). Because of this problem Transformer-XL has been created.</p>&#xA;&#xA;<p>Can you explain to me where this problem is hiding, please?...
nlp transformer
1
Why does vanilla transformer has fixed-length input? -- (nlp transformer) <p>I know that in the math on which the transformer is based there is no restriction on the length of input. But I still can’t understand why we should fix it in the frameworks (PyTorch). Because of this problem Transformer-XL has been created.</...
habedi/stack-exchange-dataset
69,361
Trying to understand the Fowlkes-Mallows Score
<p>I recently bought Chris Albon's ML flashcards and I'm working my way through them. But this one on the Fowlkes-Mallows score has me stumped, as his definitions of false negatives and false positives seem reversed:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/EX5sq.png" rel="nofollow noreferrer"><img src="https...
machine learning clustering
1
Trying to understand the Fowlkes-Mallows Score -- (machine learning clustering) <p>I recently bought Chris Albon's ML flashcards and I'm working my way through them. But this one on the Fowlkes-Mallows score has me stumped, as his definitions of false negatives and false positives seem reversed:</p>&#xA;&#xA;<p><a href...
habedi/stack-exchange-dataset
69,368
Why normalize function has a different result on a matrix vs single value?
<p>I have a matrix like:</p>&#xA;&#xA;<pre><code>B=[ 1.5035; 1.5728; 1.6485; 1.5369; 1.5467; 1.572; 1.5374; 1.787; 1.5825; 1.6905];&#xA;</code></pre>&#xA;&#xA;<p>Using normalize function like normalize(B,'range') has this result:</p>&#xA;&#xA;<pre><code>ans = 0&#xA; 0.24444&#xA; 0.51146&#xA; 0.11781&#xA; 0.1...
data data cleaning normalization matlab
1
Why normalize function has a different result on a matrix vs single value? -- (data data cleaning normalization matlab) <p>I have a matrix like:</p>&#xA;&#xA;<pre><code>B=[ 1.5035; 1.5728; 1.6485; 1.5369; 1.5467; 1.572; 1.5374; 1.787; 1.5825; 1.6905];&#xA;</code></pre>&#xA;&#xA;<p>Using normalize function like no...
habedi/stack-exchange-dataset
69,370
Dimensionality reduction without select components
<p>I would like to use dimensionality reduction algorithm in my pipeline.&#xA;I have 2k features and I'm using xgboost.&#xA;My model is rebuilding each day (there are new records that should be involve to training set).</p>&#xA;&#xA;<p>I'm looking for method for dimensionality reduction with out setting <code>n_compone...
clustering data preprocessing dimensionality reduction
1
Dimensionality reduction without select components -- (clustering data preprocessing dimensionality reduction) <p>I would like to use dimensionality reduction algorithm in my pipeline.&#xA;I have 2k features and I'm using xgboost.&#xA;My model is rebuilding each day (there are new records that should be involve to trai...
habedi/stack-exchange-dataset
69,384
How to trust the labels generated using ML models?
<p>I have a dataset of patient records. But I do not know whether he is +ve for a cancer or not. So, I do not have the labels in my dataset.</p>&#xA;&#xA;<p>Now I can run a machine learning models like clustering to generate labels. </p>&#xA;&#xA;<p>For ex: I can run clustering to group the two classes based on similar...
machine learning deep learning data mining multilabel classification labels
1
How to trust the labels generated using ML models? -- (machine learning deep learning data mining multilabel classification labels) <p>I have a dataset of patient records. But I do not know whether he is +ve for a cancer or not. So, I do not have the labels in my dataset.</p>&#xA;&#xA;<p>Now I can run a machine learnin...
habedi/stack-exchange-dataset
69,397
Ellipses detecting at the image
<p>I have the following image:&#xA;<a href="https://i.stack.imgur.com/lGQ0t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lGQ0t.png" alt="input image"></a></p>&#xA;&#xA;<p>I need to get two ellipses which will 'describe' my 'ring'.</p>&#xA;&#xA;<p>I have the following code at the moment:</p>&#xA;&#...
python computer vision opencv
1
Ellipses detecting at the image -- (python computer vision opencv) <p>I have the following image:&#xA;<a href="https://i.stack.imgur.com/lGQ0t.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lGQ0t.png" alt="input image"></a></p>&#xA;&#xA;<p>I need to get two ellipses which will 'describe' my 'ring'.<...
habedi/stack-exchange-dataset
69,398
Probabilistic gold standard vs Deterministic gold standard
<p>I understand that we say something as a gold standard when it involves human intervention/judgement/review.</p>&#xA;&#xA;<p>But can someone help me understand what's the difference between probabilistic gold standard and deterministic gold standard.</p>&#xA;&#xA;<p>For ex: Patient has cancer or not - binary response...
machine learning deep learning classification data mining supervised learning
1
Probabilistic gold standard vs Deterministic gold standard -- (machine learning deep learning classification data mining supervised learning) <p>I understand that we say something as a gold standard when it involves human intervention/judgement/review.</p>&#xA;&#xA;<p>But can someone help me understand what's the diffe...
habedi/stack-exchange-dataset
69,402
Why does averaging over vector values cause errors?
<p>As a way to improve my model, I want to average GloVe vectors over a sentence. However, I can't get np.mean to work. The following code works when <em>not</em> averaging over words. (copied from other code)</p>&#xA;&#xA;<pre><code>embeddings_dict = {}&#xA;with open("glove.6B.50d.txt", 'r') as f:&#xA; for line in ...
word embeddings numpy
1
Why does averaging over vector values cause errors? -- (word embeddings numpy) <p>As a way to improve my model, I want to average GloVe vectors over a sentence. However, I can't get np.mean to work. The following code works when <em>not</em> averaging over words. (copied from other code)</p>&#xA;&#xA;<pre><code>embeddi...
habedi/stack-exchange-dataset
69,423
How much can bias decrease performance of the network at the beginnng of the training?
<p>I am writing a custom framework and in it I'm trying to train a simple network to predict the addition function. </p>&#xA;&#xA;<p><strong>The network:</strong></p>&#xA;&#xA;<ul>&#xA;<li>1 hidden layer of 3 Neurons</li>&#xA;<li>1 output layer</li>&#xA;<li>cost function used is Squared error, (Not MSE to avoid precisi...
regression bias
1
How much can bias decrease performance of the network at the beginnng of the training? -- (regression bias) <p>I am writing a custom framework and in it I'm trying to train a simple network to predict the addition function. </p>&#xA;&#xA;<p><strong>The network:</strong></p>&#xA;&#xA;<ul>&#xA;<li>1 hidden layer of 3 Neu...
habedi/stack-exchange-dataset
69,441
An error coming out when fitting a model with keras
<p>I am trying to build a model using kerras but for some reason I receive a <code>ValueError: Error when checking target: expected activation_5 to have 4 dimensions, but got array with shape (50000, 10)</code> error. I have recently changed the model parameters, so I think it has something to do with that, but I canno...
machine learning keras tensorflow machine learning model
1
An error coming out when fitting a model with keras -- (machine learning keras tensorflow machine learning model) <p>I am trying to build a model using kerras but for some reason I receive a <code>ValueError: Error when checking target: expected activation_5 to have 4 dimensions, but got array with shape (50000, 10)</c...
habedi/stack-exchange-dataset
69,444
Different definitions of Macro F1 score, which one is used in Scikit-learn?
<p>In this article <a href="https://arxiv.org/pdf/1911.03347.pdf" rel="nofollow noreferrer">Macro F1 and Macro F1</a> two different definitions of the F1 used in the literature are demonstrated. &#xA;The first F1 score is computed such as: </p>&#xA;&#xA;<blockquote>&#xA; <p>F1 scores are computed for each class and th...
machine learning scikit learn multiclass classification f1score
1
Different definitions of Macro F1 score, which one is used in Scikit-learn? -- (machine learning scikit learn multiclass classification f1score) <p>In this article <a href="https://arxiv.org/pdf/1911.03347.pdf" rel="nofollow noreferrer">Macro F1 and Macro F1</a> two different definitions of the F1 used in the literatur...
habedi/stack-exchange-dataset
69,452
Weights for unbalanced classification
<p>I'm working with an unbalanced classification problem, in which the target variable contains:</p>&#xA;&#xA;<pre><code>np.bincount(y_train)&#xA;array([151953, 13273])&#xA;</code></pre>&#xA;&#xA;<p>i.e. <code>151953</code> zeroes and <code>13273</code> ones.</p>&#xA;&#xA;<p>To deal with this I'm using <code>XGBoost<...
machine learning python scikit learn xgboost class imbalance
1
Weights for unbalanced classification -- (machine learning python scikit learn xgboost class imbalance) <p>I'm working with an unbalanced classification problem, in which the target variable contains:</p>&#xA;&#xA;<pre><code>np.bincount(y_train)&#xA;array([151953, 13273])&#xA;</code></pre>&#xA;&#xA;<p>i.e. <code>15195...
habedi/stack-exchange-dataset
69,457
keras CNN lstm add model depth
<p>Would anyone have any advice on how to add model depth? This works below but I was hoping to experiment with adding in additional non-TimeDistributed layers.</p>&#xA;&#xA;<pre><code># reshape from [samples, timesteps] into [samples, subsequences, timesteps, features]&#xA;n_features = 1&#xA;n_seq = 2&#xA;n_steps = 2&...
machine learning python keras lstm
1
keras CNN lstm add model depth -- (machine learning python keras lstm) <p>Would anyone have any advice on how to add model depth? This works below but I was hoping to experiment with adding in additional non-TimeDistributed layers.</p>&#xA;&#xA;<pre><code># reshape from [samples, timesteps] into [samples, subsequences,...
habedi/stack-exchange-dataset
69,474
Select best answer from several existing ones for a question
<p>After analyzing questions on a forum, a human support team has created a set of general answers, that can be used to provide basic answers on the forum. </p>&#xA;&#xA;<p>I am trying to build a system that: </p>&#xA;&#xA;<ol>&#xA;<li><p>Selects best answer from this set of answers for a given question. How to do this...
nlp question answering
1
Select best answer from several existing ones for a question -- (nlp question answering) <p>After analyzing questions on a forum, a human support team has created a set of general answers, that can be used to provide basic answers on the forum. </p>&#xA;&#xA;<p>I am trying to build a system that: </p>&#xA;&#xA;<ol>&#xA...
habedi/stack-exchange-dataset
69,477
Use embeddings to find similarity between documents
<p>I need to find cosine similarity between two text documents. I need embeddings that reflect order of the word sequence, so I don't plan to use document vectors built with bag of words or TF/IDF. Ideally I would use pre-trained document embeddings such as doc2vec from Gensim. &#xA;How to map new documents to pre-trai...
keras nlp pytorch embeddings doc2vec
1
Use embeddings to find similarity between documents -- (keras nlp pytorch embeddings doc2vec) <p>I need to find cosine similarity between two text documents. I need embeddings that reflect order of the word sequence, so I don't plan to use document vectors built with bag of words or TF/IDF. Ideally I would use pre-trai...
habedi/stack-exchange-dataset
69,493
Why to exclude features used for label generation during modeling?
<p>I have a dataset like below without labels</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/DQeqZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DQeqZ.png" alt="enter image description here"></a></p>&#xA;&#xA;<p>But with the help of experts opinion, we generate labels based on the below 3 rules...
machine learning neural network deep learning data mining feature selection
1
Why to exclude features used for label generation during modeling? -- (machine learning neural network deep learning data mining feature selection) <p>I have a dataset like below without labels</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/DQeqZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DQ...
habedi/stack-exchange-dataset
69,499
Should bias updates be porportional to overfitting?
<p><a href="https://datascience.stackexchange.com/questions/11962/how-to-update-bias-and-biass-weight-using-backpropagation-algorithm">According</a> to <a href="https://stackoverflow.com/questions/3775032/how-to-update-the-bias-in-neural-network-backpropagation">questions</a> on the internet, the bias is a learnable pa...
cross validation gradient descent overfitting bias
1
Should bias updates be porportional to overfitting? -- (cross validation gradient descent overfitting bias) <p><a href="https://datascience.stackexchange.com/questions/11962/how-to-update-bias-and-biass-weight-using-backpropagation-algorithm">According</a> to <a href="https://stackoverflow.com/questions/3775032/how-to-...
habedi/stack-exchange-dataset
69,518
Different approaches to label data
<p>I have a dataset of patient records but they don't have labels.</p>&#xA;&#xA;<p>I would like to label them and would like to know what are the different approaches available that I can consider to label them.</p>&#xA;&#xA;<p>For ex: I have given two approaches below but is there any other approaches to it?</p>&#xA;...
machine learning neural network deep learning data mining feature selection
1
Different approaches to label data -- (machine learning neural network deep learning data mining feature selection) <p>I have a dataset of patient records but they don't have labels.</p>&#xA;&#xA;<p>I would like to label them and would like to know what are the different approaches available that I can consider to labe...
habedi/stack-exchange-dataset
69,519
How to tackle too many outliers in dataset
<p>I boxplot all of my columns with seaborn boxplot in order to know how many outliers that i have, surprisingly there're too many outliers and so i can remove the outliers because i'm afraid with too many outliers it will have bad impact to my model especially impacting the mean,median, variance which will further imp...
machine learning python outlier
1
How to tackle too many outliers in dataset -- (machine learning python outlier) <p>I boxplot all of my columns with seaborn boxplot in order to know how many outliers that i have, surprisingly there're too many outliers and so i can remove the outliers because i'm afraid with too many outliers it will have bad impact t...
habedi/stack-exchange-dataset
69,531
Asynchronous Hyperparameter Optimization - Dependency between iterations
<p>When using Asynchronous Hyperparameter Optimization packages such as scikit optimize or hyperopt with cross validation (e.g., cv = 2 or 4) and setting the number of iteration to N (e.g., N=100), should I expect:</p>&#xA;&#xA;<ol>&#xA;<li>Dependency between sequential iterations where the loss value improves sequenti...
cross validation model selection hyperparameter hyperparameter tuning
1
Asynchronous Hyperparameter Optimization - Dependency between iterations -- (cross validation model selection hyperparameter hyperparameter tuning) <p>When using Asynchronous Hyperparameter Optimization packages such as scikit optimize or hyperopt with cross validation (e.g., cv = 2 or 4) and setting the number of iter...
habedi/stack-exchange-dataset
69,562
Can one property name be used twice in the same branch of a DecisionTreeRegressor?
<p><a href="https://i.stack.imgur.com/ETCbC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ETCbC.png" alt="Dataset"></a></p>&#xA;&#xA;<p>I am using this dataset for the analysis (Generated using make_regression of sklearn library)</p>&#xA;&#xA;<p>I was trying to learn the DecisionTreeRegression algo...
machine learning scikit learn regression decision trees
1
Can one property name be used twice in the same branch of a DecisionTreeRegressor? -- (machine learning scikit learn regression decision trees) <p><a href="https://i.stack.imgur.com/ETCbC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ETCbC.png" alt="Dataset"></a></p>&#xA;&#xA;<p>I am using this dat...
habedi/stack-exchange-dataset
69,567
What is neural structure learning in tensorflow?
<ul>&#xA;<li>What is neural structure learning?</li>&#xA;<li>what is the difference between neural network vs neural structure&#xA;learning?</li>&#xA;</ul>&#xA;
machine learning neural network tensorflow data science model
1
What is neural structure learning in tensorflow? -- (machine learning neural network tensorflow data science model) <ul>&#xA;<li>What is neural structure learning?</li>&#xA;<li>what is the difference between neural network vs neural structure&#xA;learning?</li>&#xA;</ul>&#xA;
habedi/stack-exchange-dataset
69,572
How to determine which features matter the most?
<p>I have a large dataset that consists of search results of loans. Someone would input their details like income etc and the results would include a bunch of loans from different companies and different loan types (so there can be more than 1 loan per company).</p>&#xA;<p><strong>The dataset</strong> consists of every...
machine learning scikit learn feature selection machine learning model
1
How to determine which features matter the most? -- (machine learning scikit learn feature selection machine learning model) <p>I have a large dataset that consists of search results of loans. Someone would input their details like income etc and the results would include a bunch of loans from different companies and d...
habedi/stack-exchange-dataset
69,582
redundancy or functional dependency of two columns
<p>Being a beginner in Data Analysis I ask you not to be much judgemental about this question.</p>&#xA;&#xA;<p>I was tring to find if there is a standard way (function?) in Pandas module to identify redundancy of a column. For example, notably for categorical data types, if a column is a function of another it could b...
pandas data cleaning
1
redundancy or functional dependency of two columns -- (pandas data cleaning) <p>Being a beginner in Data Analysis I ask you not to be much judgemental about this question.</p>&#xA;&#xA;<p>I was tring to find if there is a standard way (function?) in Pandas module to identify redundancy of a column. For example, notably...
habedi/stack-exchange-dataset
69,585
Pre-processing mixed data prior to clustering
<p>I am new to hierarchical clustering, and wish to perform clustering on mixed data. I am slightly confused on the necessary pre-processing steps. I understand how to pre-process purely continuous data, what I haven't been able to identify is what pre-processing steps are necessary for mixed data? Do I just scale my c...
clustering unsupervised learning preprocessing
1
Pre-processing mixed data prior to clustering -- (clustering unsupervised learning preprocessing) <p>I am new to hierarchical clustering, and wish to perform clustering on mixed data. I am slightly confused on the necessary pre-processing steps. I understand how to pre-process purely continuous data, what I haven't bee...
habedi/stack-exchange-dataset
69,594
can I use t-sne or PCA to reduce number of classes?
<p>I wanted to know if I can use t-sne or PCA to reduce the number of classes depending on the similarity between them. For example, if I have 100 classes of 100 different animals and would like to put all the cats in a group and all the dogs in a group etc. (to get few groups of these 100 classes).</p>&#xA;
classification pca tsne
1
can I use t-sne or PCA to reduce number of classes? -- (classification pca tsne) <p>I wanted to know if I can use t-sne or PCA to reduce the number of classes depending on the similarity between them. For example, if I have 100 classes of 100 different animals and would like to put all the cats in a group and all the ...
habedi/stack-exchange-dataset
69,603
Logistic Regression vs SVM
<p>Following <strong>Andrew Ng's</strong> machine learning course, he explains how we can modify logistic regression to obtain <strong>SVM</strong> algorithm. First he replaces (sort of approximating) cross entropy loss with hinge loss as shown in the image below:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/LBnY...
machine learning logistic regression svm
1
Logistic Regression vs SVM -- (machine learning logistic regression svm) <p>Following <strong>Andrew Ng's</strong> machine learning course, he explains how we can modify logistic regression to obtain <strong>SVM</strong> algorithm. First he replaces (sort of approximating) cross entropy loss with hinge loss as shown in...
habedi/stack-exchange-dataset
69,610
Change date in linear regression model
<p>Im trying to run a linear regression model with Years as the x variable and temperature on the y variable but I keep getting errors. I manage to run a regression model using the below code and also predicting for a future date 2040. But what Im struggling with is to change the data so its running from a specific dat...
linear regression
1
Change date in linear regression model -- (linear regression) <p>Im trying to run a linear regression model with Years as the x variable and temperature on the y variable but I keep getting errors. I manage to run a regression model using the below code and also predicting for a future date 2040. But what Im struggling...
habedi/stack-exchange-dataset
69,611
When can you reorder log operations?
<p>For example, you can reorder a <strong><em>softmax + nl (negative likelihood)</em></strong>&#xA; to <strong><em>log_softmax + nll (negative log-likelihood)</em></strong> </p>&#xA;&#xA;<p>Essentially changing <strong><em>log(softmax(x))</em></strong> to <strong><em>softmax(log(x))</em></strong></p>&#xA;&#xA;<p>Howev...
logistic regression mathematics softmax
1
When can you reorder log operations? -- (logistic regression mathematics softmax) <p>For example, you can reorder a <strong><em>softmax + nl (negative likelihood)</em></strong>&#xA; to <strong><em>log_softmax + nll (negative log-likelihood)</em></strong> </p>&#xA;&#xA;<p>Essentially changing <strong><em>log(softmax(x)...
habedi/stack-exchange-dataset
69,614
Would it be okay to stop training my neural network?
<p>When the validation error of my Neural Network that I am trying to train is slowly decreasing but not by much, is it okay to stop train the network at that point, or do I need to increase the training time until the minimum validation error is reached?</p>&#xA;&#xA;<p>For instance, in the last 5 epochs my validation...
deep learning training
1
Would it be okay to stop training my neural network? -- (deep learning training) <p>When the validation error of my Neural Network that I am trying to train is slowly decreasing but not by much, is it okay to stop train the network at that point, or do I need to increase the training time until the minimum validation e...
habedi/stack-exchange-dataset
69,622
Discrimination vs Calibration - Machine Learning Models
<p>I came across a new term called <code>Calibration</code> while reading about prediction models.</p>&#xA;&#xA;<p>Can you please help me understand how different it is from <code>Discrimination</code>.</p>&#xA;&#xA;<p>We build ML models to discriminate two/more classes from one another</p>&#xA;&#xA;<p>But what does <c...
machine learning deep learning classification data mining dataset
1
Discrimination vs Calibration - Machine Learning Models -- (machine learning deep learning classification data mining dataset) <p>I came across a new term called <code>Calibration</code> while reading about prediction models.</p>&#xA;&#xA;<p>Can you please help me understand how different it is from <code>Discriminatio...
habedi/stack-exchange-dataset
69,626
Extract features from Decision tree leaf nodes
<p>Recently came across a coursera course on "How to win Kaggle competitions" where they explain how <strong>we can engineer a categorical feature from each leaf node of the decision tree.</strong></p>&#xA;&#xA;<p>[Video Link][1] </p>&#xA;&#xA;<p>I cannot understand this concept. Any suggestion or pointers towards unde...
decision trees feature engineering feature extraction kaggle coursera
1
Extract features from Decision tree leaf nodes -- (decision trees feature engineering feature extraction kaggle coursera) <p>Recently came across a coursera course on "How to win Kaggle competitions" where they explain how <strong>we can engineer a categorical feature from each leaf node of the decision tree.</strong><...
habedi/stack-exchange-dataset
69,628
ImageDataGenerator - trained with model.fit instead of model.fit_generator
<p>I am a beginner in using the ImageDataGenerator from Keras and I accidentally used model.fit instead of model.fit_generator.</p>&#xA;&#xA;<pre><code>def gen_Image_data():&#xA; gen = ImageDataGenerator(&#xA; width_shift_range=0.1,&#xA; horizontal_flip=True)&#xA; return gen&#xA;&#xA;&#xA;&#xA;&...
keras data augmentation python 3.x
1
ImageDataGenerator - trained with model.fit instead of model.fit_generator -- (keras data augmentation python 3.x) <p>I am a beginner in using the ImageDataGenerator from Keras and I accidentally used model.fit instead of model.fit_generator.</p>&#xA;&#xA;<pre><code>def gen_Image_data():&#xA; gen = ImageDataGenerator...
habedi/stack-exchange-dataset
69,640
What should be the labels for subword tokens in BERT for NER task?
<p>For any NER task, we need a sequence of words and their corresponding labels.&#xA;To extract features for these words from BERT, they need to be tokenized into subwords.</p>&#xA;&#xA;<p>For example, the word <code>'infrequent'</code> (with label B-count) will be tokenized into <code>['in', '##fr', '##e', '##quent']<...
python named entity recognition bert
1
What should be the labels for subword tokens in BERT for NER task? -- (python named entity recognition bert) <p>For any NER task, we need a sequence of words and their corresponding labels.&#xA;To extract features for these words from BERT, they need to be tokenized into subwords.</p>&#xA;&#xA;<p>For example, the word ...
habedi/stack-exchange-dataset
69,643
Cannot clone object '<keras.engine.sequential.Sequential object at 0x0000023DD4D5F488>'
<p>My model-</p>&#xA;&#xA;<pre><code>#define model&#xA;model = Sequential()&#xA;model.add(Dense(128, activation='relu', input_dim=n_input_1))&#xA;model.add(Dense(64, activation='relu'))&#xA;#model.add(Dense(32, activation='relu'))&#xA;#model.add(Dense(16, activation='relu'))&#xA;model.add(Dense(1))&#xA;model.compile(op...
machine learning python keras scikit learn
1
Cannot clone object '<keras.engine.sequential.Sequential object at 0x0000023DD4D5F488>' -- (machine learning python keras scikit learn) <p>My model-</p>&#xA;&#xA;<pre><code>#define model&#xA;model = Sequential()&#xA;model.add(Dense(128, activation='relu', input_dim=n_input_1))&#xA;model.add(Dense(64, activation='relu')...
habedi/stack-exchange-dataset
69,657
Multiclassification problem
<p>I was wondering what happens when an image not in the training set is provided to the model in a multiclassification problem? Does it just classify something which is close to this image?</p>&#xA;
machine learning classification image classification multiclass classification
1
Multiclassification problem -- (machine learning classification image classification multiclass classification) <p>I was wondering what happens when an image not in the training set is provided to the model in a multiclassification problem? Does it just classify something which is close to this image?</p>&#xA;
habedi/stack-exchange-dataset
69,661
Difference between Ridge and Linear Regression
<p>From what I have understood, the Ridge Regression is just having the loss function for an optimization problem with the addition of the regularization term (L2 Norm in the case of Ridge). However I am not sure if the loss function can be described by a non-linear function or it needs to be linear. In this case, if t...
regression linear regression
1
Difference between Ridge and Linear Regression -- (regression linear regression) <p>From what I have understood, the Ridge Regression is just having the loss function for an optimization problem with the addition of the regularization term (L2 Norm in the case of Ridge). However I am not sure if the loss function can b...
habedi/stack-exchange-dataset
69,664
How to interpret Keras predict output?
<p>I am new in Keras and would want to apply a neural network on this dataset: &#xA;<a href="https://www.drivendata.org/competitions/57/nepal-earthquake/" rel="nofollow noreferrer">https://www.drivendata.org/competitions/57/nepal-earthquake/</a></p>&#xA;&#xA;<p>I have proprocessed the dataset transforming categorical v...
keras multilabel classification
1
How to interpret Keras predict output? -- (keras multilabel classification) <p>I am new in Keras and would want to apply a neural network on this dataset: &#xA;<a href="https://www.drivendata.org/competitions/57/nepal-earthquake/" rel="nofollow noreferrer">https://www.drivendata.org/competitions/57/nepal-earthquake/</a...
habedi/stack-exchange-dataset
69,675
How do I test a difference between two proportions representing fatality rate for Covid 19 in Philippines and World (except Philippines)?
<p>I'm trying to analyse if the fatality rate from my country (A third world country) vary significantly from the world's fatality rate.</p>&#xA;&#xA;<p>So I'd basically have two samples, labeled (Philippines) and (World excluding the Philippines) then i can compute the fatality rate for the 2 groups.</p>&#xA;&#xA;<p>D...
statistics distance self study
1
How do I test a difference between two proportions representing fatality rate for Covid 19 in Philippines and World (except Philippines)? -- (statistics distance self study) <p>I'm trying to analyse if the fatality rate from my country (A third world country) vary significantly from the world's fatality rate.</p>&#xA;&...
habedi/stack-exchange-dataset
69,677
What could be the reason of having a lower RMSE than MAE?
<p>I used some machine learning algorithms in my dataset and I found that my RMSE goes low than the MAE. What are the most common reasons for that type of typical scenario. Since from my understanding the RMSE is normally higher than the MAE. But if I am wrong is it actually possible to have a lower RMSE and higher MAE...
machine learning rmse
1
What could be the reason of having a lower RMSE than MAE? -- (machine learning rmse) <p>I used some machine learning algorithms in my dataset and I found that my RMSE goes low than the MAE. What are the most common reasons for that type of typical scenario. Since from my understanding the RMSE is normally higher than t...
habedi/stack-exchange-dataset
69,683
LogisticRegression NotImplementedError on fit function
<p>im a newbie in data science or machine learning. i try to implement code from <a href="https://github.com/python-engineer/MLfromscratch" rel="nofollow noreferrer">here</a>, but i got error when try to call fit function</p>&#xA;&#xA;<p>here is the code:</p>&#xA;&#xA;<pre><code>classification_data = dataset.drop([10],...
machine learning python logistic regression
1
LogisticRegression NotImplementedError on fit function -- (machine learning python logistic regression) <p>im a newbie in data science or machine learning. i try to implement code from <a href="https://github.com/python-engineer/MLfromscratch" rel="nofollow noreferrer">here</a>, but i got error when try to call fit fun...
habedi/stack-exchange-dataset
69,687
How to compute denominator in Naive Bayes?
<p>Suppose we have class <code>C_k</code> and input feature vector <code>x</code> in dataset&#xA;<a href="https://i.stack.imgur.com/yQMfv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yQMfv.jpg" alt="enter image description here"></a></p>&#xA;&#xA;<p>How to calculate probability <code>p(x)</code>?<...
machine learning probability naive bayes classifier
1
How to compute denominator in Naive Bayes? -- (machine learning probability naive bayes classifier) <p>Suppose we have class <code>C_k</code> and input feature vector <code>x</code> in dataset&#xA;<a href="https://i.stack.imgur.com/yQMfv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/yQMfv.jpg" alt=...
habedi/stack-exchange-dataset
69,698
Skip Connections in Residual Modules
<p>I am a beginner in CNN theory and would like to understand the usage of residual modules better.&#xA;As far as I understand residual modules can be skipped, only the activation function must be computed with the given input.</p>&#xA;&#xA;<p>My question is: How does the network know if it should skip the residual mod...
neural network convolution
1
Skip Connections in Residual Modules -- (neural network convolution) <p>I am a beginner in CNN theory and would like to understand the usage of residual modules better.&#xA;As far as I understand residual modules can be skipped, only the activation function must be computed with the given input.</p>&#xA;&#xA;<p>My ques...
habedi/stack-exchange-dataset
69,700
Convolution v.s. Cross-Correlation
<p>I understand that from mathematical point of view, only difference between Convolution and Cross-Correlation is that Convolution is commutative, while Cross-Correlation is now. </p>&#xA;&#xA;<p>In many articles Cross-Correlation is explained as measuring similarity between two signals, and Convolution is explained a...
machine learning cnn convolution
1
Convolution v.s. Cross-Correlation -- (machine learning cnn convolution) <p>I understand that from mathematical point of view, only difference between Convolution and Cross-Correlation is that Convolution is commutative, while Cross-Correlation is now. </p>&#xA;&#xA;<p>In many articles Cross-Correlation is explained as...
habedi/stack-exchange-dataset
69,701
How do you think about neural networks and ways to design new models?
<p>I'm currently learning about neural networks, and it seems to me that there usually is no good theoretical explanation given for why certain architectures work; there is most of the times, no formal argument as to why certain architectures work. The explanation give by professors seems to be more that we devise arch...
machine learning neural network lstm
1
How do you think about neural networks and ways to design new models? -- (machine learning neural network lstm) <p>I'm currently learning about neural networks, and it seems to me that there usually is no good theoretical explanation given for why certain architectures work; there is most of the times, no formal argume...
habedi/stack-exchange-dataset
69,708
Processing train and test data
<p>I have <code>X numpy array</code> as my features and <code>y numpy array</code> as my target. I split both of it into train and test data. From many <code>QnA</code> i have read they only say to <code>preprocess</code> both train and test separately. I assume i only do it to my feature (X) train and test data and no...
machine learning
1
Processing train and test data -- (machine learning) <p>I have <code>X numpy array</code> as my features and <code>y numpy array</code> as my target. I split both of it into train and test data. From many <code>QnA</code> i have read they only say to <code>preprocess</code> both train and test separately. I assume i on...
habedi/stack-exchange-dataset
69,716
Python and data analytics how to get the unique number of orders per seller using groupby?
<p>I am totally new to data analytics and python.</p>&#xA;&#xA;<p>I took a good course on Machine learning. But I didn't really worked with real life data.</p>&#xA;&#xA;<p>I managed to get data from a store who wants to create a recommendation system. I convinced them, that I will learn and get experience, and you will...
python data mining data analysis
1
Python and data analytics how to get the unique number of orders per seller using groupby? -- (python data mining data analysis) <p>I am totally new to data analytics and python.</p>&#xA;&#xA;<p>I took a good course on Machine learning. But I didn't really worked with real life data.</p>&#xA;&#xA;<p>I managed to get da...
habedi/stack-exchange-dataset
69,719
Data Under fitting and its handling
<p>Regularization is used to handle over-fitting problem.</p>&#xA;&#xA;<p>Similarly can we have some methodology to overcome under fitting problem or merely adding new features or training data will help us in reducing under-fitting issue?</p>&#xA;
data cleaning
1
Data Under fitting and its handling -- (data cleaning) <p>Regularization is used to handle over-fitting problem.</p>&#xA;&#xA;<p>Similarly can we have some methodology to overcome under fitting problem or merely adding new features or training data will help us in reducing under-fitting issue?</p>&#xA;
habedi/stack-exchange-dataset
69,729
Tensorflow CNN not predicting correctly for a well trained model
<p>So I have built a CNN and trained it to around 95% accuracy on training data, and 90% on testing data. The issue is, when I save this model, load it in again, and predict, it always predicts 1 or close to 1. I even used training data.</p>&#xA;&#xA;<pre><code>import numpy as np&#xA;import matplotlib.pyplot as plt&#xA...
keras tensorflow cnn
1
Tensorflow CNN not predicting correctly for a well trained model -- (keras tensorflow cnn) <p>So I have built a CNN and trained it to around 95% accuracy on training data, and 90% on testing data. The issue is, when I save this model, load it in again, and predict, it always predicts 1 or close to 1. I even used traini...
habedi/stack-exchange-dataset
69,730
What metric does `Scalar test loss` in AutoKeras mean?
<p>I'm using the following code:</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>import autokeras as ak&#xA;&#xA;regressor = ak.StructuredDataRegressor(max_trials=100)&#xA;regressor.fit(x=train_dataset.drop(columns=['MPG']), y=train_dataset['MPG'])&#xA;# Evaluate the accuracy of the found model.&#xA;print(...
keras
1
What metric does `Scalar test loss` in AutoKeras mean? -- (keras) <p>I'm using the following code:</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>import autokeras as ak&#xA;&#xA;regressor = ak.StructuredDataRegressor(max_trials=100)&#xA;regressor.fit(x=train_dataset.drop(columns=['MPG']), y=train_dataset[...
habedi/stack-exchange-dataset
69,737
Fastest way for 1 vs all lookup on embeddings
<p>I have a dataset with about 1 000 000 texts where I have computed their sentence embeddings with a language model and stored them in a numpy array. </p>&#xA;&#xA;<p>I wish to compare a new unseen text to all the 1 000 000 pre-computed embeddings and perform cosine similarity to retrieve the most semantic similar doc...
machine learning bert embeddings cosine distance similar documents
1
Fastest way for 1 vs all lookup on embeddings -- (machine learning bert embeddings cosine distance similar documents) <p>I have a dataset with about 1 000 000 texts where I have computed their sentence embeddings with a language model and stored them in a numpy array. </p>&#xA;&#xA;<p>I wish to compare a new unseen tex...
habedi/stack-exchange-dataset
69,743
What is the best way to find minima in Logistic regression?
<p>In the Andrew NG's tutorial on Machine Learning, he takes the first derivative of the error function then takes small steps in direction of the derivative to find minima. (Gradient Descent basically)</p>&#xA;&#xA;<p>In the elements of statistical leaning book, it found the first derivative of the error function, equ...
logistic regression gradient descent
1
What is the best way to find minima in Logistic regression? -- (logistic regression gradient descent) <p>In the Andrew NG's tutorial on Machine Learning, he takes the first derivative of the error function then takes small steps in direction of the derivative to find minima. (Gradient Descent basically)</p>&#xA;&#xA;<p...
habedi/stack-exchange-dataset
69,746
Semantic Annotation in text with curlie.org
<p>I came across curlie.org (previously known as the dmoz taxonomy) and I'm interested to see how I could best start tagging a given text, with concepts from that taxonomy:</p>&#xA;&#xA;<ul>&#xA;<li>Are there any tools out there that do semantic annotation based on a taxonomy (I couldn't find any)</li>&#xA;<li>How woul...
annotation
1
Semantic Annotation in text with curlie.org -- (annotation) <p>I came across curlie.org (previously known as the dmoz taxonomy) and I'm interested to see how I could best start tagging a given text, with concepts from that taxonomy:</p>&#xA;&#xA;<ul>&#xA;<li>Are there any tools out there that do semantic annotation bas...
habedi/stack-exchange-dataset
69,770
Understanding MSE,R2 scores wrt different scaling methods and non intutive results
<p>EDIT: Added Code and updated the metric values as my code changed</p>&#xA;&#xA;<p>If I have the Income Statements of all the companies currently trading in the US, I would like to predict the gross profit.&#xA;I was playing with the different scalers in <code>scikit-learn</code> and comparing mean squared error and ...
feature scaling mse
1
Understanding MSE,R2 scores wrt different scaling methods and non intutive results -- (feature scaling mse) <p>EDIT: Added Code and updated the metric values as my code changed</p>&#xA;&#xA;<p>If I have the Income Statements of all the companies currently trading in the US, I would like to predict the gross profit.&#xA...
habedi/stack-exchange-dataset
69,780
When should train and test data be merged?
<p>I am very new to data science and machine learning. I am following courses on datacamp, and then trying to solve problems on kaggle/drivendata.</p>&#xA;&#xA;<p>Very often, I try to use the sklearn.model_selection train_test_split()-method, but because my training (X) and test (y) data is not same shape, I get the er...
scikit learn
1
When should train and test data be merged? -- (scikit learn) <p>I am very new to data science and machine learning. I am following courses on datacamp, and then trying to solve problems on kaggle/drivendata.</p>&#xA;&#xA;<p>Very often, I try to use the sklearn.model_selection train_test_split()-method, but because my t...
habedi/stack-exchange-dataset
69,781
prediction() returning mistakenly false positives
<p>I do not know how to interpret the result of:</p>&#xA;&#xA;<pre><code>prediction(c(1,1,0,0),&#xA; c(1,1,0,0))&#xA;</code></pre>&#xA;&#xA;<p>prediction() functino comes from prediction {ROCR} it has this site: <a href="http://rocr.bioinf.mpi-sb.mpg.de/" rel="nofollow noreferrer">http://rocr.bioinf.mpi-sb.m...
r prediction
1
prediction() returning mistakenly false positives -- (r prediction) <p>I do not know how to interpret the result of:</p>&#xA;&#xA;<pre><code>prediction(c(1,1,0,0),&#xA; c(1,1,0,0))&#xA;</code></pre>&#xA;&#xA;<p>prediction() functino comes from prediction {ROCR} it has this site: <a href="http://rocr.bioinf.m...
habedi/stack-exchange-dataset
69,791
Why there is very large difference between cross validation scores?
<p>I have a very simple regression model and I am doing the cross validation. When cv=10 the highest score i got is 60.3 and lowest is -9.7 which is useless.&#xA;Average will be 30. </p>&#xA;&#xA;<p>No of row data set= 658 </p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/bfmqC.png" rel="nofollow noreferrer"><img sr...
machine learning regression data cross validation score
1
Why there is very large difference between cross validation scores? -- (machine learning regression data cross validation score) <p>I have a very simple regression model and I am doing the cross validation. When cv=10 the highest score i got is 60.3 and lowest is -9.7 which is useless.&#xA;Average will be 30. </p>&#xA...
habedi/stack-exchange-dataset
69,799
Conv1D specify output chanels in tensorflow 2.1
<p>Hello I'm trying to implement the "Tacotron Towards end to end" paper and in the<br>&#xA;<code>Encoder CBHG - a Conv1D bank of K=16, conv-k-128-ReLU</code><br>&#xA;“conv-k-c-ReLU” - denotes 1-D convolution&#xA;with width k and c output channels with ReLU activation.<br>&#xA;And I wanted to ask how exactly I can impl...
python deep learning tensorflow cnn speech to text
1
Conv1D specify output chanels in tensorflow 2.1 -- (python deep learning tensorflow cnn speech to text) <p>Hello I'm trying to implement the "Tacotron Towards end to end" paper and in the<br>&#xA;<code>Encoder CBHG - a Conv1D bank of K=16, conv-k-128-ReLU</code><br>&#xA;“conv-k-c-ReLU” - denotes 1-D convolution&#xA;wit...
habedi/stack-exchange-dataset
69,803
Convolution and Pooling as Infinitely strong priors
<p>I am currently reading about Convolutional Neural Networks in Deep Learning Book. I am stuck on section 9.4 titled "Convolution and Pooling as Infinitely String Priors". </p>&#xA;&#xA;<p>Could someone please intuitively explain to me what prior probability distribution is and what is its association to Convolution a...
machine learning deep learning probability
1
Convolution and Pooling as Infinitely strong priors -- (machine learning deep learning probability) <p>I am currently reading about Convolutional Neural Networks in Deep Learning Book. I am stuck on section 9.4 titled "Convolution and Pooling as Infinitely String Priors". </p>&#xA;&#xA;<p>Could someone please intuitive...
habedi/stack-exchange-dataset
69,805
How to extract the reason behind a prediction using TensorFlow?
<p>I created a CNN using TensorFlow2 and trained it as a binary classifier. Is there a way to extract the influence of each pixel upon the prediction?</p>&#xA;&#xA;<p>I am trying to obtain a mask similar to the following:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/k9VlI.png" rel="nofollow noreferrer"><img src="...
machine learning tensorflow cnn image classification
1
How to extract the reason behind a prediction using TensorFlow? -- (machine learning tensorflow cnn image classification) <p>I created a CNN using TensorFlow2 and trained it as a binary classifier. Is there a way to extract the influence of each pixel upon the prediction?</p>&#xA;&#xA;<p>I am trying to obtain a mask si...
habedi/stack-exchange-dataset
69,830
What is the difference between filling missing values with 0 or any othe constant term like -999?
<p>Most of the text book says to fill missing values use mean/median(numerical) and most frequent(categorical) but I working on a data set which has too many missing values and I can't remove those columns because they are important. </p>&#xA;&#xA;<pre><code>train.isnull().sum()&#xA;&#xA;TransactionID 0&#xA;is...
machine learning
1
What is the difference between filling missing values with 0 or any othe constant term like -999? -- (machine learning) <p>Most of the text book says to fill missing values use mean/median(numerical) and most frequent(categorical) but I working on a data set which has too many missing values and I can't remove those co...
habedi/stack-exchange-dataset
69,839
Non-categorical loss in Keras
<p>I am training a neural network (arbitrary architecture) and I have a label space that is not one-hot encoded, but continuous. The reason is that for the given problem, it is not possible to assign a single class only, it is more of a probability mapping. So in the end, my targets sum up to 1 again, but they are not ...
keras loss function
1
Non-categorical loss in Keras -- (keras loss function) <p>I am training a neural network (arbitrary architecture) and I have a label space that is not one-hot encoded, but continuous. The reason is that for the given problem, it is not possible to assign a single class only, it is more of a probability mapping. So in t...
habedi/stack-exchange-dataset
69,847
What is the selection criteria to choose between XGBoost and Random Forest
<p>I am trying to understand - when would someone choose Random Forest over XGBoost and vice versa. All the articles out there highlights on the differences between both. I understand them. But when actually given a real world data set, how should we approach the problem to choose between these? </p>&#xA;&#xA;<p>For eg...
machine learning random forest xgboost model selection ensemble modeling
1
What is the selection criteria to choose between XGBoost and Random Forest -- (machine learning random forest xgboost model selection ensemble modeling) <p>I am trying to understand - when would someone choose Random Forest over XGBoost and vice versa. All the articles out there highlights on the differences between bo...
habedi/stack-exchange-dataset
69,852
Extremely high MSE/MAE for Ridge Regression(sklearn) when the label is directly calculated from the features
<p>Edit: Removing <code>TransformedTargetRegressor</code> and adding more info as requested.</p>&#xA;&#xA;<p>Edit2: There were 18K rows where the relation did not hold. I'm sorry :(. After removing those rows and upon @Ben Reiniger's advice, I used LinearRegression and the metrics looked more saner. The new metrics ar...
scikit learn mse ridge regression
1
Extremely high MSE/MAE for Ridge Regression(sklearn) when the label is directly calculated from the features -- (scikit learn mse ridge regression) <p>Edit: Removing <code>TransformedTargetRegressor</code> and adding more info as requested.</p>&#xA;&#xA;<p>Edit2: There were 18K rows where the relation did not hold. I'm...
habedi/stack-exchange-dataset
69,907
80-20 or 80-10-10 for training machine learning models?
<p>I have a very basic question.</p>&#xA;&#xA;<p>1) When is it recommended to hold part of the data for validation and when is it unnecessary? For example, when can we say it is better to have 80% training, 10% validating and 10% testing split and when can we say it is enough to have a simple 80% training and 20% testi...
machine learning cross validation training
1
80-20 or 80-10-10 for training machine learning models? -- (machine learning cross validation training) <p>I have a very basic question.</p>&#xA;&#xA;<p>1) When is it recommended to hold part of the data for validation and when is it unnecessary? For example, when can we say it is better to have 80% training, 10% valid...
habedi/stack-exchange-dataset
69,914
Sklearn Pipeline for mixed features: numerical and (skewed) categorical
<p>I am working on a dataset from Kaggle (housing price prediction). I have done some pre-processing on the data (missing values, category aggregation, selecting ordinal vs one-hot). I am trying to implement a pipeline to streamline the code. The pipeline consists of a ColumnTransformer with two components: one compone...
machine learning scikit learn kaggle
1
Sklearn Pipeline for mixed features: numerical and (skewed) categorical -- (machine learning scikit learn kaggle) <p>I am working on a dataset from Kaggle (housing price prediction). I have done some pre-processing on the data (missing values, category aggregation, selecting ordinal vs one-hot). I am trying to implemen...
habedi/stack-exchange-dataset
69,917
what is learning rate in neural network?
<p>When I am creating a model using Keras we should define the learning rate(lr) in that optimizer method Please refer to the below code.</p>&#xA;&#xA;<pre><code>from keras import optimizers&#xA;sgd = optimizers.SGD(lr=0.01, clipnorm=1.)&#xA;</code></pre>&#xA;&#xA;<p>Please give a simple example with a definition. &#xA...
machine learning deep learning keras tensorflow data science model
1
what is learning rate in neural network? -- (machine learning deep learning keras tensorflow data science model) <p>When I am creating a model using Keras we should define the learning rate(lr) in that optimizer method Please refer to the below code.</p>&#xA;&#xA;<pre><code>from keras import optimizers&#xA;sgd = optimi...
habedi/stack-exchange-dataset
69,930
Find the optimal n_estimator by looping the model accuracy indicator in random forest algorithm - python
<p>i'm trying to find the best n_estimator value on a Random Forest ML model by running this loop: </p>&#xA;&#xA;<pre><code>for i in r:&#xA; RF_model_i = RandomForestClassifier(criterion="gini", n_estimators=i, oob_score=True)&#xA; RF_model_i.id = [i] # dynamically add fields to objects&#xA; RF_model_i.fit(X_t...
random forest python 3.x
1
Find the optimal n_estimator by looping the model accuracy indicator in random forest algorithm - python -- (random forest python 3.x) <p>i'm trying to find the best n_estimator value on a Random Forest ML model by running this loop: </p>&#xA;&#xA;<pre><code>for i in r:&#xA; RF_model_i = RandomForestClassifier(criter...
habedi/stack-exchange-dataset
69,945
How to approximate constant parameters of any generalized function?
<p>I am new to Data Science and Machine Learning.&#xA;I am trying to approximate constant parameters of any generalized not necessarily polynomial function given the input, desired output and the form of the function using neural network.&#xA;Is there any other way to do it using neural network or should I use some oth...
neural network
1
How to approximate constant parameters of any generalized function? -- (neural network) <p>I am new to Data Science and Machine Learning.&#xA;I am trying to approximate constant parameters of any generalized not necessarily polynomial function given the input, desired output and the form of the function using neural ne...
habedi/stack-exchange-dataset
69,954
Split text into phrases of a person and an operator
<p>I have about 5,000 texts without punctuation marks.&#xA;Each text is a conversation between an operator and a person.&#xA;For example: "Hello hello how can I help you how can I find out how much money I have in my account"</p>&#xA;&#xA;<p>How can one separate phrases between a person and an operator using machine le...
machine learning neural network nlp speech to text
1
Split text into phrases of a person and an operator -- (machine learning neural network nlp speech to text) <p>I have about 5,000 texts without punctuation marks.&#xA;Each text is a conversation between an operator and a person.&#xA;For example: "Hello hello how can I help you how can I find out how much money I have i...
habedi/stack-exchange-dataset
69,958
Confusion matrix and ROC AUC curves are not in sync
<p>I created a classification model with three target classes and created a confusion matrix to measure the accuracy, here is the matrix code </p>&#xA;&#xA;<pre><code>from sklearn.datasets import load_wine&#xA;data = load_wine()&#xA;x = pd.DataFrame(data=data.data, columns=data.feature_names )&#xA;y = pd.DataFrame(data...
python classification machine learning model confusion matrix auc
1
Confusion matrix and ROC AUC curves are not in sync -- (python classification machine learning model confusion matrix auc) <p>I created a classification model with three target classes and created a confusion matrix to measure the accuracy, here is the matrix code </p>&#xA;&#xA;<pre><code>from sklearn.datasets import l...
habedi/stack-exchange-dataset
69,981
Preparing for a Machine Learning Design Interview
<p>I am not sure if this is a relevant post here but:</p>&#xA;&#xA;<p>I made it to the final round for the Machine Learing Engineer position at Facebook. The final round interview is virtual (thanks to Corona) and will consist of:</p>&#xA;&#xA;<pre><code>2 - General Algorithmic Coding questions&#xA;1 - Machine Learning...
machine learning ranking search
1
Preparing for a Machine Learning Design Interview -- (machine learning ranking search) <p>I am not sure if this is a relevant post here but:</p>&#xA;&#xA;<p>I made it to the final round for the Machine Learing Engineer position at Facebook. The final round interview is virtual (thanks to Corona) and will consist of:</p...
habedi/stack-exchange-dataset
69,983
I don't understand RidgeCV's fit_intercept, and how to use it for my data
<p>Alright, I have an assignment that makes me calculate weights for a function with different terms. At first, I thought I might just leave the weight for the term <span class="math-container">$1$</span> out, and instead use the intercept. I have decided to use RidgeCV, as I had a large amount of multicolinearity.</p>...
regression linear regression
1
I don't understand RidgeCV's fit_intercept, and how to use it for my data -- (regression linear regression) <p>Alright, I have an assignment that makes me calculate weights for a function with different terms. At first, I thought I might just leave the weight for the term <span class="math-container">$1$</span> out, an...
habedi/stack-exchange-dataset
69,990
using feature selection to improve model performance
<p>I have a highly sparse dataset that I am using to predict a continuous variable via a random forest regression. I have achieved an acceptable level of performance following cross-validation, and I am now thinking of potential ways I might further improve accuracy.</p>&#xA;&#xA;<p>Given that my dataset is highly spar...
python regression feature selection random forest
1
using feature selection to improve model performance -- (python regression feature selection random forest) <p>I have a highly sparse dataset that I am using to predict a continuous variable via a random forest regression. I have achieved an acceptable level of performance following cross-validation, and I am now think...
habedi/stack-exchange-dataset
70,021
Model selection metric for validation phase in deep learning
<p>I have been taught that for each epoch in training, we perform a training phase, and then a validation phase where we decide whether the new set of parameters is better than the current best. This selection of parameters is done using the same loss function that we use for training, but applied to validation data in...
deep learning model selection
1
Model selection metric for validation phase in deep learning -- (deep learning model selection) <p>I have been taught that for each epoch in training, we perform a training phase, and then a validation phase where we decide whether the new set of parameters is better than the current best. This selection of parameters ...
habedi/stack-exchange-dataset
70,036
Genetic Optimization, Heuristic regarding choosing the number of generations and population size
<p>I have a simple model with some fitness function that I'm trying to max out.&#xA;This model have ~20 variables, each about ~15 options.&#xA;Is there a heuristic formula or a study of some sort that can guide me regarding the best:</p>&#xA;&#xA;<ol>&#xA;<li>Population size</li>&#xA;<li>Generations</li>&#xA;</ol>&#xA;...
genetic algorithms
1
Genetic Optimization, Heuristic regarding choosing the number of generations and population size -- (genetic algorithms) <p>I have a simple model with some fitness function that I'm trying to max out.&#xA;This model have ~20 variables, each about ~15 options.&#xA;Is there a heuristic formula or a study of some sort tha...
habedi/stack-exchange-dataset
70,041
Can OLS regression be used to predict from a complete sequence of data?
<p>Reading online and following <a href="https://scipy-cookbook.readthedocs.io/items/robust_regression.html" rel="nofollow noreferrer">this example from scipy</a> I understand OLS can be used to find data between gaps in a sequence (interpolate?) but I already have a complete sequence and want to predict the future of ...
prediction sequence least squares svm
1
Can OLS regression be used to predict from a complete sequence of data? -- (prediction sequence least squares svm) <p>Reading online and following <a href="https://scipy-cookbook.readthedocs.io/items/robust_regression.html" rel="nofollow noreferrer">this example from scipy</a> I understand OLS can be used to find data ...
habedi/stack-exchange-dataset
70,054
Interpretation for test score , training score and validation score in machine learning?
<p>Interpretation for test score , training score and validation score ? what they actually tell us?</p>&#xA;&#xA;<p>What's an acceptable difference between cross test score , validation score and test score?</p>&#xA;&#xA;<p>If difference between test score and training score is small mean it is a good model/fit?</p>&#...
cross validation overfitting
1
Interpretation for test score , training score and validation score in machine learning? -- (cross validation overfitting) <p>Interpretation for test score , training score and validation score ? what they actually tell us?</p>&#xA;&#xA;<p>What's an acceptable difference between cross test score , validation score and ...
habedi/stack-exchange-dataset
70,064
How gradients are learned for pooling layers in Convolution Neural Network?
<p>Assuming we could compute a layerwise Hessian of the error function when training a&#xA;neural network, the error sub-surface of pooling layers will be flat.??</p>&#xA;&#xA;<p>Is that correct?</p>&#xA;&#xA;<p>There is no weights to be learnt for pooling layer but for eg. max pool can have different values at differe...
cnn pooling
1
How gradients are learned for pooling layers in Convolution Neural Network? -- (cnn pooling) <p>Assuming we could compute a layerwise Hessian of the error function when training a&#xA;neural network, the error sub-surface of pooling layers will be flat.??</p>&#xA;&#xA;<p>Is that correct?</p>&#xA;&#xA;<p>There is no wei...
habedi/stack-exchange-dataset
70,068
How to transform and cummulate data in python
<p>I would like to transform dataframe and cummulate them using pandas. </p>&#xA;&#xA;<ol>&#xA;<li>year country value</li>&#xA;<li>1999 JAPAN 10</li>&#xA;<li>2000 KOREA 15</li>&#xA;<li>2000 USA 20</li>&#xA;<li>2001 USA 13</li>&#xA;<li>2002 JAPAN 30</li>&#xA;</ol>&#xA;&#xA;<h2>* I want to transform datafra...
python pandas data cleaning
1
How to transform and cummulate data in python -- (python pandas data cleaning) <p>I would like to transform dataframe and cummulate them using pandas. </p>&#xA;&#xA;<ol>&#xA;<li>year country value</li>&#xA;<li>1999 JAPAN 10</li>&#xA;<li>2000 KOREA 15</li>&#xA;<li>2000 USA 20</li>&#xA;<li>2001 USA 13</li>&#x...
habedi/stack-exchange-dataset
70,075
Predicting the missing word using fasttext pretrained word embedding models (CBOW vs skipgram)
<p>I am trying to implement a simple word prediction algorithm for filling a gap in a sentence by choosing from several options:</p>&#xA;&#xA;<p>Driving a ---- is not fun in London streets.</p>&#xA;&#xA;<ol>&#xA;<li>Apple</li>&#xA;<li>Car</li>&#xA;<li>Book</li>&#xA;<li>King</li>&#xA;</ol>&#xA;&#xA;<p>With the right mod...
machine learning nlp prediction word2vec gensim
1
Predicting the missing word using fasttext pretrained word embedding models (CBOW vs skipgram) -- (machine learning nlp prediction word2vec gensim) <p>I am trying to implement a simple word prediction algorithm for filling a gap in a sentence by choosing from several options:</p>&#xA;&#xA;<p>Driving a ---- is not fun i...
habedi/stack-exchange-dataset
70,078
Kohen Kappa Coefficient of Naive Bayes with 62% overall accuracy is better than Logistic Regression with 98% accuracy?
<p>I have been trying to evaluate my models used on fire systems dataset with a huge imbalance in the dataset. Most models failed to predict any true positives correctly however naive Bayes managed to do that but with a very high rate of False Positive. I had run the experiments on both the confusion matrix and classif...
machine learning logistic regression class imbalance naive bayes classifier
1
Kohen Kappa Coefficient of Naive Bayes with 62% overall accuracy is better than Logistic Regression with 98% accuracy? -- (machine learning logistic regression class imbalance naive bayes classifier) <p>I have been trying to evaluate my models used on fire systems dataset with a huge imbalance in the dataset. Most mode...
habedi/stack-exchange-dataset
70,086
How is the weight matrix set and its dimension in CNN
<p>I am trying to calculate the output size of each layer and the number of parameters for 3 class classification using CNN. I have calculated till the final maxpooling layer and would really appreciate help in understanding how to reach the fully connected layer. </p>&#xA;&#xA;<p>In Matlab I checked that the size for ...
classification multiclass classification confusion matrix
1
How is the weight matrix set and its dimension in CNN -- (classification multiclass classification confusion matrix) <p>I am trying to calculate the output size of each layer and the number of parameters for 3 class classification using CNN. I have calculated till the final maxpooling layer and would really appreciate ...
habedi/stack-exchange-dataset
70,087
The meaning of γt−t0 in Reinforcement learning with pytorch
<p>When reading <a href="https://pytorch.org/tutorials/intermediate/reinforcement_q_learning.html" rel="nofollow noreferrer">pytorch tutorial</a>:</p>&#xA;&#xA;<blockquote>&#xA; <p>Our aim will be to train a policy that tries to maximize the discounted, cumulative reward <code>Rt0=∑∞t=t0γt−t0rt</code>, where <code>Rt0...
reinforcement learning pytorch
1
The meaning of γt−t0 in Reinforcement learning with pytorch -- (reinforcement learning pytorch) <p>When reading <a href="https://pytorch.org/tutorials/intermediate/reinforcement_q_learning.html" rel="nofollow noreferrer">pytorch tutorial</a>:</p>&#xA;&#xA;<blockquote>&#xA; <p>Our aim will be to train a policy that tri...
habedi/stack-exchange-dataset
70,125
Spark/Databricks: GPU does not appear to be utilized for ML regression (cross-validation, prediction) notebook
<p>I have created and attached a notebook to a GPU-enabled Databricks cluster (6.4 ML (includes Apache Spark 2.4.5, GPU, Scala 2.11), EC2 type: p2.xlarge).</p>&#xA;&#xA;<p>I have started running the notebook that includes cells with PySpark/MLlib code for performing cross-validation and prediction using a Pipeline cons...
apache spark pyspark
1
Spark/Databricks: GPU does not appear to be utilized for ML regression (cross-validation, prediction) notebook -- (apache spark pyspark) <p>I have created and attached a notebook to a GPU-enabled Databricks cluster (6.4 ML (includes Apache Spark 2.4.5, GPU, Scala 2.11), EC2 type: p2.xlarge).</p>&#xA;&#xA;<p>I have star...
habedi/stack-exchange-dataset
70,135
Do I use the mean vector from my training set to center my testing set when dimension reducing for classification?
<p>Please let me know if this is the right place to ask this (or if any of my tags are wrong) or if I need to write this any differently.</p>&#xA;&#xA;<p>Do I use the mean vector from my training set to center my testing set when dimension reducing for classification?</p>&#xA;&#xA;<p>I am using the principal component ...
machine learning classification machine learning model pca dimensionality reduction
1
Do I use the mean vector from my training set to center my testing set when dimension reducing for classification? -- (machine learning classification machine learning model pca dimensionality reduction) <p>Please let me know if this is the right place to ask this (or if any of my tags are wrong) or if I need to write ...
habedi/stack-exchange-dataset
70,137
What model do I use to predict a regression problem with timeseries data
<p>Overall Goal&#xA;To predict how much reagent "A" I started with in a reaction.</p>&#xA;&#xA;<p>Data:&#xA;To predict this I have timeseries data of reagent "B". For each time step a measurement of reagent "B" is taken (the amount of reagent "B" present at that time point). The overall timeseries is a curve. This curv...
time series predictive modeling
1
What model do I use to predict a regression problem with timeseries data -- (time series predictive modeling) <p>Overall Goal&#xA;To predict how much reagent "A" I started with in a reaction.</p>&#xA;&#xA;<p>Data:&#xA;To predict this I have timeseries data of reagent "B". For each time step a measurement of reagent "B"...
habedi/stack-exchange-dataset
70,140
cross validation on whole data set or training data?
<p>I am always having cross validation score smaller then the training score and I am performing cross validation on just training data is that normal thing ? Kfold = 5 <a href="https://i.stack.imgur.com/NsZyo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NsZyo.png" alt="cross"></a></p>&#xA;
machine learning cross validation score
1
cross validation on whole data set or training data? -- (machine learning cross validation score) <p>I am always having cross validation score smaller then the training score and I am performing cross validation on just training data is that normal thing ? Kfold = 5 <a href="https://i.stack.imgur.com/NsZyo.png" rel="no...
habedi/stack-exchange-dataset
70,157
r2 for regression models it is a score or error?
<p>some places I have seen it is called as score and some other place as error. Lets suppose r2=0.83 means that score = 83% and Error= 17% or vise versa </p>&#xA;
regression score
1
r2 for regression models it is a score or error? -- (regression score) <p>some places I have seen it is called as score and some other place as error. Lets suppose r2=0.83 means that score = 83% and Error= 17% or vise versa </p>&#xA;
habedi/stack-exchange-dataset