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 |
|---|---|---|---|---|---|---|
84,773 | Impossible to increase model accuracy | <p>I'm building binary classification models on my company's dataset. The problem I'm having is that I haven't been able to increase the accuracy of my models. I have trained, tuned, cross validated models such as logistic regression, knn, neural networks and they all have results with the same accuracy. I feel that I ... | machine learning neural network logistic regression accuracy k nn | 1 | Impossible to increase model accuracy -- (machine learning neural network logistic regression accuracy k nn)
<p>I'm building binary classification models on my company's dataset. The problem I'm having is that I haven't been able to increase the accuracy of my models. I have trained, tuned, cross validated models such ... | habedi/stack-exchange-dataset |
84,785 | Dividing data set into (almost) equal batches based on characteristics | <p>I have a large dataset containing 6 characteristics (all numerical).
I need to split this dataset into multiple batches to be processed in parallel, and ideally, the batches should be as equal in size as possible.</p>
<p>The catch is: I can only split based on the 6 characteristics, so I have to specify rang... | python classification | 1 | Dividing data set into (almost) equal batches based on characteristics -- (python classification)
<p>I have a large dataset containing 6 characteristics (all numerical).
I need to split this dataset into multiple batches to be processed in parallel, and ideally, the batches should be as equal in size as possible.</... | habedi/stack-exchange-dataset |
84,793 | SelectFromModel vs RFE - huge difference in model performance | <p><strong>Note: I have already looked at <a href="https://datascience.stackexchange.com/questions/23539/difference-between-rfe-and-selectfrommodel-in-scikit-learn">Difference between RFE and SelectFromModel in Scikit-Learn</a> post and my query is differnt from that post</strong></p>
<hr />
<p><strong>Expectat... | scikit learn feature selection | 1 | SelectFromModel vs RFE - huge difference in model performance -- (scikit learn feature selection)
<p><strong>Note: I have already looked at <a href="https://datascience.stackexchange.com/questions/23539/difference-between-rfe-and-selectfrommodel-in-scikit-learn">Difference between RFE and SelectFromModel in Scikit-Lear... | habedi/stack-exchange-dataset |
84,795 | Calculate the number of params of a neural network | <p>I'm not clear how the number of params on my Convolutional Network in keras is estimated.</p>
<p>Could you help me to understand this?</p>
<pre><code>Model: "sequential_7"
_________________________________________________________________
Layer (type) Output Shape ... | neural network keras cnn | 1 | Calculate the number of params of a neural network -- (neural network keras cnn)
<p>I'm not clear how the number of params on my Convolutional Network in keras is estimated.</p>
<p>Could you help me to understand this?</p>
<pre><code>Model: "sequential_7"
__________________________________________... | habedi/stack-exchange-dataset |
84,798 | Confusion matrix in sklearn | <p>If you look at this:</p>
<pre><code>>>> y_true = ["cat", "ant", "cat", "cat", "ant", "bird"]
>>> y_pred = ["ant", "ant", "cat", "cat", "ant", "cat"]
>>> confu... | scikit learn confusion matrix | 1 | Confusion matrix in sklearn -- (scikit learn confusion matrix)
<p>If you look at this:</p>
<pre><code>>>> y_true = ["cat", "ant", "cat", "cat", "ant", "bird"]
>>> y_pred = ["ant", "ant", "cat", "cat&... | habedi/stack-exchange-dataset |
84,809 | nnet in caret. Bootstrapping or cross-validation? | <p>I want to train shallow neural network with one hidden layer using nnet in caret. In trainControl, I used method = "cv" to perform 3-fold cross-validation. The snipped the code and results summary are below.</p>
<pre><code> myControl <- trainControl(## 3-fold CV
 method = "cv",
... | machine learning neural network r cross validation bootstraping | 1 | nnet in caret. Bootstrapping or cross-validation? -- (machine learning neural network r cross validation bootstraping)
<p>I want to train shallow neural network with one hidden layer using nnet in caret. In trainControl, I used method = "cv" to perform 3-fold cross-validation. The snipped the code and results... | habedi/stack-exchange-dataset |
84,810 | When to use GAN over conventional sampling methods? | <p>Let's say I have a dataset from a diabetes hospital which has 30000 Type 2 diabetes and 300 Type 1 diabetes patients.</p>
<p>So this dataset has millions and millions of other data points like lab measurements, drugs prescribed and diagnosis data.</p>
<p>Now my objective is to build a model which can classif... | machine learning neural network deep learning classification gan | 1 | When to use GAN over conventional sampling methods? -- (machine learning neural network deep learning classification gan)
<p>Let's say I have a dataset from a diabetes hospital which has 30000 Type 2 diabetes and 300 Type 1 diabetes patients.</p>
<p>So this dataset has millions and millions of other data points lik... | habedi/stack-exchange-dataset |
84,811 | Is an $F_1$ score of 0.1 always bad? | <p>I'm currently building a model to predict early mortgage delinquency (60+ days delinquent within 2 years of origination) for loans originating in 2018Q1. I will eventually train out-of-time (on loans originating in 2015Q4), but for now I'm just doing in-time training (training & testing on 2018Q1) -- and even th... | machine learning classification class imbalance f1score | 1 | Is an $F_1$ score of 0.1 always bad? -- (machine learning classification class imbalance f1score)
<p>I'm currently building a model to predict early mortgage delinquency (60+ days delinquent within 2 years of origination) for loans originating in 2018Q1. I will eventually train out-of-time (on loans originating in 2015... | habedi/stack-exchange-dataset |
84,827 | How to study the effect of eps in sklearn.cluster.DBSCAN? | <p>I posted <a href="https://stackoverflow.com/questions/64610329/how-to-study-the-effect-of-eps-in-sklearn-cluster-dbscan">this question</a> on stackoverflow.com and have not received any answer. In case I get an answer from one of them, I will inform on the other.</p>
<hr />
<p>I have a dataset and is request... | machine learning clustering dbscan | 1 | How to study the effect of eps in sklearn.cluster.DBSCAN? -- (machine learning clustering dbscan)
<p>I posted <a href="https://stackoverflow.com/questions/64610329/how-to-study-the-effect-of-eps-in-sklearn-cluster-dbscan">this question</a> on stackoverflow.com and have not received any answer. In case I get an answer f... | habedi/stack-exchange-dataset |
84,829 | Unable to make CNN model with same output and input dimensions | <p>I'm trying to develop a simple CNN model that takes in a RGB images and returns the same <code>3</code> channel as output.</p>
<p>Eg: <code>3 x 128 x 128</code> is what I'm giving as input</p>
<pre><code>K.set_image_data_format('channels_first')
def resBlock(x, channels, kernel_size=[3, 3], scale=0.1):&#... | python keras tensorflow cnn | 1 | Unable to make CNN model with same output and input dimensions -- (python keras tensorflow cnn)
<p>I'm trying to develop a simple CNN model that takes in a RGB images and returns the same <code>3</code> channel as output.</p>
<p>Eg: <code>3 x 128 x 128</code> is what I'm giving as input</p>
<pre><code>K.set_ima... | habedi/stack-exchange-dataset |
84,838 | Extract names from email address | <p>Say I have two email addresses and I would like to see if it is likely that they belong to the same person. For example, <code>Cameron_M_Thompson@company.com</code> and <code>cthompson1024@personal.com</code> is likely to be from the same person (it doesn't have to be certain, providing the likeliness would be suffi... | machine learning deep learning nlp | 1 | Extract names from email address -- (machine learning deep learning nlp)
<p>Say I have two email addresses and I would like to see if it is likely that they belong to the same person. For example, <code>Cameron_M_Thompson@company.com</code> and <code>cthompson1024@personal.com</code> is likely to be from the same perso... | habedi/stack-exchange-dataset |
84,840 | how to create multiple subplots( scatterplot) in for loop | <p>I want to create scatterplot of target variable with all the other variables in dataframe. Just like we create pairplot but as pairplot with large number of variables will take lot of time and computing memory, it is required to draw scatter plot containing all the variables with target variable.
So tried implem... | visualization matplotlib python 3.x plotting seaborn | 1 | how to create multiple subplots( scatterplot) in for loop -- (visualization matplotlib python 3.x plotting seaborn)
<p>I want to create scatterplot of target variable with all the other variables in dataframe. Just like we create pairplot but as pairplot with large number of variables will take lot of time and computin... | habedi/stack-exchange-dataset |
84,850 | Convert Neural network to Keras Classifier | <p>I am training a Neural Network for Multi-Class classification. After succesfully training it and validating the model through cross validation, I would like to use this network inside a voting Classifier. In order to perform cross validation on my trained network I convert it to a Keras Classifier and then calculate... | neural network classification keras scikit learn multiclass classification | 1 | Convert Neural network to Keras Classifier -- (neural network classification keras scikit learn multiclass classification)
<p>I am training a Neural Network for Multi-Class classification. After succesfully training it and validating the model through cross validation, I would like to use this network inside a voting C... | habedi/stack-exchange-dataset |
84,859 | Why the accuracy of my bagging model heavily affected by random state? | <p>The accuracy of my bagging decision tree model reach up to 97% when I set the random seed=5 but the accuracy reduce to only 92% when I set random seed=0. Can someone explain why the huge gap and should I just use the accuracy with highest value in my research paper or takes the average with random seed=None?</p>&#x... | machine learning classification random forest bagging | 1 | Why the accuracy of my bagging model heavily affected by random state? -- (machine learning classification random forest bagging)
<p>The accuracy of my bagging decision tree model reach up to 97% when I set the random seed=5 but the accuracy reduce to only 92% when I set random seed=0. Can someone explain why the huge... | habedi/stack-exchange-dataset |
84,860 | finding similarity of a new datapoint | <p>I have built a recommendation engine using cosine similarity. When I want to find all the records similar to a given record that is already present in the dataset it works. Consider a case, a user enters a new record which does not exist in the similarity matrix, to find and recommend similar records I am adding the... | data science model recommender system cosine distance | 1 | finding similarity of a new datapoint -- (data science model recommender system cosine distance)
<p>I have built a recommendation engine using cosine similarity. When I want to find all the records similar to a given record that is already present in the dataset it works. Consider a case, a user enters a new record whi... | habedi/stack-exchange-dataset |
84,867 | Running scikit-learn with large volume | <p>I need to run a Random Forest process with <code>scikit-learn</code>. To train the model, I have a database table with 10 million rows of features. The question is: what is the best way to approach this, should I load into memory the 10 million rows, for example with numpy or pandas or there's a better way to load t... | python scikit learn pandas numpy | 1 | Running scikit-learn with large volume -- (python scikit learn pandas numpy)
<p>I need to run a Random Forest process with <code>scikit-learn</code>. To train the model, I have a database table with 10 million rows of features. The question is: what is the best way to approach this, should I load into memory the 10 mil... | habedi/stack-exchange-dataset |
84,889 | How to approach All vs All classification problem | <p>Let's say you are building a Star trek style medical tricorder which can diagnose any medical condition. It needs to be able to detect comorbidities where a patient has multiple conditions (e.g. perhaps the patient has COVID, diabetes and lung cancer all at the same time).</p>
<p>How would you build a classifica... | machine learning classification xgboost multiclass classification | 1 | How to approach All vs All classification problem -- (machine learning classification xgboost multiclass classification)
<p>Let's say you are building a Star trek style medical tricorder which can diagnose any medical condition. It needs to be able to detect comorbidities where a patient has multiple conditions (e.g. p... | habedi/stack-exchange-dataset |
84,930 | Weights shared by different parts of a transformer model | <p><a href="https://i.stack.imgur.com/R2IDD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R2IDD.png" alt="enter image description here" /></a></p>
<p>Which parts of a transformer share weights, like, do all the encoders share the same weight or all the decoders share the same weights?</p>
 | machine learning neural network deep learning nlp transformer | 1 | Weights shared by different parts of a transformer model -- (machine learning neural network deep learning nlp transformer)
<p><a href="https://i.stack.imgur.com/R2IDD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R2IDD.png" alt="enter image description here" /></a></p>
<p>Which parts of a tran... | habedi/stack-exchange-dataset |
84,931 | Need to kickstart learning rates | <p>I was just looking at the docs on Pytorch for different available schedulers and I found one that I am having some trouble understanding <a href="https://huggingface.co/transformers/main_classes/optimizer_schedules.html#transformers.get_cosine_with_hard_restarts_schedule_with_warmup" rel="nofollow noreferrer">here</... | deep learning optimization learning rate | 1 | Need to kickstart learning rates -- (deep learning optimization learning rate)
<p>I was just looking at the docs on Pytorch for different available schedulers and I found one that I am having some trouble understanding <a href="https://huggingface.co/transformers/main_classes/optimizer_schedules.html#transformers.get_c... | habedi/stack-exchange-dataset |
84,938 | Scaling continuous data to discrete range | <p>Edit: the context is as follows: I've trained some ML model that predicts some feature vector. Thats <code>a</code>. But I know that a can take some values from discrete range, but the model outputs continuous values. After applying <code>predict</code> I want to enforce the outputs to take the discrete values they ... | numpy feature scaling | 1 | Scaling continuous data to discrete range -- (numpy feature scaling)
<p>Edit: the context is as follows: I've trained some ML model that predicts some feature vector. Thats <code>a</code>. But I know that a can take some values from discrete range, but the model outputs continuous values. After applying <code>predict</... | habedi/stack-exchange-dataset |
84,946 | Tensorflow.js error: must be either an HTMLVideoElement but was HTMLVideoElement | <p>I am getting this error in the console using tensorflow.js</p>
<blockquote>
<p>Uncaught (in promise) Error: pixels passed to tf.browser.fromPixels()
must be either an HTMLVideoElement, HTMLImageElement,
HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData
in webworker or {data: ... | tensorflow | 1 | Tensorflow.js error: must be either an HTMLVideoElement but was HTMLVideoElement -- (tensorflow)
<p>I am getting this error in the console using tensorflow.js</p>
<blockquote>
<p>Uncaught (in promise) Error: pixels passed to tf.browser.fromPixels()
must be either an HTMLVideoElement, HTMLImageElement,
H... | habedi/stack-exchange-dataset |
84,971 | Compare cross validation and test set results | <p>I am having a hard time understanding the results of a cross validation test and a test run on a test set.</p>
<p>First I made the following pipeline:</p>
<p><code>pipe=Pipeline([('clf',DecisionTreeClassifier(random_state=0))])</code></p>
<p>Then I use cross validation on a scaled training set(75% of the... | machine learning python cross validation overfitting pipelines | 1 | Compare cross validation and test set results -- (machine learning python cross validation overfitting pipelines)
<p>I am having a hard time understanding the results of a cross validation test and a test run on a test set.</p>
<p>First I made the following pipeline:</p>
<p><code>pipe=Pipeline([('clf',DecisionT... | habedi/stack-exchange-dataset |
84,976 | R code that gives results like Wolfram Alpha for the expectation of a function of a random variable? | <p>When I ask <a href="https://www.wolframalpha.com/input/?i=expected%20value%20e%5E%28-X%5E2%29%2C%20X%20%7E%20N%281%2C4%29" rel="nofollow noreferrer">Wolfram Alpha</a> to calculate <span class="math-container">$E[f(X)]$</span> where <span class="math-container">$f(x) = e^{-x^2}$</span> and <span class="math-container... | r statistics probability programming wolfram language | 1 | R code that gives results like Wolfram Alpha for the expectation of a function of a random variable? -- (r statistics probability programming wolfram language)
<p>When I ask <a href="https://www.wolframalpha.com/input/?i=expected%20value%20e%5E%28-X%5E2%29%2C%20X%20%7E%20N%281%2C4%29" rel="nofollow noreferrer">Wolfram ... | habedi/stack-exchange-dataset |
84,998 | Should I include all dummy variables or N-1 dummy variables (keep one as reference) in neural networks | <p>I have a categorical variable with N factor levels (e.g. gender has two levels) in classification problem. I have converted it into dummy variables (male and female).</p>
<p>I have to use neural network (nnet) to classify. I have two options -</p>
<ol>
<li>Include any N-1 dummy variables in the input dat... | machine learning neural network dummy variables | 1 | Should I include all dummy variables or N-1 dummy variables (keep one as reference) in neural networks -- (machine learning neural network dummy variables)
<p>I have a categorical variable with N factor levels (e.g. gender has two levels) in classification problem. I have converted it into dummy variables (male and fem... | habedi/stack-exchange-dataset |
85,008 | Model inclines because of imbalanced data | <p>In life, some events are rare and most cases are normal. So I am wondering, to detect the rare cases, shall we use an imbalanced dataset with more historical rare cases?</p>
<p>Taking the German Credit Data, as an example. It contains data on 20 variables and the classification whether an applicant is considered... | machine learning data | 1 | Model inclines because of imbalanced data -- (machine learning data)
<p>In life, some events are rare and most cases are normal. So I am wondering, to detect the rare cases, shall we use an imbalanced dataset with more historical rare cases?</p>
<p>Taking the German Credit Data, as an example. It contains data on 2... | habedi/stack-exchange-dataset |
85,012 | Training, Testing and Validation Dataset | <p>I'm training a <strong>Unet</strong> model for tumor segmentation.
I have a dataset of <strong>400 patients</strong> for that.
The used images are CT scans (3D images) that I divide into 2D images (for a total of 30k 2D images).</p>
<p>I am actually splitting the dataset into:
10% test data, 18% vali... | dataset training computer vision | 1 | Training, Testing and Validation Dataset -- (dataset training computer vision)
<p>I'm training a <strong>Unet</strong> model for tumor segmentation.
I have a dataset of <strong>400 patients</strong> for that.
The used images are CT scans (3D images) that I divide into 2D images (for a total of 30k 2D images).</... | habedi/stack-exchange-dataset |
85,022 | Shapley values without intercept (or without `expected_value`) | <p>I have a model and I want to derive its interpretability by using feature contributions. In the end, I want to have some contribution per feature such that the sum of contributions equals the prediction of the model.</p>
<p>One approach may be to use shapley values. The issue with shapley values and its implemen... | machine learning explainable ai interpretation shap | 1 | Shapley values without intercept (or without `expected_value`) -- (machine learning explainable ai interpretation shap)
<p>I have a model and I want to derive its interpretability by using feature contributions. In the end, I want to have some contribution per feature such that the sum of contributions equals the predi... | habedi/stack-exchange-dataset |
85,030 | How to sample with guaranteed minimum spacing? | <p>I have a timeseries stored as a <code>pandas.Series</code>, and have computed the autocorrelation to be negiligable for 12 hours lag. Therefore, I want to test the approach of sampling data points randomly, but with at least 12 hours between them, and then treating them as IID data.</p>
<p>How do I do this algor... | time series pandas data | 1 | How to sample with guaranteed minimum spacing? -- (time series pandas data)
<p>I have a timeseries stored as a <code>pandas.Series</code>, and have computed the autocorrelation to be negiligable for 12 hours lag. Therefore, I want to test the approach of sampling data points randomly, but with at least 12 hours between... | habedi/stack-exchange-dataset |
85,047 | Maximum Likelihood with Gradient Descent or Coordinate Descent blows up | <h1>Context</h1>
<p>The maximum likelihood estimators for a Normal distribution with unknown mean and unknown variance are
<span class="math-container">$$
\widehat{\mu} = \frac{1}{n}\sum_{i=1}^n x_i \qquad \text{and} \qquad \widehat{\sigma}^2 = \frac{1}{n}\sum_{i=1}^n (x_i - \mu)^2
$$</span>
These c... | statistics gradient descent | 1 | Maximum Likelihood with Gradient Descent or Coordinate Descent blows up -- (statistics gradient descent)
<h1>Context</h1>
<p>The maximum likelihood estimators for a Normal distribution with unknown mean and unknown variance are
<span class="math-container">$$
\widehat{\mu} = \frac{1}{n}\sum_{i=1}^n x_i \qqu... | habedi/stack-exchange-dataset |
85,053 | How to create a model to suggest similar words in realtime? | <p>I have a huge database of job titles, I want to build a system where if you enter something like "jav " then it should suggest next some similar job titles like (java developer, java engineer) etc..</p>
<p>How should one approach this problem? How can build something like this, the latency is biggest c... | machine learning python deep learning | 1 | How to create a model to suggest similar words in realtime? -- (machine learning python deep learning)
<p>I have a huge database of job titles, I want to build a system where if you enter something like "jav " then it should suggest next some similar job titles like (java developer, java engineer) etc..</p>&#... | habedi/stack-exchange-dataset |
85,056 | Which probability distribution will you use to model outliers? | <p>I was asked this question in a recent interview for the position of a Data Scientist: Which probability distribution will you use to model outliers ?</p>
<p>I told him outliers are like rare events which can be modelled by a Poisson distribution. I pretty sure I'm wrong and the interviewer seemed to think the s... | probability | 1 | Which probability distribution will you use to model outliers? -- (probability)
<p>I was asked this question in a recent interview for the position of a Data Scientist: Which probability distribution will you use to model outliers ?</p>
<p>I told him outliers are like rare events which can be modelled by a Poisson... | habedi/stack-exchange-dataset |
85,062 | Is the result of feature extraction a feature representation? | <p>If a use a feature extraction method on images, do I then get a feature representation or is there a different meaning behind feature representation?</p>
<p>To my understanding, when I use a CNN on an image the convolutional layers perform feature extraction. Can I then also say that I get a new feature represen... | machine learning feature selection feature engineering feature extraction | 1 | Is the result of feature extraction a feature representation? -- (machine learning feature selection feature engineering feature extraction)
<p>If a use a feature extraction method on images, do I then get a feature representation or is there a different meaning behind feature representation?</p>
<p>To my understan... | habedi/stack-exchange-dataset |
85,064 | Where is the rotated angle actually located in fitEllipse method? | <p><strong>Main task</strong>: I fit the ellipse using the <code>fitEllipse()</code> method and then I'd like to count the rotation angle between the horizontal axis and the major axis of the generated ellipse. I'm going to do this using the 3rd returned argument from the <code>fitEllipse()</code> method - <span class=... | python opencv | 1 | Where is the rotated angle actually located in fitEllipse method? -- (python opencv)
<p><strong>Main task</strong>: I fit the ellipse using the <code>fitEllipse()</code> method and then I'd like to count the rotation angle between the horizontal axis and the major axis of the generated ellipse. I'm going to do this usi... | habedi/stack-exchange-dataset |
85,086 | What is a distribution-wise asymmetric measure? | <p>I was trying to understand KL-Divergence, <span class="math-container">$$D_{KL} \langle P(X) \Vert P(Y) \rangle,$$</span> and was going through its Wikipedia article. It says the following</p>
<blockquote>
<p>In contrast to variation of information, it is a distribution-wise asymmetric measure and thus does ... | statistics probability distribution mathematics | 1 | What is a distribution-wise asymmetric measure? -- (statistics probability distribution mathematics)
<p>I was trying to understand KL-Divergence, <span class="math-container">$$D_{KL} \langle P(X) \Vert P(Y) \rangle,$$</span> and was going through its Wikipedia article. It says the following</p>
<blockquote>
<p... | habedi/stack-exchange-dataset |
85,099 | Problem importing imblearn | <p>I am trying to do:</p>
<pre><code>import imblearn
</code></pre>
<p>in my jupyter notebook, but when I run the cell I get the following error message:</p>
<pre><code>SyntaxError: invalid syntax
</code></pre>
<p>even if I have installed the package. I am using python 2.</p>
<p>What could th... | machine learning dataset | 1 | Problem importing imblearn -- (machine learning dataset)
<p>I am trying to do:</p>
<pre><code>import imblearn
</code></pre>
<p>in my jupyter notebook, but when I run the cell I get the following error message:</p>
<pre><code>SyntaxError: invalid syntax
</code></pre>
<p>even if I have installed t... | habedi/stack-exchange-dataset |
85,105 | Problem extracting words from dataframe | <p>I have the following dataset which is a <strong>.json</strong> file:</p>
<p><a href="https://i.stack.imgur.com/BZqbC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BZqbC.png" alt="enter image description here" /></a></p>
<p>and I would like to get the first word for every string inside <c... | machine learning pandas feature extraction | 1 | Problem extracting words from dataframe -- (machine learning pandas feature extraction)
<p>I have the following dataset which is a <strong>.json</strong> file:</p>
<p><a href="https://i.stack.imgur.com/BZqbC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BZqbC.png" alt="enter image description h... | habedi/stack-exchange-dataset |
85,120 | Is sampling a valid way to reduce complexity? | <p>I'm facing an issue where I have a massive amount of data that I need to cluster. As we know, clustering algorithms can have a very high O complexity, and I'm looking for ways to reduce the time my algorithm is running.</p>
<p>I want to try a few different approaches, like pre-clustering (canopy clustering) or s... | clustering sampling | 1 | Is sampling a valid way to reduce complexity? -- (clustering sampling)
<p>I'm facing an issue where I have a massive amount of data that I need to cluster. As we know, clustering algorithms can have a very high O complexity, and I'm looking for ways to reduce the time my algorithm is running.</p>
<p>I want to try a... | habedi/stack-exchange-dataset |
85,122 | Fitting probabilities in scikit-learn RandomForestClassifier | <p>This is a newbie questions, so please bear with me. Given this random forest model:</p>
<pre><code>from sklearn.ensemble import RandomForestClassifier

X = [ [2,1,1,1], [2,0,2,1], [3,1,1,1] ]
y = [ 0, 1, 2 ]

regr = RandomForestClassifier(n_estimators=200, max_depth=5)
regr.fit(X, y)
... | python scikit learn random forest decision trees | 1 | Fitting probabilities in scikit-learn RandomForestClassifier -- (python scikit learn random forest decision trees)
<p>This is a newbie questions, so please bear with me. Given this random forest model:</p>
<pre><code>from sklearn.ensemble import RandomForestClassifier

X = [ [2,1,1,1], [2,0,2,1], [3,1,1,1] ... | habedi/stack-exchange-dataset |
85,130 | Repeated features in Neural Networks with tabular data | <p>When using algorithms like linear regression or least-squares methods, having repeated or highly correlated features can be harmful for the model. For tree based models, they are generally not too strongly affected by highly correlated features. There are no numeric stability issues as with least squares.</p>
<p... | machine learning neural network deep learning feature selection preprocessing | 1 | Repeated features in Neural Networks with tabular data -- (machine learning neural network deep learning feature selection preprocessing)
<p>When using algorithms like linear regression or least-squares methods, having repeated or highly correlated features can be harmful for the model. For tree based models, they are ... | habedi/stack-exchange-dataset |
85,132 | Dealing with missing data in several features at once | <p>Good day,</p>
<p>What are the approaches for handling missing data in several features (categorical and continuous) at once? I look through each feature and plotted several histograms of the distribution of them, and I think that a simple substitution of value by some constant value (mean, mode or something else... | machine learning missing data | 1 | Dealing with missing data in several features at once -- (machine learning missing data)
<p>Good day,</p>
<p>What are the approaches for handling missing data in several features (categorical and continuous) at once? I look through each feature and plotted several histograms of the distribution of them, and I think... | habedi/stack-exchange-dataset |
85,147 | Choropleth Map with plotly.express doesn't show map, just legend | <p>I copied the "Indexing by GeoJSON Properties" example as seen on the <a href="https://plotly.com/python/choropleth-maps" rel="nofollow noreferrer">Choropleth Maps in Python page</a>. The code was executed with no error but there was no map showing, only the legend. In addition, the 'box', 'pan', 'zoom' opt... | python pandas plotly | 1 | Choropleth Map with plotly.express doesn't show map, just legend -- (python pandas plotly)
<p>I copied the "Indexing by GeoJSON Properties" example as seen on the <a href="https://plotly.com/python/choropleth-maps" rel="nofollow noreferrer">Choropleth Maps in Python page</a>. The code was executed with no err... | habedi/stack-exchange-dataset |
85,152 | How does skewed data affect deep neural networks? | <p>I'm playing around with deep neural networks for a regression problem. The dataset I have is skewed right and for a linear regression model, I would typically perform a log transform. Should I be applying the same practice to a DNN?</p>
<p>Specifically, I'm curious how skewed data affects regression with a DNN a... | deep learning regression dataset data cleaning bigdata | 1 | How does skewed data affect deep neural networks? -- (deep learning regression dataset data cleaning bigdata)
<p>I'm playing around with deep neural networks for a regression problem. The dataset I have is skewed right and for a linear regression model, I would typically perform a log transform. Should I be applying th... | habedi/stack-exchange-dataset |
85,159 | How to conclude the generality of any classification methods? | <p>Suppose a classification task A, and there exist a lot of methods <span class="math-container">$M_1, M_2, M_3$</span>.
The task <span class="math-container">$A$</span> is measured by a consistent measure.
For instance, the task A can be a binary classification. In this case, F-score, ROC curve can be used.</... | data preprocessing research | 1 | How to conclude the generality of any classification methods? -- (data preprocessing research)
<p>Suppose a classification task A, and there exist a lot of methods <span class="math-container">$M_1, M_2, M_3$</span>.
The task <span class="math-container">$A$</span> is measured by a consistent measure.
For insta... | habedi/stack-exchange-dataset |
85,164 | Query relating to Pandas Rows manipulation | <p>I have a query regarding Pandas data manipulation.</p>
<p>Let's say I have a dataframe, df with following structure.</p>
<pre><code>A B C
1 1 7
5 3 3
3 3 2
7 5 2
5 NaN 2
</code></pre>
<p>We have 3 columns in the dataframe A, B & C.</p>
<p>B column consists of mean values w... | pandas data cleaning numpy | 1 | Query relating to Pandas Rows manipulation -- (pandas data cleaning numpy)
<p>I have a query regarding Pandas data manipulation.</p>
<p>Let's say I have a dataframe, df with following structure.</p>
<pre><code>A B C
1 1 7
5 3 3
3 3 2
7 5 2
5 NaN 2
</code></pre>
<p>We have 3 columns i... | habedi/stack-exchange-dataset |
85,168 | Calculation of VC dimension of simple neural network | <p>Suppose I have a perceptron with one-hidden layer, with the input - one real number <span class="math-container">$x \in \mathbb{R}$</span>, and the activation function of the output layers - threshold functions:
<span class="math-container">$$
\theta(x) = 
\begin{cases}
0, x \leq 0 \\
1, x > 0... | neural network perceptron vc theory | 1 | Calculation of VC dimension of simple neural network -- (neural network perceptron vc theory)
<p>Suppose I have a perceptron with one-hidden layer, with the input - one real number <span class="math-container">$x \in \mathbb{R}$</span>, and the activation function of the output layers - threshold functions:
<span c... | habedi/stack-exchange-dataset |
85,176 | Too high performances on a classification problem | <p>I have a <strong>.json</strong> file as dataset of the type:</p>
<p><a href="https://i.stack.imgur.com/tOiiE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tOiiE.png" alt="enter image description here" /></a></p>
<p>and I am working on a classification problem in which I have to predict 4... | machine learning classification accuracy f1score | 1 | Too high performances on a classification problem -- (machine learning classification accuracy f1score)
<p>I have a <strong>.json</strong> file as dataset of the type:</p>
<p><a href="https://i.stack.imgur.com/tOiiE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tOiiE.png" alt="enter image descr... | habedi/stack-exchange-dataset |
85,179 | Is Cross Validation needed for regression if you already know the predictors in your model? | <p>Let's say you want to model the behavior of Y = X1 + X2 and you know that this is the model you want to make. Whether or not that approximates the true relationship well is unknown. But since you want to be able to have coefficients that explain how Xi affects Y, you build a regression model. You don't plan on add... | regression cross validation | 1 | Is Cross Validation needed for regression if you already know the predictors in your model? -- (regression cross validation)
<p>Let's say you want to model the behavior of Y = X1 + X2 and you know that this is the model you want to make. Whether or not that approximates the true relationship well is unknown. But since... | habedi/stack-exchange-dataset |
85,182 | Macro and micro average for imbalanced binary classes | <p>Micro and macro averaging are metrics for multi-class classification. However, for binary classification when data are imbalanced, it seems that micro and macro precision have different results. My question is that: <strong>does it make sense to use micro and macro precision in binary classification problems when cl... | machine learning class imbalance evaluation | 1 | Macro and micro average for imbalanced binary classes -- (machine learning class imbalance evaluation)
<p>Micro and macro averaging are metrics for multi-class classification. However, for binary classification when data are imbalanced, it seems that micro and macro precision have different results. My question is that... | habedi/stack-exchange-dataset |
85,189 | How to Include Features that Apply to Specific Classes | <p>I'm predicting hours that will be worked for building tasks. Due to the overall low sample size, I've stacked multiple related tasks together into a single model. (There may be 100 total samples in a single model, each task having 10 to 20 samples individually) An example would be - how long will it take a worker to... | machine learning predictive modeling statistics data cleaning data engineering | 1 | How to Include Features that Apply to Specific Classes -- (machine learning predictive modeling statistics data cleaning data engineering)
<p>I'm predicting hours that will be worked for building tasks. Due to the overall low sample size, I've stacked multiple related tasks together into a single model. (There may be 1... | habedi/stack-exchange-dataset |
85,199 | LSTM followed by Dense Layer in Keras | <p>I am working on LSTMs and LSTM AutoEncoders, trying different types of architectures for multivariate time series data, using Keras.</p>
<p>Since it is not really practical to use relu in LSTM because of exploding gradients, I added a Dense layer following LSTM, so it is like:</p>
<pre><code>model = Sequenti... | deep learning keras lstm | 1 | LSTM followed by Dense Layer in Keras -- (deep learning keras lstm)
<p>I am working on LSTMs and LSTM AutoEncoders, trying different types of architectures for multivariate time series data, using Keras.</p>
<p>Since it is not really practical to use relu in LSTM because of exploding gradients, I added a Dense laye... | habedi/stack-exchange-dataset |
85,208 | How to find correlated knowledge among different documents? | <p>Say I have a sequence of documents clicked by a user, how can I mine the identical or semanticly similar word/knowledge/phrases shared among different documents?</p>
<p>Maybe someone can give a paper or subject relating to my goal?</p>
 | nlp information retrieval | 1 | How to find correlated knowledge among different documents? -- (nlp information retrieval)
<p>Say I have a sequence of documents clicked by a user, how can I mine the identical or semanticly similar word/knowledge/phrases shared among different documents?</p>
<p>Maybe someone can give a paper or subject relating to... | habedi/stack-exchange-dataset |
85,218 | What is considered short and long text in NLP (document similarity) | <p>What is considered short and long text in NLP?</p>
<p>I'm working on a dataset that contains documents from 10 to 600 words and I'm asking myself if I should treat them differently. Also, I haven't found a source which explicitly defines short and long text in NLP yet. The goal for my task is to find similar doc... | nlp similar documents | 1 | What is considered short and long text in NLP (document similarity) -- (nlp similar documents)
<p>What is considered short and long text in NLP?</p>
<p>I'm working on a dataset that contains documents from 10 to 600 words and I'm asking myself if I should treat them differently. Also, I haven't found a source which... | habedi/stack-exchange-dataset |
85,246 | Dataset with some mislabeled data (around 1%) | <p>I have a dataset with around 1% of mislabeled data, it is a multi label problem and i want to find a way to correct those incorrect labels.</p>
<p>Assuming that the amount of mislabeled data is low i divided the dataset in Train/Test and trained a classifier taking care that the classifier does not overfit.</p>&... | machine learning classification | 1 | Dataset with some mislabeled data (around 1%) -- (machine learning classification)
<p>I have a dataset with around 1% of mislabeled data, it is a multi label problem and i want to find a way to correct those incorrect labels.</p>
<p>Assuming that the amount of mislabeled data is low i divided the dataset in Train/T... | habedi/stack-exchange-dataset |
85,247 | adding a feature as "generic" | <p>I am using sklearn and python, to build a "malicious" login identifier. Reading some documents and examples, I chose the RandomForest classifier, then I decided to use the following features:</p>
<pre><code>Timestamp (hour)
IP (this is expanded in feature creation adding geolocation info like Coord... | machine learning python scikit learn random forest data | 1 | adding a feature as "generic" -- (machine learning python scikit learn random forest data)
<p>I am using sklearn and python, to build a "malicious" login identifier. Reading some documents and examples, I chose the RandomForest classifier, then I decided to use the following features:</p>
<pre><code>Times... | habedi/stack-exchange-dataset |
85,256 | How would you interpret the following ROC and PRC curves? | <p>How would you interpret the following ROC and PRC curves?</p>
<p>For example, I find it weird to understand that the precision actually increases at some point when recall increases as well. Is that even possible?</p>
<p><a href="https://i.stack.imgur.com/kf3wk.png" rel="nofollow noreferrer"><img src="https:... | classification roc | 1 | How would you interpret the following ROC and PRC curves? -- (classification roc)
<p>How would you interpret the following ROC and PRC curves?</p>
<p>For example, I find it weird to understand that the precision actually increases at some point when recall increases as well. Is that even possible?</p>
<p><a hre... | habedi/stack-exchange-dataset |
85,287 | Augmentation on test dataset and validation dataset | <p>I'm training a <strong>segmentation</strong> model (computer-vision).
Thus, my dataset contains images and masks (binary segmentation of objects).</p>
<p>I'm augmenting the <strong>training</strong> dataset (applying random crop, rotation or shift etc.) to get a larger dataset. I <em>don't apply</em> augment... | deep learning dataset computer vision validation | 1 | Augmentation on test dataset and validation dataset -- (deep learning dataset computer vision validation)
<p>I'm training a <strong>segmentation</strong> model (computer-vision).
Thus, my dataset contains images and masks (binary segmentation of objects).</p>
<p>I'm augmenting the <strong>training</strong> data... | habedi/stack-exchange-dataset |
85,292 | Neural networks with not-fixed dimension for input and output | <p>I would like to know if it exists a model/method which can deal with input and output of different dimension.</p>
<p>For example, let us say that the maximum number of info we could have is 6 features and 5 output.
Then I could have examples with 4 features and 3 output.</p>
<p>Less input features always... | deep learning machine learning model training dimensionality reduction features | 1 | Neural networks with not-fixed dimension for input and output -- (deep learning machine learning model training dimensionality reduction features)
<p>I would like to know if it exists a model/method which can deal with input and output of different dimension.</p>
<p>For example, let us say that the maximum number o... | habedi/stack-exchange-dataset |
85,306 | YOLOv1 algorithm - how to determine predictor responsibility | <p>I am researching Yolo detector, and have read the original paper, but still have some confusion and a few questions regarding the assignment of bounding box predictors to ground truth at training time (in particular calculating the confidence).</p>
<p>Some resources like Andrew Ngs deep.ai <a href="https://www.y... | deep learning yolo | 1 | YOLOv1 algorithm - how to determine predictor responsibility -- (deep learning yolo)
<p>I am researching Yolo detector, and have read the original paper, but still have some confusion and a few questions regarding the assignment of bounding box predictors to ground truth at training time (in particular calculating the ... | habedi/stack-exchange-dataset |
85,314 | np.unique() explanation? | <p>What happends in this numpy function:
<a href="https://numpy.org/doc/stable/reference/generated/numpy.unique.html" rel="nofollow noreferrer">https://numpy.org/doc/stable/reference/generated/numpy.unique.html</a></p>
<pre><code>a = np.array([1, 2, 5, 3, 2])
u, indices = np.unique(a, return_inverse=True)&#... | numpy | 1 | np.unique() explanation? -- (numpy)
<p>What happends in this numpy function:
<a href="https://numpy.org/doc/stable/reference/generated/numpy.unique.html" rel="nofollow noreferrer">https://numpy.org/doc/stable/reference/generated/numpy.unique.html</a></p>
<pre><code>a = np.array([1, 2, 5, 3, 2])
u, indices =... | habedi/stack-exchange-dataset |
85,330 | Coloring clusters so that nearby clusters have different colors | <p>I have clustered a large number of points (~3000) into (~400) clusters. I want to plot the data and visualize the clusters. I want to make sure that nearby clusters have different colors. Can anyone recommend an approach to coloring the clusters?</p>
<p>This is a conceptual question, but I'm most interested i... | machine learning python r clustering visualization | 1 | Coloring clusters so that nearby clusters have different colors -- (machine learning python r clustering visualization)
<p>I have clustered a large number of points (~3000) into (~400) clusters. I want to plot the data and visualize the clusters. I want to make sure that nearby clusters have different colors. Can an... | habedi/stack-exchange-dataset |
85,334 | How to increase sales and revenue of a Client? | <p>I was asked this in an interview for a Data Scientist position:</p>
<p>Lets say Holland and Barret came to you and said they'd like to increase their sales and revenue. How will you go about it?</p>
<p>My answer wasn't hitting the mark or touching the points the interviewer was looking for. How to go about a... | machine learning data data science model interpretation usecase | 1 | How to increase sales and revenue of a Client? -- (machine learning data data science model interpretation usecase)
<p>I was asked this in an interview for a Data Scientist position:</p>
<p>Lets say Holland and Barret came to you and said they'd like to increase their sales and revenue. How will you go about it?</p... | habedi/stack-exchange-dataset |
85,335 | Which learning rate should I choose? | <p>I'm training a segmentation model, <strong>Unet++</strong>, on <em>2d images</em> and I am now trying to find the optimal learning rate.
The backbone of the model is <em>Resnet34</em>, I use <em>Adam</em> optimizer and the loss function is the <em>dice loss function</em>.</p>
<p>Also, I use a few callbacksfu... | deep learning training loss function optimization learning rate | 1 | Which learning rate should I choose? -- (deep learning training loss function optimization learning rate)
<p>I'm training a segmentation model, <strong>Unet++</strong>, on <em>2d images</em> and I am now trying to find the optimal learning rate.
The backbone of the model is <em>Resnet34</em>, I use <em>Adam</em> op... | habedi/stack-exchange-dataset |
85,340 | no decrease loss and val_loss | <p>I try to train a neural network for time series. I use some data from Covid, mainly the goal is knowing 14 days of number of people at hospital to predict the number at J+1.
I have use some early stopping to not over fit, but almost one time over two the learning stop at patience+1 and there is no decrease of lo... | python keras deep learning time series loss function | 1 | no decrease loss and val_loss -- (python keras deep learning time series loss function)
<p>I try to train a neural network for time series. I use some data from Covid, mainly the goal is knowing 14 days of number of people at hospital to predict the number at J+1.
I have use some early stopping to not over fit, but... | habedi/stack-exchange-dataset |
85,355 | multi regression for energy data | <p>I'm trying to develop a multi regression model to predict energy consumption during one day period.
X-set dimension is (10178, 52) and consist of 52-feature and Y-set dimension is (10178, 48) as output. I have used the following code:</p>
<pre><code>xtrain, xtest, ytrain, ytest=train_test_split(X, Y, test_si... | python deep learning keras regression | 1 | multi regression for energy data -- (python deep learning keras regression)
<p>I'm trying to develop a multi regression model to predict energy consumption during one day period.
X-set dimension is (10178, 52) and consist of 52-feature and Y-set dimension is (10178, 48) as output. I have used the following code:</p... | habedi/stack-exchange-dataset |
85,358 | What is the difference between active learning and reinforcement learning? | <p>From Wikipedia:</p>
<blockquote>
<p>Active learning is a special case of machine learning in which a learning algorithm can interactively query a user (or some other information source) to label new data points with the desired outputs.</p>
</blockquote>
<blockquote>
<p>Reinforcement learning (RL... | machine learning reinforcement learning active learning difference | 1 | What is the difference between active learning and reinforcement learning? -- (machine learning reinforcement learning active learning difference)
<p>From Wikipedia:</p>
<blockquote>
<p>Active learning is a special case of machine learning in which a learning algorithm can interactively query a user (or some ot... | habedi/stack-exchange-dataset |
85,366 | Math behind 2D convolution for RGB images | <p>I read many threads discussing why 2D convolutional layer is typically used for RGB images in neural network.
I read that it is possible to use 3D conv layer.</p>
<p>What I do not understand is the math behind it.</p>
<p>Say your image is 300 by 300, and the <code>kernel_size = (3, 3)</code> and <code>fi... | neural network cnn | 1 | Math behind 2D convolution for RGB images -- (neural network cnn)
<p>I read many threads discussing why 2D convolutional layer is typically used for RGB images in neural network.
I read that it is possible to use 3D conv layer.</p>
<p>What I do not understand is the math behind it.</p>
<p>Say your image is ... | habedi/stack-exchange-dataset |
85,367 | Is applying pre-trained model on a different type of corpus called transfer learning? | <p>I trained my classification model on corpus A and evaluated it on corpus B.</p>
<p>I do it, because for corpus A I have a lot more labeled sentences than for B. Nature of sentences used in A is different than sentences using in B. A has name of products from e-shop, B has names of products as they appear in shop... | nlp transfer learning | 1 | Is applying pre-trained model on a different type of corpus called transfer learning? -- (nlp transfer learning)
<p>I trained my classification model on corpus A and evaluated it on corpus B.</p>
<p>I do it, because for corpus A I have a lot more labeled sentences than for B. Nature of sentences used in A is differ... | habedi/stack-exchange-dataset |
85,373 | batch_size in neural network | <p>When NN is construsted, batch size is not defined and place holder is used and its summary(tensorfow) shows the batch size as None.</p>
<p>This is useful because you can change batch size later.</p>
<p>In case of a simple model with 10 input features, 1 hidden layers with 10 neurons and output layer, the sha... | neural network tensorflow | 1 | batch_size in neural network -- (neural network tensorflow)
<p>When NN is construsted, batch size is not defined and place holder is used and its summary(tensorfow) shows the batch size as None.</p>
<p>This is useful because you can change batch size later.</p>
<p>In case of a simple model with 10 input feature... | habedi/stack-exchange-dataset |
85,389 | what is the largest network used for image recognition/segmentation? | <p>What is the largest network (in number of params and layers) considered in the literature for image recognition/segmentation task? I am in particular interested in ResNet architectures.
Any recommendation for literature is appreciated.</p>
<p>For natural language processing, the largest models are of order o... | neural network deep learning inceptionresnetv2 | 1 | what is the largest network used for image recognition/segmentation? -- (neural network deep learning inceptionresnetv2)
<p>What is the largest network (in number of params and layers) considered in the literature for image recognition/segmentation task? I am in particular interested in ResNet architectures.
Any re... | habedi/stack-exchange-dataset |
85,398 | What are the model parameters in PCA? | <p>I've been asked to report the number of parameters to be learned in a PCA model. This <a href="https://datascience.stackexchange.com/a/17746">answer</a> implies that parameters do exist in PCA, but does not explain. Software packages often report the number of parameters, but do not document what those parameters <e... | pca | 1 | What are the model parameters in PCA? -- (pca)
<p>I've been asked to report the number of parameters to be learned in a PCA model. This <a href="https://datascience.stackexchange.com/a/17746">answer</a> implies that parameters do exist in PCA, but does not explain. Software packages often report the number of parameter... | habedi/stack-exchange-dataset |
85,401 | Hand preprocessing data | <p>I am working with a relatively small (~1000 samples) dataset that has some very messy text data (i.e lots of things missing, no real structure, etc.). I am trying to preprocess it and just going through each data sample and preprocessing it by hand is a viable option. I think that writing an algorithm to automate th... | data data cleaning preprocessing | 1 | Hand preprocessing data -- (data data cleaning preprocessing)
<p>I am working with a relatively small (~1000 samples) dataset that has some very messy text data (i.e lots of things missing, no real structure, etc.). I am trying to preprocess it and just going through each data sample and preprocessing it by hand is a v... | habedi/stack-exchange-dataset |
85,409 | Getting NN weights for every batch / epoch from Keras model | <p>I am trying to get weights for every batch / epoch from Keras model after it is trained. To do so I use callback to make model save weights during training. Yet after model is trained it looks like I get weights only from the final epoch. How to get all weights that model generates? Here is a simple example:</p>
... | python keras tensorflow gradient descent | 1 | Getting NN weights for every batch / epoch from Keras model -- (python keras tensorflow gradient descent)
<p>I am trying to get weights for every batch / epoch from Keras model after it is trained. To do so I use callback to make model save weights during training. Yet after model is trained it looks like I get weights... | habedi/stack-exchange-dataset |
85,433 | Why use gradient descent on Deep Nets / RNNs when cost function is not convex? | <p>Why do we use gradient descent on very non-convex loss functions such as in Deep nets / RNNs rather than a heuristic search (genetic algorithms, simulated annealing, etc)?</p>
 | neural network rnn gradient descent optimization genetic algorithms | 1 | Why use gradient descent on Deep Nets / RNNs when cost function is not convex? -- (neural network rnn gradient descent optimization genetic algorithms)
<p>Why do we use gradient descent on very non-convex loss functions such as in Deep nets / RNNs rather than a heuristic search (genetic algorithms, simulated annealing,... | habedi/stack-exchange-dataset |
85,435 | What is the appropriate statistical significance test for multi-class classification? | <p>I have a multi-class classification problem. I am primarily using macro-average F1 measure to evaluate the performance of models and want to verify if the results are statistically significant. I have the results of two classifiers on the same train/test-set (paired observations).</p>
<p>Some sources suggest to ... | statistics multiclass classification performance f1score | 1 | What is the appropriate statistical significance test for multi-class classification? -- (statistics multiclass classification performance f1score)
<p>I have a multi-class classification problem. I am primarily using macro-average F1 measure to evaluate the performance of models and want to verify if the results are st... | habedi/stack-exchange-dataset |
85,439 | Why softmax in YouTube’s DNN recommender | <p>I am confused about the softmax layer of <a href="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45530.pdf" rel="nofollow noreferrer">YouTube’s DNN candidate generation</a>. A user may interact with many videos. Softmax is assuming classes are exclusive. For example, logits = [[4.0, ... | recommender system | 1 | Why softmax in YouTube’s DNN recommender -- (recommender system)
<p>I am confused about the softmax layer of <a href="https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/45530.pdf" rel="nofollow noreferrer">YouTube’s DNN candidate generation</a>. A user may interact with many videos. Softmax... | habedi/stack-exchange-dataset |
85,447 | ValueError: No gradients provided for any variable | <p>I have this error when running training on my model.
I found this issue on different sites, but could not find a solution to my problem.</p>
<p>Here is my model :</p>
<pre><code>import keras
import tensorflow as tf
import tensorflow.keras.layers as L
import tensorflow.keras.models as M
im... | deep learning tensorflow lstm pooling | 1 | ValueError: No gradients provided for any variable -- (deep learning tensorflow lstm pooling)
<p>I have this error when running training on my model.
I found this issue on different sites, but could not find a solution to my problem.</p>
<p>Here is my model :</p>
<pre><code>import keras
import tensorflo... | habedi/stack-exchange-dataset |
85,451 | LightFm - replicate precision@k score with predict vs. predict_rank method | <p>LightFm has two methods to predict: <code>predict()</code> and <code>predict_rank()</code>. The evaluation function <code>precision_at_k</code> is based on the <code>predict_rank</code> function. Since I have many items to rank for each user, the <code>predict</code> method is more suitable/faster. Hence, I tried to... | recommender system | 1 | LightFm - replicate precision@k score with predict vs. predict_rank method -- (recommender system)
<p>LightFm has two methods to predict: <code>predict()</code> and <code>predict_rank()</code>. The evaluation function <code>precision_at_k</code> is based on the <code>predict_rank</code> function. Since I have many item... | habedi/stack-exchange-dataset |
85,453 | Ranking problem and imbalanced dataset | <p>I know about the problems that imbalanced dataset will cause when we are working on classification problems. And I know the solution for that including undersampling and oversampling.</p>
<p>I have to work on a Ranking problem(Ranking hotels and evaluate based on NDCG50 score <a href="https://github.com/achillea... | machine learning class imbalance ranking learning to rank | 1 | Ranking problem and imbalanced dataset -- (machine learning class imbalance ranking learning to rank)
<p>I know about the problems that imbalanced dataset will cause when we are working on classification problems. And I know the solution for that including undersampling and oversampling.</p>
<p>I have to work on a ... | habedi/stack-exchange-dataset |
85,456 | Metric to use to choose between different models - Hyperparameters tuning | <p>I'm building a Feedforward Neural Network with Pytorch and doing hyperparameters tuning using Ray Tune. I have train, validation and test set, train and validation used during the training procedure.
I have different versions of the model (different learning rates and numbers of neurons in the hidden layers) and... | machine learning pytorch hyperparameter tuning metric | 1 | Metric to use to choose between different models - Hyperparameters tuning -- (machine learning pytorch hyperparameter tuning metric)
<p>I'm building a Feedforward Neural Network with Pytorch and doing hyperparameters tuning using Ray Tune. I have train, validation and test set, train and validation used during the trai... | habedi/stack-exchange-dataset |
85,486 | What is the difference between GPT blocks and Transformer Decoder blocks? | <p>I know GPT is a Transformer-based Neural Network, composed of several blocks. These blocks are based on the original Transformer's Decoder blocks, but are they exactly the same?</p>
<p>In the original Transformer model, Decoder blocks have two attention mechanisms: the first is pure Multi Head Self-Attention, th... | deep learning transformer language model | 1 | What is the difference between GPT blocks and Transformer Decoder blocks? -- (deep learning transformer language model)
<p>I know GPT is a Transformer-based Neural Network, composed of several blocks. These blocks are based on the original Transformer's Decoder blocks, but are they exactly the same?</p>
<p>In the o... | habedi/stack-exchange-dataset |
85,488 | Encoding Tags for Random Forest | <p>I have the following data set:
<a href="https://i.stack.imgur.com/qtzRM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qtzRM.png" alt="enter image description here" /></a></p>
<p>I want to use attributes <strong>Tags</strong> and <strong>Authors</strong> to classify each record into their... | python scikit learn random forest encoding | 1 | Encoding Tags for Random Forest -- (python scikit learn random forest encoding)
<p>I have the following data set:
<a href="https://i.stack.imgur.com/qtzRM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qtzRM.png" alt="enter image description here" /></a></p>
<p>I want to use attributes <stro... | habedi/stack-exchange-dataset |
85,491 | Why does horizontal lines in plt.plot(feature, '.') mean that the data have been properly shuffled? | <p>I am following a Mooc and <a href="https://www.coursera.org/learn/competitive-data-science/lecture/zoIx3/visualizations" rel="nofollow noreferrer">in this lecture about visualisation in explenatory data analysi</a>s the lecturer claims that when plotting the row indexes against feature values, if we have lines on th... | visualization data analysis | 1 | Why does horizontal lines in plt.plot(feature, '.') mean that the data have been properly shuffled? -- (visualization data analysis)
<p>I am following a Mooc and <a href="https://www.coursera.org/learn/competitive-data-science/lecture/zoIx3/visualizations" rel="nofollow noreferrer">in this lecture about visualisation i... | habedi/stack-exchange-dataset |
85,507 | Gradient descent does not converge in some runs and converges in other runs in the following simple Keras network | <p>When training a simple Keras NN (1 input, 1 level with 1 unit for a regression task) during some runs I get big constant loss that does not change in 80 batches. During other runs it decreases. What may be the reason that gradient does not converge in some runs and converges in other runs in the following network: ?... | keras tensorflow gradient descent | 1 | Gradient descent does not converge in some runs and converges in other runs in the following simple Keras network -- (keras tensorflow gradient descent)
<p>When training a simple Keras NN (1 input, 1 level with 1 unit for a regression task) during some runs I get big constant loss that does not change in 80 batches. Du... | habedi/stack-exchange-dataset |
85,510 | From where does BERT get the tokens it predicts? | <p>When BERT is used for masked language modeling, it masks a token and then tries to predict it.</p>
<p>What are the candidate tokens BERT can choose from? Does it just predict an integer (like a regression problem) and then use that token? Or does it do a softmax over all possible word tokens? For the latter, isn... | nlp bert language model tokenization | 1 | From where does BERT get the tokens it predicts? -- (nlp bert language model tokenization)
<p>When BERT is used for masked language modeling, it masks a token and then tries to predict it.</p>
<p>What are the candidate tokens BERT can choose from? Does it just predict an integer (like a regression problem) and then... | habedi/stack-exchange-dataset |
85,515 | How to choose between different types of feature scaling? | <p>The feature set for my multi-class multi-label classification task, using the MLPClassifier from scikit learn, contains mostly features where the values are in the same range of [0,1], but there are 3 out of 45 features where this isn't the case and feature scaling is required. So far I've tried out min-max normaliz... | machine learning neural network classification normalization feature scaling | 1 | How to choose between different types of feature scaling? -- (machine learning neural network classification normalization feature scaling)
<p>The feature set for my multi-class multi-label classification task, using the MLPClassifier from scikit learn, contains mostly features where the values are in the same range of... | habedi/stack-exchange-dataset |
85,533 | One-hot vector for fixed vocabulary | <p>given a vocabulary with <span class="math-container">$|V|=4$</span> and V = {I, want, this, cat} for example.</p>
<p>How does the bag-of-words representation with this vocabulary and one-hot encoding look like regarding example sentences:</p>
<ol>
<li>You are the dog here</li>
<li>I am fifty</li>
... | one hot encoding bag of words | 1 | One-hot vector for fixed vocabulary -- (one hot encoding bag of words)
<p>given a vocabulary with <span class="math-container">$|V|=4$</span> and V = {I, want, this, cat} for example.</p>
<p>How does the bag-of-words representation with this vocabulary and one-hot encoding look like regarding example sentences:</p>... | habedi/stack-exchange-dataset |
85,536 | How would I approach training a model and encoding this categorical data | <p>So I have the following data:<br />
I have one series where each word has a value that describes the average review score that would get.<br />
For example, if the word "excellent" showed up in reviews with a score of 2,3,5,4 it would gain a value of 3.5.</p>
<p>I also have a list of the words ... | machine learning regression categorical data encoding | 1 | How would I approach training a model and encoding this categorical data -- (machine learning regression categorical data encoding)
<p>So I have the following data:<br />
I have one series where each word has a value that describes the average review score that would get.<br />
For example, if the word "ex... | habedi/stack-exchange-dataset |
85,545 | What's the difference between sequence preprocessing and text preprocessing in Keras? | <p>In Keras, we mainly have three types of preprocessing, i.e., sequence preprocessing, text preprocessing, and image preprocessing. However, for me, I think the meanings of the word "sequence" and "text" are the same. How to understand the differences between these two preprocessing operations?</p>... | keras preprocessing text sequence | 1 | What's the difference between sequence preprocessing and text preprocessing in Keras? -- (keras preprocessing text sequence)
<p>In Keras, we mainly have three types of preprocessing, i.e., sequence preprocessing, text preprocessing, and image preprocessing. However, for me, I think the meanings of the word "sequen... | habedi/stack-exchange-dataset |
85,551 | Generate new features from two columns | <p>I have database with three columns, y,x1 and x2:</p>
<pre><code>>>>y x1 x2
0 0.25 -19.3 -25.1
1 0.24 -18.2 -26.7
2 0.81 -45.2 -31.4
...
</code></pre>
<p>I want to create more features based on the x columns.
until now I have just created random funct... | python feature engineering | 1 | Generate new features from two columns -- (python feature engineering)
<p>I have database with three columns, y,x1 and x2:</p>
<pre><code>>>>y x1 x2
0 0.25 -19.3 -25.1
1 0.24 -18.2 -26.7
2 0.81 -45.2 -31.4
...
</code></pre>
<p>I want to create more features... | habedi/stack-exchange-dataset |
85,553 | Polynomial Regression Not Overfitting as Expected | <p>I am trying to implement polynomial regression in Python and have it mostly working, but it is not overfitting enough for higher degree polynomials. This is a weird thing to be upset about, I know, but it may point to an underlying problem with my implementation.</p>
<p>In this case I'm using a toy example where... | regression linear regression | 1 | Polynomial Regression Not Overfitting as Expected -- (regression linear regression)
<p>I am trying to implement polynomial regression in Python and have it mostly working, but it is not overfitting enough for higher degree polynomials. This is a weird thing to be upset about, I know, but it may point to an underlying p... | habedi/stack-exchange-dataset |
85,566 | How pre-trained BERT model generates word embeddings for out of vocabulary words? | <p>Currently, I am reading <a href="https://arxiv.org/abs/1810.04805" rel="nofollow noreferrer">BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding</a>. I want to understand how pre-trained BERT generates word embeddings for out of vocabulary words? Models like <a href="https://arxiv.org/ab... | nlp word embeddings bert | 1 | How pre-trained BERT model generates word embeddings for out of vocabulary words? -- (nlp word embeddings bert)
<p>Currently, I am reading <a href="https://arxiv.org/abs/1810.04805" rel="nofollow noreferrer">BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding</a>. I want to understand how p... | habedi/stack-exchange-dataset |
85,582 | Dense Layer vs convolutional layer - when to use them and how | <p>I know what's the difference between the two, however I am a little confused on to use them. I have also seen some models that have a mix of both. what's the logic behind it? or is it only random things?</p>
 | machine learning neural network | 1 | Dense Layer vs convolutional layer - when to use them and how -- (machine learning neural network)
<p>I know what's the difference between the two, however I am a little confused on to use them. I have also seen some models that have a mix of both. what's the logic behind it? or is it only random things?</p>
 | habedi/stack-exchange-dataset |
85,586 | What is the use of applying img_to_array() after cv2.imread() | <p>In a book, I saw the following code to load images from a directory:</p>
<pre><code>1.image = cv2.imread(imagePath)
2.image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
3.image = cv2.resize(image, (28,28)) 
4.image = img_to_array(image)
5.data.append(image)
</code></pre>
<p><stron... | keras image preprocessing opencv | 1 | What is the use of applying img_to_array() after cv2.imread() -- (keras image preprocessing opencv)
<p>In a book, I saw the following code to load images from a directory:</p>
<pre><code>1.image = cv2.imread(imagePath)
2.image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
3.image = cv2.resize(image, (28,28)) ... | habedi/stack-exchange-dataset |
85,590 | How do I transform a file to .txt file using pandas? | <p>I have to submit a machine learning project, and it has to be node in a .txt file. I know that if I am using pandas, and I want to transform a file from another format to .csv format I can use .to_csv().</p>
<p>Is there something similar for transforming the file into .txt() file using pandas?</p>
 | machine learning pandas | 1 | How do I transform a file to .txt file using pandas? -- (machine learning pandas)
<p>I have to submit a machine learning project, and it has to be node in a .txt file. I know that if I am using pandas, and I want to transform a file from another format to .csv format I can use .to_csv().</p>
<p>Is there something s... | habedi/stack-exchange-dataset |
85,593 | What is the difference between AI, ML, NN and DL? | <p>What is the difference between the following four categories:</p>
<ol>
<li>Artificial Intelligence (AI)</li>
<li>Machine Learning (ML)</li>
<li>Neural Network (NN)</li>
<li>Deep Learning (DL)</li>
<li>Data Science</li>
</ol>
<p>My current understanding is that each of these encapsulat... | machine learning neural network deep learning data mining algorithms | 1 | What is the difference between AI, ML, NN and DL? -- (machine learning neural network deep learning data mining algorithms)
<p>What is the difference between the following four categories:</p>
<ol>
<li>Artificial Intelligence (AI)</li>
<li>Machine Learning (ML)</li>
<li>Neural Network (NN)</li>
<li>... | habedi/stack-exchange-dataset |
85,605 | Can anyone recommend me a very good pre-trained model for face or head detection? | <p>I really need to know the best pre-trained models to detect faces and/or peoples' head. Not a face recognition model, but only to classify whether an object is a person's head/face or not.</p>
<p>I'm implementing one on top of <code>Resnet50</code> from <code>tensorflow.keras.applications.resnet50</code>, but I'... | machine learning neural network tensorflow convolution object detection | 1 | Can anyone recommend me a very good pre-trained model for face or head detection? -- (machine learning neural network tensorflow convolution object detection)
<p>I really need to know the best pre-trained models to detect faces and/or peoples' head. Not a face recognition model, but only to classify whether an object i... | habedi/stack-exchange-dataset |
85,608 | ValueError: Input 0 of layer sequential is incompatible with the layer: expected ndim=3, found ndim=4. Full shape received: [None, 25, 25, 1] | <p>I am trying to use conv1D but getting that error.
My dataset's is batched and has a shape of [None, 25, 25, 1]
I am using input_shape=(25,25)
I am not able to figure out what should I change so I can get it to work.</p>
<p>My model:</p>
<pre><code>model = Sequential()
model.add(Conv1D(32, ker... | tensorflow convolution | 1 | ValueError: Input 0 of layer sequential is incompatible with the layer: expected ndim=3, found ndim=4. Full shape received: [None, 25, 25, 1] -- (tensorflow convolution)
<p>I am trying to use conv1D but getting that error.
My dataset's is batched and has a shape of [None, 25, 25, 1]
I am using input_shape=(25,2... | habedi/stack-exchange-dataset |
85,618 | Understanding and find the best eps value for DBSCAN | <p>I'm trying to run the DBSCAN algorithm on <a href="http://www.sharecsv.com/s/c6dd1bc7e68b6c248dfe44c59277ddfc/CURE-complete.csv" rel="nofollow noreferrer">this</a> .csv. In the first part of my program I load it and plot the data inside it to check its distribution. This is the first part of the code:</p>
<pre><... | python k means matplotlib plotting dbscan | 1 | Understanding and find the best eps value for DBSCAN -- (python k means matplotlib plotting dbscan)
<p>I'm trying to run the DBSCAN algorithm on <a href="http://www.sharecsv.com/s/c6dd1bc7e68b6c248dfe44c59277ddfc/CURE-complete.csv" rel="nofollow noreferrer">this</a> .csv. In the first part of my program I load it and p... | habedi/stack-exchange-dataset |
85,623 | Pandas: Compare two Dataframe and Groupby categorical | <p>My Question is about pandas DataFrame, I have two DataFrame both follow the same structure.</p>
<p>df_1:</p>
<pre><code>Index Text Category
0 Text 01 1
1 Text 02 1
2 Text 03 1
3 Text 04 1
</code></pre>
<p>df_2:</p>
<pr... | python pandas | 1 | Pandas: Compare two Dataframe and Groupby categorical -- (python pandas)
<p>My Question is about pandas DataFrame, I have two DataFrame both follow the same structure.</p>
<p>df_1:</p>
<pre><code>Index Text Category
0 Text 01 1
1 Text 02 1
2 Text 03 1... | habedi/stack-exchange-dataset |
85,631 | Which term is correct Datafication or Datification? | <p>I have recently started reading <a href="https://link.springer.com/book/10.1007/978-3-319-50017-1#authorsandaffiliationsbook" rel="nofollow noreferrer">Introduction to Data Science: A python approach to Concepts, Techniques, and Applications </a> and taking notes on Data Science.</p>
<p>Chapter 1 repeatedly uses... | terminology | 1 | Which term is correct Datafication or Datification? -- (terminology)
<p>I have recently started reading <a href="https://link.springer.com/book/10.1007/978-3-319-50017-1#authorsandaffiliationsbook" rel="nofollow noreferrer">Introduction to Data Science: A python approach to Concepts, Techniques, and Applications </a> a... | habedi/stack-exchange-dataset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.