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
55,769
better confussion matrix higher LogLoss ? Is that possible>
<p>I have tried a 2 different versions of a gbm in a multinomial classification problem. The second model results in better confusion matrix but in worse Log Loss value (at the test sample). How is that possible. </p>&#xA;&#xA;<p>Further are the results of the two models. </p>&#xA;&#xA;<p><a href="https://i.stack.imgu...
machine learning multiclass classification loss function
1
better confussion matrix higher LogLoss ? Is that possible> -- (machine learning multiclass classification loss function) <p>I have tried a 2 different versions of a gbm in a multinomial classification problem. The second model results in better confusion matrix but in worse Log Loss value (at the test sample). How is...
habedi/stack-exchange-dataset
55,771
How to get mean of column using groupby() and another condition
<p>For the following</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>df = pd.DataFrame()&#xA;df['1'] = 1,2,1,2,1,2&#xA;df['2'] = 3,6,5,4,7,8&#xA;df['3'] = 1,1,1,2,2,2&#xA;</code></pre>&#xA;&#xA;<p>I want to do </p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>mean(df.groupby().loc[df['1']==df['...
pandas data cleaning
1
How to get mean of column using groupby() and another condition -- (pandas data cleaning) <p>For the following</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>df = pd.DataFrame()&#xA;df['1'] = 1,2,1,2,1,2&#xA;df['2'] = 3,6,5,4,7,8&#xA;df['3'] = 1,1,1,2,2,2&#xA;</code></pre>&#xA;&#xA;<p>I want to do </p>&#x...
habedi/stack-exchange-dataset
55,785
Q table creation and update for dynamic action space
<p>I am trying to implement a Q-learning algorithm for energy optimization. It is a finite MDP with states represented as 6 dimensional vectors of integers. The number of discrete values in each index of the state vector varies from 24 to 90.</p>&#xA;&#xA;<p>The action space varies from state to state and goes up to 30...
q learning
1
Q table creation and update for dynamic action space -- (q learning) <p>I am trying to implement a Q-learning algorithm for energy optimization. It is a finite MDP with states represented as 6 dimensional vectors of integers. The number of discrete values in each index of the state vector varies from 24 to 90.</p>&#xA;...
habedi/stack-exchange-dataset
55,795
How to normalize complex-valued data?
<p>I'm taking the abs of all elements, compute the mean, subtract it off from the original values. I just feel that this is not correct and can change the vectors.&#xA;I'm also dividing by the standard deviation, but I'm quite confident about this, knowing that this is pure rescaling of complex values.</p>&#xA;&#xA;<p>...
machine learning deep learning scikit learn
1
How to normalize complex-valued data? -- (machine learning deep learning scikit learn) <p>I'm taking the abs of all elements, compute the mean, subtract it off from the original values. I just feel that this is not correct and can change the vectors.&#xA;I'm also dividing by the standard deviation, but I'm quite confid...
habedi/stack-exchange-dataset
55,808
Find columns with numeric values, but stored as string
<p>I need to find the columns in data frame, which has numeric values and are stored as string.</p>&#xA;&#xA;<pre><code>data_set = pd.DataFrame({"Number":["1","2","3","4","5"], "Char":["A","B","C","D","E"]})&#xA;data_set.dtypes&#xA;</code></pre>&#xA;&#xA;<p>In above code, column "Number" has numeric values, but stored ...
python pandas dataframe
1
Find columns with numeric values, but stored as string -- (python pandas dataframe) <p>I need to find the columns in data frame, which has numeric values and are stored as string.</p>&#xA;&#xA;<pre><code>data_set = pd.DataFrame({"Number":["1","2","3","4","5"], "Char":["A","B","C","D","E"]})&#xA;data_set.dtypes&#xA;</co...
habedi/stack-exchange-dataset
55,811
Getting stock data in a discipline manner from Yahoo finance
<p>I used the below code for downloading stock data from yahoo finance:-</p>&#xA;&#xA;<pre><code>import yfinance as yf&#xA;import datetime&#xA;&#xA; stocks = ["AXISBANK.NS", "HDFCBANK.NS", "ICICIBANK.NS" ,"INDUSINDBK.NS",&#xA; "KOTAKBANK.NS",&#xA; "SBIN.NS",&#xA; "YESBANK.NS"]&#xA; start = datetime.datet...
python pandas csv data formats
1
Getting stock data in a discipline manner from Yahoo finance -- (python pandas csv data formats) <p>I used the below code for downloading stock data from yahoo finance:-</p>&#xA;&#xA;<pre><code>import yfinance as yf&#xA;import datetime&#xA;&#xA; stocks = ["AXISBANK.NS", "HDFCBANK.NS", "ICICIBANK.NS" ,"INDUSINDBK.NS"...
habedi/stack-exchange-dataset
55,829
What kind of model is this?
<p>Can anyone help me identify what kind of Architecture is behind this Application? Is it a "simple" Classification Network? If so how are the heatmaps generated?</p>&#xA;&#xA;<p><a href="https://www.youtube.com/watch?v=c_giaOUzB_8" rel="nofollow noreferrer">https://www.youtube.com/watch?v=c_giaOUzB_8</a></p>&#xA;&#xA...
machine learning deep learning anomaly detection
1
What kind of model is this? -- (machine learning deep learning anomaly detection) <p>Can anyone help me identify what kind of Architecture is behind this Application? Is it a "simple" Classification Network? If so how are the heatmaps generated?</p>&#xA;&#xA;<p><a href="https://www.youtube.com/watch?v=c_giaOUzB_8" rel=...
habedi/stack-exchange-dataset
55,838
Are mainstream pre-trained models useful as discriminators?
<p>In the context of GANs I see many papers designing new discriminator networks. </p>&#xA;&#xA;<p>I'm curious about the usefulness of designing discriminators as modified versions of mainstream models like Inception, MobileNet, EfficientNet etc. My intuition is that the mentioned image classification models are way mo...
deep learning gan transfer learning generative models
1
Are mainstream pre-trained models useful as discriminators? -- (deep learning gan transfer learning generative models) <p>In the context of GANs I see many papers designing new discriminator networks. </p>&#xA;&#xA;<p>I'm curious about the usefulness of designing discriminators as modified versions of mainstream models...
habedi/stack-exchange-dataset
55,856
Does the mean/median of a set sentence embedded vectors represent anything?
<p>Please bear with me as I am new to NLP.&#xA;I am specifically using tensorflow's universal sentence encoder: <a href="https://tfhub.dev/google/universal-sentence-encoder-large/3" rel="nofollow noreferrer">https://tfhub.dev/google/universal-sentence-encoder-large/3</a></p>&#xA;&#xA;<p>I am clustering text based on th...
python nlp clustering word embeddings
1
Does the mean/median of a set sentence embedded vectors represent anything? -- (python nlp clustering word embeddings) <p>Please bear with me as I am new to NLP.&#xA;I am specifically using tensorflow's universal sentence encoder: <a href="https://tfhub.dev/google/universal-sentence-encoder-large/3" rel="nofollow noref...
habedi/stack-exchange-dataset
55,859
What should be the value of batch_size in fit() method when using sgd (Stochastic Gradient Descent) as the optimizer?
<p>I am confused about the batch size of this model. I have used sgd i.e., Stochastic Gradient Descent as the optimizer (see the code). I am aware that in sgd, a single random instance from the training set is used to compute the gradient at each step. So, according to it, the batch_size should be equal to 1. Now, in t...
deep learning keras tensorflow
1
What should be the value of batch_size in fit() method when using sgd (Stochastic Gradient Descent) as the optimizer? -- (deep learning keras tensorflow) <p>I am confused about the batch size of this model. I have used sgd i.e., Stochastic Gradient Descent as the optimizer (see the code). I am aware that in sgd, a sing...
habedi/stack-exchange-dataset
55,862
How should a decision tree handle an attribute that can be anything?
<p>Say I have AttributeA that can take values A1, A2, A3, AttributeB that can take values B1, B2, B3, etc. and I know ahead of time that my classification table looks like</p>&#xA;&#xA;<p>AttributeA | AttributeB | AttributeC | Classification</p>&#xA;&#xA;<p>A1 | B1 | anything | Class 1</p>&#xA;&#xA;<p>anything | B2 | a...
decision trees
1
How should a decision tree handle an attribute that can be anything? -- (decision trees) <p>Say I have AttributeA that can take values A1, A2, A3, AttributeB that can take values B1, B2, B3, etc. and I know ahead of time that my classification table looks like</p>&#xA;&#xA;<p>AttributeA | AttributeB | AttributeC | Clas...
habedi/stack-exchange-dataset
55,877
What is the difference between the value -99 and NaN in a data column?
<p>I am new to data science. I was looking into some datasets and I saw some values like -99, which I discovered later that it means that there is a missing value. Does this mean the same thing as NaN? If it is the same thing, why do we use -99 instead of NaN?</p>&#xA;
beginner missing data definitions
1
What is the difference between the value -99 and NaN in a data column? -- (beginner missing data definitions) <p>I am new to data science. I was looking into some datasets and I saw some values like -99, which I discovered later that it means that there is a missing value. Does this mean the same thing as NaN? If it is...
habedi/stack-exchange-dataset
55,879
File format where column names are repeated on each row
<p>I have received a dataset in text file with the following format</p>&#xA;&#xA;<pre><code>col1=datac1r1,col2=datac2r1,col3=datac3r1&#xA;col1=datac1r2,col2=datac2r2,col3=datac3r2&#xA;col1=datac1r3,col2=datac2r3,col3=datac3r3&#xA;col1=datac1r4,col2=datac2r4,col3=datac3r4&#xA;</code></pre>&#xA;&#xA;<p>Each row is a uniq...
data cleaning csv
1
File format where column names are repeated on each row -- (data cleaning csv) <p>I have received a dataset in text file with the following format</p>&#xA;&#xA;<pre><code>col1=datac1r1,col2=datac2r1,col3=datac3r1&#xA;col1=datac1r2,col2=datac2r2,col3=datac3r2&#xA;col1=datac1r3,col2=datac2r3,col3=datac3r3&#xA;col1=datac1...
habedi/stack-exchange-dataset
55,888
Which language to learn for Machine Learning?
<p>I am currently working in BigData with Spark-Scala framework. I want to learn Machine learning from scratch.&#xA;Which language would be better to learn for machine learning, Scala or Python?</p>&#xA;
machine learning python scala
1
Which language to learn for Machine Learning? -- (machine learning python scala) <p>I am currently working in BigData with Spark-Scala framework. I want to learn Machine learning from scratch.&#xA;Which language would be better to learn for machine learning, Scala or Python?</p>&#xA;
habedi/stack-exchange-dataset
55,901
In a Transformer model, why does one sum positional encoding to the embedding rather than concatenate it?
<p>While reviewing the Transformer architecture, I realized something I didn't expect, which is that :</p>&#xA;&#xA;<ul>&#xA;<li>the positional encoding is summed to the word embeddings </li>&#xA;<li>rather than concatenated to it.</li>&#xA;</ul>&#xA;&#xA;<blockquote>&#xA; <p><a href="https://i.stack.imgur.com/bFPI9.p...
nlp encoding transformer attention mechanism
1
In a Transformer model, why does one sum positional encoding to the embedding rather than concatenate it? -- (nlp encoding transformer attention mechanism) <p>While reviewing the Transformer architecture, I realized something I didn't expect, which is that :</p>&#xA;&#xA;<ul>&#xA;<li>the positional encoding is summed t...
habedi/stack-exchange-dataset
55,902
Python XGBoost predict_proba returns very high or low probabilities
<p>I trained my data with XGBoost in python with GridSearchCV as follows:</p>&#xA;&#xA;<pre><code>parameters = {'nthread':[6], &#xA; 'objective':['binary:logistic'],&#xA; 'learning_rate': [0.01, 0.1],&#xA; 'max_depth': [5,8,13],&#xA; 'n_estimators': [200,500,1000,3000...
machine learning python classification xgboost
1
Python XGBoost predict_proba returns very high or low probabilities -- (machine learning python classification xgboost) <p>I trained my data with XGBoost in python with GridSearchCV as follows:</p>&#xA;&#xA;<pre><code>parameters = {'nthread':[6], &#xA; 'objective':['binary:logistic'],&#xA; 'le...
habedi/stack-exchange-dataset
55,920
Gaussian Mixture Model performance with data outliers
<blockquote>&#xA; <p>Given Gaussian Mixture Model for clustering of data with outliers. </p>&#xA;</blockquote>&#xA;&#xA;<p>Will the performance of it degrade with outliers or it will work as expected?</p>&#xA;
machine learning clustering
1
Gaussian Mixture Model performance with data outliers -- (machine learning clustering) <blockquote>&#xA; <p>Given Gaussian Mixture Model for clustering of data with outliers. </p>&#xA;</blockquote>&#xA;&#xA;<p>Will the performance of it degrade with outliers or it will work as expected?</p>&#xA;
habedi/stack-exchange-dataset
55,935
Repeated training and testing in Weka?
<p>I am using one file for training (e.g train.arff) and another for testing (e.g test.atff) with the 70-30 ratio in Weka. I want to ask how can I use the repeated training/testing in Weka when I have separate train and test data files and the second part of the question is what is the advantage if we use repeated and ...
classification data science model weka
1
Repeated training and testing in Weka? -- (classification data science model weka) <p>I am using one file for training (e.g train.arff) and another for testing (e.g test.atff) with the 70-30 ratio in Weka. I want to ask how can I use the repeated training/testing in Weka when I have separate train and test data files a...
habedi/stack-exchange-dataset
55,949
speed up the fit of model
<p>What are the ways to speed up the fit of the model on large files (more than 200 mb)? I tried to divide into pieces (chunks) or use dask but the effect is unsatisfactory. I use 16GB RAM and i7 2.2GHz processor 4 core. It remains to buy a cloud service or use a better computer?&#xA;My clasiffier</p>&#xA;&#xA;<pre><co...
machine learning
1
speed up the fit of model -- (machine learning) <p>What are the ways to speed up the fit of the model on large files (more than 200 mb)? I tried to divide into pieces (chunks) or use dask but the effect is unsatisfactory. I use 16GB RAM and i7 2.2GHz processor 4 core. It remains to buy a cloud service or use a better c...
habedi/stack-exchange-dataset
55,950
VlookUp: how to loop it?
<p>I am not an experienced user of Excel because I usually use python but I am obliged to use it this time.</p>&#xA;&#xA;<p>This is the big picture of my case.</p>&#xA;&#xA;<p>The problem is: </p>&#xA;&#xA;<p>I have a sheet with a column with some words, another column with the translation of these words in a non stand...
dataset data excel
1
VlookUp: how to loop it? -- (dataset data excel) <p>I am not an experienced user of Excel because I usually use python but I am obliged to use it this time.</p>&#xA;&#xA;<p>This is the big picture of my case.</p>&#xA;&#xA;<p>The problem is: </p>&#xA;&#xA;<p>I have a sheet with a column with some words, another column w...
habedi/stack-exchange-dataset
55,961
How can I arrange data in different columns (for different constituents) from one?
<p>I have a data file that has all the values for various constituents at different dates in same column. I want different constituents in different columns. Following is the example data format. I want Aluminium, Berrylium and other variables in that column to be in different columns. The data file is attached.</p>&#x...
python dataset pandas dataframe
1
How can I arrange data in different columns (for different constituents) from one? -- (python dataset pandas dataframe) <p>I have a data file that has all the values for various constituents at different dates in same column. I want different constituents in different columns. Following is the example data format. I wa...
habedi/stack-exchange-dataset
55,962
Pytorch doing a cross entropy loss when the predictions already have probabilities
<p>So, normally categorical cross-entropy could be applied using a cross-entropy loss function in PyTorch or by combing a logsoftmax with the negative log likelyhood function such as follows:</p>&#xA;&#xA;<pre><code>m = nn.LogSoftmax(dim=1)&#xA;loss = nn.NLLLoss()&#xA;pred = torch.tensor([[-1,0,3,0,9,0,-7,0,5]], req...
neural network loss function probability pytorch softmax
1
Pytorch doing a cross entropy loss when the predictions already have probabilities -- (neural network loss function probability pytorch softmax) <p>So, normally categorical cross-entropy could be applied using a cross-entropy loss function in PyTorch or by combing a logsoftmax with the negative log likelyhood function ...
habedi/stack-exchange-dataset
55,969
Feature selection method explanation
<p>In the context of feature relevance, I am trying to understand the meaning of the correlation method for feature selection. Can somebody please explain if the following results of the correlation coefficients arise, then should I take that feature? The rule is to select the features for which corrcoeff values are gr...
feature selection feature engineering correlation matlab
1
Feature selection method explanation -- (feature selection feature engineering correlation matlab) <p>In the context of feature relevance, I am trying to understand the meaning of the correlation method for feature selection. Can somebody please explain if the following results of the correlation coefficients arise, th...
habedi/stack-exchange-dataset
55,972
What does this symbol means, what operator is it?
<p><img src="https://i.stack.imgur.com/JUqn6.jpg" alt="loss fuction of Generative Adversarial Networks"></p>&#xA;&#xA;<p>I am confused about the <span class="math-container">$E_{x\sim P_{data}(x)}$</span>, what does <span class="math-container">$E$</span> means here. I cannot find an appropriate answer on the internet,...
neural network gan generative models
1
What does this symbol means, what operator is it? -- (neural network gan generative models) <p><img src="https://i.stack.imgur.com/JUqn6.jpg" alt="loss fuction of Generative Adversarial Networks"></p>&#xA;&#xA;<p>I am confused about the <span class="math-container">$E_{x\sim P_{data}(x)}$</span>, what does <span class=...
habedi/stack-exchange-dataset
55,988
Getting a ValueError from train_test_split
<p>I'm working on <a href="https://github.com/oo92/Boston-Kaggle/blob/master/train.csv" rel="nofollow noreferrer">this</a> dataset. I'm trying to select features using Random Forest. This is the relevant code:</p>&#xA;&#xA;<pre><code>x_train, y_train, x_test, y_test = train_test_split(train, test_size = 0.3)&#xA;&#xA...
machine learning python scikit learn feature selection random forest
1
Getting a ValueError from train_test_split -- (machine learning python scikit learn feature selection random forest) <p>I'm working on <a href="https://github.com/oo92/Boston-Kaggle/blob/master/train.csv" rel="nofollow noreferrer">this</a> dataset. I'm trying to select features using Random Forest. This is the releva...
habedi/stack-exchange-dataset
55,991
In the context of Deep Learning, what is training warmup steps
<p>I found this term "training warmup steps" in some of the papers, what exactly does this term mean? Has it got anything to do with "learning rate"? If so, how does it affect? </p>&#xA;
machine learning deep learning training
1
In the context of Deep Learning, what is training warmup steps -- (machine learning deep learning training) <p>I found this term "training warmup steps" in some of the papers, what exactly does this term mean? Has it got anything to do with "learning rate"? If so, how does it affect? </p>&#xA;
habedi/stack-exchange-dataset
56,006
Data driven project for a self-catering accommodation business
<p>I want to apologise in advance for my ignorance but I'm hitting my head in a wall here as I'm not sure how to proceed with my project and I've got no experience in that field even though I'm doing a masters in Data Science (don't slag me too much pls) &#xA;So I've started a project with this small business that offe...
dataset regression statistics data bigdata
1
Data driven project for a self-catering accommodation business -- (dataset regression statistics data bigdata) <p>I want to apologise in advance for my ignorance but I'm hitting my head in a wall here as I'm not sure how to proceed with my project and I've got no experience in that field even though I'm doing a masters...
habedi/stack-exchange-dataset
56,013
How does Decision Tree with Gini Impurity Calculate Root Node?
<p>I couldn't figure out how it selected the root node with with <code>&lt;=7.5</code> and it's gini impurity is <code>0.45</code> but I tried to manually calculate it but the weighted gini impurity I got for it was <code>0.27</code>. </p>&#xA;&#xA;<p>Can anyone explain me how the calculation is done here just for the ...
machine learning python scikit learn decision trees
1
How does Decision Tree with Gini Impurity Calculate Root Node? -- (machine learning python scikit learn decision trees) <p>I couldn't figure out how it selected the root node with with <code>&lt;=7.5</code> and it's gini impurity is <code>0.45</code> but I tried to manually calculate it but the weighted gini impurity I...
habedi/stack-exchange-dataset
56,045
Algorithm or function or model that encourages clustered classfication?
<p>I have a soft classfication problem, i.e., the correct label for a certain instance is not just one class with 100% probability, but rather bunch of classes with probabilities that sum up to one.</p>&#xA;&#xA;<p>What I know as apriori information (I know it because I understand the underlying physical phenomenon) th...
machine learning deep learning classification
1
Algorithm or function or model that encourages clustered classfication? -- (machine learning deep learning classification) <p>I have a soft classfication problem, i.e., the correct label for a certain instance is not just one class with 100% probability, but rather bunch of classes with probabilities that sum up to one...
habedi/stack-exchange-dataset
56,050
Depending samples in ad ranking and click rate prediction
<p>I am struggling with the following problem:&#xA;Suppose we fit a machine learning model to model advertisers click rates. I used a Logistic Regression approach using a one-hot/dummy encoding. </p>&#xA;&#xA;<p>We have two advertisers A and B with a click rate of 10% and 9% respectively. Hence, we would rank A before ...
logistic regression feature engineering feature construction
1
Depending samples in ad ranking and click rate prediction -- (logistic regression feature engineering feature construction) <p>I am struggling with the following problem:&#xA;Suppose we fit a machine learning model to model advertisers click rates. I used a Logistic Regression approach using a one-hot/dummy encoding. <...
habedi/stack-exchange-dataset
56,053
Why could my DDQN get significantly worse after beating the game repeatedly?
<p>I've been trying to train a DDQN to play OpenAI Gym's CartPole-v1, but found that although it starts off well and starts getting full score (500) repeatedly (at around 600 episodes in the pic below), it then seems to go off the rails and do worse the more it plays.</p>&#xA;<p><a href="https://i.stack.imgur.com/5dhPM...
python deep learning reinforcement learning q learning openai gym
1
Why could my DDQN get significantly worse after beating the game repeatedly? -- (python deep learning reinforcement learning q learning openai gym) <p>I've been trying to train a DDQN to play OpenAI Gym's CartPole-v1, but found that although it starts off well and starts getting full score (500) repeatedly (at around 6...
habedi/stack-exchange-dataset
56,087
Why do people import weights for DenseNet when Keras includes them?
<p>In several Kaggle kernels I've seen that people often import their weights into Keras' DenseNet. In the following case, I believe the weights are sourced from this <a href="https://github.com/titu1994/DenseNet/releases/" rel="nofollow noreferrer">github repo</a> and contain the pre-trained weights on the ImageNet da...
neural network keras cnn
1
Why do people import weights for DenseNet when Keras includes them? -- (neural network keras cnn) <p>In several Kaggle kernels I've seen that people often import their weights into Keras' DenseNet. In the following case, I believe the weights are sourced from this <a href="https://github.com/titu1994/DenseNet/releases/...
habedi/stack-exchange-dataset
56,090
One hot encoding with too many features (~ 10,000)
<p>I am building a model to predict time off and sick leave for a specific employee.</p>&#xA;&#xA;<p>Each of the employees has one row per day from 01/01/2013 to 31/12/2018 in the dataset flagged with 0 or 1 (if that day was taken as a time off or sick day). I am using information like location, age, job position, etc....
encoding
1
One hot encoding with too many features (~ 10,000) -- (encoding) <p>I am building a model to predict time off and sick leave for a specific employee.</p>&#xA;&#xA;<p>Each of the employees has one row per day from 01/01/2013 to 31/12/2018 in the dataset flagged with 0 or 1 (if that day was taken as a time off or sick da...
habedi/stack-exchange-dataset
56,109
Is it okay to use training data for validifying the trained model?
<p>Currently, I have trained my model through 5-fold cross validation with very small amount of the sample (n=100).</p>&#xA;&#xA;<p>I used whole data set to train and got quite low performance in terms of accuracy, which is bit higher than 70%.</p>&#xA;&#xA;<p>However, if I put my data which was used for training back ...
cross validation training
1
Is it okay to use training data for validifying the trained model? -- (cross validation training) <p>Currently, I have trained my model through 5-fold cross validation with very small amount of the sample (n=100).</p>&#xA;&#xA;<p>I used whole data set to train and got quite low performance in terms of accuracy, which i...
habedi/stack-exchange-dataset
56,110
What is the difference between multiply and dot functions that is used to merge layer in Keras?
<p>I want to merge two CNN deep learning model using Keras and would like to know what is the difference multiply and dot functions that is used to merge layer?</p>&#xA;&#xA;<pre><code>keras.layers.multiply(inputs)&#xA;&#xA;&#xA;keras.layers.dot(inputs, axes, normalize=False)&#xA;</code></pre>&#xA;
deep learning keras tensorflow convolution convolutional neural network
1
What is the difference between multiply and dot functions that is used to merge layer in Keras? -- (deep learning keras tensorflow convolution convolutional neural network) <p>I want to merge two CNN deep learning model using Keras and would like to know what is the difference multiply and dot functions that is used to...
habedi/stack-exchange-dataset
56,111
Machine Learning: Balanced training set but highly unbalanced prediction set? How to adjust?
<p>I am trying to train a model to detect gender in a dataset of CEO speeches. Here are the datasets that I have:</p>&#xA;&#xA;<ol>&#xA;<li>Final Dataset: 20K CEO voices analyzed (around 95% male) </li>&#xA;<li>Testing dataset (?): 1K CEO voices analyzed from the final dataset, less unbalanced because I added more fema...
machine learning python scikit learn class imbalance
1
Machine Learning: Balanced training set but highly unbalanced prediction set? How to adjust? -- (machine learning python scikit learn class imbalance) <p>I am trying to train a model to detect gender in a dataset of CEO speeches. Here are the datasets that I have:</p>&#xA;&#xA;<ol>&#xA;<li>Final Dataset: 20K CEO voices...
habedi/stack-exchange-dataset
56,116
DQN - target values vs action values?
<p>I'm trying to understand the difference between <strong>target-values</strong> and <strong>action-values</strong> in Deep Q Networks.</p>&#xA;&#xA;<p>From what I understand, action-value tries to approximate the reward of a given action (at some state). The target-value is also an approximate of the reward. How are ...
deep learning reinforcement learning q learning
1
DQN - target values vs action values? -- (deep learning reinforcement learning q learning) <p>I'm trying to understand the difference between <strong>target-values</strong> and <strong>action-values</strong> in Deep Q Networks.</p>&#xA;&#xA;<p>From what I understand, action-value tries to approximate the reward of a gi...
habedi/stack-exchange-dataset
56,136
Understanding LSTM Training and Validation Graph and their metrics (LSTM Keras)
<p>I have trained a RNN/LSTM model. I would like to interpret my model results, after plotting the graph for Loss and accuracy (b/w training and Validation data set).</p>&#xA;&#xA;<p>My objective is to classify the labels (either 0 or 1) if i provide only a partial input to the model. In such a way I have performed tra...
python deep learning keras lstm
1
Understanding LSTM Training and Validation Graph and their metrics (LSTM Keras) -- (python deep learning keras lstm) <p>I have trained a RNN/LSTM model. I would like to interpret my model results, after plotting the graph for Loss and accuracy (b/w training and Validation data set).</p>&#xA;&#xA;<p>My objective is to c...
habedi/stack-exchange-dataset
56,137
Using strong predictor in Model training?
<p>I am trying to build a Disease predictor based on symptoms. I am using data scraped from Symcat website. After sampling the data we have symptoms to disease mapped for training purpose.Data looks like these: X --> S1,S2,S4... Y --> D1,D2,D5. The problem is some symptoms are strong predictors for a particular disease...
feature selection feature engineering data science model
1
Using strong predictor in Model training? -- (feature selection feature engineering data science model) <p>I am trying to build a Disease predictor based on symptoms. I am using data scraped from Symcat website. After sampling the data we have symptoms to disease mapped for training purpose.Data looks like these: X -->...
habedi/stack-exchange-dataset
56,139
what do we actually study in machine learning?
<p>I just started learning machine learning and learned a few basic algorithms and there is one stupid doubt in my mind and I am unable to find the answer of it. What do we actually study in machine learning algorithms that solves kinds of problems based on the data given to the algorithms?</p>&#xA;&#xA;<p>Take an exam...
machine learning
1
what do we actually study in machine learning? -- (machine learning) <p>I just started learning machine learning and learned a few basic algorithms and there is one stupid doubt in my mind and I am unable to find the answer of it. What do we actually study in machine learning algorithms that solves kinds of problems ba...
habedi/stack-exchange-dataset
56,150
suitable algorithms for very high dimensional ”binary pattern" recognition?
<p>I have a dataset consisting of 3000 binary features and one binary ouput. subset of these binary features form binary patterns. these subsets could be neighbouring features or from different regions (which one is the case is unknown). also these patterns can show up anywhere within the feature vector.&#xA;any ideas ...
classification algorithms supervised learning
1
suitable algorithms for very high dimensional ”binary pattern" recognition? -- (classification algorithms supervised learning) <p>I have a dataset consisting of 3000 binary features and one binary ouput. subset of these binary features form binary patterns. these subsets could be neighbouring features or from different...
habedi/stack-exchange-dataset
56,155
scipy.optimize.minimize(method=’trust-constr’) doesn't terminate on xtol condition
<p>I have set up an optimization problem with linear equality constraints as follows</p>&#xA;&#xA;<pre><code>sol0 = minimize(objective, x0, args=mock_df, method='trust-constr',&#xA; bounds=bnds, constraints=cons,&#xA; options={'maxiter': 250, 'verbose': 3})&#xA;</code></pre>&#xA;&#xA;<p>Th...
optimization scipy
1
scipy.optimize.minimize(method=’trust-constr’) doesn't terminate on xtol condition -- (optimization scipy) <p>I have set up an optimization problem with linear equality constraints as follows</p>&#xA;&#xA;<pre><code>sol0 = minimize(objective, x0, args=mock_df, method='trust-constr',&#xA; bounds=bnds, con...
habedi/stack-exchange-dataset
56,171
How to merge two CNN deep learning model using weighted sum and weighted product in Keras?
<p>I am using Keras to create a deep learning model and I want to merge two CNNs by using weighted sum or weighted product. </p>&#xA;&#xA;<p>How can I merge two CNNs using weighted sum and weighted product? </p>&#xA;
deep learning keras tensorflow cnn convolutional neural network
1
How to merge two CNN deep learning model using weighted sum and weighted product in Keras? -- (deep learning keras tensorflow cnn convolutional neural network) <p>I am using Keras to create a deep learning model and I want to merge two CNNs by using weighted sum or weighted product. </p>&#xA;&#xA;<p>How can I merge two...
habedi/stack-exchange-dataset
56,178
XGBoost, binary classification: uneven number of observations per user
<p>I'm working on a binary classification problem with XGBoost and I have a dataset, which has uneven number of observations per user. For some users there are over 100 observations, whereas for some users there are only a few. The "USER_ID" feature is not used as an input for XGBoost. </p>&#xA;&#xA;<p>More specificall...
machine learning python classification dataset xgboost
1
XGBoost, binary classification: uneven number of observations per user -- (machine learning python classification dataset xgboost) <p>I'm working on a binary classification problem with XGBoost and I have a dataset, which has uneven number of observations per user. For some users there are over 100 observations, wherea...
habedi/stack-exchange-dataset
56,186
Clustering with geolocation (lat/long pairs) attributes
<p>I am trying to cluster customer behavior based on where they shop given by lat/long pairs. I also have other numeric attributes such as volume, average amount spent, etc. I am considering using HDBSCAN to create clusters. However, I'm not sure whether to feed the dataframe directly to the clustering algorithm or whe...
machine learning python clustering unsupervised learning feature scaling
1
Clustering with geolocation (lat/long pairs) attributes -- (machine learning python clustering unsupervised learning feature scaling) <p>I am trying to cluster customer behavior based on where they shop given by lat/long pairs. I also have other numeric attributes such as volume, average amount spent, etc. I am conside...
habedi/stack-exchange-dataset
56,193
Why does discriminiator accuracy falls to 0%, and is there a fix around this?
<p>I am training a Vanilla-GAN(or original GAN 2016) on a pokemon dataset <a href="https://www.kaggle.com/kvpratama/pokemon-images-dataset" rel="nofollow noreferrer">https://www.kaggle.com/kvpratama/pokemon-images-dataset</a>, for few epochs the discriminator has 100% accuracy over the real examples, but as the epochs ...
neural network deep learning optimization gan generative models
1
Why does discriminiator accuracy falls to 0%, and is there a fix around this? -- (neural network deep learning optimization gan generative models) <p>I am training a Vanilla-GAN(or original GAN 2016) on a pokemon dataset <a href="https://www.kaggle.com/kvpratama/pokemon-images-dataset" rel="nofollow noreferrer">https:/...
habedi/stack-exchange-dataset
56,202
What is the use of @ between two matrices
<p>I was looking into a repo, where I came across this snippet of code:</p>&#xA;&#xA;<p><code>priors = x[None, :, :, None, :] @ self.route_weights[:, None, :, :, :]</code></p>&#xA;&#xA;<p>It basically tried to incorporate weights of an input image matrix.&#xA;I am really not sure what is the use of @ out here and what ...
python neural network deep learning cnn pytorch
1
What is the use of @ between two matrices -- (python neural network deep learning cnn pytorch) <p>I was looking into a repo, where I came across this snippet of code:</p>&#xA;&#xA;<p><code>priors = x[None, :, :, None, :] @ self.route_weights[:, None, :, :, :]</code></p>&#xA;&#xA;<p>It basically tried to incorporate wei...
habedi/stack-exchange-dataset
56,204
Which method of NLP is this?
<p>I have been searching for 2 weeks and I got no where so far.</p>&#xA;&#xA;<p>There is a list of diseases</p>&#xA;&#xA;<pre><code>Diabetes &#xA;Heart Transplant&#xA;Fingertip amputation&#xA;Injury by sharp tools&#xA;.&#xA;.&#xA;.&#xA;</code></pre>&#xA;&#xA;<p>and My dataset is a list of medical text reports.</p>&#xA...
nlp
1
Which method of NLP is this? -- (nlp) <p>I have been searching for 2 weeks and I got no where so far.</p>&#xA;&#xA;<p>There is a list of diseases</p>&#xA;&#xA;<pre><code>Diabetes &#xA;Heart Transplant&#xA;Fingertip amputation&#xA;Injury by sharp tools&#xA;.&#xA;.&#xA;.&#xA;</code></pre>&#xA;&#xA;<p>and My dataset is a...
habedi/stack-exchange-dataset
56,215
What it means for a neural network to memorize data
<p>I've seen at many places that sometimes neural networks simply memorizes training data. What that means actually ?</p>&#xA;&#xA;<p>Neural network consists of bunch of weights which gets trained and outputs based on input data. It'll output different thing for different input. Where does this memorization comes into ...
neural network deep learning
1
What it means for a neural network to memorize data -- (neural network deep learning) <p>I've seen at many places that sometimes neural networks simply memorizes training data. What that means actually ?</p>&#xA;&#xA;<p>Neural network consists of bunch of weights which gets trained and outputs based on input data. It'l...
habedi/stack-exchange-dataset
56,217
Do we need to tune same model differently for different window sizes in time series data classification?
<p>I am currently working on the time series data classification problem using deep learning. As we all know that in time series, we process the time-series data sequentially for some time steps at a time through the model which is called as a window. We slide the window and the next window is our input again. Since I ...
deep learning time series hyperparameter tuning
1
Do we need to tune same model differently for different window sizes in time series data classification? -- (deep learning time series hyperparameter tuning) <p>I am currently working on the time series data classification problem using deep learning. As we all know that in time series, we process the time-series data ...
habedi/stack-exchange-dataset
56,226
In the context of natural language processing, can anyone give a concrete example of True Positive, True Negative, False Positive, False Negative?
<p>Google <a href="https://developers.google.com/machine-learning/crash-course/classification/true-false-positive-negative" rel="nofollow noreferrer">post</a> gives a interesting explanation about True Positive, True Negative, False Positive, False Negative</p>&#xA;&#xA;<blockquote>&#xA; <p>True Positive (TP): Reality...
machine learning deep learning classification nlp
1
In the context of natural language processing, can anyone give a concrete example of True Positive, True Negative, False Positive, False Negative? -- (machine learning deep learning classification nlp) <p>Google <a href="https://developers.google.com/machine-learning/crash-course/classification/true-false-positive-nega...
habedi/stack-exchange-dataset
56,250
How does class_weight work in Decision Tree
<p>The <code>scikit-learn</code> implementation of <code>DecisionTreeClassifier</code> has a parameter as <code>class_weight</code>.&#xA;As per documentation:</p>&#xA;&#xA;<blockquote>&#xA; <p>Weights associated with classes in the form {class_label: weight}. If not given, all classes are supposed to have weight one.<...
scikit learn decision trees class imbalance
1
How does class_weight work in Decision Tree -- (scikit learn decision trees class imbalance) <p>The <code>scikit-learn</code> implementation of <code>DecisionTreeClassifier</code> has a parameter as <code>class_weight</code>.&#xA;As per documentation:</p>&#xA;&#xA;<blockquote>&#xA; <p>Weights associated with classes i...
habedi/stack-exchange-dataset
56,263
What is sample and feature
<p>I'm reading Scikit-learn and I can't understand sample and feature. (n_samples, n_features)<br/>&#xA;Can anybody describe those by example?</p>&#xA;
machine learning scikit learn
1
What is sample and feature -- (machine learning scikit learn) <p>I'm reading Scikit-learn and I can't understand sample and feature. (n_samples, n_features)<br/>&#xA;Can anybody describe those by example?</p>&#xA;
habedi/stack-exchange-dataset
56,264
Uneven dataset, how I should train the model if I can't load all pictures at once
<p>I have a dataset of multiple classes (About 50). The dataset doesn't have the same number of pictures per class, some have 300, some have 1000, and some more, and I've seen that this ruined my accuracy on my model</p>&#xA;&#xA;<p>First of all, the data is too big for me to store in the RAM, so I have to split it int...
machine learning python keras tensorflow
1
Uneven dataset, how I should train the model if I can't load all pictures at once -- (machine learning python keras tensorflow) <p>I have a dataset of multiple classes (About 50). The dataset doesn't have the same number of pictures per class, some have 300, some have 1000, and some more, and I've seen that this ruined...
habedi/stack-exchange-dataset
56,303
Does a larger action space take longer to train an RL agent?
<p>I am playing around with the <a href="http://gym.openai.com/" rel="nofollow noreferrer">openai gym</a> to try and better understand reinforcement learning. One agent parameter you can modify is the <a href="http://gym.openai.com/docs/#spaces" rel="nofollow noreferrer">action space</a> i.e. the specific actions an ag...
reinforcement learning openai gym
1
Does a larger action space take longer to train an RL agent? -- (reinforcement learning openai gym) <p>I am playing around with the <a href="http://gym.openai.com/" rel="nofollow noreferrer">openai gym</a> to try and better understand reinforcement learning. One agent parameter you can modify is the <a href="http://gym...
habedi/stack-exchange-dataset
56,304
Do RL agents learn the optimal "degree" of an action to take?
<p>I have a game environment I want to train an RL model on. This environment has 2 fundamental actions that the agent can take; "Left" or "Right" (say, 0 or 1).</p>&#xA;&#xA;<p>However, the actions "Left" or "Right" can be taken in a discrete number of "degrees". For example, I can take action "Left" with degree 70% ,...
reinforcement learning openai gym
1
Do RL agents learn the optimal "degree" of an action to take? -- (reinforcement learning openai gym) <p>I have a game environment I want to train an RL model on. This environment has 2 fundamental actions that the agent can take; "Left" or "Right" (say, 0 or 1).</p>&#xA;&#xA;<p>However, the actions "Left" or "Right" ca...
habedi/stack-exchange-dataset
56,307
Mapping one embedding to another using Deep Learning
<p>I am trying to write a model that has the input vector of one embedding (say <span class="math-container">$E_1$</span>) and predicts the corresponding vector in the second embedding <span class="math-container">$E_2$</span>. Both are n-dimensional real dense vectors <span class="math-container">$\mathbb{R}^n$</span>...
deep learning keras word embeddings embeddings
1
Mapping one embedding to another using Deep Learning -- (deep learning keras word embeddings embeddings) <p>I am trying to write a model that has the input vector of one embedding (say <span class="math-container">$E_1$</span>) and predicts the corresponding vector in the second embedding <span class="math-container">$...
habedi/stack-exchange-dataset
56,308
Why do trained RL agents still display stochastic "exploratory" behavior on testing data?
<p>I am training a PPO2 RL model using stable baselines. One thing I found is that a trained agent will still display some stochastic behavior on test data, as shown by the <a href="https://stable-baselines.readthedocs.io/en/master/modules/ppo2.html#stable_baselines.ppo2.PPO2.predict" rel="nofollow noreferrer"><code>pr...
reinforcement learning
1
Why do trained RL agents still display stochastic "exploratory" behavior on testing data? -- (reinforcement learning) <p>I am training a PPO2 RL model using stable baselines. One thing I found is that a trained agent will still display some stochastic behavior on test data, as shown by the <a href="https://stable-basel...
habedi/stack-exchange-dataset
56,315
Statistical comparison of model performance when training and validation data is always the same
<p>I have a labelled dataset of text in 4 languages (1000 samples per languages makes a total of 4000 samples). In one experiment I would like to assess the performance of a classification algorithm (neural network) on an unseen language. That means using the 3000 tweets from three languages as training data and 1000 s...
neural network
1
Statistical comparison of model performance when training and validation data is always the same -- (neural network) <p>I have a labelled dataset of text in 4 languages (1000 samples per languages makes a total of 4000 samples). In one experiment I would like to assess the performance of a classification algorithm (neu...
habedi/stack-exchange-dataset
56,318
What is the right way to keep track of the different things we try?
<p>In Machine Learning we usually try many combinations of different features, filters we apply to the data, transformations on the features or the target variables and different versions of hyperparameters.</p>&#xA;&#xA;<p>This fact makes it difficult to keep track of what works and what doesn't if we are not exhausti...
machine learning
1
What is the right way to keep track of the different things we try? -- (machine learning) <p>In Machine Learning we usually try many combinations of different features, filters we apply to the data, transformations on the features or the target variables and different versions of hyperparameters.</p>&#xA;&#xA;<p>This f...
habedi/stack-exchange-dataset
56,321
Interpretability of RMSE and R squared scores on cross validation
<p>I'm working on a regression problem with 30k rows in my dataset, decided to use XGBoost mainly to avoid processing data for a quick primitive model. And i noticed upon doing cross-validation that there's a noticeable difference between R² for train and R² for CV => clear signs of overfitting. Here's my code for CV :...
regression xgboost cross validation overfitting metric
1
Interpretability of RMSE and R squared scores on cross validation -- (regression xgboost cross validation overfitting metric) <p>I'm working on a regression problem with 30k rows in my dataset, decided to use XGBoost mainly to avoid processing data for a quick primitive model. And i noticed upon doing cross-validation ...
habedi/stack-exchange-dataset
56,356
How to read specific column with specific row in x_test using python
<p>I have a dataset with four input. here I am trying to predict X1 input in next time period using lstm model. </p>&#xA;&#xA;<p>Here I put x_train 80% and x_test 20% .&#xA;In x_test first input some of rows are with 0 values.</p>&#xA;&#xA;<p>What I want is I want to read that 0 value separately. I tried and it didn't ...
machine learning python pandas lstm
1
How to read specific column with specific row in x_test using python -- (machine learning python pandas lstm) <p>I have a dataset with four input. here I am trying to predict X1 input in next time period using lstm model. </p>&#xA;&#xA;<p>Here I put x_train 80% and x_test 20% .&#xA;In x_test first input some of rows ar...
habedi/stack-exchange-dataset
56,366
My NN has less than 1% accuracy rate, what's wrong with my model/dataset?
<p><strong>Data info</strong></p>&#xA;&#xA;<pre><code>X_train.shape&#xA;</code></pre>&#xA;&#xA;<p>(20160, 44)</p>&#xA;&#xA;<pre><code>y_train.shape&#xA;</code></pre>&#xA;&#xA;<p>(20160,)</p>&#xA;&#xA;<pre><code>#first row of the dataset&#xA;X_train.values[0]&#xA;</code></pre>&#xA;&#xA;<p>array([93., 87., 85., 79., 78.,...
neural network dataset
1
My NN has less than 1% accuracy rate, what's wrong with my model/dataset? -- (neural network dataset) <p><strong>Data info</strong></p>&#xA;&#xA;<pre><code>X_train.shape&#xA;</code></pre>&#xA;&#xA;<p>(20160, 44)</p>&#xA;&#xA;<pre><code>y_train.shape&#xA;</code></pre>&#xA;&#xA;<p>(20160,)</p>&#xA;&#xA;<pre><code>#first ...
habedi/stack-exchange-dataset
56,369
Does it matter whether we put regularization parameter ($C$) with error or weight term in Kernel ridge regression?
<p>Kernel ridge regression associate a regularization parameter <span class="math-container">$C$</span> with weight term (<span class="math-container">$\beta$</span>):</p>&#xA;&#xA;<p><span class="math-container">$\text{Minimize}: {KRR}=C\frac{1}{2} \left \|\beta\right\|^{2} + \frac{1}{2}\sum_{i=1}^{\mathcal{N}}\left\|...
svm kernel ridge regression
1
Does it matter whether we put regularization parameter ($C$) with error or weight term in Kernel ridge regression? -- (svm kernel ridge regression) <p>Kernel ridge regression associate a regularization parameter <span class="math-container">$C$</span> with weight term (<span class="math-container">$\beta$</span>):</p>&...
habedi/stack-exchange-dataset
56,376
Unable to understand the meaning of following lines of the research paper for image segmentation
<p>I am implementing a paper on image segmentation. It is based on the slight modification of the u-net architecture.&#xA;<br>The paper is based on encoder and decoder steps&#xA;Following are the lines of the paper which I am unable to understand.</p>&#xA;&#xA;<pre><code>In the decoder path, features from the encoder p...
neural network deep learning computer vision convolution
1
Unable to understand the meaning of following lines of the research paper for image segmentation -- (neural network deep learning computer vision convolution) <p>I am implementing a paper on image segmentation. It is based on the slight modification of the u-net architecture.&#xA;<br>The paper is based on encoder and d...
habedi/stack-exchange-dataset
56,390
How to make this intersection chart?
<p>I want to prepare the following chart. Say, I have three datasets of different lengths, for example:</p>&#xA;&#xA;<pre><code>A = [c,d,e,g,h,o,m,n,o,x,y,z]&#xA;B = [d,e,f,g,h,i,j,k,l]&#xA;C = [a,b,c,d,e]&#xA;</code></pre>&#xA;&#xA;<p>Any dataset might contain items already there in other 2 datasets. Now I want to sho...
visualization
1
How to make this intersection chart? -- (visualization) <p>I want to prepare the following chart. Say, I have three datasets of different lengths, for example:</p>&#xA;&#xA;<pre><code>A = [c,d,e,g,h,o,m,n,o,x,y,z]&#xA;B = [d,e,f,g,h,i,j,k,l]&#xA;C = [a,b,c,d,e]&#xA;</code></pre>&#xA;&#xA;<p>Any dataset might contain it...
habedi/stack-exchange-dataset
56,404
How does R-CNN and AlexNet compare?
<p>I know AlexNet does object classification in images [categories] and R-CNN does object localization [category and bounding box].&#xA;How does R-CNN and AlexNet compare?</p>&#xA;&#xA;<p>Are they used for the same purpose or R-CNN does more? Does R-CNN use Alexnet as a sub-module?</p>&#xA;
faster rcnn alex net
1
How does R-CNN and AlexNet compare? -- (faster rcnn alex net) <p>I know AlexNet does object classification in images [categories] and R-CNN does object localization [category and bounding box].&#xA;How does R-CNN and AlexNet compare?</p>&#xA;&#xA;<p>Are they used for the same purpose or R-CNN does more? Does R-CNN use ...
habedi/stack-exchange-dataset
56,406
An exhaustive, representative test database in phrase search algorithm
<p>For a phrase searching algorithm, imagine the goal is to search for a name phrase and return matched results based on a pre-defined threshold. For example, searching for "Jon Smith" could return "Jon Smith", "Jonathan Smith", "Jonathan David Smith", "Jonathan Smith-Mikel", "Jonathan 'Smith' Mikel" etc.</p>&#xA;&#xA;...
nlp search engine
1
An exhaustive, representative test database in phrase search algorithm -- (nlp search engine) <p>For a phrase searching algorithm, imagine the goal is to search for a name phrase and return matched results based on a pre-defined threshold. For example, searching for "Jon Smith" could return "Jon Smith", "Jonathan Smith...
habedi/stack-exchange-dataset
56,407
Keras: Misunderstanding the Conv2D's param "filters"?
<p>From <a href="https://keras.io/layers/convolutional/" rel="nofollow noreferrer">https://keras.io/layers/convolutional/</a> (Conv2D):</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>keras.layers.Conv2D(filters, kernel_size, strides=(1, 1), padding='valid',&#xA; data_format=None, dilati...
keras kernel
1
Keras: Misunderstanding the Conv2D's param "filters"? -- (keras kernel) <p>From <a href="https://keras.io/layers/convolutional/" rel="nofollow noreferrer">https://keras.io/layers/convolutional/</a> (Conv2D):</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>keras.layers.Conv2D(filters, kernel_size, strides=(...
habedi/stack-exchange-dataset
56,426
Training vs test data set for supervised learning in real life scenario
<p>In the tutorials, I have noticed only similar data has been used with models training and prediction. </p>&#xA;&#xA;<p>I was wondering how cases where you can't find training data that is similar to your final use case(test data)? </p>&#xA;&#xA;<p>What happens if I am building a recommendation system for <strong>hou...
data feature engineering feature scaling
1
Training vs test data set for supervised learning in real life scenario -- (data feature engineering feature scaling) <p>In the tutorials, I have noticed only similar data has been used with models training and prediction. </p>&#xA;&#xA;<p>I was wondering how cases where you can't find training data that is similar to ...
habedi/stack-exchange-dataset
56,432
Why is it necessary to overfit a yolov2 on a subset of images before model training?
<p>I am using yolov2 for passport details detection with 8 classes? My object detectiion bounding boxes has errors though recognition being fine.</p>&#xA;&#xA;<p>I want to know if object_detection by overfitting with a sample subset of training data, say 3 images, helps determine prediction performance? If yes how?</p>...
neural network deep learning cnn object detection yolo
1
Why is it necessary to overfit a yolov2 on a subset of images before model training? -- (neural network deep learning cnn object detection yolo) <p>I am using yolov2 for passport details detection with 8 classes? My object detectiion bounding boxes has errors though recognition being fine.</p>&#xA;&#xA;<p>I want to kno...
habedi/stack-exchange-dataset
56,447
Poor performance of regression model for imbalanced data
<p>I am trying to train a neural network model to solve a regression problem. The specificity of my dataset is that it has something like an exponential distribution of target values (imbalanced). Therefor, the model seems to output just values less than 2 (if the range is [0,6]), for instance, and it absolutely ignore...
neural network regression loss function class imbalance
1
Poor performance of regression model for imbalanced data -- (neural network regression loss function class imbalance) <p>I am trying to train a neural network model to solve a regression problem. The specificity of my dataset is that it has something like an exponential distribution of target values (imbalanced). There...
habedi/stack-exchange-dataset
56,479
Keras: Misunderstanding what Keras does when invoking a Model, providing an Input?
<p>In a class named <code>Generator</code>, I have defined a model with the below method <code>define_model</code>:</p>&#xA;&#xA;<pre><code>def define_model(self):&#xA; conv2d = Generator.__last_block()&#xA; output = Activation('tanh')(conv2d)&#xA; model = Model(self.input_layer, output)&#xA; return model&#...
python keras machine learning model data science model
1
Keras: Misunderstanding what Keras does when invoking a Model, providing an Input? -- (python keras machine learning model data science model) <p>In a class named <code>Generator</code>, I have defined a model with the below method <code>define_model</code>:</p>&#xA;&#xA;<pre><code>def define_model(self):&#xA; conv2...
habedi/stack-exchange-dataset
56,483
User Location Prediction
<p>I am trying to predict the user location for a mobile app for a certain timestamp. So far I've gathered training data throughout different days. The data contains the latitude, longitude and the timestamp. </p>&#xA;&#xA;<p>What would be the best algorithm/best way in order to train a model that takes a timestamp as ...
machine learning
1
User Location Prediction -- (machine learning) <p>I am trying to predict the user location for a mobile app for a certain timestamp. So far I've gathered training data throughout different days. The data contains the latitude, longitude and the timestamp. </p>&#xA;&#xA;<p>What would be the best algorithm/best way in or...
habedi/stack-exchange-dataset
56,495
What are named entity advantages over strings?
<p>I am unclear about the practical benefit of named entity recognition. Specifically, I don't get how this entity is any better than a string representation of the same object. Let's take the popular example of movies. I can create a model where each row is a movie. Any attribute you can have in a recommendation syste...
named entity recognition
1
What are named entity advantages over strings? -- (named entity recognition) <p>I am unclear about the practical benefit of named entity recognition. Specifically, I don't get how this entity is any better than a string representation of the same object. Let's take the popular example of movies. I can create a model wh...
habedi/stack-exchange-dataset
56,514
Is the _error_ in the context of ML always just the difference of predictions and targets?
<p>Simple definitional question: In the context of machine learning, is the <em>error</em> of a model always the difference of predictions <span class="math-container">$f(x) = \hat{y}$</span> and targets <span class="math-container">$y$</span>? Or are there also other definitions of error?</p>&#xA;&#xA;<p>I looked into...
machine learning machine learning model terminology definitions
1
Is the _error_ in the context of ML always just the difference of predictions and targets? -- (machine learning machine learning model terminology definitions) <p>Simple definitional question: In the context of machine learning, is the <em>error</em> of a model always the difference of predictions <span class="math-con...
habedi/stack-exchange-dataset
56,534
Difference between from nltk import word_tokenize and from nltk.tokenize import word_tokenize?
<p>What is the difference between the word_tokenize, one imported directly from nltk and the other being imported from tokenize package of nltk?</p>&#xA;
nlp nltk
1
Difference between from nltk import word_tokenize and from nltk.tokenize import word_tokenize? -- (nlp nltk) <p>What is the difference between the word_tokenize, one imported directly from nltk and the other being imported from tokenize package of nltk?</p>&#xA;
habedi/stack-exchange-dataset
56,537
Why Generator error increases after some epoch
<p>I'm training Realtivistic GAN on dog images. I don't understand why my generator loss increased after 100 epoch.</p>&#xA;&#xA;<p>This is the generator loss graph.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/FZSCq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FZSCq.png" alt="enter image de...
deep learning generative models
1
Why Generator error increases after some epoch -- (deep learning generative models) <p>I'm training Realtivistic GAN on dog images. I don't understand why my generator loss increased after 100 epoch.</p>&#xA;&#xA;<p>This is the generator loss graph.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/FZSCq.png" rel="nof...
habedi/stack-exchange-dataset
56,565
Are there any algorithms for solid polygon clustering?
<p>I'm looking for something like K-Means for dividing solid polygons into regions. K-Means clusters discrete points. But I want to cluster (that is, partition) the points of solid polygons.<a href="https://i.stack.imgur.com/43RD0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/43RD0.png" alt="expect...
clustering
1
Are there any algorithms for solid polygon clustering? -- (clustering) <p>I'm looking for something like K-Means for dividing solid polygons into regions. K-Means clusters discrete points. But I want to cluster (that is, partition) the points of solid polygons.<a href="https://i.stack.imgur.com/43RD0.png" rel="nofollow...
habedi/stack-exchange-dataset
56,568
Comparing models using P-value
<p>I have 2 different ML architectures for a translation task, I evaluate them using BLEU score (higher is better)</p>&#xA;&#xA;<p>I've run them 9 times each, yielding the following scores</p>&#xA;&#xA;<p><strong>Architecture 1</strong> | 36.52 |&#xA;36.27 |&#xA;35.9 |&#xA;35.22 |&#xA;37.13 |&#xA;35.53 |&#xA;35.3 |&#xA...
machine learning deep learning statistics
1
Comparing models using P-value -- (machine learning deep learning statistics) <p>I have 2 different ML architectures for a translation task, I evaluate them using BLEU score (higher is better)</p>&#xA;&#xA;<p>I've run them 9 times each, yielding the following scores</p>&#xA;&#xA;<p><strong>Architecture 1</strong> | 36....
habedi/stack-exchange-dataset
56,570
How to barplot output of pandas.describe() from multiple datasets
<p>I'm trying to compare the differences and similarities between 10 dataframes. I have decided to df.describe() each dataframe in turn and accumulate the results into a new dataframe.</p>&#xA;&#xA;<pre><code> count mean std min 25% 50% 75% max&#xA;run ...
pandas visualization seaborn
1
How to barplot output of pandas.describe() from multiple datasets -- (pandas visualization seaborn) <p>I'm trying to compare the differences and similarities between 10 dataframes. I have decided to df.describe() each dataframe in turn and accumulate the results into a new dataframe.</p>&#xA;&#xA;<pre><code> count ...
habedi/stack-exchange-dataset
56,577
How to optimize hyperparameters in stacked model?
<p>I was wondering whether somebody could explain how to optimize hyperparameters for the base learners and meta algorithm when stacking? In many tutorials they seem to be plucked out of thin air!</p>&#xA;&#xA;<p>Thanks,</p>&#xA;&#xA;<p>Jack</p>&#xA;
machine learning ensemble modeling hyperparameter meta learning
1
How to optimize hyperparameters in stacked model? -- (machine learning ensemble modeling hyperparameter meta learning) <p>I was wondering whether somebody could explain how to optimize hyperparameters for the base learners and meta algorithm when stacking? In many tutorials they seem to be plucked out of thin air!</p>&...
habedi/stack-exchange-dataset
56,589
Intuition behind the entropy definition
<p>The definition of information entropy is defined below:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/j7qP6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j7qP6.png" alt="enter image description here"></a></p>&#xA;&#xA;<p>This looks fine but I got no intuition why it is defined this way. Cou...
information retrieval
1
Intuition behind the entropy definition -- (information retrieval) <p>The definition of information entropy is defined below:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/j7qP6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/j7qP6.png" alt="enter image description here"></a></p>&#xA;&#xA;<p>Thi...
habedi/stack-exchange-dataset
56,601
Do CNN convolution and pooling layers get backpropogated?
<p>I can't find a simple answer to this by Googling which leads me to think the answer is no, but I want to be sure...</p>&#xA;&#xA;<p>In a feed forward network, all of the layers of weights get backpropogated, but what happens in a convolutional neural network on the backprop step? Is it only the feedforward part of t...
machine learning neural network cnn convolution
1
Do CNN convolution and pooling layers get backpropogated? -- (machine learning neural network cnn convolution) <p>I can't find a simple answer to this by Googling which leads me to think the answer is no, but I want to be sure...</p>&#xA;&#xA;<p>In a feed forward network, all of the layers of weights get backpropogated...
habedi/stack-exchange-dataset
56,604
Does an RL agent still learn if its actions are "blocked"?
<p>Say we have a game that is a maze environment where there is a character to be controlled through the maze. When the agent (the character) approaches a wall, it may try to execute an action that would lead it into the wall, which is not permitted. Instead of executing this action, we place an <code>if</code> stateme...
reinforcement learning
1
Does an RL agent still learn if its actions are "blocked"? -- (reinforcement learning) <p>Say we have a game that is a maze environment where there is a character to be controlled through the maze. When the agent (the character) approaches a wall, it may try to execute an action that would lead it into the wall, which ...
habedi/stack-exchange-dataset
56,607
Using data agumentation for a frozen pre-trained model
<p>I was following the following article with regards to doing transfer learning:</p>&#xA;&#xA;<p><a href="https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html" rel="nofollow noreferrer">https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data...
transfer learning data augmentation
1
Using data agumentation for a frozen pre-trained model -- (transfer learning data augmentation) <p>I was following the following article with regards to doing transfer learning:</p>&#xA;&#xA;<p><a href="https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html" rel="nofollow norefe...
habedi/stack-exchange-dataset
56,608
Python lifelines - ConvergenceWarning: Newton-Raphson failed to converge sufficiently in Cox prop hazard
<p>When calling <code>CoxPHFitter()</code> on my full dataset I'm getting the following error:</p>&#xA;&#xA;<pre><code>Users/anaconda3/lib/python3.7/site-packages/lifelines/fitters/coxph_fitter.py:557: ConvergenceWarning: Newton-Rhapson failed to converge sufficiently in 50 steps.&#xA; warnings.warn("Newton-Rhapson fa...
machine learning python optimization convergence survival analysis
1
Python lifelines - ConvergenceWarning: Newton-Raphson failed to converge sufficiently in Cox prop hazard -- (machine learning python optimization convergence survival analysis) <p>When calling <code>CoxPHFitter()</code> on my full dataset I'm getting the following error:</p>&#xA;&#xA;<pre><code>Users/anaconda3/lib/pyth...
habedi/stack-exchange-dataset
56,611
How to compare different similarity measurements in text clustering?
<p>I have a dataset which contains vectors generated from subtitles (each column represents a genre, each row is a movie name), my purpose is to find the most similar movie titles, I want to use different distance/similarity measurements and compare them, what is the best method to use?</p>&#xA;&#xA;<p>For now, I tried...
clustering text mining k means similarity
1
How to compare different similarity measurements in text clustering? -- (clustering text mining k means similarity) <p>I have a dataset which contains vectors generated from subtitles (each column represents a genre, each row is a movie name), my purpose is to find the most similar movie titles, I want to use different...
habedi/stack-exchange-dataset
56,612
Why do seaborn.dist and pyplot.hist generate two different looking histograms on the same data?
<p>I'm looking at telecom customers data. Two of the variables I'm looking at currently are:</p>&#xA;&#xA;<ul>&#xA;<li><em>Monthly Charges</em> - The total amount charged to the customer monthly.</li>&#xA;<li><em>Is Senior Citizen</em> - Whether the customer is a senior citizen.</li>&#xA;</ul>&#xA;&#xA;<p>I'm trying to...
python data visualization distribution seaborn
1
Why do seaborn.dist and pyplot.hist generate two different looking histograms on the same data? -- (python data visualization distribution seaborn) <p>I'm looking at telecom customers data. Two of the variables I'm looking at currently are:</p>&#xA;&#xA;<ul>&#xA;<li><em>Monthly Charges</em> - The total amount charged t...
habedi/stack-exchange-dataset
56,616
Getting Value Error while training a model for binary classification
<p>While training a sequential model using Keras, Im getting this error</p>&#xA;&#xA;<p>The model summary is shown below</p>&#xA;&#xA;<pre><code>Layer (type) Output Shape Param # &#xA;=================================================================&#xA;dense_1 (Dense) (None,...
deep learning keras nlp spacy
1
Getting Value Error while training a model for binary classification -- (deep learning keras nlp spacy) <p>While training a sequential model using Keras, Im getting this error</p>&#xA;&#xA;<p>The model summary is shown below</p>&#xA;&#xA;<pre><code>Layer (type) Output Shape Param # &#xA;=...
habedi/stack-exchange-dataset
56,621
Q-learning when minimising a total cost instead of maximising a total reward
<p>I have a decision problem where the results are measured as a cost that I want to minimise. It seems like a good fit to Q-learning, but I am not sure how to adjust it to deal with a cost instead of a reward.</p>&#xA;&#xA;<p>Which one is better:</p>&#xA;&#xA;<ol>&#xA;<li>Initializing Q-values for all actions with zer...
reinforcement learning q learning markov process
1
Q-learning when minimising a total cost instead of maximising a total reward -- (reinforcement learning q learning markov process) <p>I have a decision problem where the results are measured as a cost that I want to minimise. It seems like a good fit to Q-learning, but I am not sure how to adjust it to deal with a cost...
habedi/stack-exchange-dataset
56,635
"Stationarity of statistics" and "locality of pixel dependencies"
<p>I'm reading the <a href="https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf" rel="nofollow noreferrer">ImageNet Classification with Deep Convolutional Neural Networks</a> paper by Krizhevsky et al, and came across these lines in the Intro paragraph:</p>&#xA;&#xA;<bl...
cnn image classification
1
"Stationarity of statistics" and "locality of pixel dependencies" -- (cnn image classification) <p>I'm reading the <a href="https://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf" rel="nofollow noreferrer">ImageNet Classification with Deep Convolutional Neural Networks</a>...
habedi/stack-exchange-dataset
56,638
Is there any method to determine which clustering algorithm to use on a particular dataset?
<p>I'm having a hard time getting kmeans to cluster data effectively. It fails to segment data well even for a simple attribute with 5 categories. I'm aware of DBSCAN, Hierarchical Clustering and GMM. However, just wanted to know if there's any way (visual or otherwise) to narrow down the clustering algorithm which mig...
machine learning python clustering unsupervised learning
1
Is there any method to determine which clustering algorithm to use on a particular dataset? -- (machine learning python clustering unsupervised learning) <p>I'm having a hard time getting kmeans to cluster data effectively. It fails to segment data well even for a simple attribute with 5 categories. I'm aware of DBSCAN...
habedi/stack-exchange-dataset
56,647
How to make forecast in LSTM with specific/defined feature values
<p>I am analyzing the <a href="https://www.kaggle.com/neuromusic/avocado-prices" rel="nofollow noreferrer">avocado dataset</a> to predict the <strong>future</strong> prices of avocado <strong>depending on the region and type (organic/conventional).</strong> </p>&#xA;&#xA;<p>I've trained <a href="https://www.kaggle.com/...
machine learning keras time series lstm forecasting
1
How to make forecast in LSTM with specific/defined feature values -- (machine learning keras time series lstm forecasting) <p>I am analyzing the <a href="https://www.kaggle.com/neuromusic/avocado-prices" rel="nofollow noreferrer">avocado dataset</a> to predict the <strong>future</strong> prices of avocado <strong>depen...
habedi/stack-exchange-dataset
56,658
Random Forest Prediction
<p>Let's say I want to classify if the employee will churn or not. In my random forest, I have 6 estimators where 3 of them predict the employee to churn and the other estimators predict the employee to retain. In short, <strong>3 estimators = predicted to churn</strong> and <strong>3 estimators = predicted to retain</...
machine learning classification random forest data science model
1
Random Forest Prediction -- (machine learning classification random forest data science model) <p>Let's say I want to classify if the employee will churn or not. In my random forest, I have 6 estimators where 3 of them predict the employee to churn and the other estimators predict the employee to retain. In short, <str...
habedi/stack-exchange-dataset
56,667
How to define a neural model as linear or non linear
<p><a href="https://i.stack.imgur.com/98nGK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/98nGK.png" alt="a nonlinear model of a neuron"></a></p>&#xA;&#xA;<p><strong>TL;DR</strong>: in what sense is the model of a neuron seen in the image above nonlinear?</p>&#xA;&#xA;<p>In chapter 1, section 1.3 <...
neural network beginner
1
How to define a neural model as linear or non linear -- (neural network beginner) <p><a href="https://i.stack.imgur.com/98nGK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/98nGK.png" alt="a nonlinear model of a neuron"></a></p>&#xA;&#xA;<p><strong>TL;DR</strong>: in what sense is the model of a neu...
habedi/stack-exchange-dataset
56,668
Pandas change value of a column based another column condition
<p>I have values in column1, I have columns in column2.&#xA;What I want to achieve: Condition: where column2 == 2 leave to be 2 if&#xA; column1 &lt; 30 elsif change to 3 if column1 > 90.</p>&#xA;&#xA;<p>Here is what i did so far, the problem is 2 does not change to 3 where column1 > 90.</p>&#xA;&#xA;<pre><code>filter1 ...
data mining pandas
1
Pandas change value of a column based another column condition -- (data mining pandas) <p>I have values in column1, I have columns in column2.&#xA;What I want to achieve: Condition: where column2 == 2 leave to be 2 if&#xA; column1 &lt; 30 elsif change to 3 if column1 > 90.</p>&#xA;&#xA;<p>Here is what i did so far, the...
habedi/stack-exchange-dataset
56,672
unimportant features impact on model's performance
<p>Using XGBoost and RandomForests, do unimportant features (according to the <code>feature_importances_</code> attribute) hurt the model's performance?</p>&#xA;&#xA;<p>Do I need to carefully select highly correlated <strong><em>and</em></strong> import features? Or do I throw everything in and hope that it can correct...
feature selection random forest xgboost
1
unimportant features impact on model's performance -- (feature selection random forest xgboost) <p>Using XGBoost and RandomForests, do unimportant features (according to the <code>feature_importances_</code> attribute) hurt the model's performance?</p>&#xA;&#xA;<p>Do I need to carefully select highly correlated <strong...
habedi/stack-exchange-dataset
56,693
CrossValidation using glmnet and very high values of Lambda?
<p>I am trying to run crossvalidation (folds=10) using glmnet library on my dataset. My outcome of interest is BMI and predictors include a set of clinical variables. My final goal is to use elastic-net regression to select features and also predict BMI. For crossvalidation, I am using a range of alpha from 0 to 1 usin...
machine learning feature selection cross validation
1
CrossValidation using glmnet and very high values of Lambda? -- (machine learning feature selection cross validation) <p>I am trying to run crossvalidation (folds=10) using glmnet library on my dataset. My outcome of interest is BMI and predictors include a set of clinical variables. My final goal is to use elastic-net...
habedi/stack-exchange-dataset
56,700
Is it normal that a classifier always wrongly predicts the same samples?
<p>I'm trying to improve the accuracy of a classifier, a random forest one.&#xA;I built different models with the same hyperparameters but with different random seeds, trained them with the same training data, used the same test daata to make the predictions and compared the results. I discovered that 50% of the errors...
classification random forest
1
Is it normal that a classifier always wrongly predicts the same samples? -- (classification random forest) <p>I'm trying to improve the accuracy of a classifier, a random forest one.&#xA;I built different models with the same hyperparameters but with different random seeds, trained them with the same training data, use...
habedi/stack-exchange-dataset