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
92,799
Mututal Information in sklearn
<p>I expected sklearn's <a href="https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.mutual_info_classif.html" rel="nofollow noreferrer">mutual_info_classif</a> to give a value of 1 for the mutual information of a series of values with itself but instead I'm seeing results ranging between about ...
python scikit learn mutual information
1
Mututal Information in sklearn -- (python scikit learn mutual information) <p>I expected sklearn's <a href="https://scikit-learn.org/stable/modules/generated/sklearn.feature_selection.mutual_info_classif.html" rel="nofollow noreferrer">mutual_info_classif</a> to give a value of 1 for the mutual information of a series ...
habedi/stack-exchange-dataset
92,809
NLP methods specific to a language?
<p>What NLP methods / algorithms depend on the features existing only in some languages? For example, does French has any NLP algorithms that English NLP and Spanish NLP do not have?</p>&#xA;
nlp algorithms
1
NLP methods specific to a language? -- (nlp algorithms) <p>What NLP methods / algorithms depend on the features existing only in some languages? For example, does French has any NLP algorithms that English NLP and Spanish NLP do not have?</p>&#xA;
habedi/stack-exchange-dataset
92,810
Why we use an activation function for introducing nonlinearity instead of a polynomial Perceptron implementation?
<p>I perceive a single perceptron as a single linear function <span class="math-container">$y = a_1x_1 + a_2x_2 + ... + a_nx_n + b_0$</span> with a goal to calculate the best weights combination <span class="math-container">$ w_1, w_2, ..., w_n $</span> that minimizes the given loss function.</p>&#xA;<p>The problem wit...
deep learning perceptron mlp
1
Why we use an activation function for introducing nonlinearity instead of a polynomial Perceptron implementation? -- (deep learning perceptron mlp) <p>I perceive a single perceptron as a single linear function <span class="math-container">$y = a_1x_1 + a_2x_2 + ... + a_nx_n + b_0$</span> with a goal to calculate the be...
habedi/stack-exchange-dataset
92,825
How to measure the contribution of each input channel to a network's accuracy?
<p>As the title says, let's assume we have some neural network. More specifically, a regression network in case that changes anything. It takes multiple 2D input channels. How could one measure how much each input channel is contributing to the accuracy of the network on a validation set, to know which channels to keep...
deep learning
1
How to measure the contribution of each input channel to a network's accuracy? -- (deep learning) <p>As the title says, let's assume we have some neural network. More specifically, a regression network in case that changes anything. It takes multiple 2D input channels. How could one measure how much each input channel ...
habedi/stack-exchange-dataset
92,826
Why is KNN better at K-Fold Cross Validation than XGBoost or Random Forest?
<p>I've been running K-Fold cross validation multiple times for KNN, random forest and XGBoost.</p>&#xA;<p>KNN can complete sklearn's cross_val_score, so much faster consistently.</p>&#xA;<p>They all use the same preprocessed data, all have the same test/train split with a random state, etc.</p>&#xA;<p>When ran individ...
random forest xgboost k nn
1
Why is KNN better at K-Fold Cross Validation than XGBoost or Random Forest? -- (random forest xgboost k nn) <p>I've been running K-Fold cross validation multiple times for KNN, random forest and XGBoost.</p>&#xA;<p>KNN can complete sklearn's cross_val_score, so much faster consistently.</p>&#xA;<p>They all use the same...
habedi/stack-exchange-dataset
92,834
Why is DDPG a Policy Gradient Method?
<p>Why is DDPG a Policy Gradient Method even though it's actor does not output probability?</p>&#xA;
machine learning deep learning reinforcement learning policy gradients
1
Why is DDPG a Policy Gradient Method? -- (machine learning deep learning reinforcement learning policy gradients) <p>Why is DDPG a Policy Gradient Method even though it's actor does not output probability?</p>&#xA;
habedi/stack-exchange-dataset
92,846
Difference between $Q(s,a)$ ,$V^*(s)$ and $V^\pi(s)$ in Markov Decision Process?
<p>I am new to RL and I am trying to understand how to find solutions of an MDP.<br>&#xA;This is what I understand so far -&gt; since the nature of our environment is stochastic, at a state 's' if we take an action 'a' we do not know which state we would end up in. So we define the following terms : <br></p>&#xA;<ol>&#...
reinforcement learning markov process ai
1
Difference between $Q(s,a)$ ,$V^*(s)$ and $V^\pi(s)$ in Markov Decision Process? -- (reinforcement learning markov process ai) <p>I am new to RL and I am trying to understand how to find solutions of an MDP.<br>&#xA;This is what I understand so far -&gt; since the nature of our environment is stochastic, at a state 's'...
habedi/stack-exchange-dataset
92,847
Can Boosting and Bagging be applied to heterogeneous algorithms?
<p>Stacking can be achieved with heterogeneous algorithms such as RF, SVM and KNN. However, can such heterogeneously be achieved in Bagging or Boosting? For example, in Boosting, instead of using RF in all the iterations, could we use different algorithms?</p>&#xA;
data science model boosting bagging stacking
1
Can Boosting and Bagging be applied to heterogeneous algorithms? -- (data science model boosting bagging stacking) <p>Stacking can be achieved with heterogeneous algorithms such as RF, SVM and KNN. However, can such heterogeneously be achieved in Bagging or Boosting? For example, in Boosting, instead of using RF in all...
habedi/stack-exchange-dataset
92,853
Which Policy Gradient Method was used by Google's Deep Mind to teach AI to walk
<p>I just saw <a href="https://www.youtube.com/watch?v=gn4nRCC9TwQ" rel="nofollow noreferrer">this</a> video on Youtube.</p>&#xA;<p>Which Policy Gradient method was used to train the AI to walk?</p>&#xA;<p>Was it DDPG or D4PG or what?</p>&#xA;
machine learning deep learning reinforcement learning policy gradients deepmind
1
Which Policy Gradient Method was used by Google's Deep Mind to teach AI to walk -- (machine learning deep learning reinforcement learning policy gradients deepmind) <p>I just saw <a href="https://www.youtube.com/watch?v=gn4nRCC9TwQ" rel="nofollow noreferrer">this</a> video on Youtube.</p>&#xA;<p>Which Policy Gradient m...
habedi/stack-exchange-dataset
92,874
Are we allowed to transform the continuous target variable by creating a log transformation in order to have a normal distribution?
<p>The following code gives the target variable Item_Outlet_Sales before transformation and Item_Outlet_Sales_log which is transformed</p>&#xA;<pre><code>#treat extreme values in Item_Outlet_Sales&#xA;train['Item_Outlet_Sales_log'] = np.log(train.Item_Outlet_Sales)&#xA;test['Item_Outlet_Sales_log'] = np.log(test.Item_O...
machine learning python data transformation
1
Are we allowed to transform the continuous target variable by creating a log transformation in order to have a normal distribution? -- (machine learning python data transformation) <p>The following code gives the target variable Item_Outlet_Sales before transformation and Item_Outlet_Sales_log which is transformed</p>&...
habedi/stack-exchange-dataset
92,883
How to operate dataset from paperswithcode.com?
<p>I'm trying to use IG-3.5B-17k dataset from paperswithcode.com, but I can't figure out how to do that exactly.&#xA;How to do it? I guess I need to use this site API? Am I even able to use this dataset?</p>&#xA;
dataset api
1
How to operate dataset from paperswithcode.com? -- (dataset api) <p>I'm trying to use IG-3.5B-17k dataset from paperswithcode.com, but I can't figure out how to do that exactly.&#xA;How to do it? I guess I need to use this site API? Am I even able to use this dataset?</p>&#xA;
habedi/stack-exchange-dataset
92,895
select hyperparameters using Latin hypercube sampling (LHS) from a large matrix/grid of parameter combinations
<p>I have a matrix with each row corresponds to a hyperparameter for the XGBoost model. There are seven parameters to tune in XGBoost (as shown below: nrounds/iterations, max_depth, eta, gamma, colsample_byTree, min_child_weight, and subsample). I did a literature review to specify the range and interval of values for ...
r xgboost hyperparameter
1
select hyperparameters using Latin hypercube sampling (LHS) from a large matrix/grid of parameter combinations -- (r xgboost hyperparameter) <p>I have a matrix with each row corresponds to a hyperparameter for the XGBoost model. There are seven parameters to tune in XGBoost (as shown below: nrounds/iterations, max_dept...
habedi/stack-exchange-dataset
92,900
Is it wrong to transform the target variable and test the model without dropping the column that was transformed? What's the disadvantage about it?
<p>I have a linear regression model, I have transformed the target variable Item_Outlet_Sales into Item_Outlet_Sales_log on both training and testing dataset. I did not delete the Item_Outlet_Sales.</p>&#xA;<p>Here is the snippet:</p>&#xA;<pre><code>#treat extreme values in Item_Outlet_Sales&#xA;train['Item_Outlet_Sale...
machine learning scikit learn
1
Is it wrong to transform the target variable and test the model without dropping the column that was transformed? What's the disadvantage about it? -- (machine learning scikit learn) <p>I have a linear regression model, I have transformed the target variable Item_Outlet_Sales into Item_Outlet_Sales_log on both training...
habedi/stack-exchange-dataset
92,924
I am confused about these models
<p><a href="https://i.stack.imgur.com/lDjPE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lDjPE.png" alt="enter image description here" /></a>&#xA;In the first problem, it's been told to accept the maximum number of good customers, if at least 98% of the customers that are do not repay their debt c...
decision trees logistic regression
1
I am confused about these models -- (decision trees logistic regression) <p><a href="https://i.stack.imgur.com/lDjPE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lDjPE.png" alt="enter image description here" /></a>&#xA;In the first problem, it's been told to accept the maximum number of good custo...
habedi/stack-exchange-dataset
92,929
Multiple Features with the same categorical value
<p>In working with a telecommunications data set with multiple categorical variables which all depend on Internet Service, a separate categorical variable, I ran into the problem where 'No Internet Service' is dummy encoded several times in my training data. See the below pie charts for an illustration of the problem.<...
scikit learn preprocessing
1
Multiple Features with the same categorical value -- (scikit learn preprocessing) <p>In working with a telecommunications data set with multiple categorical variables which all depend on Internet Service, a separate categorical variable, I ran into the problem where 'No Internet Service' is dummy encoded several times ...
habedi/stack-exchange-dataset
92,941
Dimension of output in Dense layer Keras
<p>I have the sample following model</p>&#xA;<pre><code>from tensorflow.keras import models&#xA;from tensorflow.keras import layers&#xA;sample_model = models.Sequential()&#xA;sample_model.add(layers.Dense(32, input_shape=(4,)))&#xA;sample_model.add(layers.Dense(16, input_shape = (44,)))&#xA;&#xA;sample_model.compile(lo...
machine learning deep learning keras tensorflow
1
Dimension of output in Dense layer Keras -- (machine learning deep learning keras tensorflow) <p>I have the sample following model</p>&#xA;<pre><code>from tensorflow.keras import models&#xA;from tensorflow.keras import layers&#xA;sample_model = models.Sequential()&#xA;sample_model.add(layers.Dense(32, input_shape=(4,))...
habedi/stack-exchange-dataset
92,953
Does multi-head attention remove the need for self-attention?
<p>The title may be confusing but suppose I were to build Transformer Neural Network with a masking network that utilizes multi-head attention (like that in <a href="https://arxiv.org/pdf/2010.13154.pdf" rel="nofollow noreferrer">SepFormer</a>), would adding self-attention in the encoder and decoder still be necessary?...
deep learning transformer attention mechanism
1
Does multi-head attention remove the need for self-attention? -- (deep learning transformer attention mechanism) <p>The title may be confusing but suppose I were to build Transformer Neural Network with a masking network that utilizes multi-head attention (like that in <a href="https://arxiv.org/pdf/2010.13154.pdf" rel...
habedi/stack-exchange-dataset
92,954
Understanding math notation in infoGAN paper
<p>I'm reading this paper about <strong>mutual information</strong> in infoGAN <a href="https://arxiv.org/pdf/1606.03657v1.pdf" rel="nofollow noreferrer">infoGAN_paper_link </a>and already have the code to run it. I pretty much found code for it which is fine and dandy except for the fact that I kinda don't understand ...
statistics gan descriptive statistics mutual information
1
Understanding math notation in infoGAN paper -- (statistics gan descriptive statistics mutual information) <p>I'm reading this paper about <strong>mutual information</strong> in infoGAN <a href="https://arxiv.org/pdf/1606.03657v1.pdf" rel="nofollow noreferrer">infoGAN_paper_link </a>and already have the code to run it....
habedi/stack-exchange-dataset
92,956
Testing accuracy very low, while training and validation accuracy ~ 85%
<p>I have a training dataset of 10000 pictures and a test dataset of 15000 pictures. There are 23 types of birds.</p>&#xA;<p>First of all, I imported the necessary</p>&#xA;<pre><code>import tensorflow as tf &#xA;from tensorflow import keras&#xA;from tensorflow.keras.preprocessing.image import ImageDataGenerator &#xA;fr...
classification cnn convolutional neural network inception
1
Testing accuracy very low, while training and validation accuracy ~ 85% -- (classification cnn convolutional neural network inception) <p>I have a training dataset of 10000 pictures and a test dataset of 15000 pictures. There are 23 types of birds.</p>&#xA;<p>First of all, I imported the necessary</p>&#xA;<pre><code>im...
habedi/stack-exchange-dataset
92,962
Does Homoscedasticity applies only for linear regression models?
<p>In statistics, a sequence of random variables is homoscedastic if all its random variables have the same finite variance. This is also known as homogeneity of variance (<a href="https://en.wikipedia.org/wiki/Homoscedasticity" rel="nofollow noreferrer">Wikipedia</a>).</p>&#xA;<p>Is this assumption only for linear reg...
statistics linear regression
1
Does Homoscedasticity applies only for linear regression models? -- (statistics linear regression) <p>In statistics, a sequence of random variables is homoscedastic if all its random variables have the same finite variance. This is also known as homogeneity of variance (<a href="https://en.wikipedia.org/wiki/Homoscedas...
habedi/stack-exchange-dataset
92,968
Follow Up Question - Why use fit when already have fit_transform?
<p>This is a follow up question to: <a href="https://datascience.stackexchange.com/questions/12321/whats-the-difference-between-fit-and-fit-transform-in-scikit-learn-models/92921">What&#39;s the difference between fit and fit_transform in scikit-learn models?</a></p>&#xA;<p>I want to know why should we use <code>fit</c...
python scikit learn
1
Follow Up Question - Why use fit when already have fit_transform? -- (python scikit learn) <p>This is a follow up question to: <a href="https://datascience.stackexchange.com/questions/12321/whats-the-difference-between-fit-and-fit-transform-in-scikit-learn-models/92921">What&#39;s the difference between fit and fit_tra...
habedi/stack-exchange-dataset
92,983
Original k-Means Research Paper
<p>I'm having difficulty searching for the original published paper proposing k-Means as an algorithm. I have been inspired to find it as reference for similar work, inspired by this <a href="https://towardsdatascience.com/machine-learning-algorithms-part-9-k-means-example-in-python-f2ad05ed5203" rel="nofollow noreferr...
k means
1
Original k-Means Research Paper -- (k means) <p>I'm having difficulty searching for the original published paper proposing k-Means as an algorithm. I have been inspired to find it as reference for similar work, inspired by this <a href="https://towardsdatascience.com/machine-learning-algorithms-part-9-k-means-example-i...
habedi/stack-exchange-dataset
92,994
Data wrangling dates
<p>I have a feature with data creation dates. I have normalized them all to the same format and split them to 'day', 'month' and 'year' columns. But now I have a question. Should I apply normalization or standardization to these columns, or on dates this does not have sense?</p>&#xA;
data cleaning data wrangling
1
Data wrangling dates -- (data cleaning data wrangling) <p>I have a feature with data creation dates. I have normalized them all to the same format and split them to 'day', 'month' and 'year' columns. But now I have a question. Should I apply normalization or standardization to these columns, or on dates this does not h...
habedi/stack-exchange-dataset
93,001
Precision or Recall when dealing with critical cases?
<p>I have to create an AI that classifies mutliple objects in order to accept them or not inside a machine.&#xA;The problem is that some objects could be really harmful to the machine if they get accepted.</p>&#xA;<p>Should I focus on an high Precision or an high Recall, in order to not accept this kind of objects?</p>...
image classification
1
Precision or Recall when dealing with critical cases? -- (image classification) <p>I have to create an AI that classifies mutliple objects in order to accept them or not inside a machine.&#xA;The problem is that some objects could be really harmful to the machine if they get accepted.</p>&#xA;<p>Should I focus on an hi...
habedi/stack-exchange-dataset
93,008
How to select the split point for Continuous Attribute Age
<p><a href="https://i.stack.imgur.com/RqPxQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RqPxQ.png" alt="enter image description here" /></a></p>&#xA;<p>For the above table, midpoints for possible split points are 22.5 and 35. I have calculated the entropy and gain for each value and 35 had the mi...
classification decision trees
1
How to select the split point for Continuous Attribute Age -- (classification decision trees) <p><a href="https://i.stack.imgur.com/RqPxQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RqPxQ.png" alt="enter image description here" /></a></p>&#xA;<p>For the above table, midpoints for possible split p...
habedi/stack-exchange-dataset
93,038
Why are convolutions still used in some Transformer networks for speech enhancement?
<p>So I’ve read in <a href="https://arxiv.org/pdf/1706.03762v5.pdf" rel="nofollow noreferrer">Attention is All You Need</a> that Transformers remove the need for recurrence and convolutions entirely. However, I’ve seen some TNNs (such as <a href="https://arxiv.org/pdf/2010.13154.pdf" rel="nofollow noreferrer">SepFormer...
machine learning transformer attention mechanism
1
Why are convolutions still used in some Transformer networks for speech enhancement? -- (machine learning transformer attention mechanism) <p>So I’ve read in <a href="https://arxiv.org/pdf/1706.03762v5.pdf" rel="nofollow noreferrer">Attention is All You Need</a> that Transformers remove the need for recurrence and conv...
habedi/stack-exchange-dataset
93,040
Do weights of keywords for each topic add up to 1 in topic modeling?
<p>When you run a topic modeling (say LDA), you can get outputs for some number of topics with corresponding keywords and their weights. Based on my understanding, people usually output top 10 or top 20 keywords for each topic. For these keywords, they also have weights which represent how important each keyword is for...
topic model
1
Do weights of keywords for each topic add up to 1 in topic modeling? -- (topic model) <p>When you run a topic modeling (say LDA), you can get outputs for some number of topics with corresponding keywords and their weights. Based on my understanding, people usually output top 10 or top 20 keywords for each topic. For th...
habedi/stack-exchange-dataset
93,041
Help with Classification using scikit-learn models
<p>I'm using the Titanic data set to classify the missing Cabins. There is a lot of missing Cabin values. My objective is just to assign the letter of the Cabin without the room number. So, I'm just wanting to use the models to assign the section letter. I've used 4 models:</p>&#xA;<ul>&#xA;<li>(2) RandomForestClassifi...
scikit learn multiclass classification hyperparameter
1
Help with Classification using scikit-learn models -- (scikit learn multiclass classification hyperparameter) <p>I'm using the Titanic data set to classify the missing Cabins. There is a lot of missing Cabin values. My objective is just to assign the letter of the Cabin without the room number. So, I'm just wanting to ...
habedi/stack-exchange-dataset
93,045
What representation of data should I choose, pandas, numpy or tensors to train neural network model
<p>I am having a pandas dataframe divided to <code>X_train, X_test, y_train, y_test</code> by <code>train_test_split</code> and I am using it to train my neural network model for binary classification. It is taking some time and I was wondering if it would be faster if I changed it from <code>pandas.dataframe</code> to...
neural network keras numpy
1
What representation of data should I choose, pandas, numpy or tensors to train neural network model -- (neural network keras numpy) <p>I am having a pandas dataframe divided to <code>X_train, X_test, y_train, y_test</code> by <code>train_test_split</code> and I am using it to train my neural network model for binary cl...
habedi/stack-exchange-dataset
93,052
How can I plot a line for time series data with categorical intervals in R
<p>I am working with single time-series measurements that I want to plot for the time window of about 1 week.</p>&#xA;<p><a href="https://github.com/JohannesJamroszczyk/timeSeries.git" rel="nofollow noreferrer">This</a> is the data I am working with.</p>&#xA;<p>This is my R script:</p>&#xA;<pre><code>library(tidyverse)...
time series r plotting ggplot2
1
How can I plot a line for time series data with categorical intervals in R -- (time series r plotting ggplot2) <p>I am working with single time-series measurements that I want to plot for the time window of about 1 week.</p>&#xA;<p><a href="https://github.com/JohannesJamroszczyk/timeSeries.git" rel="nofollow noreferrer...
habedi/stack-exchange-dataset
93,067
VC dimension for Gaussian Process Regression
<p>In neural networks, the VC dimension <span class="math-container">$d_{VC}$</span> equals approximately the number of parameters (weights) of the network. The rule of thump for good generalization is then <span class="math-container">$N \geq 10 d_{VC} \approx 10 * (\text{number of weigts})$</span>.</p>&#xA;<p>What is...
machine learning gaussian process vc theory
1
VC dimension for Gaussian Process Regression -- (machine learning gaussian process vc theory) <p>In neural networks, the VC dimension <span class="math-container">$d_{VC}$</span> equals approximately the number of parameters (weights) of the network. The rule of thump for good generalization is then <span class="math-c...
habedi/stack-exchange-dataset
93,073
I'm trying to do a time series model without a datetime field in python. Is this possible?
<p>I have a dataset with data like this:</p>&#xA;<pre><code>Day Revenue&#xA;1 1.2&#xA;2 1.5&#xA;3 1.1&#xA;4 1.34&#xA;</code></pre>&#xA;<p>I want to do a time series model on it, but am getting this error:</p>&#xA;<p>ValueError: view limit minimum -35.45 is less than 1 and is an...
python time series
1
I'm trying to do a time series model without a datetime field in python. Is this possible? -- (python time series) <p>I have a dataset with data like this:</p>&#xA;<pre><code>Day Revenue&#xA;1 1.2&#xA;2 1.5&#xA;3 1.1&#xA;4 1.34&#xA;</code></pre>&#xA;<p>I want to do a time serie...
habedi/stack-exchange-dataset
93,100
Understanding clusters after applying PCA then K-means
<p>I have a dataset grouped by customer level, and the rows are sum_mexico, sum_uk, ... etc to indicate if the customer has spent money at stores in those countries..similarily counts for these as well. I end up with 200 columns.</p>&#xA;<p>I would like to cluster this data to observe the spending habits and see if i c...
machine learning data mining k means pca dimensionality reduction
1
Understanding clusters after applying PCA then K-means -- (machine learning data mining k means pca dimensionality reduction) <p>I have a dataset grouped by customer level, and the rows are sum_mexico, sum_uk, ... etc to indicate if the customer has spent money at stores in those countries..similarily counts for these ...
habedi/stack-exchange-dataset
93,108
Actor Network Target Value in A2C Reinforcement Learning
<p>In DQN, we use;</p>&#xA;<p><span class="math-container">$Target = r+\gamma v(s')$</span> equation to train (fit) our network. It is easy to understand since we use the <span class="math-container">$Target$</span> value as the dependent variable like we do in supervised learning. I.e. we can use codes in python to t...
machine learning reinforcement learning actor critic
1
Actor Network Target Value in A2C Reinforcement Learning -- (machine learning reinforcement learning actor critic) <p>In DQN, we use;</p>&#xA;<p><span class="math-container">$Target = r+\gamma v(s')$</span> equation to train (fit) our network. It is easy to understand since we use the <span class="math-container">$Tar...
habedi/stack-exchange-dataset
93,110
How to block network access for conda/python environments?
<p>How can I configure a virtual data science environment so that data science libraries from NumFocus do not contact external servers without explicit consent?</p>&#xA;<p>After setting up a custom DNS I observed traffic when initializing a conda environment. I would like to avoid this for individual projects/ environm...
anaconda
1
How to block network access for conda/python environments? -- (anaconda) <p>How can I configure a virtual data science environment so that data science libraries from NumFocus do not contact external servers without explicit consent?</p>&#xA;<p>After setting up a custom DNS I observed traffic when initializing a conda ...
habedi/stack-exchange-dataset
93,125
Why does the MAE still remain, at all?
<p>This may seem to be a silly question. But I just wonder why the MAE doesn't reduce to values close to 0.</p>&#xA;<p><a href="https://i.stack.imgur.com/eZEJr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eZEJr.jpg" alt="MAE" /></a></p>&#xA;<p>It's the result of an MLP with 2 hidden layers and 6 n...
mlp cost function error handling
1
Why does the MAE still remain, at all? -- (mlp cost function error handling) <p>This may seem to be a silly question. But I just wonder why the MAE doesn't reduce to values close to 0.</p>&#xA;<p><a href="https://i.stack.imgur.com/eZEJr.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eZEJr.jpg" alt="...
habedi/stack-exchange-dataset
93,133
Negative learning implementation in pytorch
<p>I have read a paper on Negative Learning: <a href="https://arxiv.org/abs/1908.07387" rel="nofollow noreferrer">https://arxiv.org/abs/1908.07387</a>.&#xA;The idea is that you can train a network not only by telling what label of the sample is, but by telling what it surely is not.&#xA;Let's call the latter a <strong>...
loss function pytorch
1
Negative learning implementation in pytorch -- (loss function pytorch) <p>I have read a paper on Negative Learning: <a href="https://arxiv.org/abs/1908.07387" rel="nofollow noreferrer">https://arxiv.org/abs/1908.07387</a>.&#xA;The idea is that you can train a network not only by telling what label of the sample is, but...
habedi/stack-exchange-dataset
93,138
Applying an algorithm on it's own training data for descriptive purposes?
<p>Good Day, I am newer to data science so I am not confident in this. To set up the question I will describe my data and approach.</p>&#xA;<p><strong>Data</strong></p>&#xA;<p>I don't want to share specific data examples as I want to try and keep some anonymity. I have data for events between 2016 and 2019. Each even...
model selection descriptive statistics
1
Applying an algorithm on it's own training data for descriptive purposes? -- (model selection descriptive statistics) <p>Good Day, I am newer to data science so I am not confident in this. To set up the question I will describe my data and approach.</p>&#xA;<p><strong>Data</strong></p>&#xA;<p>I don't want to share spec...
habedi/stack-exchange-dataset
93,139
Which Algorithm did OpenAI used to create a hide and seek playing Agent?
<p>I just saw this video on youtube: <a href="https://www.youtube.com/watch?v=kopoLzvh5jY&amp;t=9s" rel="nofollow noreferrer">https://www.youtube.com/watch?v=kopoLzvh5jY&amp;t=9s</a></p>&#xA;<p>Which Algorithm did OpenAI used to create a hide and seek playing Agent?</p>&#xA;<p>Was it Genetic Algorithm or Policy Gradien...
machine learning deep learning reinforcement learning policy gradients genetic algorithms
1
Which Algorithm did OpenAI used to create a hide and seek playing Agent? -- (machine learning deep learning reinforcement learning policy gradients genetic algorithms) <p>I just saw this video on youtube: <a href="https://www.youtube.com/watch?v=kopoLzvh5jY&amp;t=9s" rel="nofollow noreferrer">https://www.youtube.com/wa...
habedi/stack-exchange-dataset
93,144
Minimal working example or tutorial showing how to use Pytorch's nn.TransformerDecoder for batch text generation in training and inference modes?
<p>I want to solve a sequence-to-sequence text generation task (e.g. question answering, language translation, etc.).</p>&#xA;<p>For the purposes of this question, you may assume that I already have the input part already handled. (I already have a tensor of dimensions batch_size x num_input_tokens x input_dim represen...
pytorch transformer sequence to sequence text generation huggingface
1
Minimal working example or tutorial showing how to use Pytorch's nn.TransformerDecoder for batch text generation in training and inference modes? -- (pytorch transformer sequence to sequence text generation huggingface) <p>I want to solve a sequence-to-sequence text generation task (e.g. question answering, language tr...
habedi/stack-exchange-dataset
93,147
Performance metrics changing significantly based on batch size
<p>I am working on a binary classification problem where there is significant class imbalance (minority class makes up nearly 10%). The dataset has ~15,000 observations and I have split this in to a training, validation and test set (that are stratified).</p>&#xA;<p>Using PyTorch I build a neural network with 5 fully c...
neural network pytorch overfitting
1
Performance metrics changing significantly based on batch size -- (neural network pytorch overfitting) <p>I am working on a binary classification problem where there is significant class imbalance (minority class makes up nearly 10%). The dataset has ~15,000 observations and I have split this in to a training, validati...
habedi/stack-exchange-dataset
93,161
Training Objective of language model for GPT3
<p>On page 34 of OpenAI's <a href="https://arxiv.org/pdf/2005.14165v2.pdf" rel="nofollow noreferrer">GPT-3</a>, there is a sentence demonstrating the limitation of objective function:</p>&#xA;<blockquote>&#xA;<p>Our current objective weights every token equally and lacks a notion of what is most important to predict an...
nlp language model openai gpt
1
Training Objective of language model for GPT3 -- (nlp language model openai gpt) <p>On page 34 of OpenAI's <a href="https://arxiv.org/pdf/2005.14165v2.pdf" rel="nofollow noreferrer">GPT-3</a>, there is a sentence demonstrating the limitation of objective function:</p>&#xA;<blockquote>&#xA;<p>Our current objective weigh...
habedi/stack-exchange-dataset
93,169
Calculating optimal number of topics for topic modeling (LDA)
<p>am going to do topic modeling via LDA. I run my commands to see the optimal number of topics. The output was as follows: It is a bit different from any other plots that I have ever seen. Do you think it is okay? or it is better to use other algorithms rather than LDA. It is worth mentioning that when I run my comman...
nlp data science model topic model lda
1
Calculating optimal number of topics for topic modeling (LDA) -- (nlp data science model topic model lda) <p>am going to do topic modeling via LDA. I run my commands to see the optimal number of topics. The output was as follows: It is a bit different from any other plots that I have ever seen. Do you think it is okay?...
habedi/stack-exchange-dataset
93,173
Explanation of random forest performance difference to when using categories and when using dummy variables
<p>I have some hand coded feature which is a category with values &quot;High&quot;, &quot;Low&quot;, and &quot;Normal&quot;.</p>&#xA;<p>I created this feature myself and my problem performance (classification) increased dramatically when using it with expanding these by dummy variables.</p>&#xA;<p>Now since I'm trying ...
classification feature selection random forest decision trees feature engineering
1
Explanation of random forest performance difference to when using categories and when using dummy variables -- (classification feature selection random forest decision trees feature engineering) <p>I have some hand coded feature which is a category with values &quot;High&quot;, &quot;Low&quot;, and &quot;Normal&quot;.<...
habedi/stack-exchange-dataset
93,181
How can I convert a dataframe column of fraction float that is stored as a string into float?
<p>The df is as follows:</p>&#xA;<pre><code>&gt;&gt;&gt; df['csl']&#xA; 0 250/500&#xA; 1 500/1000&#xA; 2 500/1000&#xA; 3 500/1000&#xA; 4 100/300&#xA;695 500/1000&#xA;696 250/500&#xA;697 100/300&#xA;698 250/500&#xA;699 250/500&#xA;Name: csl, Length: 700, dtype: object&#xA;</...
python pandas data science model numpy
1
How can I convert a dataframe column of fraction float that is stored as a string into float? -- (python pandas data science model numpy) <p>The df is as follows:</p>&#xA;<pre><code>&gt;&gt;&gt; df['csl']&#xA; 0 250/500&#xA; 1 500/1000&#xA; 2 500/1000&#xA; 3 500/1000&#xA; 4 100/300&#xA;695 ...
habedi/stack-exchange-dataset
93,203
Removing correlation between independent variables
<p>If there are two continuous independent variables that show a high amount of correlation between them, can we remove this correlation by multiplying or dividing the values of one of the variables with random factors (E.g., multiplying the first value with 2, the second value with 3, etc.). We would be keeping a cop...
machine learning correlation
1
Removing correlation between independent variables -- (machine learning correlation) <p>If there are two continuous independent variables that show a high amount of correlation between them, can we remove this correlation by multiplying or dividing the values of one of the variables with random factors (E.g., multiplyi...
habedi/stack-exchange-dataset
93,224
Word2vec outperforming BERT, possible?
<p>I'm trying to solve a multilabel classification (dataset is tweet text) using a combination of BERT and CNN. As a benchmark, I'd compare it to other word embeddings, one of which is Word2vec. After numerous tries, it seems that Word2vec-CNN keeps outperforming BERT-CNN by a slight bit, here's a result from my last t...
keras tensorflow nlp word2vec bert
1
Word2vec outperforming BERT, possible? -- (keras tensorflow nlp word2vec bert) <p>I'm trying to solve a multilabel classification (dataset is tweet text) using a combination of BERT and CNN. As a benchmark, I'd compare it to other word embeddings, one of which is Word2vec. After numerous tries, it seems that Word2vec-C...
habedi/stack-exchange-dataset
93,225
Probability that ensemble model is correct based on accuracies of its classifiers
<p>I'm trying to understand what I did wrong when trying to answer this question. The exact question is:</p>&#xA;<blockquote>&#xA;<p>Assume that we have 3 trained prediction models, and each model outputs either&#xA;-1 or 1. We then tested the accuracies of these models and obtained the following outcomes:</p>&#xA;</b...
ensemble modeling
1
Probability that ensemble model is correct based on accuracies of its classifiers -- (ensemble modeling) <p>I'm trying to understand what I did wrong when trying to answer this question. The exact question is:</p>&#xA;<blockquote>&#xA;<p>Assume that we have 3 trained prediction models, and each model outputs either&#x...
habedi/stack-exchange-dataset
93,226
Should I make single machine learning model for predicting price of house or 6 different models, given 6 datasets for different cities?
<p>I am currently working on <a href="https://www.kaggle.com/ruchi798/housing-prices-in-metropolitan-areas-of-india" rel="nofollow noreferrer">&quot;Housing Prices in Metropolitan Areas of India&quot;</a> (kaggle dataset), with 6 different csv files for 6 different cities.</p>&#xA;<p>All have same columns (40).</p>&#xA...
machine learning machine learning model
1
Should I make single machine learning model for predicting price of house or 6 different models, given 6 datasets for different cities? -- (machine learning machine learning model) <p>I am currently working on <a href="https://www.kaggle.com/ruchi798/housing-prices-in-metropolitan-areas-of-india" rel="nofollow noreferr...
habedi/stack-exchange-dataset
93,234
How can I group by elements in a column in pandas?
<p>I have a dataset that looks like this:</p>&#xA;<p><a href="https://i.stack.imgur.com/Soc9J.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Soc9J.jpg" alt="enter image description here" /></a></p>&#xA;<p>I need to transform it so it looks like this:</p>&#xA;<p><a href="https://i.stack.imgur.com/iPX...
pandas data cleaning
1
How can I group by elements in a column in pandas? -- (pandas data cleaning) <p>I have a dataset that looks like this:</p>&#xA;<p><a href="https://i.stack.imgur.com/Soc9J.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Soc9J.jpg" alt="enter image description here" /></a></p>&#xA;<p>I need to transfor...
habedi/stack-exchange-dataset
93,241
Shaping columns (and column headers) into multi-index rows using pivot/pivot_table
<p><strong>Problem</strong></p>&#xA;<p>I am trying to shape a dataset which includes stacked dates/data as rows and half-hourly data as columns (Trading periods, eg. TP1, TP2), into a chronological half-hourly order with the stacked data becoming columns (see image below for the output format) and the column headers (T...
python pandas data cleaning
1
Shaping columns (and column headers) into multi-index rows using pivot/pivot_table -- (python pandas data cleaning) <p><strong>Problem</strong></p>&#xA;<p>I am trying to shape a dataset which includes stacked dates/data as rows and half-hourly data as columns (Trading periods, eg. TP1, TP2), into a chronological half-h...
habedi/stack-exchange-dataset
93,253
Why is averaging the vectors required in word2vec?
<p>While implementing word2vec using gensim by following few tutorials online, one thing that I couldn't understand is the reason why word vectors are averaged once the model is trained. Few example links below.</p>&#xA;<ol>&#xA;<li><p><a href="https://www.kaggle.com/ananyabioinfo/text-classification-using-word2vec/not...
word embeddings word2vec gensim
1
Why is averaging the vectors required in word2vec? -- (word embeddings word2vec gensim) <p>While implementing word2vec using gensim by following few tutorials online, one thing that I couldn't understand is the reason why word vectors are averaged once the model is trained. Few example links below.</p>&#xA;<ol>&#xA;<li...
habedi/stack-exchange-dataset
93,263
What would cause a Hierarchical Cluster to look like skewed (if this is the right term to use!)?
<p>I am surprised about this hierarchical cluster! For me, it looks somehow abnormal. Or, maybe normal but I am not able to identify why it looks like this. Any idea why data would be clustered in such a structure?&#xA;<a href="https://i.stack.imgur.com/ojzUe.png" rel="nofollow noreferrer"><img src="https://i.stack.img...
clustering unsupervised learning
1
What would cause a Hierarchical Cluster to look like skewed (if this is the right term to use!)? -- (clustering unsupervised learning) <p>I am surprised about this hierarchical cluster! For me, it looks somehow abnormal. Or, maybe normal but I am not able to identify why it looks like this. Any idea why data would be c...
habedi/stack-exchange-dataset
93,278
Recurrent Neural Network (RNN) Vanishing gradient problem - Why does it affect earlier timesteps more?
<p>I understand the concept of backpropagation in standard neural networks and backpropagation through time with RNNs, why this causes exponentially smaller gradients at earlier time steps and most of the maths behind it all, but what I don’t understand is why this affects the earlier timestep in particular? Since, th...
machine learning deep learning neural network backpropagation rnn
1
Recurrent Neural Network (RNN) Vanishing gradient problem - Why does it affect earlier timesteps more? -- (machine learning deep learning neural network backpropagation rnn) <p>I understand the concept of backpropagation in standard neural networks and backpropagation through time with RNNs, why this causes exponentia...
habedi/stack-exchange-dataset
93,288
why my batch size doesn't change
<p>it happens quite a lot for me that I declared batch_size=64 or any number and end up watching Keras training my net on whole data instead of the batch. then I edit it many times and finally finished with the very first code working.&#xA;for example this simple code:</p>&#xA;<pre><code>data_train=pd.read_csv(&quot;tr...
keras tensorflow
1
why my batch size doesn't change -- (keras tensorflow) <p>it happens quite a lot for me that I declared batch_size=64 or any number and end up watching Keras training my net on whole data instead of the batch. then I edit it many times and finally finished with the very first code working.&#xA;for example this simple c...
habedi/stack-exchange-dataset
93,333
Why can't I use 2D-arrays as features for CCA (Canonical Correlation Analysis) classifier?
<h3>The Problem</h3>&#xA;<p>When using <code>fit</code> of the <a href="https://scikit-learn.org/stable/modules/generated/sklearn.cross_decomposition.CCA.html" rel="nofollow noreferrer">scikit learn CCA</a> classifier it won't allow me to use arrays as features. The error <code>ValueError: Found array with dim 3. Estim...
machine learning python scikit learn
1
Why can't I use 2D-arrays as features for CCA (Canonical Correlation Analysis) classifier? -- (machine learning python scikit learn) <h3>The Problem</h3>&#xA;<p>When using <code>fit</code> of the <a href="https://scikit-learn.org/stable/modules/generated/sklearn.cross_decomposition.CCA.html" rel="nofollow noreferrer">s...
habedi/stack-exchange-dataset
93,342
Data Selection according to Feature Values
<p>I am given a dataset consisting of 10 million molecules. Each row contains:</p>&#xA;<ul>&#xA;<li>The average value predicted by an ensemble of regression models trained to predict a&#xA;certain property about chemicals (value of interest)</li>&#xA;<li>The ensemble variance of the predicted value</li>&#xA;<li>A heuri...
data mining feature selection data feature engineering feature scaling
1
Data Selection according to Feature Values -- (data mining feature selection data feature engineering feature scaling) <p>I am given a dataset consisting of 10 million molecules. Each row contains:</p>&#xA;<ul>&#xA;<li>The average value predicted by an ensemble of regression models trained to predict a&#xA;certain prop...
habedi/stack-exchange-dataset
93,347
Specifying class or sample weights in Keras for one-hot encoded labels in a TF Dataset
<p>I am trying to train an image classifier on an unbalanced training set. In order to cope with the class imbalance, I want either to weight the classes or the individual samples. Weighting the classes does not seem to work. And somehow for my setup I was not able to find a way to specify the samples weights. Below yo...
classification keras tensorflow class imbalance weighted data
1
Specifying class or sample weights in Keras for one-hot encoded labels in a TF Dataset -- (classification keras tensorflow class imbalance weighted data) <p>I am trying to train an image classifier on an unbalanced training set. In order to cope with the class imbalance, I want either to weight the classes or the indiv...
habedi/stack-exchange-dataset
93,350
Logistic regression with unbalanced data, scoring based only on rare class
<p>I have a dataset off app. 600.000 data points in which 0.2% (1.200 samples) is labelled as signifying a rare event. I want to use logistic regression to help me predict this rare event, but even when I apply weighting, the classification accuracy is poor.</p>&#xA;<p>I know that I can rebalance the dataset, but the p...
python scikit learn logistic regression class imbalance
1
Logistic regression with unbalanced data, scoring based only on rare class -- (python scikit learn logistic regression class imbalance) <p>I have a dataset off app. 600.000 data points in which 0.2% (1.200 samples) is labelled as signifying a rare event. I want to use logistic regression to help me predict this rare ev...
habedi/stack-exchange-dataset
93,367
Neural network for time series forecasting with an auxiliary data
<p>Lets say we have 2 data sets. First is the close price time series data set and we want to predict future values of it. The second is volumes of each price from the first data set and we do not want to predict on it but use this data to help predict future price values.</p>&#xA;<p>What kind of neural networks is sui...
neural network time series lstm
1
Neural network for time series forecasting with an auxiliary data -- (neural network time series lstm) <p>Lets say we have 2 data sets. First is the close price time series data set and we want to predict future values of it. The second is volumes of each price from the first data set and we do not want to predict on i...
habedi/stack-exchange-dataset
93,376
Producing a confidence output to use in a weighted average layer
<p>I am trying to solve a problem where the input consists of an unordered set of observations (variable size), and the desired output is a single value describing some property of the observations as a whole.</p>&#xA;<p>The straight-forward approach would be to train a network to handle an individual observation and f...
keras confidence
1
Producing a confidence output to use in a weighted average layer -- (keras confidence) <p>I am trying to solve a problem where the input consists of an unordered set of observations (variable size), and the desired output is a single value describing some property of the observations as a whole.</p>&#xA;<p>The straight...
habedi/stack-exchange-dataset
93,395
Does not using more filters in deeper CNN creates more images?
<p>For example, we have applied 32 filters to a single image. Then it created 32 different images (stack of convolutional values).</p>&#xA;<p>And in the second layer, if we apply 64 filters, are all these filters going to be applied on all those 32 images? If so, then it will create 64*32 numbers of output or I am und...
deep learning cnn convolutional neural network
1
Does not using more filters in deeper CNN creates more images? -- (deep learning cnn convolutional neural network) <p>For example, we have applied 32 filters to a single image. Then it created 32 different images (stack of convolutional values).</p>&#xA;<p>And in the second layer, if we apply 64 filters, are all these ...
habedi/stack-exchange-dataset
93,421
Visualization methods in R to examine correlation of labels against response
<p><strong>Question</strong></p>&#xA;<p>What are some good plotting methods in R for examining the relationship between a target variable and various explanatory variables? In particular, I'm looking for visualization techniques that scale to more variables than the traditional scatterplot matrix.</p>&#xA;<p><strong>Mo...
r visualization correlation
1
Visualization methods in R to examine correlation of labels against response -- (r visualization correlation) <p><strong>Question</strong></p>&#xA;<p>What are some good plotting methods in R for examining the relationship between a target variable and various explanatory variables? In particular, I'm looking for visual...
habedi/stack-exchange-dataset
93,427
Training network 10 time slower on 16core vs 8core C++ API
<p>Pytorch seems to run 10 times slower on a 16 core machine vs 8 core machine. Any thoughts on why that is and what/if any thing I can do to speed up the 16 core machine? Thank you</p>&#xA;<p>Below is a list of details in the order in which you find them.</p>&#xA;<ol>&#xA;<li>16 core pytorch env</li>&#xA;<li>16 core l...
pytorch c++
1
Training network 10 time slower on 16core vs 8core C++ API -- (pytorch c++) <p>Pytorch seems to run 10 times slower on a 16 core machine vs 8 core machine. Any thoughts on why that is and what/if any thing I can do to speed up the 16 core machine? Thank you</p>&#xA;<p>Below is a list of details in the order in which yo...
habedi/stack-exchange-dataset
93,440
Preparing for interview - Logistic regression question
<p>So I'm doing some exercises to prepare for a interview test. However there's one of the assignments I don't understand. Maybe some of you can explain what they want me to do? It would help me to understand the underlying questionframes I may come across.</p>&#xA;<p>This is the assignment:</p>&#xA;<p><em>Logit Regres...
python logistic regression
1
Preparing for interview - Logistic regression question -- (python logistic regression) <p>So I'm doing some exercises to prepare for a interview test. However there's one of the assignments I don't understand. Maybe some of you can explain what they want me to do? It would help me to understand the underlying questionf...
habedi/stack-exchange-dataset
93,491
Forecasting with Neural network and understanding which underlying model is favoured
<p>If I have a very large set of data (~ 1TB). How can I use Neural Network on this data to understand which underlying distribution (eg. let's say a Gaussian or a Poissonian with a certain mean, sd) is favoured by the data. At least, can I conclude, if one of the distributions (out of the 2 distributions) is not favo...
neural network predictive modeling convolutional neural network forecasting generative models
1
Forecasting with Neural network and understanding which underlying model is favoured -- (neural network predictive modeling convolutional neural network forecasting generative models) <p>If I have a very large set of data (~ 1TB). How can I use Neural Network on this data to understand which underlying distribution (eg...
habedi/stack-exchange-dataset
93,496
Bellman operator and contraction property
<p>Currently, I am learning about Bellman Operator in Dynamic Programming and Reinforcement Learning. I would like to know why is Bellman operator contraction with respect to infinity norm? Why not another norm e.g. Euclidian norm?</p>&#xA;
reinforcement learning dynamic programming
1
Bellman operator and contraction property -- (reinforcement learning dynamic programming) <p>Currently, I am learning about Bellman Operator in Dynamic Programming and Reinforcement Learning. I would like to know why is Bellman operator contraction with respect to infinity norm? Why not another norm e.g. Euclidian norm...
habedi/stack-exchange-dataset
93,497
Computing SVD through Eigendecomposition of correlation matrix
<p>I am following the excellent series on SVD by Steve Brunton from the University of Washington, on YouTube, but I have trouble interpreting his 4th video on the subject.</p>&#xA;<p>If I understand correctly, he mentions that one can compute the economy SVD decomposition <span class="math-container">$X = \hat{U}\hat{\...
python numpy pca image
1
Computing SVD through Eigendecomposition of correlation matrix -- (python numpy pca image) <p>I am following the excellent series on SVD by Steve Brunton from the University of Washington, on YouTube, but I have trouble interpreting his 4th video on the subject.</p>&#xA;<p>If I understand correctly, he mentions that on...
habedi/stack-exchange-dataset
93,501
Pandas: Group by Single Column Entries
<p><a href="https://i.stack.imgur.com/RD5ag.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RD5ag.png" alt="enter image description here" /></a></p>&#xA;<p>So have this table above. I'm trying to aggregate the occupations such that the table results in:</p>&#xA;<p><a href="https://i.stack.imgur.com/9...
python dataset pandas data table
1
Pandas: Group by Single Column Entries -- (python dataset pandas data table) <p><a href="https://i.stack.imgur.com/RD5ag.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RD5ag.png" alt="enter image description here" /></a></p>&#xA;<p>So have this table above. I'm trying to aggregate the occupations su...
habedi/stack-exchange-dataset
93,510
Different training method for encoder-decoder model
<p>Trying to learn the encoder-decoder model for some NLP problems.</p>&#xA;<p>I am referring to <a href="https://blog.keras.io/a-ten-minute-introduction-to-sequence-to-sequence-learning-in-keras.html" rel="nofollow noreferrer">this Keras tutorial</a>.</p>&#xA;<p>During the model training phase, this tutorial just uses...
deep learning keras tensorflow sequence to sequence
1
Different training method for encoder-decoder model -- (deep learning keras tensorflow sequence to sequence) <p>Trying to learn the encoder-decoder model for some NLP problems.</p>&#xA;<p>I am referring to <a href="https://blog.keras.io/a-ten-minute-introduction-to-sequence-to-sequence-learning-in-keras.html" rel="nofo...
habedi/stack-exchange-dataset
93,522
VC-dimension of the infinite set of convex bodies?
<p>I try to find and prove the VC-dimension of the infinite set of (uni-directional) convex bodies. From intuition, it's clear to me that it goes to infinity, but I don't know the correct way to prove it formally.&#xA;Any clue for direction?</p>&#xA;
vc theory
1
VC-dimension of the infinite set of convex bodies? -- (vc theory) <p>I try to find and prove the VC-dimension of the infinite set of (uni-directional) convex bodies. From intuition, it's clear to me that it goes to infinity, but I don't know the correct way to prove it formally.&#xA;Any clue for direction?</p>&#xA;
habedi/stack-exchange-dataset
93,535
Pytorch: understanding the purpose of each argument in the forward function of nn.TransformerDecoder
<p>According to <a href="https://pytorch.org/docs/stable/generated/torch.nn.TransformerDecoder.html" rel="nofollow noreferrer">https://pytorch.org/docs/stable/generated/torch.nn.TransformerDecoder.html</a>, the <a href="https://pytorch.org/docs/stable/generated/torch.nn.TransformerDecoder.html#torch.nn.TransformerDecod...
nlp pytorch transformer sequence to sequence text generation
1
Pytorch: understanding the purpose of each argument in the forward function of nn.TransformerDecoder -- (nlp pytorch transformer sequence to sequence text generation) <p>According to <a href="https://pytorch.org/docs/stable/generated/torch.nn.TransformerDecoder.html" rel="nofollow noreferrer">https://pytorch.org/docs/s...
habedi/stack-exchange-dataset
93,570
LSTM for Stock Return Prediction
<p>I am writing my masters thesis and am using LSTMs for daily stock return prediction. So far I am only predicting numerical values but will soon explore a classification style problem and predict whether it will go up or down each day.</p>&#xA;<p>I have explored several scenarios</p>&#xA;<ul>&#xA;<li>A single LSTM us...
machine learning lstm loss function rnn
1
LSTM for Stock Return Prediction -- (machine learning lstm loss function rnn) <p>I am writing my masters thesis and am using LSTMs for daily stock return prediction. So far I am only predicting numerical values but will soon explore a classification style problem and predict whether it will go up or down each day.</p>&...
habedi/stack-exchange-dataset
93,588
3d input for Dense Layer Keras
<p>Is there any example of how Keras <code>Dense</code> layer handles <code>3D</code> input.</p>&#xA;<p>The documentation explains the following:</p>&#xA;<p><code>If the input to the layer has a rank greater than 2, then Dense computes the dot product between the inputs and the kernel along the last axis of the inputs ...
deep learning neural network keras tensorflow linear algebra
1
3d input for Dense Layer Keras -- (deep learning neural network keras tensorflow linear algebra) <p>Is there any example of how Keras <code>Dense</code> layer handles <code>3D</code> input.</p>&#xA;<p>The documentation explains the following:</p>&#xA;<p><code>If the input to the layer has a rank greater than 2, then De...
habedi/stack-exchange-dataset
93,613
Memory issue when trying to initiate zero tensor with pytorch
<p>I am facing a memory issue while trying to initialize a torch.zeros -&#xA;<code>torch.zeros((2000,2000,3200), device=device)</code></p>&#xA;<p>Getting the following error:</p>&#xA;<pre><code>RuntimeError: CUDA out of memory. Tried to allocate 47.69 GiB (GPU 0; 8.00 GiB total capacity; 1.50 KiB already allocated; 6.1...
machine learning python tensorflow pytorch memory
1
Memory issue when trying to initiate zero tensor with pytorch -- (machine learning python tensorflow pytorch memory) <p>I am facing a memory issue while trying to initialize a torch.zeros -&#xA;<code>torch.zeros((2000,2000,3200), device=device)</code></p>&#xA;<p>Getting the following error:</p>&#xA;<pre><code>RuntimeEr...
habedi/stack-exchange-dataset
93,626
How can I split hourly time series?
<p>I'm newbie in R and time series analysis. I'm trying to build an Arima model.&#xA;My dataset has this structure:</p>&#xA;<pre><code>DATA Ora VALORE&#xA;&lt;chr&gt; &lt;dbl&gt; &lt;dbl&gt;&#xA; &#xA;2018-09-01 1 3646742 &#xA;2018-09-01 2 3273110 &#xA;2018-09-01 3 ...
time series r
1
How can I split hourly time series? -- (time series r) <p>I'm newbie in R and time series analysis. I'm trying to build an Arima model.&#xA;My dataset has this structure:</p>&#xA;<pre><code>DATA Ora VALORE&#xA;&lt;chr&gt; &lt;dbl&gt; &lt;dbl&gt;&#xA; &#xA;2018-09-01 1 3646742 &#xA;20...
habedi/stack-exchange-dataset
93,637
Any research on relationship between the dimensions of a (word2Vec) space and how the human mind constructs meaning (or reality) through language?
<p>Neuroscience is still trying to &quot;find&quot; how the mind (and language) somehow &quot;works&quot;. Is there any theory linking a (low-dimensionality) embedding space (like word2Vec) to a mind (linguistic) model? Any <a href="https://en.wikipedia.org/wiki/Cognitive_linguistics#Cognitive_Linguistics_(linguistics_...
nlp word2vec deepmind
1
Any research on relationship between the dimensions of a (word2Vec) space and how the human mind constructs meaning (or reality) through language? -- (nlp word2vec deepmind) <p>Neuroscience is still trying to &quot;find&quot; how the mind (and language) somehow &quot;works&quot;. Is there any theory linking a (low-dime...
habedi/stack-exchange-dataset
93,638
Is positional encoding (in transformers) an estimation of the relative positions of words in the training corpus texts?
<p>Is this some kind of estimation of the relative positions of words in the training texts? are they creating some kind of statistical &quot;distribution&quot; of words? is &quot;cat&quot; usually 2 or 3 words away from &quot;milk&quot; in English language? things have to have a meaning, havent they? Is BERT just add...
bert transformer
1
Is positional encoding (in transformers) an estimation of the relative positions of words in the training corpus texts? -- (bert transformer) <p>Is this some kind of estimation of the relative positions of words in the training texts? are they creating some kind of statistical &quot;distribution&quot; of words? is &quo...
habedi/stack-exchange-dataset
93,651
Reason for adding 1 to word index for sequence modeling
<p>I notice in many of the tutorials <code>1</code> is added to the <code>word_index</code>. For example considering a sample code snippet inspired from <code>Tensorflow's</code> tutorial for <code>NMT</code> <a href="https://www.tensorflow.org/tutorials/text/nmt_with_attention" rel="nofollow noreferrer">https://www.te...
deep learning neural network keras tensorflow machine translation
1
Reason for adding 1 to word index for sequence modeling -- (deep learning neural network keras tensorflow machine translation) <p>I notice in many of the tutorials <code>1</code> is added to the <code>word_index</code>. For example considering a sample code snippet inspired from <code>Tensorflow's</code> tutorial for <...
habedi/stack-exchange-dataset
93,677
Concat two tensors of different dimensions
<p>I have two tensors. For example -</p>&#xA;<pre><code>a = torch.randn((500, 200, 10))&#xA;b = torch.randn((500, 5))&#xA;</code></pre>&#xA;<p>I have to concat each of <code>b</code> tensor to all elements of corresponding <code>a</code> tensor i.e., each 200 tensors of <code>a[0]</code> should get concatenated with <c...
python deep learning pytorch embeddings
1
Concat two tensors of different dimensions -- (python deep learning pytorch embeddings) <p>I have two tensors. For example -</p>&#xA;<pre><code>a = torch.randn((500, 200, 10))&#xA;b = torch.randn((500, 5))&#xA;</code></pre>&#xA;<p>I have to concat each of <code>b</code> tensor to all elements of corresponding <code>a</...
habedi/stack-exchange-dataset
93,693
Stacked Bar Chart in R
<p>I wondered if someone could help with a re-labelling 'fill' variables ' and the x-axis on a stacked bar chart please?</p>&#xA;<p>My ambition is to:</p>&#xA;<ul>&#xA;<li>Express the fill variable(s) as of six domains in the health survey, titled ' MR, Mob, SC, Act, Pain, Anx')</li>&#xA;<li>And have the x-variable rep...
machine learning r graphs
1
Stacked Bar Chart in R -- (machine learning r graphs) <p>I wondered if someone could help with a re-labelling 'fill' variables ' and the x-axis on a stacked bar chart please?</p>&#xA;<p>My ambition is to:</p>&#xA;<ul>&#xA;<li>Express the fill variable(s) as of six domains in the health survey, titled ' MR, Mob, SC, Act...
habedi/stack-exchange-dataset
93,715
Reducing (Variance) | the gap between my weights
<p>I have ML ready samples. And each sample has a weight.</p>&#xA;<p>The weights distribute between <code>[0-1]</code></p>&#xA;<p>My problem arise because there are a lot of samples which are <code>0.001, 0.00x</code>&#xA;And a lot of samples which are <code>0.997, 0.99x</code></p>&#xA;<p>I am going to sample data base...
sampling variance weighted data
1
Reducing (Variance) | the gap between my weights -- (sampling variance weighted data) <p>I have ML ready samples. And each sample has a weight.</p>&#xA;<p>The weights distribute between <code>[0-1]</code></p>&#xA;<p>My problem arise because there are a lot of samples which are <code>0.001, 0.00x</code>&#xA;And a lot of...
habedi/stack-exchange-dataset
93,722
X Second samples taken on unevenly spaced intervals
<p>I have dataset of following specification:</p>&#xA;<ul>&#xA;<li>512 samples taken at unevenly spaced intervals over the year</li>&#xA;<li>Each sample is an 8 second data from sensors with 4ms resolution</li>&#xA;<li>Samples are not labeled</li>&#xA;</ul>&#xA;<p>For example, I have 5 samples taken on first day, then ...
python time series clustering predictive modeling
1
X Second samples taken on unevenly spaced intervals -- (python time series clustering predictive modeling) <p>I have dataset of following specification:</p>&#xA;<ul>&#xA;<li>512 samples taken at unevenly spaced intervals over the year</li>&#xA;<li>Each sample is an 8 second data from sensors with 4ms resolution</li>&#x...
habedi/stack-exchange-dataset
93,730
Doesn't over(/under)sampling an imbalanced dataset cause issues?
<p>I'm reading a lot about how to use different metrics specifically for imbalanced datasets (e.g. two classes present, but 80% of the data is one class) and how to tackle the issue of imbalanced datasets.</p>&#xA;<p>One trick is to oversample, so to take more (or even duplicate some) data belonging to the underreprese...
classification class imbalance imbalanced data
1
Doesn't over(/under)sampling an imbalanced dataset cause issues? -- (classification class imbalance imbalanced data) <p>I'm reading a lot about how to use different metrics specifically for imbalanced datasets (e.g. two classes present, but 80% of the data is one class) and how to tackle the issue of imbalanced dataset...
habedi/stack-exchange-dataset
93,732
Train at 99% and Validation split accuracy is not more than 70%
<p>I am training a model that get accuracy on train set up to 99%<br>&#xA;but the validation split test not increase more than 70-72%</p>&#xA;<p>this is how my model is configurated:</p>&#xA;<pre><code>model = Sequential()&#xA;#model.add(TimeDistributed(Dense(64, activation='linear')))&#xA;#model.add(GRU(512, return_se...
deep learning keras tensorflow
1
Train at 99% and Validation split accuracy is not more than 70% -- (deep learning keras tensorflow) <p>I am training a model that get accuracy on train set up to 99%<br>&#xA;but the validation split test not increase more than 70-72%</p>&#xA;<p>this is how my model is configurated:</p>&#xA;<pre><code>model = Sequential...
habedi/stack-exchange-dataset
93,762
How to explain a relationship between Accuracy and F1 Score / F-Measure?
<p>I am building a CNN model for pitch estimation using a song recording. Pitch estimation is done by inputting spectrogram to CNN model and make the CNN predict pitch sequence (250 pitch values per recording) from that spectrogram. For the evaluation metrics, I am using <code>Accuracy</code> and <code>F1 Score</code>....
machine learning model accuracy evaluation f1score
1
How to explain a relationship between Accuracy and F1 Score / F-Measure? -- (machine learning model accuracy evaluation f1score) <p>I am building a CNN model for pitch estimation using a song recording. Pitch estimation is done by inputting spectrogram to CNN model and make the CNN predict pitch sequence (250 pitch val...
habedi/stack-exchange-dataset
93,766
why my pytorch liner regression failed?
<p>I am new to pytorch, i want start from a simple example-linear regression:</p>&#xA;<p>I created some random training and test sample.</p>&#xA;<p>here is my code:</p>&#xA;<pre><code>import torch&#xA;import torch.nn as nn&#xA;import torch.nn.functional as F&#xA;import torch.optim as opt &#xA;from numpy import random&#...
pytorch
1
why my pytorch liner regression failed? -- (pytorch) <p>I am new to pytorch, i want start from a simple example-linear regression:</p>&#xA;<p>I created some random training and test sample.</p>&#xA;<p>here is my code:</p>&#xA;<pre><code>import torch&#xA;import torch.nn as nn&#xA;import torch.nn.functional as F&#xA;impo...
habedi/stack-exchange-dataset
93,768
Dimensions of Transformer - dmodel and depth
<p>Trying to understand the dimensions of the <code>Multihead Attention</code> component in <code>Transformer</code> referring the following tutorial <a href="https://www.tensorflow.org/tutorials/text/transformer#setup" rel="nofollow noreferrer">https://www.tensorflow.org/tutorials/text/transformer#setup</a></p>&#xA;<p...
deep learning neural network keras tensorflow transformer
1
Dimensions of Transformer - dmodel and depth -- (deep learning neural network keras tensorflow transformer) <p>Trying to understand the dimensions of the <code>Multihead Attention</code> component in <code>Transformer</code> referring the following tutorial <a href="https://www.tensorflow.org/tutorials/text/transformer...
habedi/stack-exchange-dataset
93,782
Storing and loading bottleneck features for transfer learning on large data sets (Keras)
<p>I would like to apply transfer learning on a pretty large image data set in order to solve a classification problem. Currently I load a pre-trained net without the top layers, add my own top layers, freeze the base model and start training.&#xA;Since the data set is too big to fit into memory I load the train and va...
keras image classification preprocessing transfer learning
1
Storing and loading bottleneck features for transfer learning on large data sets (Keras) -- (keras image classification preprocessing transfer learning) <p>I would like to apply transfer learning on a pretty large image data set in order to solve a classification problem. Currently I load a pre-trained net without the ...
habedi/stack-exchange-dataset
93,801
Training a model purely on weak labels
<p>I have read a couple of papers now use rules-based system to create weak labels and then train a BERT-based model only using these weak labels. Both studies have reported better performances on manually labelled gold-standard test data.</p>&#xA;<p>However, I just don't follow the logic here. I understand distant sup...
machine learning nlp supervised learning
1
Training a model purely on weak labels -- (machine learning nlp supervised learning) <p>I have read a couple of papers now use rules-based system to create weak labels and then train a BERT-based model only using these weak labels. Both studies have reported better performances on manually labelled gold-standard test d...
habedi/stack-exchange-dataset
93,806
Applying Sci-kit Learn's kNN algorithm to Fresh Data
<p>While I was studying Scikit-learn's kNN algorithm, I realized that if I use <code>sklearn.model_selection.train_test_split</code>, the provided data gets automatically split into the train data and the test data set, according to the proportions provided as parameters.</p>&#xA;<p>Then based on the train data, the al...
machine learning scikit learn k nn
1
Applying Sci-kit Learn's kNN algorithm to Fresh Data -- (machine learning scikit learn k nn) <p>While I was studying Scikit-learn's kNN algorithm, I realized that if I use <code>sklearn.model_selection.train_test_split</code>, the provided data gets automatically split into the train data and the test data set, accordi...
habedi/stack-exchange-dataset
93,809
Adding Validation PyTorch
<p>First of all, I'm new in this field and it's my first this kind of work. I'm trying to train EfficientNet (CNN), the code below is working fine, but I can't succeed to add also validation set to the code below. My validation data is val_X and val_y. I really will appreciate your help.</p>&#xA;<pre><code> def trai...
python deep learning convolutional neural network training pytorch
1
Adding Validation PyTorch -- (python deep learning convolutional neural network training pytorch) <p>First of all, I'm new in this field and it's my first this kind of work. I'm trying to train EfficientNet (CNN), the code below is working fine, but I can't succeed to add also validation set to the code below. My valid...
habedi/stack-exchange-dataset
93,812
"R" write/export dataframe preserving the class information
<p><strong>Short Question</strong></p>&#xA;<blockquote>&#xA;<p>After formatting a dataframe in R with class information like &quot;Date&quot;, &quot;Factor&quot;, and etc. how to save the dataframe while preserving the class information. Consequently how to load the information back to a new R Project with preserving t...
r dataframe
1
"R" write/export dataframe preserving the class information -- (r dataframe) <p><strong>Short Question</strong></p>&#xA;<blockquote>&#xA;<p>After formatting a dataframe in R with class information like &quot;Date&quot;, &quot;Factor&quot;, and etc. how to save the dataframe while preserving the class information. Conse...
habedi/stack-exchange-dataset
93,822
Which ANN structure to use?
<p>Let <span class="math-container">$\mathcal{S}$</span> be the training input data set where each input <span class="math-container">$u^i \in \mathcal{S}$</span> has <span class="math-container">$d$</span> features.&#xA;I want to design a ANN so that the cost function below is minimized (the sum of&#xA;square of pair...
deep learning neural network machine learning model
1
Which ANN structure to use? -- (deep learning neural network machine learning model) <p>Let <span class="math-container">$\mathcal{S}$</span> be the training input data set where each input <span class="math-container">$u^i \in \mathcal{S}$</span> has <span class="math-container">$d$</span> features.&#xA;I want to des...
habedi/stack-exchange-dataset
93,854
Do I have to scale/normalize my training data for LSTM Classification, even if I only have one feature?
<p>I have a time-series data as follows:</p>&#xA;<pre><code># Time, Bitrate, Class&#xA; 0.2, 312, 1&#xA; 0.3, 319 1&#xA; 0.5, 227 0&#xA; 0.6, 229 0 &#xA; 0.7, 219 0 &#xA; 0.8, 341 1 &#xA; 1.0, 401 2 &#xA;</code></pre>&#xA;<p>I am using only the &quot;Bitrate&...
preprocessing normalization feature scaling
1
Do I have to scale/normalize my training data for LSTM Classification, even if I only have one feature? -- (preprocessing normalization feature scaling) <p>I have a time-series data as follows:</p>&#xA;<pre><code># Time, Bitrate, Class&#xA; 0.2, 312, 1&#xA; 0.3, 319 1&#xA; 0.5, 227 0&#xA; 0.6, 229...
habedi/stack-exchange-dataset
93,857
How Many Features Are Used in Random Forest When max_features is not an integer?
<p>In the <code>RandomForestClassifier</code> function in <code>sklearn.ensemble</code>, one of the parameters is <code>max_features</code>, which controls the size of the random subset of features that are considered at each node splitting. I would think this needs to be an integer, since of course the size of a subse...
random forest
1
How Many Features Are Used in Random Forest When max_features is not an integer? -- (random forest) <p>In the <code>RandomForestClassifier</code> function in <code>sklearn.ensemble</code>, one of the parameters is <code>max_features</code>, which controls the size of the random subset of features that are considered at...
habedi/stack-exchange-dataset
93,861
Trouble performing feature selection using boruta and support vector regression
<p>I was trying to select the most important features of a data set using <a href="https://github.com/scikit-learn-contrib/boruta_py" rel="nofollow noreferrer">Boruta in python</a>. I have split the data into training and test set. Then I used <a href="https://scikit-learn.org/stable/modules/generated/sklearn.svm.SVR.h...
python feature selection svr boruta
1
Trouble performing feature selection using boruta and support vector regression -- (python feature selection svr boruta) <p>I was trying to select the most important features of a data set using <a href="https://github.com/scikit-learn-contrib/boruta_py" rel="nofollow noreferrer">Boruta in python</a>. I have split the ...
habedi/stack-exchange-dataset
93,863
Loading pretrained model with Pytorch
<p>I saved my model with this code:</p>&#xA;<pre><code>from google.colab import files&#xA;torch.save(net, 'model.pth')&#xA;&#xA;# download checkpoint file&#xA;files.download('model.pth')&#xA;</code></pre>&#xA;<p>Then uploaded this way and checked on an image (x):</p>&#xA;<pre><code>model = torch.load('model.pth')&#xA;m...
python classification convolutional neural network pytorch colab
1
Loading pretrained model with Pytorch -- (python classification convolutional neural network pytorch colab) <p>I saved my model with this code:</p>&#xA;<pre><code>from google.colab import files&#xA;torch.save(net, 'model.pth')&#xA;&#xA;# download checkpoint file&#xA;files.download('model.pth')&#xA;</code></pre>&#xA;<p>...
habedi/stack-exchange-dataset
93,872
What if Training and testing dataset comes from the same source?
<p>I am working on a classification problem in which I have to distinguish between healthy and damaged plates. when I use the combination of k-means clustering and SVM algorithm together with 10-fold cross validation, I can achieve the accuracy up to 95%. All the training and validation datasets come from the experimen...
machine learning svm training
1
What if Training and testing dataset comes from the same source? -- (machine learning svm training) <p>I am working on a classification problem in which I have to distinguish between healthy and damaged plates. when I use the combination of k-means clustering and SVM algorithm together with 10-fold cross validation, I ...
habedi/stack-exchange-dataset
93,877
Can you choose a binary feature matrix for a binary classification model
<p>This may be a stupid, but, I am new to deep learning (and machine learning for that matter) and I can't seem to find any literature to help with my question. All I can see when Googling many different questions (trying to change keywords to try get a hit on my question) is about binary classification. And also, bina...
machine learning deep learning machine learning model binary
1
Can you choose a binary feature matrix for a binary classification model -- (machine learning deep learning machine learning model binary) <p>This may be a stupid, but, I am new to deep learning (and machine learning for that matter) and I can't seem to find any literature to help with my question. All I can see when G...
habedi/stack-exchange-dataset