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 |
|---|---|---|---|---|---|---|
80,130 | KNN Regression: Distance function and/or vector representation for datetime features | <p>Context: Trying to forecast some sort of consumption value (e.g. water) using datetime features and exogenous variables (like temperature).</p>
<p>Take some datetime features like week days (<code>mon=1, tue=2, ..., sun=7</code>) and months (<code>jan=1, ..., dec=12</code>).</p>
<p>A naive KNN regressor will... | regression feature engineering k nn distance | 1 | KNN Regression: Distance function and/or vector representation for datetime features -- (regression feature engineering k nn distance)
<p>Context: Trying to forecast some sort of consumption value (e.g. water) using datetime features and exogenous variables (like temperature).</p>
<p>Take some datetime features lik... | habedi/stack-exchange-dataset |
80,132 | How can access to modify feature_importances of Random Forest Classifier model? | <p>My goal is to extract the feature importances from already trained random forest classifier and transfer them to another classifier. How this can be done? and How can access to modify feature_importances of Random Forest Classifier model? using scikit learn.</p>
 | python scikit learn random forest feature extraction | 1 | How can access to modify feature_importances of Random Forest Classifier model? -- (python scikit learn random forest feature extraction)
<p>My goal is to extract the feature importances from already trained random forest classifier and transfer them to another classifier. How this can be done? and How can access to mo... | habedi/stack-exchange-dataset |
80,157 | What are bias and variance in machine learning? | <p>I am studying machine learning, and I have encountered the concept of <strong>bias</strong> and <strong>variance</strong>. I am a university student and in the slides of my professor, the <strong>bias</strong> is defined as:</p>
<p><span class="math-container">$bias = E[error_s(h)]-error_d(h)$</span></p>
<p>... | machine learning dataset variance bias | 1 | What are bias and variance in machine learning? -- (machine learning dataset variance bias)
<p>I am studying machine learning, and I have encountered the concept of <strong>bias</strong> and <strong>variance</strong>. I am a university student and in the slides of my professor, the <strong>bias</strong> is defined as:<... | habedi/stack-exchange-dataset |
80,164 | Why is Regularization after PCA or Factor Analysis a bad idea? | <p>I have done Factor Analysis on my data and applied various machine learning models on it. I particularly find it giving high MSE value for Ridge and Lasso Regression compared to other models. I want to know the reason why this happens.</p>
 | machine learning pca regularization ridge regression exploratory factor analysis | 1 | Why is Regularization after PCA or Factor Analysis a bad idea? -- (machine learning pca regularization ridge regression exploratory factor analysis)
<p>I have done Factor Analysis on my data and applied various machine learning models on it. I particularly find it giving high MSE value for Ridge and Lasso Regression co... | habedi/stack-exchange-dataset |
80,170 | Why does it has a constant val_loss:? | <p><a href="https://i.stack.imgur.com/RWBS5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RWBS5.png" alt="enter image description here" /></a></p>
<p>I am working on somr dataset and am implementing a deep neural network. There are some typos that I am not familiar with. strong text</p>
 | deep learning keras | 1 | Why does it has a constant val_loss:? -- (deep learning keras)
<p><a href="https://i.stack.imgur.com/RWBS5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RWBS5.png" alt="enter image description here" /></a></p>
<p>I am working on somr dataset and am implementing a deep neural network. There are ... | habedi/stack-exchange-dataset |
80,173 | Are my features enough? | <p>I am trying to fit a regression model on a non linear data.
The features I have are around 12 and around 800 samples.
With the help of PyCaret, i tried to fit the data on to around 22 model, and then selected the best one (Ada Boost) and then tried further to tune it to get better result.
However, none o... | regression features | 1 | Are my features enough? -- (regression features)
<p>I am trying to fit a regression model on a non linear data.
The features I have are around 12 and around 800 samples.
With the help of PyCaret, i tried to fit the data on to around 22 model, and then selected the best one (Ada Boost) and then tried further to ... | habedi/stack-exchange-dataset |
80,178 | Which is better: Cross validation or a validation set for hyperparameter optimization? | <p>For hyperparameter optimization I see two approaches:</p>
<ol>
<li><p>Splitting the dataset into train, validation and test, and optimize the hyperparameters based on the results of training on the train dataset and evaluating on the validation dataset, leaving the test set untouched for final performance es... | machine learning hyperparameter tuning | 1 | Which is better: Cross validation or a validation set for hyperparameter optimization? -- (machine learning hyperparameter tuning)
<p>For hyperparameter optimization I see two approaches:</p>
<ol>
<li><p>Splitting the dataset into train, validation and test, and optimize the hyperparameters based on the results... | habedi/stack-exchange-dataset |
80,180 | For semantic sementation, why am I getting better loss values with binary cross entropy than dice coef? | <p>I'm learning all related to data science and how to train <strong>U-Net</strong> to do <strong>semantic segmentation</strong>.</p>
<p>I have a U-NET with this loss function:</p>
<pre><code>def dice_coef(y_true, y_pred):
 y_true_f = K.flatten(float(y_true))
 y_pred_f = K.flatten(float(y_pred))&#... | cnn loss function image segmentation semantic segmentation | 1 | For semantic sementation, why am I getting better loss values with binary cross entropy than dice coef? -- (cnn loss function image segmentation semantic segmentation)
<p>I'm learning all related to data science and how to train <strong>U-Net</strong> to do <strong>semantic segmentation</strong>.</p>
<p>I have a U-... | habedi/stack-exchange-dataset |
80,207 | Significance of Object-Oriented Programming (OOP) in Data Science | <p>Can someone please explain to me the role of Object-Oriented Programming (OOP) and Object-Oriented Design (OOD) in Data Science? I am from a non-computer science background. Do I need to learn these as well to become a Data Scientist? Also, please tell me if I should be learning Python or R for the same.</p>
 | machine learning python r ai | 1 | Significance of Object-Oriented Programming (OOP) in Data Science -- (machine learning python r ai)
<p>Can someone please explain to me the role of Object-Oriented Programming (OOP) and Object-Oriented Design (OOD) in Data Science? I am from a non-computer science background. Do I need to learn these as well to become ... | habedi/stack-exchange-dataset |
80,218 | How do I validate this Kalman model for estimation of undocumeted covid cases? | <p>Tensorflow recently made a tutorial titled <a href="https://www.tensorflow.org/probability/examples/Undocumented_Infection_and_the_Dissemination_of_SARS-CoV2" rel="nofollow noreferrer"><code>Estimation of undocumented SARS-CoV2 cases</code></a>. It replicates 6th March 2020 paper by Li et al titled <code>Substantial... | python tensorflow forecasting | 1 | How do I validate this Kalman model for estimation of undocumeted covid cases? -- (python tensorflow forecasting)
<p>Tensorflow recently made a tutorial titled <a href="https://www.tensorflow.org/probability/examples/Undocumented_Infection_and_the_Dissemination_of_SARS-CoV2" rel="nofollow noreferrer"><code>Estimation o... | habedi/stack-exchange-dataset |
80,221 | Creating an "unclassified" class in Random Forest | <p>I am trying to classify satellite based images by creating a region of interest and then classifying according to it.</p>
<p>I am using a Jupyter notebook using python to do that.</p>
<p>I used a Random forest classifier and got a nice model and result, but the problem is that the image is "over classif... | python random forest image classification supervised learning | 1 | Creating an "unclassified" class in Random Forest -- (python random forest image classification supervised learning)
<p>I am trying to classify satellite based images by creating a region of interest and then classifying according to it.</p>
<p>I am using a Jupyter notebook using python to do that.</p>
<p>I use... | habedi/stack-exchange-dataset |
80,227 | Should I keep common stop-words when preprocessing for word embedding? | <p>If I want to construct a word embedding by predicting a target word given context words, is it better to remove stop words or keep them?</p>
<blockquote>
<p>the quick brown fox jumped over the lazy dog</p>
</blockquote>
<p>or</p>
<blockquote>
<p>quick brown fox jumped lazy dog</p>
</block... | word embeddings word2vec nlp | 1 | Should I keep common stop-words when preprocessing for word embedding? -- (word embeddings word2vec nlp)
<p>If I want to construct a word embedding by predicting a target word given context words, is it better to remove stop words or keep them?</p>
<blockquote>
<p>the quick brown fox jumped over the lazy dog</p... | habedi/stack-exchange-dataset |
80,232 | Does convergence of loss function is always guarnteed? | <p>Which of the following is true, given the optimal learning rate?</p>
<p>(i) For convex loss functions (i.e. with a bowl shape), batch gradient descent is guaranteed to eventually converge to the global optimum while stochastic gradient descent is not.</p>
<p>(ii) For convex loss functions (i.e. with a bowl s... | loss function optimization | 1 | Does convergence of loss function is always guarnteed? -- (loss function optimization)
<p>Which of the following is true, given the optimal learning rate?</p>
<p>(i) For convex loss functions (i.e. with a bowl shape), batch gradient descent is guaranteed to eventually converge to the global optimum while stochastic... | habedi/stack-exchange-dataset |
80,248 | Autoencoder feature extraction plateau | <p>I am working with a large dataset (approximately 55K observations x 11K features) and trying to perform dimensionality reduction to about 150 features. So far, I tried PCA, LDA, and autoencoder. The autoencoder that I tried was 12000-8000-5000-100-500-250-150-, all layers were Dense with sigmoid activation, except t... | python deep learning feature extraction autoencoder | 1 | Autoencoder feature extraction plateau -- (python deep learning feature extraction autoencoder)
<p>I am working with a large dataset (approximately 55K observations x 11K features) and trying to perform dimensionality reduction to about 150 features. So far, I tried PCA, LDA, and autoencoder. The autoencoder that I tri... | habedi/stack-exchange-dataset |
80,249 | How to classify a new email as spam/not spam? | <p>I am working on a small exercise for determining if an email is spam or not. My dataset is the following:</p>
<pre><code> Email Spam
0 Hi, I am Andrew and I want too buy VIAGRA 1
1 Dear subscribe... | machine learning python classification scikit learn naive bayes classifier | 1 | How to classify a new email as spam/not spam? -- (machine learning python classification scikit learn naive bayes classifier)
<p>I am working on a small exercise for determining if an email is spam or not. My dataset is the following:</p>
<pre><code> Email ... | habedi/stack-exchange-dataset |
80,272 | What makes the posterior intractable? | <p>In the setting of Variational AutoEncoders, i.e. when we want to find the posterior distribution</p>
<p><img src="https://latex.codecogs.com/gif.latex?p_%7B%5Cmathbf%7B%5Ctheta%7D%7D(%5Cmathbf%7Bz%7D|%5Cmathbf%7Bx%7D)&space;=&space;p_%7B%5Cmathbf%7B%5Ctheta%7D%7D(%5Cmathbf%7Bx%7D|%5Cmathbf%7Bz%7D)p_%7B%5Cmathbf%... | bayesian vae | 1 | What makes the posterior intractable? -- (bayesian vae)
<p>In the setting of Variational AutoEncoders, i.e. when we want to find the posterior distribution</p>
<p><img src="https://latex.codecogs.com/gif.latex?p_%7B%5Cmathbf%7B%5Ctheta%7D%7D(%5Cmathbf%7Bz%7D|%5Cmathbf%7Bx%7D)&space;=&space;p_%7B%5Cmathbf%7B%5Ctheta... | habedi/stack-exchange-dataset |
80,281 | Not enough memory for operations with Pandas | <p>Wes McKinney, the author of Pandas, writes <a href="https://wesmckinney.com/blog/apache-arrow-pandas-internals/" rel="nofollow noreferrer">in his blog</a> that</p>
<p>"<em>... <strong>my rule of thumb for pandas is that you should have 5 to 10 times as much RAM as the size of your dataset</strong>. So if yo... | python pandas | 1 | Not enough memory for operations with Pandas -- (python pandas)
<p>Wes McKinney, the author of Pandas, writes <a href="https://wesmckinney.com/blog/apache-arrow-pandas-internals/" rel="nofollow noreferrer">in his blog</a> that</p>
<p>"<em>... <strong>my rule of thumb for pandas is that you should have 5 to 10 ... | habedi/stack-exchange-dataset |
80,287 | Classifiers and accuracy | <p>I would like to ask you how to use classifier and determine accuracy of models.
I have my dataset and I already cleaned the text (remove stopwords, punctuation, removed empty rows,...).
Then I split it into train and test.
Since I want to determine if an email is spam or not, I have used the common class... | machine learning python svm naive bayes classifier text classification | 1 | Classifiers and accuracy -- (machine learning python svm naive bayes classifier text classification)
<p>I would like to ask you how to use classifier and determine accuracy of models.
I have my dataset and I already cleaned the text (remove stopwords, punctuation, removed empty rows,...).
Then I split it into t... | habedi/stack-exchange-dataset |
80,296 | Dropping one category for regularized linear models | <p>While reviewing the sklearn's OneHotEncoder documentation (attached below) I noticed that when applying regularization (e.g., lasso, ridge, etc.) it is not recommended to drop the first category. While I understand why dropped the first category prevents collinearity, I am unsure why it is needed for regularized reg... | scikit learn regression linear regression regularization one hot encoding | 1 | Dropping one category for regularized linear models -- (scikit learn regression linear regression regularization one hot encoding)
<p>While reviewing the sklearn's OneHotEncoder documentation (attached below) I noticed that when applying regularization (e.g., lasso, ridge, etc.) it is not recommended to drop the first ... | habedi/stack-exchange-dataset |
80,305 | High Cross Validation Score on Training Set, High Score on Test Set, But Low Score on Kaggle? | <p>I've been trying to complete this regression task on Kaggle. As usual they gave a train.csv(with response variable) and a test.csv (without response variable) file for us to train the model and compute our predictions, respectively.</p>
<p>I further split the train.csv file into a train_set and test_set. I use t... | machine learning python random forest cross validation machine learning model | 1 | High Cross Validation Score on Training Set, High Score on Test Set, But Low Score on Kaggle? -- (machine learning python random forest cross validation machine learning model)
<p>I've been trying to complete this regression task on Kaggle. As usual they gave a train.csv(with response variable) and a test.csv (without ... | habedi/stack-exchange-dataset |
80,306 | Is there any model agnostic way to calculate the weight importance for neural networks given a set of inputs? | <p>I was curious if it's possible to calculate what weights are important and what weights are redundant (or have high redundancy) for separate tasks in neural networks?
And if this is doable in a model agnostic way (maybe also differentiable..)?</p>
 | neural network | 1 | Is there any model agnostic way to calculate the weight importance for neural networks given a set of inputs? -- (neural network)
<p>I was curious if it's possible to calculate what weights are important and what weights are redundant (or have high redundancy) for separate tasks in neural networks?
And if this is d... | habedi/stack-exchange-dataset |
80,308 | Dose finding slope/intercept using the formula of m,b gives best fit line always In linear regression? | <p>In liner regression We have to fit different lines and chose one with minimum error so What is the motive of having a formula for m,b that can give slope and intercept value in the regression line ,when it cannot give best fit line directly ?</p>
<p><a href="https://i.stack.imgur.com/JxedC.jpg" rel="nofollow nor... | regression linear regression supervised learning linear algebra | 1 | Dose finding slope/intercept using the formula of m,b gives best fit line always In linear regression? -- (regression linear regression supervised learning linear algebra)
<p>In liner regression We have to fit different lines and chose one with minimum error so What is the motive of having a formula for m,b that can gi... | habedi/stack-exchange-dataset |
80,310 | Is a test set necessary after cross validation on training set? | <p>I'd like to cite a paragraph from the book <em>Hands On Machine Learning with Scikit Learn and TensorFlow</em> by Aurelien Geron regarding evaluating on a final test set after hyperparameter tuning on the training set using k-fold cross validation:</p>
<blockquote>
<p>"The performance will usually be sl... | machine learning python cross validation training hyperparameter tuning | 1 | Is a test set necessary after cross validation on training set? -- (machine learning python cross validation training hyperparameter tuning)
<p>I'd like to cite a paragraph from the book <em>Hands On Machine Learning with Scikit Learn and TensorFlow</em> by Aurelien Geron regarding evaluating on a final test set after ... | habedi/stack-exchange-dataset |
80,335 | How to insert two features in a model when a feature only applies to a certain group in the model | <p>I'm building a machine learning model in Python to predict soccer player values. Consider the following feature columns of the dataframe:</p>
<pre><code> [features]
---------------------------------
position | goals | goals_conceded 
-------- |-------|--------------- 
Forward | 23... | machine learning data science model features | 1 | How to insert two features in a model when a feature only applies to a certain group in the model -- (machine learning data science model features)
<p>I'm building a machine learning model in Python to predict soccer player values. Consider the following feature columns of the dataframe:</p>
<pre><code> [fe... | habedi/stack-exchange-dataset |
80,354 | What is major difference between different dimensionality reduction algorithms? | <p>I find many algorithms are used for dimensionality reduction. The more commonly used ones (e.g. on <a href="https://scikit-learn.org/stable/modules/decomposition.html" rel="nofollow noreferrer">this page</a> ) are:</p>
<pre><code>Principal component analysis (PCA).
Factor Analysis
Independent component a... | unsupervised learning dimensionality reduction | 1 | What is major difference between different dimensionality reduction algorithms? -- (unsupervised learning dimensionality reduction)
<p>I find many algorithms are used for dimensionality reduction. The more commonly used ones (e.g. on <a href="https://scikit-learn.org/stable/modules/decomposition.html" rel="nofollow nor... | habedi/stack-exchange-dataset |
80,358 | Estimating average daily consumption with samples randomly scattered in time | <p>I want to estimate my daily water consumption. I have taken pictures of the water meters (total m3 used since last reset) every now and then, but without any regularity. There can be a difference of a few days to several weeks between samples.</p>
<p>What would be the best way to estimate this? I have thought of... | estimation | 1 | Estimating average daily consumption with samples randomly scattered in time -- (estimation)
<p>I want to estimate my daily water consumption. I have taken pictures of the water meters (total m3 used since last reset) every now and then, but without any regularity. There can be a difference of a few days to several wee... | habedi/stack-exchange-dataset |
80,363 | Reduce the risk of numerical underflow | <p>We use log-likelihood (called as lambda) to reduce the risk of numerical underflow (in context of sentiment analysis using Naive Bayes).</p>
<p>What does "reduce the risk of numerical underflow" means?</p>
 | naive bayes classifier sentiment analysis | 1 | Reduce the risk of numerical underflow -- (naive bayes classifier sentiment analysis)
<p>We use log-likelihood (called as lambda) to reduce the risk of numerical underflow (in context of sentiment analysis using Naive Bayes).</p>
<p>What does "reduce the risk of numerical underflow" means?</p>
 | habedi/stack-exchange-dataset |
80,384 | Semantic networks: word2vec? | <p>I have some doubts on how to represent the relationships between words in texts.
Let’s suppose I have two sentences like these:</p>
<pre><code>Angela Merkel is a German politician who has been Chancellor of Germany since 2005.
</code></pre>
<p>What I would expect is a connection between name Angela a... | python word2vec graphs semantic similarity semantic segmentation | 1 | Semantic networks: word2vec? -- (python word2vec graphs semantic similarity semantic segmentation)
<p>I have some doubts on how to represent the relationships between words in texts.
Let’s suppose I have two sentences like these:</p>
<pre><code>Angela Merkel is a German politician who has been Chancellor of Ger... | habedi/stack-exchange-dataset |
80,389 | What is an autoencoder? | <p>I am a student and I am studying machine learning. I am focusing on <strong>deep generative models</strong>, and in particular to <strong>autoencoders</strong> and <strong>variational autoencoders (VAE)</strong>.</p>
<p>I am trying to understand the concept, but I am having some problems.</p>
<p>So far, I ha... | machine learning neural network deep learning autoencoder | 1 | What is an autoencoder? -- (machine learning neural network deep learning autoencoder)
<p>I am a student and I am studying machine learning. I am focusing on <strong>deep generative models</strong>, and in particular to <strong>autoencoders</strong> and <strong>variational autoencoders (VAE)</strong>.</p>
<p>I am t... | habedi/stack-exchange-dataset |
80,398 | Setting sparse=True in Scikit Learn OneHotEncoder does not reduce memory usage | <p>I have a dataset that consists of 85 feature columns and 13195 rows. Approximately 50 of these features are categorical features which I encoded using OneHotEncoder. I was reading this <a href="https://towardsdatascience.com/working-with-sparse-data-sets-in-pandas-and-sklearn-d26c1cfbe067" rel="nofollow noreferrer">... | machine learning python scikit learn one hot encoding | 1 | Setting sparse=True in Scikit Learn OneHotEncoder does not reduce memory usage -- (machine learning python scikit learn one hot encoding)
<p>I have a dataset that consists of 85 feature columns and 13195 rows. Approximately 50 of these features are categorical features which I encoded using OneHotEncoder. I was reading... | habedi/stack-exchange-dataset |
80,410 | Categorical cross-entropy works wrong with one-hot encoded features | <p>I'n struggling with categorical_crossentropy problem with one-hot encoding data. The problem is in unchanged output of code presenting below:</p>
<pre class="lang-py prettyprint-override"><code> inputs = keras.Input(shape=(1190,), sparse=True)
 lay_1 = layers.Dense(1190, activation='rel... | deep learning keras loss function one hot encoding | 1 | Categorical cross-entropy works wrong with one-hot encoded features -- (deep learning keras loss function one hot encoding)
<p>I'n struggling with categorical_crossentropy problem with one-hot encoding data. The problem is in unchanged output of code presenting below:</p>
<pre class="lang-py prettyprint-override"><... | habedi/stack-exchange-dataset |
80,411 | Predicting time series data | <p>I have a dataset as following:
<a href="https://i.stack.imgur.com/jEi4u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jEi4u.png" alt="enter image description here" /></a></p>
<p>This is test case 1. My goal is to fill the missing years data. As the age sex and smoking is not changing so ... | machine learning regression predictive modeling lstm | 1 | Predicting time series data -- (machine learning regression predictive modeling lstm)
<p>I have a dataset as following:
<a href="https://i.stack.imgur.com/jEi4u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jEi4u.png" alt="enter image description here" /></a></p>
<p>This is test case 1. My ... | habedi/stack-exchange-dataset |
80,417 | Deep Reinforcement Learning - mean Q as an evaluation metric | <p>I'm tuning a deep learning model for a learner of Space Invaders game (image below). The state is defined as relative eucledian distance between the player and the enemies + relative distance between the player and 6 closest enemy lasers normalized by the window height (if the player's position is <span class="math-... | machine learning neural network deep learning reinforcement learning discounted reward | 1 | Deep Reinforcement Learning - mean Q as an evaluation metric -- (machine learning neural network deep learning reinforcement learning discounted reward)
<p>I'm tuning a deep learning model for a learner of Space Invaders game (image below). The state is defined as relative eucledian distance between the player and the ... | habedi/stack-exchange-dataset |
80,418 | Train a model to determine that the probability of an event given a set of features is higher than when given a different set of features | <p>I have a data set of attempted phone calls.
I have a set of features, say, hour of day, and zip code.
I have a label indicating whether the callee picked up the phone or not.</p>
<p>I want a model to predict the probability of a phone pick up given a instance's feature set</p>
<p>My difficulty is tha... | classification machine learning model probability | 1 | Train a model to determine that the probability of an event given a set of features is higher than when given a different set of features -- (classification machine learning model probability)
<p>I have a data set of attempted phone calls.
I have a set of features, say, hour of day, and zip code.
I have a label... | habedi/stack-exchange-dataset |
80,436 | Understanding how convolutional layers work | <p>After working with a CNN using Keras and the Mnist dataset for the well-know hand written digit recognition problem, I came up with some questions about how the convolutional layer work. I can understand what the convolution process is.</p>
<p><a href="https://i.stack.imgur.com/ZJQhR.png" rel="nofollow noreferre... | cnn training convolution backpropagation | 1 | Understanding how convolutional layers work -- (cnn training convolution backpropagation)
<p>After working with a CNN using Keras and the Mnist dataset for the well-know hand written digit recognition problem, I came up with some questions about how the convolutional layer work. I can understand what the convolution pr... | habedi/stack-exchange-dataset |
80,447 | Build Deep Belief Autoencoder for Dimensionality Reduction | <p>I'm working with a large dataset (about 50K observations x 11K features) and I'd like to reduce the dimensionality. This will eventually be used for multi-class classification, so I'd like to extract features that are useful for separating the data. Thus far, I've tried PCA (performed OK with an overall accuracy in ... | deep learning feature extraction rbm | 1 | Build Deep Belief Autoencoder for Dimensionality Reduction -- (deep learning feature extraction rbm)
<p>I'm working with a large dataset (about 50K observations x 11K features) and I'd like to reduce the dimensionality. This will eventually be used for multi-class classification, so I'd like to extract features that ar... | habedi/stack-exchange-dataset |
80,448 | What common/simple problem would work well as a web app? | <p><strong>Context</strong></p>
<p>I'm currently writing a simple tutorial to demonstrate a tool to data scientists and analysts that turns Jupyter Notebooks into web apps. Basically, it discusses setting up the web app as a front end, running some code in the notebook and then returning data to the web app.</p>&#x... | python beginner jupyter | 1 | What common/simple problem would work well as a web app? -- (python beginner jupyter)
<p><strong>Context</strong></p>
<p>I'm currently writing a simple tutorial to demonstrate a tool to data scientists and analysts that turns Jupyter Notebooks into web apps. Basically, it discusses setting up the web app as a front... | habedi/stack-exchange-dataset |
80,449 | best approach to embed random length sequences of words as a fixed size vector without having a maximum length? | <p>I have a dataset of sentences in a non-English language like:</p>
<ol>
<li><p>word1 word2 word3 word62</p>
</li>
<li><p>word5 word1 word2</p>
</li>
</ol>
<p>and the length of each sentence is not fixed.</p>
<p>Now, I want to represent each sentence as a fixed sized vector and give it ... | rnn word embeddings word2vec nlp | 1 | best approach to embed random length sequences of words as a fixed size vector without having a maximum length? -- (rnn word embeddings word2vec nlp)
<p>I have a dataset of sentences in a non-English language like:</p>
<ol>
<li><p>word1 word2 word3 word62</p>
</li>
<li><p>word5 word1 word2</p>
</li>... | habedi/stack-exchange-dataset |
80,460 | Generate series of values using Keras GAN architecture | <p><strong>I'm trying to generate something like that:</strong><br />
Which is a random sample from my real data function (that i'm trying to mimic).</p>
<pre><code>numbers = [ 54., 87., 103., 209., 356., 371., 383., 448., 452., 38., 37.,
 30., 22., 24., 48., 52., 61., 66., 87., 150., 163... | deep learning keras gan generative models | 1 | Generate series of values using Keras GAN architecture -- (deep learning keras gan generative models)
<p><strong>I'm trying to generate something like that:</strong><br />
Which is a random sample from my real data function (that i'm trying to mimic).</p>
<pre><code>numbers = [ 54., 87., 103., 209., 356., 371.... | habedi/stack-exchange-dataset |
80,461 | Up to which layer can we consider the encoder to be? | <p>I'm trying to extract the encoder from a U-Net network.</p>
<p>Given its architecture:</p>
<p><a href="https://i.stack.imgur.com/u0tpC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u0tpC.png" alt="enter image description here" /></a></p>
<p>And its summary:</p>
<pre><code>Model: ... | neural network convolution autoencoder | 1 | Up to which layer can we consider the encoder to be? -- (neural network convolution autoencoder)
<p>I'm trying to extract the encoder from a U-Net network.</p>
<p>Given its architecture:</p>
<p><a href="https://i.stack.imgur.com/u0tpC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u0tpC.png"... | habedi/stack-exchange-dataset |
80,462 | Python - accessing dictionary values for math operations | <p>I have this dictionary:</p>
<pre><code>stocks = {'FB': 255, 'AAPL': 431, 'TSLA': 1700}
</code></pre>
<p>and this script:</p>
<pre><code>shares = input('How many shares? ')
stock = input('What\'s the stock? ')

for name in stocks.keys():
 ticker = (stocks[name])
 if name == s... | python mathematics | 1 | Python - accessing dictionary values for math operations -- (python mathematics)
<p>I have this dictionary:</p>
<pre><code>stocks = {'FB': 255, 'AAPL': 431, 'TSLA': 1700}
</code></pre>
<p>and this script:</p>
<pre><code>shares = input('How many shares? ')
stock = input('What\'s the stock? ')
&#x... | habedi/stack-exchange-dataset |
80,466 | Tagged dataset with photos for race detection | <p>Looking for the tagged dataset, because I would like to identify race by photo. I tried using the UTKFace dataset from Kaggle, but it outputs hispanic and Arab people on images as <code>other</code>. My customer would like those ones as separate categories. Do you have any datasets like that? Because UTKFace has onl... | dataset data image classification image recognition | 1 | Tagged dataset with photos for race detection -- (dataset data image classification image recognition)
<p>Looking for the tagged dataset, because I would like to identify race by photo. I tried using the UTKFace dataset from Kaggle, but it outputs hispanic and Arab people on images as <code>other</code>. My customer wo... | habedi/stack-exchange-dataset |
80,483 | Based on transformer, how to improve the text generation results? | <p>If I do not pretrain the text generation model like BART, how to improve the result based on transformer like tensor2tensor?</p>
<p>What are the improvement ideas for transformer in text generation task?</p>
 | deep learning nlp transformer text generation | 1 | Based on transformer, how to improve the text generation results? -- (deep learning nlp transformer text generation)
<p>If I do not pretrain the text generation model like BART, how to improve the result based on transformer like tensor2tensor?</p>
<p>What are the improvement ideas for transformer in text generatio... | habedi/stack-exchange-dataset |
80,487 | Probability of an event | <p>How should I go about solving the following problem?</p>
<blockquote>
<p>If you randomly type a 6-digit number on a note, what is the
probability that you can see the same number if you flip your note
upside down? How would you explain your answer to a 6-year-old?</p>
</blockquote>
<p>The onl... | machine learning python statistics probability | 1 | Probability of an event -- (machine learning python statistics probability)
<p>How should I go about solving the following problem?</p>
<blockquote>
<p>If you randomly type a 6-digit number on a note, what is the
probability that you can see the same number if you flip your note
upside down? How would y... | habedi/stack-exchange-dataset |
80,488 | Is adding the embedded words of a sentence to represent the sentence a good approach? | <p>I have a dataset of sentences in a non english language like :</p>
<ol>
<li><p>word1 word2 word3 word62</p>
</li>
<li><p>word5 word1 word2</p>
</li>
</ol>
<p>Now i want to turn each variable length sentence to a fixed size vector to give it to my model, and i want all the words in the sen... | word embeddings word2vec nlp | 1 | Is adding the embedded words of a sentence to represent the sentence a good approach? -- (word embeddings word2vec nlp)
<p>I have a dataset of sentences in a non english language like :</p>
<ol>
<li><p>word1 word2 word3 word62</p>
</li>
<li><p>word5 word1 word2</p>
</li>
</ol>
<p>Now i want ... | habedi/stack-exchange-dataset |
80,491 | Does LSTM without delayed inputs work as a deep net? | <p>I want to predict a multivariate time series. My time series is <span class="math-container">$a_1(t),...,a_k(t)$</span> and I want to predict <span class="math-container">$a_k(t)$</span>. I use the following keras LSTM:</p>
<pre><code>model = Sequential()
model.add(LSTM(90,return_sequences=True,input_shape=(... | time series lstm rnn deep learning | 1 | Does LSTM without delayed inputs work as a deep net? -- (time series lstm rnn deep learning)
<p>I want to predict a multivariate time series. My time series is <span class="math-container">$a_1(t),...,a_k(t)$</span> and I want to predict <span class="math-container">$a_k(t)$</span>. I use the following keras LSTM:</p>&... | habedi/stack-exchange-dataset |
80,495 | Avoiding Overfitting with a large LSTM net on a small amount of data | <p>I'm reposting <a href="https://ai.stackexchange.com/questions/23084/avoiding-overfitting-with-a-large-lstm-net-on-a-small-amount-of-data">this question from AI.SE</a> here as I think it was maybe off-topic for AI.SE...</p>
<p><strong>1. Context</strong></p>
<p>I'm studying Health-Monitoring techniques, and I... | keras lstm | 1 | Avoiding Overfitting with a large LSTM net on a small amount of data -- (keras lstm)
<p>I'm reposting <a href="https://ai.stackexchange.com/questions/23084/avoiding-overfitting-with-a-large-lstm-net-on-a-small-amount-of-data">this question from AI.SE</a> here as I think it was maybe off-topic for AI.SE...</p>
<p><s... | habedi/stack-exchange-dataset |
80,531 | Is there any way to explicitly measure the complexity of a Machine Learning Model in Python | <p>I'm interested in <a href="https://debug-ml-iclr2019.github.io/" rel="nofollow noreferrer">model debuggin</a> and one of the points that it recommends is to compare your model with a "less complex" one in order to see if the performance is substantially better on the most complex model.</p>
<p>It raise... | machine learning python machine learning model model selection | 1 | Is there any way to explicitly measure the complexity of a Machine Learning Model in Python -- (machine learning python machine learning model model selection)
<p>I'm interested in <a href="https://debug-ml-iclr2019.github.io/" rel="nofollow noreferrer">model debuggin</a> and one of the points that it recommends is to ... | habedi/stack-exchange-dataset |
80,537 | What are the hidden states in the Transformer-XL? Also, how does the recurrence wiring look like? | <p>After exhaustively reading the many blogs and papers on Transformers-XL, I still have some questions before I can say that I understand Transformer-XL (and by extension XLNet). Any help in this regard is hugely appreciated.</p>
<ol>
<li>when we say <strong>hidden states</strong> are transferred from one segm... | deep learning nlp rnn transformer attention mechanism | 1 | What are the hidden states in the Transformer-XL? Also, how does the recurrence wiring look like? -- (deep learning nlp rnn transformer attention mechanism)
<p>After exhaustively reading the many blogs and papers on Transformers-XL, I still have some questions before I can say that I understand Transformer-XL (and by e... | habedi/stack-exchange-dataset |
80,576 | Saving and Loading Tensorflow Model Results in Keras Error | <p>For a project that I'm working on, I have created a simple model in TensorFlow that consists of a dense features layer followed by three dense layers.</p>
<pre class="lang-py prettyprint-override"><code>def build_model(arguments):
 model = tf.keras.Sequential([
 tf.keras.layers.DenseFeatures(ar... | python keras tensorflow | 1 | Saving and Loading Tensorflow Model Results in Keras Error -- (python keras tensorflow)
<p>For a project that I'm working on, I have created a simple model in TensorFlow that consists of a dense features layer followed by three dense layers.</p>
<pre class="lang-py prettyprint-override"><code>def build_model(argume... | habedi/stack-exchange-dataset |
80,587 | Do we need the outer discount term when implementing REINFORCE algorithm | <p>I am learning the REINFORCE algorithm, which seems to be a foundation for other algorithms.</p>
<p>I saw the <span class="math-container">$\gamma^t$</span> term in Sutton's textbook.</p>
<p><a href="https://i.stack.imgur.com/wN5PP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wN5PP.png" ... | reinforcement learning | 1 | Do we need the outer discount term when implementing REINFORCE algorithm -- (reinforcement learning)
<p>I am learning the REINFORCE algorithm, which seems to be a foundation for other algorithms.</p>
<p>I saw the <span class="math-container">$\gamma^t$</span> term in Sutton's textbook.</p>
<p><a href="https://i... | habedi/stack-exchange-dataset |
80,593 | Naive Bayes Denominator clarification | <p>I came across an earlier post that was resolved and had a follow up to it but I couldn't comment because my reputation is under 50. Essentially I am interested in calculating the denominator in Naive Bayes. <a href="https://i.stack.imgur.com/7uAcQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7u... | machine learning probability naive bayes classifier | 1 | Naive Bayes Denominator clarification -- (machine learning probability naive bayes classifier)
<p>I came across an earlier post that was resolved and had a follow up to it but I couldn't comment because my reputation is under 50. Essentially I am interested in calculating the denominator in Naive Bayes. <a href="https:... | habedi/stack-exchange-dataset |
80,595 | How should I use BERT embeddings for clustering (as opposed to fine-tuning BERT model for a supervised task) | <p>First of all, I want to say that I am asking this question because I am interested in using BERT embeddings as document features to do clustering. I am using Transformers from the Hugging Face library. I was thinking of averaging all of the Word Piece embeddings for each document so that each document has a unique v... | machine learning deep learning nlp word embeddings bert | 1 | How should I use BERT embeddings for clustering (as opposed to fine-tuning BERT model for a supervised task) -- (machine learning deep learning nlp word embeddings bert)
<p>First of all, I want to say that I am asking this question because I am interested in using BERT embeddings as document features to do clustering. ... | habedi/stack-exchange-dataset |
80,604 | Understanding the algebra behind a specific partial derivative equation | <p>I am following <a href="https://adventuresinmachinelearning.com/neural-networks-tutorial" rel="nofollow noreferrer">this article</a> about neural networks.</p>
<p>Given:</p>
<p><a href="https://i.stack.imgur.com/JMxo9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JMxo9.png" alt="enter im... | neural network mathematics linear algebra | 1 | Understanding the algebra behind a specific partial derivative equation -- (neural network mathematics linear algebra)
<p>I am following <a href="https://adventuresinmachinelearning.com/neural-networks-tutorial" rel="nofollow noreferrer">this article</a> about neural networks.</p>
<p>Given:</p>
<p><a href="http... | habedi/stack-exchange-dataset |
80,608 | Selecting Transforms with sklearn pipelines | <p>So I am currently working on a Data set, and I want to use Pipelines to select the transforms. Here is an example of what I want to do :</p>
<pre class="lang-py prettyprint-override"><code># I missed the imports just for brevity
pipeline = make_pipeline(StandardScaler(), PolynomialFeatures(), PCA(), Logistic... | classification scikit learn normalization model selection pipelines | 1 | Selecting Transforms with sklearn pipelines -- (classification scikit learn normalization model selection pipelines)
<p>So I am currently working on a Data set, and I want to use Pipelines to select the transforms. Here is an example of what I want to do :</p>
<pre class="lang-py prettyprint-override"><code># I mis... | habedi/stack-exchange-dataset |
80,628 | AttributeError: 'Functional' object has no attribute 'uses_learning_phase' | <p>I am trying to predict on my test set and I get the following error</p>
<pre><code>AttributeError: 'Functional' object has no attribute 'uses_learning_phase'
</code></pre>
<p>The model is created from the Class Model imported from <code>from keras.engine import Module</code>
All the module I imported... | deep learning keras tensorflow lstm speech to text | 1 | AttributeError: 'Functional' object has no attribute 'uses_learning_phase' -- (deep learning keras tensorflow lstm speech to text)
<p>I am trying to predict on my test set and I get the following error</p>
<pre><code>AttributeError: 'Functional' object has no attribute 'uses_learning_phase'
</code></pre>
<p... | habedi/stack-exchange-dataset |
80,631 | weight sharing among neurons at same depth | <p>I'm trying to understand some visual illustrations about the wight sharing in the Convolutional Neural Network as following:</p>
<p><a href="https://i.stack.imgur.com/fFSg0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fFSg0.png" alt="enter image description here" /></a></p>
<p>In this p... | neural network convolution neural | 1 | weight sharing among neurons at same depth -- (neural network convolution neural)
<p>I'm trying to understand some visual illustrations about the wight sharing in the Convolutional Neural Network as following:</p>
<p><a href="https://i.stack.imgur.com/fFSg0.png" rel="nofollow noreferrer"><img src="https://i.stack.i... | habedi/stack-exchange-dataset |
80,654 | Word representation that gives more weight to terms frequent in corpus? | <p>The tf-idf discounts the words that appear in a lot of documents in the corpus. I am constructing an anomaly detection text classification algorithm that is trained only on valid documents. Later I use One-class SVM to detect outliers. Interesting enough the tf-idf performs worse than a simple count-vectorizer. Firs... | anomaly detection nlp outlier tfidf bag of words | 1 | Word representation that gives more weight to terms frequent in corpus? -- (anomaly detection nlp outlier tfidf bag of words)
<p>The tf-idf discounts the words that appear in a lot of documents in the corpus. I am constructing an anomaly detection text classification algorithm that is trained only on valid documents. L... | habedi/stack-exchange-dataset |
80,656 | How to predict unknown unknowns in machine learning | <p>I am dealing with a problem about classifying bird species through analysing MFCCs. I already built a dataset with 13 MFCCs for two kinds of birds. And I trained the data with Naive Bayes & KNN model. However, when I tried the model with prediction of third bird species, it is classified as the one of the two sp... | machine learning classification prediction | 1 | How to predict unknown unknowns in machine learning -- (machine learning classification prediction)
<p>I am dealing with a problem about classifying bird species through analysing MFCCs. I already built a dataset with 13 MFCCs for two kinds of birds. And I trained the data with Naive Bayes & KNN model. However, whe... | habedi/stack-exchange-dataset |
80,698 | implementing forward and backward of a Linear model | <p><a href="https://i.stack.imgur.com/bxLmQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bxLmQ.png" alt="enter image description here" /></a></p>
<p>I'm implementing the code of this abstraction.</p>
<p>The forward is easy and looks like that:
<a href="https://i.stack.imgur.com/1abiK.p... | deep learning gradient descent backpropagation mlp gradient | 1 | implementing forward and backward of a Linear model -- (deep learning gradient descent backpropagation mlp gradient)
<p><a href="https://i.stack.imgur.com/bxLmQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bxLmQ.png" alt="enter image description here" /></a></p>
<p>I'm implementing the code of... | habedi/stack-exchange-dataset |
80,710 | When combined correlation of features decreases | <p>I'm building a machine learning model in Python to predict soccer player values. I'm trying to predict a <strong>"player_value"</strong> column containing the value of a specific player. Consider a sample of the columns (features) I'm using.</p>
<pre><code>---------------------------------
appearan... | machine learning data science model features | 1 | When combined correlation of features decreases -- (machine learning data science model features)
<p>I'm building a machine learning model in Python to predict soccer player values. I'm trying to predict a <strong>"player_value"</strong> column containing the value of a specific player. Consider a sample of t... | habedi/stack-exchange-dataset |
80,729 | How is the Gaussian noise given to this BLSTM based GAN? | <p>In a conditional GAN, we give a random noise along with a label to the generator as input. In <a href="https://arxiv.org/pdf/1811.02356.pdf" rel="nofollow noreferrer">this paper</a>, I don't understand why in one section of the paper, they say they are giving the random noise as input and the in another section of t... | neural network deep learning lstm nlp gan | 1 | How is the Gaussian noise given to this BLSTM based GAN? -- (neural network deep learning lstm nlp gan)
<p>In a conditional GAN, we give a random noise along with a label to the generator as input. In <a href="https://arxiv.org/pdf/1811.02356.pdf" rel="nofollow noreferrer">this paper</a>, I don't understand why in one ... | habedi/stack-exchange-dataset |
80,730 | Encoding for classifiers | <p>I have some doubts regarding encoding (i am not familiar with tasks like these) categorical variables in order to use them as parameters in a model like logistic regression or SVM.
My dataset looks like the following</p>
<pre><code>Text Symbol Note Account Age Labe... | machine learning classification logistic regression svm one hot encoding | 1 | Encoding for classifiers -- (machine learning classification logistic regression svm one hot encoding)
<p>I have some doubts regarding encoding (i am not familiar with tasks like these) categorical variables in order to use them as parameters in a model like logistic regression or SVM.
My dataset looks like the fol... | habedi/stack-exchange-dataset |
80,734 | Problem understanding probabilistic generative models for classification | <p>I am a student and I am studying machine learning. I am focusing on <strong>probabilistic generative models for classification</strong> and I am having some troubles understanding this topic.</p>
<p>In the slide of my professor it is written the following:</p>
<p><a href="https://i.stack.imgur.com/iYrVS.png"... | machine learning classification probability bayesian | 1 | Problem understanding probabilistic generative models for classification -- (machine learning classification probability bayesian)
<p>I am a student and I am studying machine learning. I am focusing on <strong>probabilistic generative models for classification</strong> and I am having some troubles understanding this t... | habedi/stack-exchange-dataset |
80,740 | How to automatically disable register_hook when training model is in eval() phase in PyTorch? | <p>I require to update grads of an intermediate tensor variable using the <code>register_hook</code> method. Since the variable isn't a leaf-variable, I require to add the <code>retain_grad()</code> method to it after which, I can use the <code>register_hook</code> method to alter the grads.</p>
<pre><code>score.re... | pytorch | 1 | How to automatically disable register_hook when training model is in eval() phase in PyTorch? -- (pytorch)
<p>I require to update grads of an intermediate tensor variable using the <code>register_hook</code> method. Since the variable isn't a leaf-variable, I require to add the <code>retain_grad()</code> method to it a... | habedi/stack-exchange-dataset |
80,750 | How can I perform weighted addition of three layers in keras? | <p>I would like to perform the weighted addition of three outputs from different Keras layers such that the weights are trainable. How can I achieve this? I am using tensorflow 2.0 as backend for Keras.</p>
 | keras tensorflow | 1 | How can I perform weighted addition of three layers in keras? -- (keras tensorflow)
<p>I would like to perform the weighted addition of three outputs from different Keras layers such that the weights are trainable. How can I achieve this? I am using tensorflow 2.0 as backend for Keras.</p>
 | habedi/stack-exchange-dataset |
80,754 | How to convert DNA sequences in FASTA format to OneHot Encoded Pandas Dataframe for Neural Networks? | <p>DNA sequences in FASTA format look like:</p>
<pre><code>CATGCATTAGTTATTAATAGTAATCAATTACGGGGTCATTAGTTCA... 
</code></pre>
<p>I am trying to convert them into one-hot encoded data in a Pandas dataframe so that I can use various neural networks to analyze them. This has probably been done many times. Can so... | deep learning sequence | 1 | How to convert DNA sequences in FASTA format to OneHot Encoded Pandas Dataframe for Neural Networks? -- (deep learning sequence)
<p>DNA sequences in FASTA format look like:</p>
<pre><code>CATGCATTAGTTATTAATAGTAATCAATTACGGGGTCATTAGTTCA... 
</code></pre>
<p>I am trying to convert them into one-hot encoded dat... | habedi/stack-exchange-dataset |
80,770 | I do feature engineering on the full dataset, is this wrong? | <p>I am aiming to predict the number of days it takes to sell a given property, let's call this variable "DaysForSale" - in short DfS</p>
<p>Using the DfS I created a variable called "median_dfs_grouped_street_name" which returns the median days it takes to sell a property for the different stre... | regression feature engineering | 1 | I do feature engineering on the full dataset, is this wrong? -- (regression feature engineering)
<p>I am aiming to predict the number of days it takes to sell a given property, let's call this variable "DaysForSale" - in short DfS</p>
<p>Using the DfS I created a variable called "median_dfs_grouped_s... | habedi/stack-exchange-dataset |
80,775 | Any advantage of sklearn wrappers for xgboost over python API? | <p>Are there any advantages of using the XGBoost sklearn wrappers <code>XGBRegressor</code> or <code>XGBClassifier</code> over using the Python API with the <code>train</code> method?
Is one faster than the other or does one use less memory than the other?
I am asking for a generic case where the data comes in ... | scikit learn xgboost api | 1 | Any advantage of sklearn wrappers for xgboost over python API? -- (scikit learn xgboost api)
<p>Are there any advantages of using the XGBoost sklearn wrappers <code>XGBRegressor</code> or <code>XGBClassifier</code> over using the Python API with the <code>train</code> method?
Is one faster than the other or does on... | habedi/stack-exchange-dataset |
80,782 | Can we use sentence transformers to embed sentences without labels? | <p>I was trying to use this project :</p>
<p><a href="https://github.com/UKPLab/sentence-transformers" rel="nofollow noreferrer">https://github.com/UKPLab/sentence-transformers</a></p>
<p>for embedding non english sentences, the language is not a human speaking language, its machine language (x86)</p>
<p>bu... | nlp word embeddings bert | 1 | Can we use sentence transformers to embed sentences without labels? -- (nlp word embeddings bert)
<p>I was trying to use this project :</p>
<p><a href="https://github.com/UKPLab/sentence-transformers" rel="nofollow noreferrer">https://github.com/UKPLab/sentence-transformers</a></p>
<p>for embedding non english ... | habedi/stack-exchange-dataset |
80,794 | Keras layer weights shape is different compared to other conventions | <p>I have been looking at the <code>layers.weights</code> output of Keras layers. The shape of the layer weight matrix is listed as <code>(number_of_inputfeatures, dense_layer_neurons)</code>.</p>
<p>The <a href="https://keras.io/api/layers/" rel="nofollow noreferrer">first example</a> in docs.</p>
<p>However, ... | neural network deep learning keras tensorflow | 1 | Keras layer weights shape is different compared to other conventions -- (neural network deep learning keras tensorflow)
<p>I have been looking at the <code>layers.weights</code> output of Keras layers. The shape of the layer weight matrix is listed as <code>(number_of_inputfeatures, dense_layer_neurons)</code>.</p>
... | habedi/stack-exchange-dataset |
80,806 | Why does Transfer Learning works better on smaller datasets than on larger ones? | <p>This question is not about the utility of Tranfer Learning compared with regular supervised learning.</p>
<p><strong>1. Context</strong></p>
<p>I'm studying Health-Monitoring techniques, and I practice on the <a href="https://data.nasa.gov/dataset/C-MAPSS-Aircraft-Engine-Simulator-Data/xaut-bemq" rel="nofoll... | supervised learning transfer learning | 1 | Why does Transfer Learning works better on smaller datasets than on larger ones? -- (supervised learning transfer learning)
<p>This question is not about the utility of Tranfer Learning compared with regular supervised learning.</p>
<p><strong>1. Context</strong></p>
<p>I'm studying Health-Monitoring techniques... | habedi/stack-exchange-dataset |
80,809 | Dealing with categorical variables in regression problems which method to use? | <p>Usually if I have regression problem and my initial dataset contains categorical variables like :</p>
<pre><code>column 1: 
Math
Science 
Science 
English 
</code></pre>
<p>I would convert this non-numerical variables to numerical variable such that : Math: 0, Science : 1, English : 2.&#... | regression data cleaning machine learning model categorical data | 1 | Dealing with categorical variables in regression problems which method to use? -- (regression data cleaning machine learning model categorical data)
<p>Usually if I have regression problem and my initial dataset contains categorical variables like :</p>
<pre><code>column 1: 
Math
Science 
Science 
... | habedi/stack-exchange-dataset |
80,812 | Removing constant from the regression model | <p>I am trying to calibrate two variables <span class="math-container">$(X,Y)$</span> of different measuring techniques from two instruments, the result of the linear regression analysis appears as shown in the image.</p>
<p>The result shows the regression constant is not statistically significant but the model is ... | r regression predictive modeling linear algebra | 1 | Removing constant from the regression model -- (r regression predictive modeling linear algebra)
<p>I am trying to calibrate two variables <span class="math-container">$(X,Y)$</span> of different measuring techniques from two instruments, the result of the linear regression analysis appears as shown in the image.</p>&#... | habedi/stack-exchange-dataset |
80,821 | TF-IDF for Topic Modeling | <p>Can TF-IDF be used a sole method for Topic Modeling ? (I know there are better methods like LDA , LSA etc)</p>
<p>I just want to understand if TF-IDF alone can help us in Topic modeling . If yes , can someone explain how that simple framework works ?</p>
<p>I want to understand the application and capabiliti... | nlp topic model lda tfidf stanford nlp | 1 | TF-IDF for Topic Modeling -- (nlp topic model lda tfidf stanford nlp)
<p>Can TF-IDF be used a sole method for Topic Modeling ? (I know there are better methods like LDA , LSA etc)</p>
<p>I just want to understand if TF-IDF alone can help us in Topic modeling . If yes , can someone explain how that simple framework ... | habedi/stack-exchange-dataset |
80,826 | Transformer masking during training or inference? | <p>I'm working through <a href="http://papers.nips.cc/paper/7181-attention-is-all-you-need.pdf" rel="nofollow noreferrer">Attention is All you Need</a>, and I have a question about masking in the decoder. It's stated that masking is used to ensure the model doesn't attend to any tokens in the future (not yet predicted)... | nlp training generative models transformer attention mechanism | 1 | Transformer masking during training or inference? -- (nlp training generative models transformer attention mechanism)
<p>I'm working through <a href="http://papers.nips.cc/paper/7181-attention-is-all-you-need.pdf" rel="nofollow noreferrer">Attention is All you Need</a>, and I have a question about masking in the decode... | habedi/stack-exchange-dataset |
80,828 | Is it bad to have a lot of one class of Data [K-NN classifier]? | <p>I am trying to train a sklearn K-NN classifier on a labeled text dataset (in Irish). There are 5 classes, 0-4, but there is a lot of variation between how many there are in each class.</p>
<p>What I have done is I've gotten a corpus of Irish text, iterated through every word and stripped a few letters from it ba... | machine learning classification nlp dataset | 1 | Is it bad to have a lot of one class of Data [K-NN classifier]? -- (machine learning classification nlp dataset)
<p>I am trying to train a sklearn K-NN classifier on a labeled text dataset (in Irish). There are 5 classes, 0-4, but there is a lot of variation between how many there are in each class.</p>
<p>What I h... | habedi/stack-exchange-dataset |
80,839 | How Important is Machine Learning to a Data Scientist? | <p>When ever the word <em>data science</em> pops up people generally become quick to move to machine learning. Is that the right thing? For a data scientist isn't the handling of data (collection, pre-processing, visualization, etc.,) more important?</p>
<p>I am aware of the thread <a href="https://datascience.stac... | machine learning | 1 | How Important is Machine Learning to a Data Scientist? -- (machine learning)
<p>When ever the word <em>data science</em> pops up people generally become quick to move to machine learning. Is that the right thing? For a data scientist isn't the handling of data (collection, pre-processing, visualization, etc.,) more imp... | habedi/stack-exchange-dataset |
80,841 | When should I use normal Q learning over a DQN? | <p>From <em><a href="https://medium.com/emergent-future/simple-reinforcement-learning-with-tensorflow-part-0-q-learning-with-tables-and-neural-networks-d195264329d0" rel="nofollow noreferrer">this</a></em> article here, it says that using a tabular Q function is less scalable than a deep Q network. I assume that this m... | reinforcement learning q learning | 1 | When should I use normal Q learning over a DQN? -- (reinforcement learning q learning)
<p>From <em><a href="https://medium.com/emergent-future/simple-reinforcement-learning-with-tensorflow-part-0-q-learning-with-tables-and-neural-networks-d195264329d0" rel="nofollow noreferrer">this</a></em> article here, it says that ... | habedi/stack-exchange-dataset |
80,843 | Reducing the size of a dataset | <p>I am trying to classify gestures. I am using Python's scikit learn library classification algorithms for that. I have collected depth images for this purpose. 200 samples are collected for each gesture. Each gesture is made up of 25 frames and each frame is of size 240x420. I tried PCA for dimensionality framewise f... | classification scikit learn computer vision preprocessing dimensionality reduction | 1 | Reducing the size of a dataset -- (classification scikit learn computer vision preprocessing dimensionality reduction)
<p>I am trying to classify gestures. I am using Python's scikit learn library classification algorithms for that. I have collected depth images for this purpose. 200 samples are collected for each gest... | habedi/stack-exchange-dataset |
80,853 | Types of maps in Interpretable Machine Learning | <p>I have worked on Interpretable Machine Learning (IML) for over 1 year. However, there are some terminologies that always make me confused.</p>
<p>For example, saliency maps/heat maps. Are they same?</p>
<p>Are activation maps visualizations of activation values of a unit(s) in Neural networks? Do you know an... | machine learning deep learning explainable ai interpretation | 1 | Types of maps in Interpretable Machine Learning -- (machine learning deep learning explainable ai interpretation)
<p>I have worked on Interpretable Machine Learning (IML) for over 1 year. However, there are some terminologies that always make me confused.</p>
<p>For example, saliency maps/heat maps. Are they same?<... | habedi/stack-exchange-dataset |
80,861 | Pandas Groupby datetime by multiple hours | <p>I have a log dataset which looks like the following:-</p>
<pre><code> Time event
2020-08-27 07:00:00 1
2020-08-27 08:34:00 1
2020-08-27 16:42:23 1 
2020-08-27 23:19:11 1
 .
 .
 . 
</code></pre>
<p>I ... | time series pandas groupby | 1 | Pandas Groupby datetime by multiple hours -- (time series pandas groupby)
<p>I have a log dataset which looks like the following:-</p>
<pre><code> Time event
2020-08-27 07:00:00 1
2020-08-27 08:34:00 1
2020-08-27 16:42:23 1 
2020-08-27 23:19:11 1
 ... | habedi/stack-exchange-dataset |
80,887 | Neural Network for Multiple Dependent Outputs | <p>I have a dataset with approx 6 input features and 5 output values to be predicted. I am trying to understand what kind of neural network would be most suitable to assign probability across multiple dependent outputs, with the motivation to maximise the value of a single feature.</p>
<p>For example, suppose the i... | machine learning neural network regression multi output | 1 | Neural Network for Multiple Dependent Outputs -- (machine learning neural network regression multi output)
<p>I have a dataset with approx 6 input features and 5 output values to be predicted. I am trying to understand what kind of neural network would be most suitable to assign probability across multiple dependent ou... | habedi/stack-exchange-dataset |
80,890 | Keras P/R metrics at different thresholds during training | <p>I'm training a binary classifier and I'd like to see Precision/Recall metrics at different thresholds.</p>
<p>Tensorflow 2.3 introduced <a href="https://www.tensorflow.org/api_docs/python/tf/keras/metrics/Precision" rel="nofollow noreferrer">tf.keras.metrics.Precision</a> and <a href="https://www.tensorflow.org/... | keras tensorflow | 1 | Keras P/R metrics at different thresholds during training -- (keras tensorflow)
<p>I'm training a binary classifier and I'd like to see Precision/Recall metrics at different thresholds.</p>
<p>Tensorflow 2.3 introduced <a href="https://www.tensorflow.org/api_docs/python/tf/keras/metrics/Precision" rel="nofollow nor... | habedi/stack-exchange-dataset |
80,898 | Tensorflow gradient returns nan or Inf | <p>I am trying to implement a WGAN-GP model using Tensorflow and Keras (for <a href="https://www.kaggle.com/mlg-ulb/creditcardfraud" rel="nofollow noreferrer">credit card fraud data from kaggle</a>).</p>
<p>I mostly followed the sample code that is provided in <a href="https://keras.io/examples/generative/wgan_gp/"... | python deep learning keras tensorflow gan | 1 | Tensorflow gradient returns nan or Inf -- (python deep learning keras tensorflow gan)
<p>I am trying to implement a WGAN-GP model using Tensorflow and Keras (for <a href="https://www.kaggle.com/mlg-ulb/creditcardfraud" rel="nofollow noreferrer">credit card fraud data from kaggle</a>).</p>
<p>I mostly followed the s... | habedi/stack-exchange-dataset |
80,920 | What does a blue empty cell mean [ ] in Anaconda if the cell above is still [*]? | <p>I've been running a machine learning algorithm for two days now, I have a large dataset and a slow machine.</p>
<p>I noticed today that the cell below the "fit model" cell turned from green to blue, however, the cell above (the one with fit) is still running [*]</p>
<p><a href="https://i.stack.imgu... | jupyter anaconda | 1 | What does a blue empty cell mean [ ] in Anaconda if the cell above is still [*]? -- (jupyter anaconda)
<p>I've been running a machine learning algorithm for two days now, I have a large dataset and a slow machine.</p>
<p>I noticed today that the cell below the "fit model" cell turned from green to blue, h... | habedi/stack-exchange-dataset |
80,921 | significance test and sample size estimation for classifiers | <p>What is the test to tell if e.g. an F1 score of 0.69 for classifier A and 0.72 for classifier B is truly different and not just by chance? (for mean-values one would use a "t-test" and obtain a "p-value"). I have access to the underlying data and not only to the F1 scores.</p>
<p>... and how ... | classification | 1 | significance test and sample size estimation for classifiers -- (classification)
<p>What is the test to tell if e.g. an F1 score of 0.69 for classifier A and 0.72 for classifier B is truly different and not just by chance? (for mean-values one would use a "t-test" and obtain a "p-value"). I have acc... | habedi/stack-exchange-dataset |
80,923 | Is autocorrelation of residuals a problem in machine learning? | <p>Let's assume I have a random forest model and the residuals of the model are autocorrelated. Is this a problem?</p>
<p>As an example, let's assume I have two different random forest models, A and B, with a similar predictive performance. The residuals of model A are less autocorrelated than the residuals of mode... | correlation model selection | 1 | Is autocorrelation of residuals a problem in machine learning? -- (correlation model selection)
<p>Let's assume I have a random forest model and the residuals of the model are autocorrelated. Is this a problem?</p>
<p>As an example, let's assume I have two different random forest models, A and B, with a similar pre... | habedi/stack-exchange-dataset |
80,926 | model selection in clustering | <p>I am working on a mall customer segmentation dataset (5 features, 200 rows) using clustering. This dataset does not have any ground truth labels. I had a few doubts regarding clustering:</p>
<ol>
<li><p>Can I use model selection in clustering using the silhouette score? - Since my dataset does not have any g... | clustering evaluation overfitting model selection | 1 | model selection in clustering -- (clustering evaluation overfitting model selection)
<p>I am working on a mall customer segmentation dataset (5 features, 200 rows) using clustering. This dataset does not have any ground truth labels. I had a few doubts regarding clustering:</p>
<ol>
<li><p>Can I use model selec... | habedi/stack-exchange-dataset |
80,927 | Compare two tends with big difference in absolute value | <p>I'm studying the Spotify streams trend for different nations in order to show the impact of the pandemic on music listeners.</p>
<p>So far i retrieved my data, and plotted it.</p>
<p><a href="https://i.stack.imgur.com/NGlug.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NGlug.png" alt="St... | data mining data visualization data analysis | 1 | Compare two tends with big difference in absolute value -- (data mining data visualization data analysis)
<p>I'm studying the Spotify streams trend for different nations in order to show the impact of the pandemic on music listeners.</p>
<p>So far i retrieved my data, and plotted it.</p>
<p><a href="https://i.s... | habedi/stack-exchange-dataset |
80,929 | Problem regarding calculating correlation approach? | <p>There are 3 columns say <code>product_id</code>, <code>product_type</code>, and <code>price_drop</code>. <code>product_id</code> is unique while a product can belong to say 100 classes that information is given by product_type. price_drop column value is 1 when a drop in the price of the product occurred else 0. Wha... | correlation data analysis descriptive statistics | 1 | Problem regarding calculating correlation approach? -- (correlation data analysis descriptive statistics)
<p>There are 3 columns say <code>product_id</code>, <code>product_type</code>, and <code>price_drop</code>. <code>product_id</code> is unique while a product can belong to say 100 classes that information is given ... | habedi/stack-exchange-dataset |
80,938 | Do I need to square a column if I want a neural network to try using that? | <p>In the classical linear regression implementation, if I suspect the square of the values of the column is correlated to the target, then I actually need to create a new column with the squares for the algorithm to make use of that.</p>
<p>Is this also necessary when using neural networks? I know it's a broad que... | neural network feature engineering | 1 | Do I need to square a column if I want a neural network to try using that? -- (neural network feature engineering)
<p>In the classical linear regression implementation, if I suspect the square of the values of the column is correlated to the target, then I actually need to create a new column with the squares for the a... | habedi/stack-exchange-dataset |
80,945 | Deploying multiple pre-trained model (tar.gz files) on Sagemaker in a single endpoint | <p>We have followed the following steps:</p>
<ol>
<li>Trained 5 TensorFlow models in local machine using 5 different training sets.</li>
<li>Saved those in .h5 format.</li>
<li>Converted those into tar.gz (Model1.tar.gz,...Model5.tar.gz) and uploaded it in the S3 bucket.</li>
<li>Successfully deploy... | tensorflow machine learning model aws sagemaker pretraining | 1 | Deploying multiple pre-trained model (tar.gz files) on Sagemaker in a single endpoint -- (tensorflow machine learning model aws sagemaker pretraining)
<p>We have followed the following steps:</p>
<ol>
<li>Trained 5 TensorFlow models in local machine using 5 different training sets.</li>
<li>Saved those in .... | habedi/stack-exchange-dataset |
80,948 | How should I configure my Neural Network to accept a column of numpy.ndarrays as input? | <p>I have a dataframe with 10k rows and the following columns:</p>
<pre><code> array target
[1,5,6,1,3,etc...] 5
[3,3,1,0,5,etc...] 10
[0,0,1,1,7,etc...] 3
 . ... | machine learning neural network deep learning keras tensorflow | 1 | How should I configure my Neural Network to accept a column of numpy.ndarrays as input? -- (machine learning neural network deep learning keras tensorflow)
<p>I have a dataframe with 10k rows and the following columns:</p>
<pre><code> array target
[1,5,6,1,3,etc...] ... | habedi/stack-exchange-dataset |
80,968 | Equivalence of two separate data distribution | <p>I am working in generative modelling. I have a real dataset of which I want to know the underlying distribution. For this I create a synthetic data generator which tries to mimic the real data. I train a classifier on one part of the real dataset. Then I test on the artificial data as well as the testset from the re... | classification statistics data similarity | 1 | Equivalence of two separate data distribution -- (classification statistics data similarity)
<p>I am working in generative modelling. I have a real dataset of which I want to know the underlying distribution. For this I create a synthetic data generator which tries to mimic the real data. I train a classifier on one pa... | habedi/stack-exchange-dataset |
80,993 | I want to start studying the field of machine translation | <p>I've studied Japanese language and literature and passed some linguistic courses and now as for my masters, I want to study natural language processing and especially machine translation. so I tried taking some data science courses online and I'm now a little bit familiar with data science but I know literally nothi... | machine learning python nlp machine translation | 1 | I want to start studying the field of machine translation -- (machine learning python nlp machine translation)
<p>I've studied Japanese language and literature and passed some linguistic courses and now as for my masters, I want to study natural language processing and especially machine translation. so I tried taking ... | habedi/stack-exchange-dataset |
80,994 | How to include categorical fields to enhance a text classification | <p>I would have a question on how to add more categorical fields in a classification problem.
My dataset had initially 4 fields:</p>
<pre><code>Date Text Short_Mex Username Label
01/01/2020 I am waiting for the TRAIN A train is ... | python logistic regression supervised learning text classification | 1 | How to include categorical fields to enhance a text classification -- (python logistic regression supervised learning text classification)
<p>I would have a question on how to add more categorical fields in a classification problem.
My dataset had initially 4 fields:</p>
<pre><code>Date Text ... | habedi/stack-exchange-dataset |
81,002 | onehotencoder random forest | <p>In a Random Forest context, do I need to setup dummies/OnehotEncoder in a dataset where features/varibles are numerical but refer to some kind of category?</p>
<p>Let's say I have the following variables:</p>
<p><a href="https://i.stack.imgur.com/IgBzp.png" rel="nofollow noreferrer"><img src="https://i.stack... | random forest one hot encoding dummy variables | 1 | onehotencoder random forest -- (random forest one hot encoding dummy variables)
<p>In a Random Forest context, do I need to setup dummies/OnehotEncoder in a dataset where features/varibles are numerical but refer to some kind of category?</p>
<p>Let's say I have the following variables:</p>
<p><a href="https://... | habedi/stack-exchange-dataset |
81,009 | Train/Test size and bias | <p>I'm running a classifier (logistic regression). The information on my dataset are the following:</p>
<pre><code>dataset size= 279 observations 
</code></pre>
<p>(80/20 rule)</p>
<pre><code>train size= 233
test size = 56

# of events in train = 31
# of events in test = 8
</code></p... | machine learning logistic regression supervised learning | 1 | Train/Test size and bias -- (machine learning logistic regression supervised learning)
<p>I'm running a classifier (logistic regression). The information on my dataset are the following:</p>
<pre><code>dataset size= 279 observations 
</code></pre>
<p>(80/20 rule)</p>
<pre><code>train size= 233
test ... | habedi/stack-exchange-dataset |
81,034 | How to properly compare these two confusion matrix? | <p>I have used Vader, a sentiment analysis tool for social media, on a database of movie reviews. These two confusion matrices differ in the vader.py algorithm, as the first one is from nltk:</p>
<p><a href="https://i.stack.imgur.com/YuSdn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YuSdn.png... | machine learning python nlp nltk | 1 | How to properly compare these two confusion matrix? -- (machine learning python nlp nltk)
<p>I have used Vader, a sentiment analysis tool for social media, on a database of movie reviews. These two confusion matrices differ in the vader.py algorithm, as the first one is from nltk:</p>
<p><a href="https://i.stack.im... | habedi/stack-exchange-dataset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.