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 |
|---|---|---|---|---|---|---|
57,520 | can i make model that can take N shape input? | <p>as far as i try all data that model take are fixed size or fixed shape, i had problem that i give data to model but it has no fixed shape and i can not cut part of it as all of it are important,so can i make model that have unshaped data as input then take unshaped data to predict ..
like have small problem that... | machine learning | 1 | can i make model that can take N shape input? -- (machine learning)
<p>as far as i try all data that model take are fixed size or fixed shape, i had problem that i give data to model but it has no fixed shape and i can not cut part of it as all of it are important,so can i make model that have unshaped data as input th... | habedi/stack-exchange-dataset |
57,529 | Conditional Function in R | <p>I have an R function <code>for (i in 1:10)</code> that reads in data and performs some cleaning. Is it possible to write a flexible statement to execute certain parts of the code conditionally, for example have different steps for i = 2 and 8?</p>
 | r | 1 | Conditional Function in R -- (r)
<p>I have an R function <code>for (i in 1:10)</code> that reads in data and performs some cleaning. Is it possible to write a flexible statement to execute certain parts of the code conditionally, for example have different steps for i = 2 and 8?</p>
 | habedi/stack-exchange-dataset |
57,542 | How to maintain CBOW dataset dimension and fit it in Neural Network? | <p>I am new to neural network. I'm trying to train word embeddings without using word2vec package. </p>

<p>Using titles from reddit worldnews dataset I'm have done some CBOW representation. </p>

<p>For window size three here is some of my outputs:</p>

<pre><code>0 Context : ['scores', 'killed... | neural network keras word2vec numpy | 1 | How to maintain CBOW dataset dimension and fit it in Neural Network? -- (neural network keras word2vec numpy)
<p>I am new to neural network. I'm trying to train word embeddings without using word2vec package. </p>

<p>Using titles from reddit worldnews dataset I'm have done some CBOW representation. </p>
&#... | habedi/stack-exchange-dataset |
57,568 | Calculate future GDP % using machine learning | <p>I need to estimate the GDP % of a country three years into the future, based on historic data.</p>

<p>I have 30+ years of the following monthly data that includes features such as inflation and unemployment rate:</p>

<pre><code>Year Month Inflation Unemployment % Other Features GDP %
1990 ... | machine learning random forest decision trees machine learning model | 1 | Calculate future GDP % using machine learning -- (machine learning random forest decision trees machine learning model)
<p>I need to estimate the GDP % of a country three years into the future, based on historic data.</p>

<p>I have 30+ years of the following monthly data that includes features such as inflatio... | habedi/stack-exchange-dataset |
57,581 | Ball Tree and Pseudometrics | <p>The <a href="https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.DistanceMetric.html" rel="nofollow noreferrer">docs</a> for <code>sklearn.neighbors.DistanceMetric</code> state that</p>

<blockquote>
 <p>in order to be used within the BallTree, the distance must be a true metric</p>
... | scikit learn k nn metric | 1 | Ball Tree and Pseudometrics -- (scikit learn k nn metric)
<p>The <a href="https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.DistanceMetric.html" rel="nofollow noreferrer">docs</a> for <code>sklearn.neighbors.DistanceMetric</code> state that</p>

<blockquote>
 <p>in order to be used within... | habedi/stack-exchange-dataset |
57,582 | Which are the appropriate prameters for lda modeling? | <p>I try to implement in R test for appropriate metrics for lda.</p>

<p>Here the way I try to use LDA</p>

<pre><code>require(quanteda)
 require(quanteda.corpora)
 require(lubridate)
 require(topicmodels)
dtext <- data.frame(id = c(1,2,3), text = c("This dataset contains mov... | r text mining topic model lda | 1 | Which are the appropriate prameters for lda modeling? -- (r text mining topic model lda)
<p>I try to implement in R test for appropriate metrics for lda.</p>

<p>Here the way I try to use LDA</p>

<pre><code>require(quanteda)
 require(quanteda.corpora)
 require(lubridate)
 require(t... | habedi/stack-exchange-dataset |
57,583 | Pandas - how to make further sub-groups after groupby( ) and get_group( ) | <p>Sample data in .csv format</p>

<pre><code>| No.| IP | Unix_time | # integer unix time
| 1 | 1.1.1.1 | 1563552000 | # equivalent to 12:00:00 AM
| 2 | 1.1.1.1 | 1563552030 | # equivalent to 12:00:30 AM
| 3 | 1.1.1.1 | 1563552100 | # equivale... | python pandas csv | 1 | Pandas - how to make further sub-groups after groupby( ) and get_group( ) -- (python pandas csv)
<p>Sample data in .csv format</p>

<pre><code>| No.| IP | Unix_time | # integer unix time
| 1 | 1.1.1.1 | 1563552000 | # equivalent to 12:00:00 AM
| 2 | 1.1.1.1 | 1563552... | habedi/stack-exchange-dataset |
57,586 | Feature addition/ subtraction and SVM model accuracy | <p>I am working on a text classification problem where I would like to improve the accuracy of my model. Presently, I am using SVM with linear SVC and OneVsRestClassifier. The model should correctly predict all of the subcategories for a parent category.</p>

<p>For entered account name, I should get the right ... | python classification svm | 1 | Feature addition/ subtraction and SVM model accuracy -- (python classification svm)
<p>I am working on a text classification problem where I would like to improve the accuracy of my model. Presently, I am using SVM with linear SVC and OneVsRestClassifier. The model should correctly predict all of the subcategories for ... | habedi/stack-exchange-dataset |
57,598 | MATCHING AN INTEGER | <p>I have this dataset. I want to create a <code>dataframe</code> from the dataset which starts with a particular integers.</p>

<p><strong>This is a sample:</strong></p>

<pre class="lang-py prettyprint-override"><code>
box = {'colors': ['Green','Yellow','Green','Blue','Blue','Red','Red','Red','Gre... | python pandas numpy | 1 | MATCHING AN INTEGER -- (python pandas numpy)
<p>I have this dataset. I want to create a <code>dataframe</code> from the dataset which starts with a particular integers.</p>

<p><strong>This is a sample:</strong></p>

<pre class="lang-py prettyprint-override"><code>
box = {'colors': ['Green','Yellow'... | habedi/stack-exchange-dataset |
57,608 | Filtering a panda dataframe in one line | <p>I had the following data-cleaning question in an interview test that I struggled on (I've changed the details to anonymise it and protect the company's interview process)</p>

<blockquote>
 <p>Given the following dataframe <code>df</code>, return a new series with <code>day</code> as the index, and a si... | python pandas data cleaning | 1 | Filtering a panda dataframe in one line -- (python pandas data cleaning)
<p>I had the following data-cleaning question in an interview test that I struggled on (I've changed the details to anonymise it and protect the company's interview process)</p>

<blockquote>
 <p>Given the following dataframe <code>df... | habedi/stack-exchange-dataset |
57,633 | How to normalize a position in 3d game? | <p>I'm pretty new to anything and everything related to this kind of stuff, I was wondering how would I normalize the coordinates of a entity in my game for a nerual network? Would it just be the same normalizng everything else? I don't assume it'd be the same just because how big these numbers are, you'd have to have ... | machine learning machine learning model normalization | 1 | How to normalize a position in 3d game? -- (machine learning machine learning model normalization)
<p>I'm pretty new to anything and everything related to this kind of stuff, I was wondering how would I normalize the coordinates of a entity in my game for a nerual network? Would it just be the same normalizng everythin... | habedi/stack-exchange-dataset |
57,639 | Transfer learning on new image size | <p>Transfer learning: Take a trained neural network and use it for a new classification task.</p>

<p>When we want to use transfer learning with a convolutional neural network, we don't have to use the same image size as input than the image size used for training. But if we change the input size we will have t... | deep learning neural network keras convolutional neural network | 1 | Transfer learning on new image size -- (deep learning neural network keras convolutional neural network)
<p>Transfer learning: Take a trained neural network and use it for a new classification task.</p>

<p>When we want to use transfer learning with a convolutional neural network, we don't have to use the same ... | habedi/stack-exchange-dataset |
57,642 | How to implement an LSTM RNN with multiple input features | <p>EDIT: Now I didn't convert to list.</p>

<p>I am training LSTM for multiple time-series in an array which has a structure: 450x801. There are 450 time series with each of 801 timesteps / time series. The labels are classes with assigned integer from 1 to 6, so the dimension of the label is 450x1. This is my ... | time series lstm multiclass classification rnn | 1 | How to implement an LSTM RNN with multiple input features -- (time series lstm multiclass classification rnn)
<p>EDIT: Now I didn't convert to list.</p>

<p>I am training LSTM for multiple time-series in an array which has a structure: 450x801. There are 450 time series with each of 801 timesteps / time series.... | habedi/stack-exchange-dataset |
57,650 | Is there any way to define custom entities in Spacy | <p>1) I have just started working on NLP the basic Idea is to extract meaningful information from text. For this I am using "Spacy".</p>

<p>As far as I have studied Spacy has following entities.</p>

<ul>
<li>ORG</li>
<li>PERSON</li>
<li>DATE</li>
<li>MONEY</li>
<li>CARDINAL</li>&#x... | python nlp spacy | 1 | Is there any way to define custom entities in Spacy -- (python nlp spacy)
<p>1) I have just started working on NLP the basic Idea is to extract meaningful information from text. For this I am using "Spacy".</p>

<p>As far as I have studied Spacy has following entities.</p>

<ul>
<li>ORG</li>
<li... | habedi/stack-exchange-dataset |
57,685 | Where can I find dataset for word analogy task? | <p>In the paper of Word2Vec by Thomas Mikolov and others, there is a accuracy report on the full Semantic-Syntactic data set. Where I can find this dataset or a related dataset for word analogy task? </p>

<p>Here is the paper link and I'm referring to table 5. 
<a href="https://arxiv.org/abs/1301.3781" rel... | nlp dataset word2vec | 1 | Where can I find dataset for word analogy task? -- (nlp dataset word2vec)
<p>In the paper of Word2Vec by Thomas Mikolov and others, there is a accuracy report on the full Semantic-Syntactic data set. Where I can find this dataset or a related dataset for word analogy task? </p>

<p>Here is the paper link and I'... | habedi/stack-exchange-dataset |
57,697 | Decision Trees Should We Discard Low Importance Features? | <p>I just started to work with feature selection. Let's say I have a decision tree model. I get its feature importances by <code>tree.feature_importances_</code>.</p>

<p>In my model out of around 30 features, 20 of them has importance value of zero. Does that mean that I should discard those low importance val... | scikit learn feature selection decision trees | 1 | Decision Trees Should We Discard Low Importance Features? -- (scikit learn feature selection decision trees)
<p>I just started to work with feature selection. Let's say I have a decision tree model. I get its feature importances by <code>tree.feature_importances_</code>.</p>

<p>In my model out of around 30 fea... | habedi/stack-exchange-dataset |
57,720 | Docker for data science | <p>I recently started to read articles about Docker.<br>
To me, in data science, Docker is useful because:</p>

<p>1) You have a totally different environment, which protect you against libraries and dependencies problems.</p>

<p>2) If your application modify, for example, the database of your comp... | data | 1 | Docker for data science -- (data)
<p>I recently started to read articles about Docker.<br>
To me, in data science, Docker is useful because:</p>

<p>1) You have a totally different environment, which protect you against libraries and dependencies problems.</p>

<p>2) If your application modify, for ... | habedi/stack-exchange-dataset |
57,726 | Gradient descent formula | <p>I came across an interesting <a href="http://neuralnetworksanddeeplearning.com/chap2.html" rel="nofollow noreferrer">book</a> about neural network basics, and the formula for gradient descent from one of the first chapters <a href="http://neuralnetworksanddeeplearning.com/chap2.html#exercises_675621" rel="nofollow n... | neural network gradient descent | 1 | Gradient descent formula -- (neural network gradient descent)
<p>I came across an interesting <a href="http://neuralnetworksanddeeplearning.com/chap2.html" rel="nofollow noreferrer">book</a> about neural network basics, and the formula for gradient descent from one of the first chapters <a href="http://neuralnetworksan... | habedi/stack-exchange-dataset |
57,733 | Equation related to Smoothness | <p>If you have a differentiable function <span class="math-container">$f:\mathbb{R}^d\rightarrow\mathbb{R}$</span> that is <span class="math-container">$\beta$</span>-smooth (for all <span class="math-container">$v$</span> and all <span class="math-container">$w$</span>, you have <span class="math-container">$\|\nabla ... | machine learning statistics optimization | 1 | Equation related to Smoothness -- (machine learning statistics optimization)
<p>If you have a differentiable function <span class="math-container">$f:\mathbb{R}^d\rightarrow\mathbb{R}$</span> that is <span class="math-container">$\beta$</span>-smooth (for all <span class="math-container">$v$</span> and all <span class=... | habedi/stack-exchange-dataset |
57,743 | Gradient boosting how can accuracy increase when we lower the depth of tree? | <p>What I don't understand about gradient boost is, doesn't lowering height of the tree means we use fewer features in our model?</p>

<p>From my model I get the highest accuracy when the depth is one. Meaning there is just root node at my trees, and uses one feature. How can a model that uses one feature gives... | decision trees ensemble modeling | 1 | Gradient boosting how can accuracy increase when we lower the depth of tree? -- (decision trees ensemble modeling)
<p>What I don't understand about gradient boost is, doesn't lowering height of the tree means we use fewer features in our model?</p>

<p>From my model I get the highest accuracy when the depth is ... | habedi/stack-exchange-dataset |
57,756 | How to use a loss functions closed-form gradient even when it does not have a closed-form itself | <p>I have a loss function without a closed analytic form that I want to implement in tensorflow that has a nice clean gradient (i.e. i have some nice gradient function <span class="math-container">$f(x)$</span> that i want to use for backprop but <span class="math-container">$\int_x f(x) \ dx$</span> is with no closed ... | tensorflow | 1 | How to use a loss functions closed-form gradient even when it does not have a closed-form itself -- (tensorflow)
<p>I have a loss function without a closed analytic form that I want to implement in tensorflow that has a nice clean gradient (i.e. i have some nice gradient function <span class="math-container">$f(x)$</sp... | habedi/stack-exchange-dataset |
57,768 | How to convert trained data (feature extracted) into a prediction model? | <p>Background:</p>

<ul>
<li>I am analyzing and labeling some log data. (parsed already, sample data below)</li>
<li><p>I have <strong>extracted the major features</strong> of data.</p>

<p>For examples, the classification results ("1 - normal" or "0 - anomaly") largely depends on columns "durat... | machine learning predictive modeling machine learning model | 1 | How to convert trained data (feature extracted) into a prediction model? -- (machine learning predictive modeling machine learning model)
<p>Background:</p>

<ul>
<li>I am analyzing and labeling some log data. (parsed already, sample data below)</li>
<li><p>I have <strong>extracted the major features</s... | habedi/stack-exchange-dataset |
57,770 | How can I have the same initialization for all my networks? | <p>I want to have the same weights for layer initializations in all my networks, so that when I'm comparing their first epoch loss they all start from the same value. Is there a way in keras to do this? </p>

<p>I have set the random seed for the numpy and tensorflow, but still I get different results in initia... | keras tensorflow numpy weight initialization | 1 | How can I have the same initialization for all my networks? -- (keras tensorflow numpy weight initialization)
<p>I want to have the same weights for layer initializations in all my networks, so that when I'm comparing their first epoch loss they all start from the same value. Is there a way in keras to do this? </p>&#x... | habedi/stack-exchange-dataset |
57,771 | Caret "train" or special package | <p>I see that there is an XGBoost package as well as XGBoost option in the "train" function in Caret. What is the difference between these two options, is it that they provide different settings? More generally, how would one choose between using the "train" function and a standalone package for the method?</p>
 | r | 1 | Caret "train" or special package -- (r)
<p>I see that there is an XGBoost package as well as XGBoost option in the "train" function in Caret. What is the difference between these two options, is it that they provide different settings? More generally, how would one choose between using the "train" function and a standa... | habedi/stack-exchange-dataset |
57,774 | Make column as dictionary key and row as value in pandas dataframe | <p>I have Dataframe as below.</p>

<pre><code>name value id
A 123 1
B 345 5
C 567 4
D 789 2
</code></pre>

<p>I need to create a dictionary of the form below</p>

<pre><code>{
 {"name":"A",
 "value":123... | python pandas dataframe | 1 | Make column as dictionary key and row as value in pandas dataframe -- (python pandas dataframe)
<p>I have Dataframe as below.</p>

<pre><code>name value id
A 123 1
B 345 5
C 567 4
D 789 2
</code></pre>

<p>I need to creat... | habedi/stack-exchange-dataset |
57,776 | Explain forward filling and backward filling (data filling) | <p>Can I understand in this way? Let me know if any statement is wrong or not accurate.</p>

<ol>
<li><p>Reason of <strong>data filling</strong>:</p>

<p>Assume I have a consecutive data (e.g., daily log data), and partial data are missing. In order to make some calculation (e.g., mean value), we fi... | dataset | 1 | Explain forward filling and backward filling (data filling) -- (dataset)
<p>Can I understand in this way? Let me know if any statement is wrong or not accurate.</p>

<ol>
<li><p>Reason of <strong>data filling</strong>:</p>

<p>Assume I have a consecutive data (e.g., daily log data), and partial data... | habedi/stack-exchange-dataset |
57,809 | Batch Normalization and Dropout together causing incorrect segmentation results | <p>So, I've been running a test to see how well a number of networks can perform road segmentation on a particular customer's dataset. I am testing UNET, RDRCNN, and Tiramisu against each other. </p>

<p>UNET reliably trains, however RDRCNN and Tiramisu cannot. Immediately during training, the validation los... | machine learning python keras batch normalization | 1 | Batch Normalization and Dropout together causing incorrect segmentation results -- (machine learning python keras batch normalization)
<p>So, I've been running a test to see how well a number of networks can perform road segmentation on a particular customer's dataset. I am testing UNET, RDRCNN, and Tiramisu against e... | habedi/stack-exchange-dataset |
57,821 | Group neural networks outputs using Keras/Tensorflow | <p>I am trying to group the outputs of my neural network, in order to have them perform a separated classification.</p>

<p>Let's take the example where the groups are constituted of two nodes and we previously have four output nodes, then the network should look like this : </p>

<p><a href="https://i.... | neural network keras tensorflow | 1 | Group neural networks outputs using Keras/Tensorflow -- (neural network keras tensorflow)
<p>I am trying to group the outputs of my neural network, in order to have them perform a separated classification.</p>

<p>Let's take the example where the groups are constituted of two nodes and we previously have four o... | habedi/stack-exchange-dataset |
57,832 | Is DQN limited to working with only image frames? | <p>I have few questions about Deep Q Network.</p>

<ol>
<li><p>Does DQN only accept image frames as input? I have never hear (read) a paperwork where it doesn't use image frames.</p></li>
<li><p>If the first is a No, then does image frames as input for training faster than any other options? For example... | reinforcement learning dqn image image size | 1 | Is DQN limited to working with only image frames? -- (reinforcement learning dqn image image size)
<p>I have few questions about Deep Q Network.</p>

<ol>
<li><p>Does DQN only accept image frames as input? I have never hear (read) a paperwork where it doesn't use image frames.</p></li>
<li><p>If the fir... | habedi/stack-exchange-dataset |
57,835 | Analyzing country data. Does duplicating observations by population for regression make sense? | <p><strong>Question:</strong> While analyzing country happiness data via OLS regression, should I duplicate observations based on country population? </p>

<p><strong>Example:</strong> If duplicating per million, the U.S. would have 327 observations and Denmark would have 6. Currently every country has 1.</p>&#... | dataset linear regression | 1 | Analyzing country data. Does duplicating observations by population for regression make sense? -- (dataset linear regression)
<p><strong>Question:</strong> While analyzing country happiness data via OLS regression, should I duplicate observations based on country population? </p>

<p><strong>Example:</strong> I... | habedi/stack-exchange-dataset |
57,839 | Is my model overfitting? The validation loss keeps on fluctuating | <p>I have trained a 4 layer neural network</p>

<pre><code>model = Sequential()

#get number of columns in training data
n_cols = X_train.shape[1]

#add model layers
model.add(Dense(8, activation='relu', input_shape=(n_cols,)))
model.add(Dense(8, activation='relu'))
model.add(Dro... | machine learning neural network deep learning | 1 | Is my model overfitting? The validation loss keeps on fluctuating -- (machine learning neural network deep learning)
<p>I have trained a 4 layer neural network</p>

<pre><code>model = Sequential()

#get number of columns in training data
n_cols = X_train.shape[1]

#add model layers
model... | habedi/stack-exchange-dataset |
57,857 | What are the limits of capping ratios to [0-1]? | <p>I work with some financial ratios. By construction those variables should be between 0 and 1. However, for some reasons I end up with values <0 and >1. These reasons include :</p>

<ul>
<li>reporting problems (fat finger errors, unit problems...)</li>
<li>discrepencies between databases</li>
<... | data cleaning | 1 | What are the limits of capping ratios to [0-1]? -- (data cleaning)
<p>I work with some financial ratios. By construction those variables should be between 0 and 1. However, for some reasons I end up with values <0 and >1. These reasons include :</p>

<ul>
<li>reporting problems (fat finger errors, unit p... | habedi/stack-exchange-dataset |
57,861 | Why is data science not yet widely applied to Law? | <p>Law (judiciary) contains such a huge corpus to apply NLP to, but yet there are only search engines designed for Law. Why is NLP not yet extensively applied? Is it because of dimensionality? </p>
 | nlp | 1 | Why is data science not yet widely applied to Law? -- (nlp)
<p>Law (judiciary) contains such a huge corpus to apply NLP to, but yet there are only search engines designed for Law. Why is NLP not yet extensively applied? Is it because of dimensionality? </p>
 | habedi/stack-exchange-dataset |
57,863 | Why my svm.SVC.fit( ) (linear kernal) run so long time? | <p>I am using sklearn.svm.SVC( ) to train & test my dataset. 80% are used for training, 20% are used for testing.</p>

<p>Here is my Python code:</p>

<pre><code>data = pd.read_csv(trainPath, header=0)

X = data.iloc[:, 5:17].values
y = data.iloc[:, 17:18].values

X_train, X_test... | scikit learn svm | 1 | Why my svm.SVC.fit( ) (linear kernal) run so long time? -- (scikit learn svm)
<p>I am using sklearn.svm.SVC( ) to train & test my dataset. 80% are used for training, 20% are used for testing.</p>

<p>Here is my Python code:</p>

<pre><code>data = pd.read_csv(trainPath, header=0)

X = data.il... | habedi/stack-exchange-dataset |
57,866 | Gradient Boosted Decision Trees How to Find Prediction of Each Tree? | <p>I'm doing a project. I have a classification problem that I should solve using gradient boosted decision trees. What I want to do is create a matrix that gives prediction of each decision tree for each sample. For example if I have 100 samples and 100 trees, I should have 100x100 matrix. i, j th entry gives the pred... | classification scikit learn boosting | 1 | Gradient Boosted Decision Trees How to Find Prediction of Each Tree? -- (classification scikit learn boosting)
<p>I'm doing a project. I have a classification problem that I should solve using gradient boosted decision trees. What I want to do is create a matrix that gives prediction of each decision tree for each samp... | habedi/stack-exchange-dataset |
57,875 | how to do topic modeling on very huge data? | <p>When i come to know that gensim is useful library for topic modeling, I tried it on my huge amount of document. It works well only if the dictionary size is to be fix. In my case i have each and every token is important so i would have huge amount of token at that time gensim algo like(LDA,LSA,etc) fails and get out... | machine learning topic model lda gensim | 1 | how to do topic modeling on very huge data? -- (machine learning topic model lda gensim)
<p>When i come to know that gensim is useful library for topic modeling, I tried it on my huge amount of document. It works well only if the dictionary size is to be fix. In my case i have each and every token is important so i wou... | habedi/stack-exchange-dataset |
57,876 | Why is my Python Altair chart printing a blank line? | <p>Wondering if anyone can help me understand why python altair chart is not printing...</p>

<p>I’m only seeing this when I run the code:</p>

<p><a href="https://i.stack.imgur.com/MKof6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MKof6.png" alt="enter image description here"></a... | python pandas matlab matplotlib | 1 | Why is my Python Altair chart printing a blank line? -- (python pandas matlab matplotlib)
<p>Wondering if anyone can help me understand why python altair chart is not printing...</p>

<p>I’m only seeing this when I run the code:</p>

<p><a href="https://i.stack.imgur.com/MKof6.png" rel="nofollow norefer... | habedi/stack-exchange-dataset |
57,882 | Resampling for imbalaced datasets: should testing set also be resampled? | <p>Apologies for what is probably a basic question but I have not been able to find a definitive answer either in the literature or in the Internet. </p>

<p>When dealing with an imbalanced dataset one possible strategy is to resample either the minority or the majority class to artificially generate a balanced... | training class imbalance | 1 | Resampling for imbalaced datasets: should testing set also be resampled? -- (training class imbalance)
<p>Apologies for what is probably a basic question but I have not been able to find a definitive answer either in the literature or in the Internet. </p>

<p>When dealing with an imbalanced dataset one possibl... | habedi/stack-exchange-dataset |
57,902 | Oversampling only balances the training set, what about the testing set? | <p>In a case of imbalanced data classification, I know that we only oversample the training set (to prevent data leakage from training to testing subsets), but what if there are no positive data points in my testing set? The testing set is still highly skewed and has only 1% of my positive class. I am using XGBoost, Ra... | classification cross validation class imbalance | 1 | Oversampling only balances the training set, what about the testing set? -- (classification cross validation class imbalance)
<p>In a case of imbalanced data classification, I know that we only oversample the training set (to prevent data leakage from training to testing subsets), but what if there are no positive data... | habedi/stack-exchange-dataset |
57,905 | How to extract trees in XGBoost? | <p>I want to extract each tree so that I can feed it with any data, and see the output.</p>

<pre><code>dump_list=xg_clas.get_booster().get_dump()
num_t=len(dump_list)
print("Number of Trees=",num_t)
</code></pre>

<p>I can find number of trees like this,</p>

<pre><code>xgb.plot_tre... | classification decision trees xgboost boosting | 1 | How to extract trees in XGBoost? -- (classification decision trees xgboost boosting)
<p>I want to extract each tree so that I can feed it with any data, and see the output.</p>

<pre><code>dump_list=xg_clas.get_booster().get_dump()
num_t=len(dump_list)
print("Number of Trees=",num_t)
</code></pre>&#... | habedi/stack-exchange-dataset |
57,922 | Track underlying observation when using GridSearchCV and make_scorer | <p>I'm doing a GridSearchCV, and I've defined a custom function (called custom_scorer below) to optimize for. So the setup is like this:</p>

<pre><code>gs = GridSearchCV(estimator=some_classifier,
 param_grid=some_grid,
 cv=5, # for concreteness
 ... | python scikit learn hyperparameter tuning grid search gridsearchcv | 1 | Track underlying observation when using GridSearchCV and make_scorer -- (python scikit learn hyperparameter tuning grid search gridsearchcv)
<p>I'm doing a GridSearchCV, and I've defined a custom function (called custom_scorer below) to optimize for. So the setup is like this:</p>

<pre><code>gs = GridSearchCV... | habedi/stack-exchange-dataset |
57,924 | Difference between sklearn make_pipeline and imblearn make_pipeline | <p>Can anybody please explain the difference between <code>sklearn.pipeline.make_pipline</code> and <code>imblearn.pipeline.make_pipline</code>.</p>
 | predictive modeling pandas class imbalance pipelines imbalanced learn | 1 | Difference between sklearn make_pipeline and imblearn make_pipeline -- (predictive modeling pandas class imbalance pipelines imbalanced learn)
<p>Can anybody please explain the difference between <code>sklearn.pipeline.make_pipline</code> and <code>imblearn.pipeline.make_pipline</code>.</p>
 | habedi/stack-exchange-dataset |
57,927 | How will a decision tree cope if it cannot find a suitable feature to choose as root node from which to split further? | <p>When I look at decision trees, they start with a root node choosing the most suitable feature from which to split further. What if the decision tree is unable to find the most suitable feature from the data as root node? How does the decision tree cope in that situation?</p>
 | machine learning decision trees | 1 | How will a decision tree cope if it cannot find a suitable feature to choose as root node from which to split further? -- (machine learning decision trees)
<p>When I look at decision trees, they start with a root node choosing the most suitable feature from which to split further. What if the decision tree is unable to... | habedi/stack-exchange-dataset |
57,928 | Why are bigger embedding vectors not necessarily better? | <p>I'm wondering why increasing the dimension of a word dimension vector in NLP doesn't necessarily lead to a better result. For instance, on examples I run, I see sometimes that using a pre-trained 100d GloVe vector performs better than a 300d one. Why is this the case? Intuitively a larger dimension should become alm... | machine learning deep learning word2vec word embeddings nlp | 1 | Why are bigger embedding vectors not necessarily better? -- (machine learning deep learning word2vec word embeddings nlp)
<p>I'm wondering why increasing the dimension of a word dimension vector in NLP doesn't necessarily lead to a better result. For instance, on examples I run, I see sometimes that using a pre-trained... | habedi/stack-exchange-dataset |
57,929 | What are the factors to consider when setting the depth of a decision tree? | <p>In scikit learn, one of the parameters to set when instantiating a decision tree is the maximum depth. What are the factors to consider when setting the depth of a decision tree? Does larger depth usually lead to higher accuracy?</p>
 | machine learning decision trees | 1 | What are the factors to consider when setting the depth of a decision tree? -- (machine learning decision trees)
<p>In scikit learn, one of the parameters to set when instantiating a decision tree is the maximum depth. What are the factors to consider when setting the depth of a decision tree? Does larger depth usually... | habedi/stack-exchange-dataset |
57,945 | sklearn.model_selection: GridSearchCV vs. KFold | <p><a href="https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.KFold.html" rel="nofollow noreferrer">Here</a> is the explain of <strong>cv</strong> parameter in the <strong>sklearn.model_selection.GridSearchCV</strong>:</p>
<blockquote>
<p>cv : int, cross-validation generator or an itera... | scikit learn grid search gridsearchcv | 1 | sklearn.model_selection: GridSearchCV vs. KFold -- (scikit learn grid search gridsearchcv)
<p><a href="https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.KFold.html" rel="nofollow noreferrer">Here</a> is the explain of <strong>cv</strong> parameter in the <strong>sklearn.model_selection.GridSear... | habedi/stack-exchange-dataset |
57,953 | What is the purpose of standardization in machine learning? | <p>I'm just getting started with learning about K-nearest neighbor and am having a hard time understanding why standardization is required. Reading through, I came across a section saying</p>

<blockquote>
 <p>When independent variables in training data are measured in different
 units, it is importan... | machine learning python classification normalization | 1 | What is the purpose of standardization in machine learning? -- (machine learning python classification normalization)
<p>I'm just getting started with learning about K-nearest neighbor and am having a hard time understanding why standardization is required. Reading through, I came across a section saying</p>

<... | habedi/stack-exchange-dataset |
57,971 | What's a good book (or other resource) to learn Imitation Learning? | <p>I must learn and apply imitation learning on a robot for my thesis. I'm looking for decent sources of information on this topic. </p>
 | machine learning | 1 | What's a good book (or other resource) to learn Imitation Learning? -- (machine learning)
<p>I must learn and apply imitation learning on a robot for my thesis. I'm looking for decent sources of information on this topic. </p>
 | habedi/stack-exchange-dataset |
57,974 | Suggestions for Matchmaking Algorithm | <p>I run a heterosexual matching making service. I have my male clients and my female clients. I need to pair each of my clients with their "soul mate" based on several attributes (age, interests, personality types, race, height,horoscope, etc.)</p>

<p>After I create all my pairings, there will be some sort ... | machine learning algorithms optimization | 1 | Suggestions for Matchmaking Algorithm -- (machine learning algorithms optimization)
<p>I run a heterosexual matching making service. I have my male clients and my female clients. I need to pair each of my clients with their "soul mate" based on several attributes (age, interests, personality types, race, height,horos... | habedi/stack-exchange-dataset |
57,976 | Fit to a power law | <p>I often encounter data which I hypothesize to be from a shifted power law,</p>

<p><span class="math-container">$ y(x) = A x^k + B$</span>.</p>

<p>I have in mind samples from an unknown deterministic function here, but you can think about a probability distribution if you prefer.</p>

<p>Wha... | python regression | 1 | Fit to a power law -- (python regression)
<p>I often encounter data which I hypothesize to be from a shifted power law,</p>

<p><span class="math-container">$ y(x) = A x^k + B$</span>.</p>

<p>I have in mind samples from an unknown deterministic function here, but you can think about a probability distr... | habedi/stack-exchange-dataset |
57,996 | is gradient descent also used during feed forward propagation in Neural Network? | <p>To the best of my understanding , weights are updated during back propagation only using gradient descent and no gradient descent is used during feed forward propagation. is it correct ? </p>
 | neural network keras | 1 | is gradient descent also used during feed forward propagation in Neural Network? -- (neural network keras)
<p>To the best of my understanding , weights are updated during back propagation only using gradient descent and no gradient descent is used during feed forward propagation. is it correct ? </p>
 | habedi/stack-exchange-dataset |
58,000 | svm.LinearSVC: larger max_iter number doesn't always increase the accuracy/precision/recall | <p>Background:</p>

<ul>
<li>Supervised machine learning</li>
<li>Data shape

<ul>
<li>10+ features, target = 1 or 0 only, 100,000+ samples (so should be no issue of over-sampling)</li>
</ul></li>
<li><p>80% training, 20% testing</p>

<p>train_test_split(X_train, Y_train, tes... | scikit learn svm supervised learning model selection | 1 | svm.LinearSVC: larger max_iter number doesn't always increase the accuracy/precision/recall -- (scikit learn svm supervised learning model selection)
<p>Background:</p>

<ul>
<li>Supervised machine learning</li>
<li>Data shape

<ul>
<li>10+ features, target = 1 or 0 only, 100,000+ samples (s... | habedi/stack-exchange-dataset |
58,002 | Explaining XGBoost functioning to non-technical people | <p>I have been tasked to explain the principle of the XGBoost algorithm to non-technical people (think 1-2 slides in a powerpoint presentation to upper management). </p>

<p>I am currently working with the original papers : <a href="https://arxiv.org/abs/1603.02754" rel="nofollow noreferrer">here</a> for the pa... | xgboost | 1 | Explaining XGBoost functioning to non-technical people -- (xgboost)
<p>I have been tasked to explain the principle of the XGBoost algorithm to non-technical people (think 1-2 slides in a powerpoint presentation to upper management). </p>

<p>I am currently working with the original papers : <a href="https://arx... | habedi/stack-exchange-dataset |
58,003 | can we make a word2vec NN of more than 3 layers using tensorflow? | <p>To the best of my understanding , word2vec crated using gensim is of 3 layers only.
I was wondering can we customize word2vec NN and create word2vec NN of more than 3 layers to experiment with it using tensorflow ?</p>
 | tensorflow word2vec word embeddings | 1 | can we make a word2vec NN of more than 3 layers using tensorflow? -- (tensorflow word2vec word embeddings)
<p>To the best of my understanding , word2vec crated using gensim is of 3 layers only.
I was wondering can we customize word2vec NN and create word2vec NN of more than 3 layers to experiment with it using tens... | habedi/stack-exchange-dataset |
58,006 | Fitting a distribution to data | <p>I have a large data set of property values at two points in time. I have calculated the change in value between those two points. I want to assess which distribution most closely matches the variation in change in property values. What are some possible ways of selecting the closest type of distribution?</p>
&#x... | statistics distribution scipy | 1 | Fitting a distribution to data -- (statistics distribution scipy)
<p>I have a large data set of property values at two points in time. I have calculated the change in value between those two points. I want to assess which distribution most closely matches the variation in change in property values. What are some possib... | habedi/stack-exchange-dataset |
58,020 | What do I need to learn in order to really understand Machine Learning? | <p>I've graduated with a math major in undergrad, but mostly focused on algebra (Galois Theory, Knot theory, etc.). I work in something unrelated right now, but now I want to study machine learning. The question is, what kind of knowledge should I have if I want to <em>really</em> understand machine learning? </p>
... | machine learning | 1 | What do I need to learn in order to really understand Machine Learning? -- (machine learning)
<p>I've graduated with a math major in undergrad, but mostly focused on algebra (Galois Theory, Knot theory, etc.). I work in something unrelated right now, but now I want to study machine learning. The question is, what kind ... | habedi/stack-exchange-dataset |
58,027 | Populate free space between two dates | <p>I'm new to data science. I'm trying to increase the time-series length for a special calculation. In the original time-series I have 20 weekly reports and I want to increase the amount of occurrences to 200. Is it ok just to use the range from the first date value to second date value between two neighbor dates?</p>... | time series pandas statistics | 1 | Populate free space between two dates -- (time series pandas statistics)
<p>I'm new to data science. I'm trying to increase the time-series length for a special calculation. In the original time-series I have 20 weekly reports and I want to increase the amount of occurrences to 200. Is it ok just to use the range from ... | habedi/stack-exchange-dataset |
58,030 | Logistics regression with polynomial features vs neural networks for classification | <p>I am taking Andrew Ng's Coursera class on machine learning. He mentions that training a logistic regression model with polynomial features would be very expensive for certain tasks compared to training a neural network. Why is that though? I mean, when we talk about neural networks we're usually looking at a model w... | machine learning neural network logistic regression | 1 | Logistics regression with polynomial features vs neural networks for classification -- (machine learning neural network logistic regression)
<p>I am taking Andrew Ng's Coursera class on machine learning. He mentions that training a logistic regression model with polynomial features would be very expensive for certain t... | habedi/stack-exchange-dataset |
58,040 | Saving LSTM hidden states while training and predicting for multi-class time series classification | <p>I am trying to use an LSTM for multi-class classification of time series data.</p>

<p>The training set has dimensions (390, 179), i.e. 390 objects with 179 time steps each.</p>

<p>There are 37 possible classes.</p>

<p>I would like to use a Keras model with just an LSTM and activation layer... | python keras time series lstm multiclass classification | 1 | Saving LSTM hidden states while training and predicting for multi-class time series classification -- (python keras time series lstm multiclass classification)
<p>I am trying to use an LSTM for multi-class classification of time series data.</p>

<p>The training set has dimensions (390, 179), i.e. 390 objects w... | habedi/stack-exchange-dataset |
58,054 | GPS generate street | <p>I am working on GPS tracking with a huge data from vehicle.</p>

<p>Dataset have: vehicleId, speed, orientation(0-360), <strong>coordinate</strong> (x,y) and <strong>timestamp</strong>.</p>

<p>Can you recommend me how to clean data and model to generate street(route) from data?</p>

<p><a hr... | machine learning deep learning bigdata data science model | 1 | GPS generate street -- (machine learning deep learning bigdata data science model)
<p>I am working on GPS tracking with a huge data from vehicle.</p>

<p>Dataset have: vehicleId, speed, orientation(0-360), <strong>coordinate</strong> (x,y) and <strong>timestamp</strong>.</p>

<p>Can you recommend me how... | habedi/stack-exchange-dataset |
58,067 | Face detection for different poses more robust than MTCNN? | <p>I am using the MTCNN model described on machinelearningmastery here: <a href="https://machinelearningmastery.com/how-to-perform-face-detection-with-classical-and-deep-learning-methods-in-python-with-keras/#comment-497918" rel="nofollow noreferrer">MTCNN ipazc</a></p>

<p>But it won't detect certain orientat... | machine learning model object detection object recognition parameter | 1 | Face detection for different poses more robust than MTCNN? -- (machine learning model object detection object recognition parameter)
<p>I am using the MTCNN model described on machinelearningmastery here: <a href="https://machinelearningmastery.com/how-to-perform-face-detection-with-classical-and-deep-learning-methods... | habedi/stack-exchange-dataset |
58,075 | Appraise the statement: “For the model = 0 + 1 + , 1 reflects the causal effect of on .” Ask | <p>not sure if this was the right place to ask my question, but I saw some questions regarding linear regression so I'd thought I would try to get some answers here. I just started learning about linear regression so this is the homework posed to me.</p>

<p>I assume that the statement is true since 1 is the co... | linear regression self study | 1 | Appraise the statement: “For the model = 0 + 1 + , 1 reflects the causal effect of on .” Ask -- (linear regression self study)
<p>not sure if this was the right place to ask my question, but I saw some questions regarding linear regression so I'd thought I would try to get some answers here. I just started learning a... | habedi/stack-exchange-dataset |
58,081 | What are the best practises to decide whether a variable is categorical? | <p>What are some of the systematic ways to categorise variables into categorical or numeric? I believe using only intuition in such scenarios can many-a-times lead to major irreversible errors. What are the best strategies when categorising variables?</p>

<p>For example, the dataframe I'm working has several c... | data cleaning categorical data structured data | 1 | What are the best practises to decide whether a variable is categorical? -- (data cleaning categorical data structured data)
<p>What are some of the systematic ways to categorise variables into categorical or numeric? I believe using only intuition in such scenarios can many-a-times lead to major irreversible errors. W... | habedi/stack-exchange-dataset |
58,082 | Is there Orange support for MySQL and SQLite? | <p>I would like to be able to directly access both MySQL and SQLite databases as part of an Orange workflow. I see there is support for PostgreSQL and (possibly) </p>
 | orange | 1 | Is there Orange support for MySQL and SQLite? -- (orange)
<p>I would like to be able to directly access both MySQL and SQLite databases as part of an Orange workflow. I see there is support for PostgreSQL and (possibly) </p>
 | habedi/stack-exchange-dataset |
58,092 | It seems that the output of sklearn.metrics.pairwise.euclidean_distances is different to the formula on doc | <p>The <a href="https://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.euclidean_distances.html" rel="nofollow noreferrer">doc</a> of <code>sklearn.metrics.pairwise.euclidean_distances()</code> gives this formula </p>

<blockquote>
 <p>dist(x, y) = sqrt(dot(x, x) - 2 * dot(x, y) + dot(y... | machine learning distance metric | 1 | It seems that the output of sklearn.metrics.pairwise.euclidean_distances is different to the formula on doc -- (machine learning distance metric)
<p>The <a href="https://scikit-learn.org/stable/modules/generated/sklearn.metrics.pairwise.euclidean_distances.html" rel="nofollow noreferrer">doc</a> of <code>sklearn.metric... | habedi/stack-exchange-dataset |
58,097 | how to handle values that only appear once in a column? | <p>Counting the values of a column using pandas I got the following result:</p>

<pre><code>Human 195
Mutant 62
God / Eternal 14
Cyborg 11
Human / Radiation 11
Android 9
Symbiote 8
Kryptonian... | data cleaning preprocessing categorical data | 1 | how to handle values that only appear once in a column? -- (data cleaning preprocessing categorical data)
<p>Counting the values of a column using pandas I got the following result:</p>

<pre><code>Human 195
Mutant 62
God / Eternal 14
Cyborg 1... | habedi/stack-exchange-dataset |
58,116 | Extracting tokens from a document: applying Deep Learning or Classification? | <p>I have a legal document from Law. That document is 4-pages of evidence from the plaintiff. I want to identify the Dates, Addresses and Financial transactions in that document.</p>

<p>Can I apply deep learning, the data with me is very small, on just one 4-page document, or should I apply Text Classification... | deep learning classification nlp | 1 | Extracting tokens from a document: applying Deep Learning or Classification? -- (deep learning classification nlp)
<p>I have a legal document from Law. That document is 4-pages of evidence from the plaintiff. I want to identify the Dates, Addresses and Financial transactions in that document.</p>

<p>Can I appl... | habedi/stack-exchange-dataset |
58,123 | np.shape[::-1] reversal of dims and np.moveaxis splitting array | <p>I cannot find anything in the documentation but it was used in some starter code for a class I am taking at school.
Upon testing per below, it seems to reverse the order of the dimensions of an numpy array.</p>

<pre><code>pic = np.ones((3,4,5))
print(pic.shape,"\n", pic)
#new_shape is the revers... | numpy | 1 | np.shape[::-1] reversal of dims and np.moveaxis splitting array -- (numpy)
<p>I cannot find anything in the documentation but it was used in some starter code for a class I am taking at school.
Upon testing per below, it seems to reverse the order of the dimensions of an numpy array.</p>

<pre><code>pic = n... | habedi/stack-exchange-dataset |
58,128 | Use correlation matrix scores as starting weights and bias inputs for neural network? | <p>I have a neural net that's generating an average 15% error across the three outputs it gives. My problem is two of the three really have about a 2% error while the third has around 40%.</p>

<p>I was wondering if anyone has used results from a correlation matrix on the raw data to set starting parameters for... | python neural network keras correlation | 1 | Use correlation matrix scores as starting weights and bias inputs for neural network? -- (python neural network keras correlation)
<p>I have a neural net that's generating an average 15% error across the three outputs it gives. My problem is two of the three really have about a 2% error while the third has around 40%.<... | habedi/stack-exchange-dataset |
58,129 | vgg16 needs less epochs than resnet ,why? | <p>Recently i Have been comparing the vgg16 with resnetv1 with 20 layers.I have found out that although each epoch on vgg takes more time to complete,it generally needs less epoch to reach a certain training accuracy than resnet20.Why vgg learns faster ? is my experiments correct ? I have tried it on Cifar100 and a pro... | deep learning keras tensorflow vgg16 | 1 | vgg16 needs less epochs than resnet ,why? -- (deep learning keras tensorflow vgg16)
<p>Recently i Have been comparing the vgg16 with resnetv1 with 20 layers.I have found out that although each epoch on vgg takes more time to complete,it generally needs less epoch to reach a certain training accuracy than resnet20.Why v... | habedi/stack-exchange-dataset |
58,130 | Overfitting Question | <p>Would you consider that overfitting?</p>

<p><a href="https://i.stack.imgur.com/G0V97.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/G0V97.jpg" alt="enter image description here"></a></p>
 | overfitting | 1 | Overfitting Question -- (overfitting)
<p>Would you consider that overfitting?</p>

<p><a href="https://i.stack.imgur.com/G0V97.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/G0V97.jpg" alt="enter image description here"></a></p>
 | habedi/stack-exchange-dataset |
58,136 | How do I use NLTK Text object with Re library? | <p>I am working on to build a <strong>bag of words</strong> model from my text file. I I want to use the <code>re.sub</code> function from the re library. I am getting the following error;</p>

<blockquote>
 <p>TypeError: expected string or bytes-like object</p>
</blockquote>

<p>I have coded t... | nlp nltk | 1 | How do I use NLTK Text object with Re library? -- (nlp nltk)
<p>I am working on to build a <strong>bag of words</strong> model from my text file. I I want to use the <code>re.sub</code> function from the re library. I am getting the following error;</p>

<blockquote>
 <p>TypeError: expected string or bytes... | habedi/stack-exchange-dataset |
58,160 | How to find feature importance with multiple XGBoost models | <p><strong>My problem statement</strong> : Time Series forecasting(Month wise data), training on 96 months of data and predicting next 12 months with a 3 months empty window in between.</p>

<p><strong>Example</strong> : </p>

<p>Batch 1</p>

<pre><code>***Training Data index*** <2010-01-01 ... | time series xgboost forecasting | 1 | How to find feature importance with multiple XGBoost models -- (time series xgboost forecasting)
<p><strong>My problem statement</strong> : Time Series forecasting(Month wise data), training on 96 months of data and predicting next 12 months with a 3 months empty window in between.</p>

<p><strong>Example</str... | habedi/stack-exchange-dataset |
58,162 | When do I use Multiply and Add | <p>I want to know the effect of <code>Add</code> and <code>Multiply</code> in keras by functionality. The dumb way of thinking is that they are meant to add and multiply keras tensors. I want to know when are they to be used. For example, look at the code below from <a href="https://github.com/titu1994/keras-squeeze-ex... | neural network keras convolutional neural network | 1 | When do I use Multiply and Add -- (neural network keras convolutional neural network)
<p>I want to know the effect of <code>Add</code> and <code>Multiply</code> in keras by functionality. The dumb way of thinking is that they are meant to add and multiply keras tensors. I want to know when are they to be used. For exam... | habedi/stack-exchange-dataset |
58,171 | How does an encoder-decoder network work? | <p>Let's say I trained an encoder-decoder network on a <strong>cat</strong> dataset using <strong>reconstruction error</strong> as loss function. The network is fully trained and the decoder is able to reconstruct <strong><em>good cat images</em></strong>.</p>

<p>Now what if I use the same network and input a ... | neural network deep learning autoencoder | 1 | How does an encoder-decoder network work? -- (neural network deep learning autoencoder)
<p>Let's say I trained an encoder-decoder network on a <strong>cat</strong> dataset using <strong>reconstruction error</strong> as loss function. The network is fully trained and the decoder is able to reconstruct <strong><em>good c... | habedi/stack-exchange-dataset |
58,173 | Intuition behind the number of output neurons for a neural network | <p>I am reading Michael Nielsen's <a href="http://neuralnetworksanddeeplearning.com/chap1.html" rel="noreferrer">book</a> on deep learning. In the first chapter, he gives the classic example of classifying 10 handwritten digits, and uses it to explain the intuition behind choosing the number of output neurons. </p>
... | deep learning | 1 | Intuition behind the number of output neurons for a neural network -- (deep learning)
<p>I am reading Michael Nielsen's <a href="http://neuralnetworksanddeeplearning.com/chap1.html" rel="noreferrer">book</a> on deep learning. In the first chapter, he gives the classic example of classifying 10 handwritten digits, and u... | habedi/stack-exchange-dataset |
58,184 | On design of the training set: conceptual question | <p>I am curious to know how training data should be constructed so that it scales to examples that are not a part of the training data. For example, the problem that I am facing right now is in the application of identifying or distinguishing the frequency response of time series that are generated from different distr... | machine learning training generalization | 1 | On design of the training set: conceptual question -- (machine learning training generalization)
<p>I am curious to know how training data should be constructed so that it scales to examples that are not a part of the training data. For example, the problem that I am facing right now is in the application of identifyin... | habedi/stack-exchange-dataset |
58,225 | XGBoost: # rounds is equal to n_estimators? | <p>I'm running a regression XGBoost model and trying to prevent over-fitting by watching the train and test error using this code:</p>

<pre><code>eval_set = [(X_train, y_train), (X_test, y_test)]

xg_reg = xgb.XGBRegressor(booster='gbtree',
 objective ='reg:squarederror',&#... | scikit learn regression xgboost | 1 | XGBoost: # rounds is equal to n_estimators? -- (scikit learn regression xgboost)
<p>I'm running a regression XGBoost model and trying to prevent over-fitting by watching the train and test error using this code:</p>

<pre><code>eval_set = [(X_train, y_train), (X_test, y_test)]

xg_reg = xgb.XGBRegressor... | habedi/stack-exchange-dataset |
58,227 | forecasting - likelihood of customers participating in next month sales | <p>I have historical transaction information of customers for the last 2 years and other information about the customers like what type of card (gold/platinum) they used for transactions etc. is also there in the dataset. Using this dataset, I will have to forecast the likelihood of each customers transacting next mont... | python forecasting | 1 | forecasting - likelihood of customers participating in next month sales -- (python forecasting)
<p>I have historical transaction information of customers for the last 2 years and other information about the customers like what type of card (gold/platinum) they used for transactions etc. is also there in the dataset. Us... | habedi/stack-exchange-dataset |
58,232 | Conditional Statement to update columns based on range | <p>I have a dataframe called <code>clients</code> that has 5000+ rows with the following:</p>

<pre><code>ID Ordered Days
1 101565 131
2 202546 122
3 459863 78
4 328453 327
5 458975 -27
</code></pre>

<p>I'm trying to create a loop that look... | python pandas data | 1 | Conditional Statement to update columns based on range -- (python pandas data)
<p>I have a dataframe called <code>clients</code> that has 5000+ rows with the following:</p>

<pre><code>ID Ordered Days
1 101565 131
2 202546 122
3 459863 78
4 328453 327
5 45... | habedi/stack-exchange-dataset |
58,236 | How to shuffle only a fraction of a column in a Pandas dataframe? | <p>I would like to shuffle a fraction (for example 40%) of the values of a specific column in a Pandas dataframe.</p>

<p>How would you do it? Is there a simple idiomatic way to do that, maybe using <code>np.random</code>, or <code>sklearn.utils.shuffle</code>?</p>

<p>I have searched and only found ans... | python pandas dataframe | 1 | How to shuffle only a fraction of a column in a Pandas dataframe? -- (python pandas dataframe)
<p>I would like to shuffle a fraction (for example 40%) of the values of a specific column in a Pandas dataframe.</p>

<p>How would you do it? Is there a simple idiomatic way to do that, maybe using <code>np.random</c... | habedi/stack-exchange-dataset |
58,247 | Getting a transition matrix from a Adjacency matrix in python | <p>I have a 3*3 Adjacency matrix and I'm trying to sum the elements of each column and divide each column element by that sum to get the transition matrix. Can you please help me code this part? Thanks in advance. </p>
 | numpy | 1 | Getting a transition matrix from a Adjacency matrix in python -- (numpy)
<p>I have a 3*3 Adjacency matrix and I'm trying to sum the elements of each column and divide each column element by that sum to get the transition matrix. Can you please help me code this part? Thanks in advance. </p>
 | habedi/stack-exchange-dataset |
58,269 | How does one decide when to use boosting over bagging algorithm? | <p>What kind of problem, circumstances and data makes it more suitable to apply boosting instead of bagging methods?</p>
 | machine learning boosting | 1 | How does one decide when to use boosting over bagging algorithm? -- (machine learning boosting)
<p>What kind of problem, circumstances and data makes it more suitable to apply boosting instead of bagging methods?</p>
 | habedi/stack-exchange-dataset |
58,270 | Why is there a trade-off between bias and variance in supervised learning? Why can't we have best of both worlds? | <p>The bias-variance trade-off is like a law in machine learning. You cannot have the best of both worlds. What is it about supervised learning in machine learning that makes it impossible to satisfy the two at the same time?</p>
 | machine learning supervised learning variance bias | 1 | Why is there a trade-off between bias and variance in supervised learning? Why can't we have best of both worlds? -- (machine learning supervised learning variance bias)
<p>The bias-variance trade-off is like a law in machine learning. You cannot have the best of both worlds. What is it about supervised learning in mac... | habedi/stack-exchange-dataset |
58,295 | What does high variance mean in a binary classification machine learning model? | <p>My understanding of high variance is that the targets are spread widely around. The output values are "all over the place". </p>

<p>In a binary classification model, there can only be 2 outcomes. I am at a loss when visualizing what high variance mean in a binary classification model. </p>
 | machine learning classification variance | 1 | What does high variance mean in a binary classification machine learning model? -- (machine learning classification variance)
<p>My understanding of high variance is that the targets are spread widely around. The output values are "all over the place". </p>

<p>In a binary classification model, there can only b... | habedi/stack-exchange-dataset |
58,298 | Is loss the same thing as variance? | <p>In Keras, the first object returned in the score list is <code>loss</code>.</p>

<pre class="lang-py prettyprint-override"><code>score = model.evaluate(X_test, y_test,verbose=1)
print(score)

[1] [0.025217213829228164, 0.99487179487179489]
</code></pre>

<p>Is this the same thing as <... | machine learning keras | 1 | Is loss the same thing as variance? -- (machine learning keras)
<p>In Keras, the first object returned in the score list is <code>loss</code>.</p>

<pre class="lang-py prettyprint-override"><code>score = model.evaluate(X_test, y_test,verbose=1)
print(score)

[1] [0.025217213829228164, 0.994871794871... | habedi/stack-exchange-dataset |
58,302 | Multinomial Naive bayes giving wrong result | <pre><code>from sklearn.naive_bayes import GaussianNB,MultinomialNB
xx = [[1],[1],[1],[2],[2],[3]]
yy = [1,1,1,0,0,0]
clf = GaussianNB()
# clf = MultinomialNB()
clf.fit(xx,yy)
clf.predict(xx)
</code></pre>

<p>The expected result is [1,1,1,0,0,0]
but code output is [0,0,0,0,0,0].... | machine learning python scikit learn naive bayes classifier | 1 | Multinomial Naive bayes giving wrong result -- (machine learning python scikit learn naive bayes classifier)
<pre><code>from sklearn.naive_bayes import GaussianNB,MultinomialNB
xx = [[1],[1],[1],[2],[2],[3]]
yy = [1,1,1,0,0,0]
clf = GaussianNB()
# clf = MultinomialNB()
clf.fit(xx,yy)
clf.predict... | habedi/stack-exchange-dataset |
58,304 | Error using decision tree regressor | <p>I'm new to data science , while i'm implementing decision tree. I'm facing the following error. Where i went wrong;</p>

<p>Sample data in csv is:
<a href="https://i.stack.imgur.com/LZUzo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LZUzo.png" alt="enter image description here"></a>... | decision trees machine learning model data science model | 1 | Error using decision tree regressor -- (decision trees machine learning model data science model)
<p>I'm new to data science , while i'm implementing decision tree. I'm facing the following error. Where i went wrong;</p>

<p>Sample data in csv is:
<a href="https://i.stack.imgur.com/LZUzo.png" rel="nofollow ... | habedi/stack-exchange-dataset |
58,318 | What is "data scaling" regarding StandardScaler()? | <p>I'm trying to figure out the purpose of <code>StandardScaler()</code> in sklearn. </p>

<p>The tutorial I am following says </p>

<blockquote>
 <p>"Remember that you also need to perform the scaling again because you had a lot of differences in some of the values for your red and white [wines]"<... | machine learning scikit learn | 1 | What is "data scaling" regarding StandardScaler()? -- (machine learning scikit learn)
<p>I'm trying to figure out the purpose of <code>StandardScaler()</code> in sklearn. </p>

<p>The tutorial I am following says </p>

<blockquote>
 <p>"Remember that you also need to perform the scaling again becau... | habedi/stack-exchange-dataset |
58,321 | Bagging with Neural Networks Best practices | <p>I am trying to build a majority vote system for 3 Neural Networks, and I came across the concept of <strong>Bagging</strong> method. Actually, I want to use neural networks as weak learners (I know it's <a href="https://stats.stackexchange.com/questions/282413/boosting-using-other-weak-learners-than-trees">debatable... | neural network boosting ensemble learning | 1 | Bagging with Neural Networks Best practices -- (neural network boosting ensemble learning)
<p>I am trying to build a majority vote system for 3 Neural Networks, and I came across the concept of <strong>Bagging</strong> method. Actually, I want to use neural networks as weak learners (I know it's <a href="https://stats.... | habedi/stack-exchange-dataset |
58,327 | normal conda install vs forge install | <p>In order to install some libraries, we just use:</p>

<pre><code>conda install pandas
</code></pre>

<p>While in other cases we use:</p>

<pre><code>conda install -c conda-forge html5lib
</code></pre>

<p>What is the difference between them?</p>
 | machine learning python pandas numpy anaconda | 1 | normal conda install vs forge install -- (machine learning python pandas numpy anaconda)
<p>In order to install some libraries, we just use:</p>

<pre><code>conda install pandas
</code></pre>

<p>While in other cases we use:</p>

<pre><code>conda install -c conda-forge html5lib
</code></... | habedi/stack-exchange-dataset |
58,351 | How to retrieve images from a url in a pandas dataframe and store them as PIL object in a new column | <p>I'm trying to store as a PIL object in a new column of a dataframe pictures that are located in a column of the same dataframe in the form of URL's.</p>

<p>I've tried the following code:</p>

<pre><code>import pandas as pd
from PIL import Image
import requests
from io import BytesIO
... | python pandas image preprocessing | 1 | How to retrieve images from a url in a pandas dataframe and store them as PIL object in a new column -- (python pandas image preprocessing)
<p>I'm trying to store as a PIL object in a new column of a dataframe pictures that are located in a column of the same dataframe in the form of URL's.</p>

<p>I've tried t... | habedi/stack-exchange-dataset |
58,353 | How Linear SVM Regression and Multiple Linear Regression different in terms of the regression result? | <p>They starts from the same equation as below.</p>

<p>y = w*x + b</p>

<p>But they solve it differently. MLR specified the w and b by minimizing the square error whereas SVM specified w and b by minimizing the loss function defined by C and epsilon.</p>

<p>I am wondering if the result of regr... | linear regression svm | 1 | How Linear SVM Regression and Multiple Linear Regression different in terms of the regression result? -- (linear regression svm)
<p>They starts from the same equation as below.</p>

<p>y = w*x + b</p>

<p>But they solve it differently. MLR specified the w and b by minimizing the square error whereas SVM... | habedi/stack-exchange-dataset |
58,361 | Calculating Univariate and MultiVariate Logistic Regression with Python | <p>I have a simple data set of a number of variables and a single binary dependent variable. The data is stored in a data frame. When I use python's statsmodels.api and logit.fit() on the dataframe I am presented with a table detailing p values and confidence intervals etc for each of the variables. I need to calcul... | python logistic regression | 1 | Calculating Univariate and MultiVariate Logistic Regression with Python -- (python logistic regression)
<p>I have a simple data set of a number of variables and a single binary dependent variable. The data is stored in a data frame. When I use python's statsmodels.api and logit.fit() on the dataframe I am presented w... | habedi/stack-exchange-dataset |
58,363 | Time-series prediction: Model & data assumptions in AI/ML models vs conventional models | <p>I was wondering if there was a good paper out there that informs about model and data assumptions in AI/ML approaches.</p>

<p>For example, if you look at Time Series Modelling (Estimation or Prediction) with Linear models or (G)ARCH/ARMA processes, there are a lot of data assumptions that have to be satisfi... | machine learning neural network time series linear regression | 1 | Time-series prediction: Model & data assumptions in AI/ML models vs conventional models -- (machine learning neural network time series linear regression)
<p>I was wondering if there was a good paper out there that informs about model and data assumptions in AI/ML approaches.</p>

<p>For example, if you look at... | habedi/stack-exchange-dataset |
58,372 | Extract imperative sentences from a document(English) using NLP in python | <p>I am very new to NLP, hence require some help on extracting imperative sentences from a document. I am working on a project where I need to get all the imperative sentences from the entire document(English documents). I understand I need to use POS tagging. But how do I proceed further.</p>

<p>Thanks. </p>... | python nlp | 1 | Extract imperative sentences from a document(English) using NLP in python -- (python nlp)
<p>I am very new to NLP, hence require some help on extracting imperative sentences from a document. I am working on a project where I need to get all the imperative sentences from the entire document(English documents). I underst... | habedi/stack-exchange-dataset |
58,377 | Using a LinearSVC() for multilabel classification with MultiOutputClassifier() in a pipeline in sci-kit learn | <p>My input data is a (23948,) pandas.Series of strings containing newspaper headlines. My target are 20 labels of the headline (e.g. 'crime', 'politics') each binarily encoded with [0, 1]. The labels are not exclusive, a headline could be about crime and politics at the same time. I would like to compare three algorit... | scikit learn random forest multilabel classification pipelines | 1 | Using a LinearSVC() for multilabel classification with MultiOutputClassifier() in a pipeline in sci-kit learn -- (scikit learn random forest multilabel classification pipelines)
<p>My input data is a (23948,) pandas.Series of strings containing newspaper headlines. My target are 20 labels of the headline (e.g. 'crime',... | habedi/stack-exchange-dataset |
58,378 | What variance threshold to consider in feature selection? | <p>Consider a numerical dataset with continuous variables, that has been scaled to end up with values in the [0,1] range. How can I compute a reasonable variance threshold for all the variables?</p>
 | feature selection variance | 1 | What variance threshold to consider in feature selection? -- (feature selection variance)
<p>Consider a numerical dataset with continuous variables, that has been scaled to end up with values in the [0,1] range. How can I compute a reasonable variance threshold for all the variables?</p>
 | habedi/stack-exchange-dataset |
58,380 | How to convert sequence of words in to numbers which are input to RNN/LSTM? | <p>I am watching online videos and tutorials about use of RNN/LSTM for NLP but none of them explain how to convert the sequences of words into digitized input to the neural networks? </p>

<p>I am looking for intuitive understanding but answers with python code are also welcome.</p>

<p>For example, how... | nlp lstm rnn | 1 | How to convert sequence of words in to numbers which are input to RNN/LSTM? -- (nlp lstm rnn)
<p>I am watching online videos and tutorials about use of RNN/LSTM for NLP but none of them explain how to convert the sequences of words into digitized input to the neural networks? </p>

<p>I am looking for intuitive... | habedi/stack-exchange-dataset |
58,385 | Layer shape computation in convolutional neural net (pyTorch) | <p>How can you know the expected <strong><em>input size</em></strong> (image input size (tensor size)), for example for this network (cf. <a href="https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html" rel="nofollow noreferrer">pyTorch tutorial example</a> ):</p>

<pre><code>import torch&#x... | cnn pytorch | 1 | Layer shape computation in convolutional neural net (pyTorch) -- (cnn pytorch)
<p>How can you know the expected <strong><em>input size</em></strong> (image input size (tensor size)), for example for this network (cf. <a href="https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html" rel="nofollow nore... | habedi/stack-exchange-dataset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.