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
81,047
How can I label (predict) an unseen set of data based on an existing model?
<p>I'm working on a learning multi-label classification project, for which I've taken 16K lines of text and kind of manually classified them achieving around 94% of accuracy/recall (out of three models).</p>&#xA;<p>Good results I'd say.</p>&#xA;<p>I then though I would have been ready to use my model to predict the lab...
classification scikit learn multilabel classification
1
How can I label (predict) an unseen set of data based on an existing model? -- (classification scikit learn multilabel classification) <p>I'm working on a learning multi-label classification project, for which I've taken 16K lines of text and kind of manually classified them achieving around 94% of accuracy/recall (out...
habedi/stack-exchange-dataset
81,077
Clusterize Spectrum
<p>I have pandas table which contains data about different observations, each one was measured in different wavlength. These observsations are different than each other in the treatment they have gotten.&#xA;The table looks something like this:</p>&#xA;<pre><code>&gt;&gt;&gt;name treatment 410.1 423.2 445.6 477.1 485....
classification clustering k means pca spectral clustering
1
Clusterize Spectrum -- (classification clustering k means pca spectral clustering) <p>I have pandas table which contains data about different observations, each one was measured in different wavlength. These observsations are different than each other in the treatment they have gotten.&#xA;The table looks something lik...
habedi/stack-exchange-dataset
81,085
How to expand abbrevations in text during preprocessing?
<p>Im doing preprocessing on english text data. I have some domain specific abbreviations, for which i'm maintaining internal dictionary with key-value pairs. The problem i'm facing is the text has abbreviations in plural forms with and without contractions like:</p>&#xA;<ul>&#xA;<li>Mgr's = manager</li>&#xA;<li>mgrs =...
machine learning nlp data cleaning preprocessing
1
How to expand abbrevations in text during preprocessing? -- (machine learning nlp data cleaning preprocessing) <p>Im doing preprocessing on english text data. I have some domain specific abbreviations, for which i'm maintaining internal dictionary with key-value pairs. The problem i'm facing is the text has abbreviatio...
habedi/stack-exchange-dataset
81,089
Getting sentence embeddings with sentence_transformers
<p>I have a text column in my data frame which contains paragraph(s) having multiple and variable sentences in each instance/example/row of the dataframe. Then, I created the sentence tokens of that paragraph using <code>sent_tokenizer</code> of nltk and put it into another column.</p>&#xA;<p>So my data frame looks lik...
machine learning python deep learning nlp bert
1
Getting sentence embeddings with sentence_transformers -- (machine learning python deep learning nlp bert) <p>I have a text column in my data frame which contains paragraph(s) having multiple and variable sentences in each instance/example/row of the dataframe. Then, I created the sentence tokens of that paragraph usin...
habedi/stack-exchange-dataset
81,107
ValueError: Found array with 0 sample(s) (shape=(0, 13)) while a minimum of 1 is required
<p>I am new to this logistic regression and finding this error. Please help.</p>&#xA;<pre><code>solver='lbfgs'&#xA;def lr_model(X_train, y_train):&#xA; &#xA; # import the LogisticRegression class&#xA; from sklearn.linear_model import LogisticRegression&#xA; &#xA; # create the model object&#xA; model =...
python pandas
1
ValueError: Found array with 0 sample(s) (shape=(0, 13)) while a minimum of 1 is required -- (python pandas) <p>I am new to this logistic regression and finding this error. Please help.</p>&#xA;<pre><code>solver='lbfgs'&#xA;def lr_model(X_train, y_train):&#xA; &#xA; # import the LogisticRegression class&#xA; f...
habedi/stack-exchange-dataset
81,126
Cross validation and evaluation: neural network loss function continuously decreases in cross-validation
<p>I am evaluating a neural network model using cross validation in 2 different ways ( A &amp; B ) that I thought were equivalent.</p>&#xA;<ul>&#xA;<li><strong>Evaluation type A :</strong>&#xA;For each cross validation loop, the model is instantiated and fitted.</li>&#xA;<li><strong>Evaluation type B :</strong>&#xA;I i...
neural network keras cross validation loss function
1
Cross validation and evaluation: neural network loss function continuously decreases in cross-validation -- (neural network keras cross validation loss function) <p>I am evaluating a neural network model using cross validation in 2 different ways ( A &amp; B ) that I thought were equivalent.</p>&#xA;<ul>&#xA;<li><stron...
habedi/stack-exchange-dataset
81,127
Is it vital to use weighted metrics with weighted loss functions?
<p>When one has an imbalanced machine learning problem, let's say a binary classification problem where class 0 is a majority class and class 1 is a minority class. Here class 1 is the most important class for you. Now your dataset is composed of 100 samples: 70 samples from class 0 and 30 samples from class 1.</p>&#xA...
python metric loss
1
Is it vital to use weighted metrics with weighted loss functions? -- (python metric loss) <p>When one has an imbalanced machine learning problem, let's say a binary classification problem where class 0 is a majority class and class 1 is a minority class. Here class 1 is the most important class for you. Now your datase...
habedi/stack-exchange-dataset
81,133
Is regression or ANOVA the right approach for determining RRP based on a set of RRPs associated with categorical variables
<p>Basically I have scraped some retail site data and I would like to know if this is a regression problem:&#xA;If I have data from the website about shoes like RRP, what brand they are, what colour they are and what size and I collate that data to build a model around such that I can give the model known variables abo...
regression
1
Is regression or ANOVA the right approach for determining RRP based on a set of RRPs associated with categorical variables -- (regression) <p>Basically I have scraped some retail site data and I would like to know if this is a regression problem:&#xA;If I have data from the website about shoes like RRP, what brand they...
habedi/stack-exchange-dataset
81,142
Looking for spatial clusters and anomalies. Is DBSCAN the right tool?
<p>I have a regular 2D grid of data points (X, Y) with each point having a value.</p>&#xA;<p>I'd like to identify clusters and then anomalies that don't belong to those clusters.</p>&#xA;<p>I'm trying to understand the best way to do this and it looks like DBSCAN might be an appropriate algorithm to use but I'm a bit c...
python clustering anomaly detection dbscan
1
Looking for spatial clusters and anomalies. Is DBSCAN the right tool? -- (python clustering anomaly detection dbscan) <p>I have a regular 2D grid of data points (X, Y) with each point having a value.</p>&#xA;<p>I'd like to identify clusters and then anomalies that don't belong to those clusters.</p>&#xA;<p>I'm trying t...
habedi/stack-exchange-dataset
81,148
Why are the ANN training and validation accuracy graphs not smooth?
<p>I am currently training an ANN using Keras (Python3), and I am slowly optimizing the model's architecture and came across something I have not seen before.</p>&#xA;<p>The graph of the training and validation accuracy seems a bit odd. The graph appears 'step-like' in the sense that it is not a smooth curve, but diffe...
machine learning python neural network keras accuracy
1
Why are the ANN training and validation accuracy graphs not smooth? -- (machine learning python neural network keras accuracy) <p>I am currently training an ANN using Keras (Python3), and I am slowly optimizing the model's architecture and came across something I have not seen before.</p>&#xA;<p>The graph of the traini...
habedi/stack-exchange-dataset
81,157
LSTM model prediction scaling with loaded model
<p>I am deploying a LSTM pytorch model for production and I have issue with scaling the LSTM output correctly. While the model was tested the output was scaled with label data:</p>&#xA;<pre><code>y_scaler = MinMaxScaler(feature_range=(-1, 1))&#xA;y_test_scaled = y_scaler.transform(y_test.reshape(-1, 1))&#xA;</code></pr...
lstm pytorch prediction
1
LSTM model prediction scaling with loaded model -- (lstm pytorch prediction) <p>I am deploying a LSTM pytorch model for production and I have issue with scaling the LSTM output correctly. While the model was tested the output was scaled with label data:</p>&#xA;<pre><code>y_scaler = MinMaxScaler(feature_range=(-1, 1))&...
habedi/stack-exchange-dataset
81,163
Predictive power of a dataset
<p>I am reading a book on machine learning for undergraduate. I am actually confused on linear regression flexibility as the say:</p>&#xA;<blockquote>&#xA;<p>Occasionally, linear regression will fail to recover a good solution&#xA;for a data set. While this may be because our data doesn’t actually&#xA;have predictive p...
dataset regression linear regression
1
Predictive power of a dataset -- (dataset regression linear regression) <p>I am reading a book on machine learning for undergraduate. I am actually confused on linear regression flexibility as the say:</p>&#xA;<blockquote>&#xA;<p>Occasionally, linear regression will fail to recover a good solution&#xA;for a data set. W...
habedi/stack-exchange-dataset
81,169
Why is the cosine distance used to measure the similatiry between word embeddings?
<p>While computing the similarity between the words, <code>cosine</code> similarity or distance is computed on word vectors. Why aren't other distance metrics such as Euclidean distance suitable for this task.</p>&#xA;<p>Let us consider 2 vectors <code>a</code> and <code>b</code>. Where, <code>a = [-1,2,-3]</code> and ...
word embeddings distance cosine distance
1
Why is the cosine distance used to measure the similatiry between word embeddings? -- (word embeddings distance cosine distance) <p>While computing the similarity between the words, <code>cosine</code> similarity or distance is computed on word vectors. Why aren't other distance metrics such as Euclidean distance suita...
habedi/stack-exchange-dataset
81,171
Batch Normalization For Federated Learning
<p>As you know, in a federated learning setting, clients train local versions of the joint global model with their Non i.i.d data and each submit an update to the global model which would be aggregated into the next joint global model.</p>&#xA;<p>The normalization which happens by Batch Normalization layers during the ...
machine learning
1
Batch Normalization For Federated Learning -- (machine learning) <p>As you know, in a federated learning setting, clients train local versions of the joint global model with their Non i.i.d data and each submit an update to the global model which would be aggregated into the next joint global model.</p>&#xA;<p>The norm...
habedi/stack-exchange-dataset
81,177
How to account for reduced student capacity when calculating program retention?
<p>I work at a nonprofit youth center that has 2 distinctive programs throughout the year. Our afterschool program runs during the school year, and our summer camp program runs during the summer.</p>&#xA;<p>I am working on calculating our student retention between Afterschool 2019-20 and SummerCamp 2020 to see which st...
statistics data data analysis
1
How to account for reduced student capacity when calculating program retention? -- (statistics data data analysis) <p>I work at a nonprofit youth center that has 2 distinctive programs throughout the year. Our afterschool program runs during the school year, and our summer camp program runs during the summer.</p>&#xA;<...
habedi/stack-exchange-dataset
81,184
How to compare Random Forest with other models
<p>I am new to Machine Learning and I am trying to undrestand the Out of Bag Error in Random Forests and its use.</p>&#xA;<p>Let's say that we have a dataset. First we use the whole dataset (without splitting it) to get a Random Forest and its Out of Bag error. Then we split the dataset, train a Neural Network on the t...
neural network random forest ensemble modeling
1
How to compare Random Forest with other models -- (neural network random forest ensemble modeling) <p>I am new to Machine Learning and I am trying to undrestand the Out of Bag Error in Random Forests and its use.</p>&#xA;<p>Let's say that we have a dataset. First we use the whole dataset (without splitting it) to get a...
habedi/stack-exchange-dataset
81,194
Is there any possibility to apply deep dreaming in data augmentation?
<p>I looked into the deep dreaming concepts and feel like this has the potential for data generation. But i'm not sure how possible this concept is. Any thoughts regarding this?</p>&#xA;
deep learning cnn data augmentation
1
Is there any possibility to apply deep dreaming in data augmentation? -- (deep learning cnn data augmentation) <p>I looked into the deep dreaming concepts and feel like this has the potential for data generation. But i'm not sure how possible this concept is. Any thoughts regarding this?</p>&#xA;
habedi/stack-exchange-dataset
81,208
How to limit a function's cosine value as it approaches 0
<p>How do I get a cosine to peak up to a certain value as it hits 0? With the above code, the y-value peaks to infinity as it approaches 0.</p>&#xA;<pre><code>import matplotlib.pyplot as plt&#xA;import numpy as np&#xA;&#xA;amp = 1&#xA;time = np.linspace(-5, 5, 1000)&#xA;&#xA;signal = np.cos(1 * np.pi * time) * abs(1/ti...
numpy
1
How to limit a function's cosine value as it approaches 0 -- (numpy) <p>How do I get a cosine to peak up to a certain value as it hits 0? With the above code, the y-value peaks to infinity as it approaches 0.</p>&#xA;<pre><code>import matplotlib.pyplot as plt&#xA;import numpy as np&#xA;&#xA;amp = 1&#xA;time = np.linspa...
habedi/stack-exchange-dataset
81,227
Estimate correlation in Python
<p>I have a dataset with labels and usernames:</p>&#xA;<pre><code>Labels Usernames&#xA;1 Londonderry&#xA;1 Londoncalling&#xA;1 Steveonder43&#xA;0 Maryclare_re&#xA;1 Patent107391&#xA;0 Anonymous &#xA;1 _24londonqr&#xA;... &#xA;</code></pre>&#xA;<p>It seems that ...
python statistics correlation data analysis
1
Estimate correlation in Python -- (python statistics correlation data analysis) <p>I have a dataset with labels and usernames:</p>&#xA;<pre><code>Labels Usernames&#xA;1 Londonderry&#xA;1 Londoncalling&#xA;1 Steveonder43&#xA;0 Maryclare_re&#xA;1 Patent107391&#xA;0 Anony...
habedi/stack-exchange-dataset
81,232
Convolution backpropagation
<p>I'm in the progress to learn, and understand different neural networks. I pretty much understand now feed-forward neural networks, and back-propagation of them, and now learning convolutional neural networks. I understand the forward-propagation of them, but having issues understanding their back-propagation. There ...
neural network backpropagation convolutional neural network
1
Convolution backpropagation -- (neural network backpropagation convolutional neural network) <p>I'm in the progress to learn, and understand different neural networks. I pretty much understand now feed-forward neural networks, and back-propagation of them, and now learning convolutional neural networks. I understand th...
habedi/stack-exchange-dataset
81,233
Adaboost with other classifier fitting
<p>There is the opportunity to fit decision trees with other decision trees. For example:</p>&#xA;<pre><code>adaclassification= AdaBoostClassifier(RandomForestClassifier(n_jobs=-1))&#xA;adaclassification.fit(X_train,y_train)&#xA;</code></pre>&#xA;<p>I got better results with random forest, so improved the result from a...
python classification random forest adaboost
1
Adaboost with other classifier fitting -- (python classification random forest adaboost) <p>There is the opportunity to fit decision trees with other decision trees. For example:</p>&#xA;<pre><code>adaclassification= AdaBoostClassifier(RandomForestClassifier(n_jobs=-1))&#xA;adaclassification.fit(X_train,y_train)&#xA;</...
habedi/stack-exchange-dataset
81,241
Stamps detection using AI, Computer vision & Machine Learning technologies
<p><a href="https://en.wikipedia.org/wiki/Postage_stamp" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Postage_stamp</a></p>&#xA;<p><a href="https://www.google.com/search?q=stamps&amp;client=ms-android-lava&amp;prmd=isnv&amp;sxsrf=ALeKk02Ik_sWwymBctdONPasm7w0YNXcZA:1599240889888&amp;source=lnms&amp;tbm=isch&a...
machine learning computer vision ai
1
Stamps detection using AI, Computer vision & Machine Learning technologies -- (machine learning computer vision ai) <p><a href="https://en.wikipedia.org/wiki/Postage_stamp" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Postage_stamp</a></p>&#xA;<p><a href="https://www.google.com/search?q=stamps&amp;client=ms-...
habedi/stack-exchange-dataset
81,242
Calculate all days for each years between two dates in a pandas dataframe
<p>I'm new in python and coding. I'm doing a university project exercise. Last question is :</p>&#xA;<p>&quot;&#xA;For each year, compute the total amount of loans. Each loan that has planned expiration time and disburse time in different years must have its amount distributed proportionally to the number of days in ea...
python pandas dataframe jupyter
1
Calculate all days for each years between two dates in a pandas dataframe -- (python pandas dataframe jupyter) <p>I'm new in python and coding. I'm doing a university project exercise. Last question is :</p>&#xA;<p>&quot;&#xA;For each year, compute the total amount of loans. Each loan that has planned expiration time a...
habedi/stack-exchange-dataset
81,249
Construct word2vec (CBOW) training data from beginning of sentence
<p>When constructing training data for CBOW, <a href="https://arxiv.org/abs/1301.3781" rel="nofollow noreferrer">Mikolov et al.</a> suggest using the word from the center of a context window. What is the &quot;best&quot; approach to capturing words at the beginning/end of a sentence (I put best in quotes because I'm su...
neural network nlp text mining word embeddings word2vec
1
Construct word2vec (CBOW) training data from beginning of sentence -- (neural network nlp text mining word embeddings word2vec) <p>When constructing training data for CBOW, <a href="https://arxiv.org/abs/1301.3781" rel="nofollow noreferrer">Mikolov et al.</a> suggest using the word from the center of a context window. ...
habedi/stack-exchange-dataset
81,256
Scikit learn linear regression - learning rate and epoch adjustment
<p>I am trying to learn linear regression using ordinary least squares and gradient descent from scratch.</p>&#xA;<p>I read the documentation for the Scikit learn function and I do not see a means to adjust the learning rate or the epoch with the <code>sklearn.linear_model.LinearRegression</code> class.</p>&#xA;<p>Is t...
scikit learn linear regression epochs learning rate
1
Scikit learn linear regression - learning rate and epoch adjustment -- (scikit learn linear regression epochs learning rate) <p>I am trying to learn linear regression using ordinary least squares and gradient descent from scratch.</p>&#xA;<p>I read the documentation for the Scikit learn function and I do not see a mean...
habedi/stack-exchange-dataset
81,263
Sentiment analysis of the target in articles
<p>The goal is as follows: I have a big article and I want to define the sentiment of the particular word. For example, the article describes pros and cons of bikes and cars and I want to find the sentiment of the word car.</p>&#xA;<p>In such an example I cannot use document-level SA as the article itself can be positi...
python nlp sentiment analysis
1
Sentiment analysis of the target in articles -- (python nlp sentiment analysis) <p>The goal is as follows: I have a big article and I want to define the sentiment of the particular word. For example, the article describes pros and cons of bikes and cars and I want to find the sentiment of the word car.</p>&#xA;<p>In su...
habedi/stack-exchange-dataset
81,274
Multiclass Classification and log_loss
<p>I hope I can make this clear with few lines of code/explanation.</p>&#xA;<p>I've a 16K list of texts, labelled over 30 different classes that were ran through different classifiers; my Prediction and the Ground truth match on average at 94%.</p>&#xA;<p>I am now after measuring something extra (not sure what should I...
classification scikit learn loss function f1score
1
Multiclass Classification and log_loss -- (classification scikit learn loss function f1score) <p>I hope I can make this clear with few lines of code/explanation.</p>&#xA;<p>I've a 16K list of texts, labelled over 30 different classes that were ran through different classifiers; my Prediction and the Ground truth match ...
habedi/stack-exchange-dataset
81,279
How do I deploy a model when using Stratified K fold?
<p>I have used Stratified K fold for learning the model . Below is the python code:</p>&#xA;<pre><code>&gt;def stratified_cv_v1(X, y, clf, shuffle=True, n=10,):&#xA;&gt; stratified_k_fold = StratifiedKFold(n_splits=n,shuffle=shuffle)&#xA;&gt; y_pred_v1 = y.copy()&#xA;&gt; for ii, jj in stratified_k_fold.split(...
python predictive modeling data science model
1
How do I deploy a model when using Stratified K fold? -- (python predictive modeling data science model) <p>I have used Stratified K fold for learning the model . Below is the python code:</p>&#xA;<pre><code>&gt;def stratified_cv_v1(X, y, clf, shuffle=True, n=10,):&#xA;&gt; stratified_k_fold = StratifiedKFold(n_spli...
habedi/stack-exchange-dataset
81,301
How to identify Overfitting in RandomForestClassifier?
<p>Im building a sentiment classification model using RandomForestClassifier. I got the training accuracy of 99.65 &amp; cross-validation( RepeatedStratifiedKFold-5 folds) accuracy of 97.29. I used f1 score for metrics. The dataset size is 5184 samples. The dataset is imbalanced so i'm using class_weight hyper-paramete...
random forest decision trees overfitting class imbalance hyperparameter tuning
1
How to identify Overfitting in RandomForestClassifier? -- (random forest decision trees overfitting class imbalance hyperparameter tuning) <p>Im building a sentiment classification model using RandomForestClassifier. I got the training accuracy of 99.65 &amp; cross-validation( RepeatedStratifiedKFold-5 folds) accuracy ...
habedi/stack-exchange-dataset
81,307
Python (Pytorch) loss function syntax
<p>I have seen many examples of this syntax that is being used for the loss function specifically:</p>&#xA;<p>loss = nn.BCEWithLogitsLoss()(pred, y)</p>&#xA;<p>Can anyone explain me what does the (pred, y) do exactly, that it directly computes the loss, instead of calling loss as a function of these 2 arguments again?<...
loss function pytorch
1
Python (Pytorch) loss function syntax -- (loss function pytorch) <p>I have seen many examples of this syntax that is being used for the loss function specifically:</p>&#xA;<p>loss = nn.BCEWithLogitsLoss()(pred, y)</p>&#xA;<p>Can anyone explain me what does the (pred, y) do exactly, that it directly computes the loss, i...
habedi/stack-exchange-dataset
81,313
How to use a dataset with only one category of data
<p>I am performing a classification task, to try to detect an object. A picture of the environment is taken, candidates are generated of this possible object using vision algorithms, and once isolated, these candidates will be passed through a CNN for the final decision on whether the object has been detected or not. I...
keras cnn
1
How to use a dataset with only one category of data -- (keras cnn) <p>I am performing a classification task, to try to detect an object. A picture of the environment is taken, candidates are generated of this possible object using vision algorithms, and once isolated, these candidates will be passed through a CNN for t...
habedi/stack-exchange-dataset
81,314
How to use a multiple linear regression model built from normalized data
<p>I built a linear multivariable regression model from normalized data (for the interval [0; 1]). Initially, the data was not normalized, I normalized the data by myself (independent and dependent variables).&#xA;I want to use this model to make predictions from newly received data (I get the values ​​of independent v...
machine learning predictive modeling linear regression prediction normalization
1
How to use a multiple linear regression model built from normalized data -- (machine learning predictive modeling linear regression prediction normalization) <p>I built a linear multivariable regression model from normalized data (for the interval [0; 1]). Initially, the data was not normalized, I normalized the data b...
habedi/stack-exchange-dataset
81,323
Should normalization be applied?
<p>I have more then 100 columns with the values of 1-0. But the two features at the end as seen in the below image, have different values then the rest. Should I rescale the values in the last two columns into a range of [0,1]?</p>&#xA;<p><strong>Note</strong> : I use K-Means algorithm.</p>&#xA;<p><a href="https://i.st...
machine learning k means normalization
1
Should normalization be applied? -- (machine learning k means normalization) <p>I have more then 100 columns with the values of 1-0. But the two features at the end as seen in the below image, have different values then the rest. Should I rescale the values in the last two columns into a range of [0,1]?</p>&#xA;<p><str...
habedi/stack-exchange-dataset
81,328
How to improve results from a Naive Bayes algorithm?
<p>I am having some difficulties in improving results from running a Naive Bayes algorithm.&#xA;My dataset consists of 39 columns (some categorical, some numerical).&#xA;However I only considered the main variable, i.e. Text, which contains all the spam and ham messages.</p>&#xA;<p>Since it is a spam filtering, I think...
machine learning python supervised learning naive bayes classifier naive bayes algorithim
1
How to improve results from a Naive Bayes algorithm? -- (machine learning python supervised learning naive bayes classifier naive bayes algorithim) <p>I am having some difficulties in improving results from running a Naive Bayes algorithm.&#xA;My dataset consists of 39 columns (some categorical, some numerical).&#xA;Ho...
habedi/stack-exchange-dataset
81,332
100% accuracy on both train and test after feature engineering
<p>The original dataset is of ~17K compound structures almost equally divided with labels indicating yes or no, after heavy use of mol2vec and rdkit I have created ~300 datapoints</p>&#xA;<p>Using the boosted trees method on the same shuffled train and test dataset gives 98% train accuracy and 89% test accuracy, but a ...
neural network tensorflow overfitting
1
100% accuracy on both train and test after feature engineering -- (neural network tensorflow overfitting) <p>The original dataset is of ~17K compound structures almost equally divided with labels indicating yes or no, after heavy use of mol2vec and rdkit I have created ~300 datapoints</p>&#xA;<p>Using the boosted trees...
habedi/stack-exchange-dataset
81,346
how to interpret a hierarchical clustering in the heatmap in the picture bellow?
<p>I am trying to interpret the heatmap which was created based on a agglomerative hierarchical clustering. I am not sure what exactly the heatmap does, having in mind that I see on left hand side clustering done on symptoms and on the top of the heatmap I get a clustering of the bellow labels.</p>&#xA;<p>Can someone p...
clustering
1
how to interpret a hierarchical clustering in the heatmap in the picture bellow? -- (clustering) <p>I am trying to interpret the heatmap which was created based on a agglomerative hierarchical clustering. I am not sure what exactly the heatmap does, having in mind that I see on left hand side clustering done on symptom...
habedi/stack-exchange-dataset
81,381
How to determine semantic differences in NLP
<p>I would need to determine the difference in meaning between the following two sentences:</p>&#xA;<pre><code>I am at home&#xA;I am not at home&#xA;I am at the office&#xA;</code></pre>&#xA;<p>the first two sentences differs in verb, which changes the meaning of the sentences (to negative); the second one, with the fir...
python nlp word2vec
1
How to determine semantic differences in NLP -- (python nlp word2vec) <p>I would need to determine the difference in meaning between the following two sentences:</p>&#xA;<pre><code>I am at home&#xA;I am not at home&#xA;I am at the office&#xA;</code></pre>&#xA;<p>the first two sentences differs in verb, which changes th...
habedi/stack-exchange-dataset
81,389
Plotting multiple precision-recall curves in one plot
<p>I have an imbalanced dataset and I was reading this <a href="https://medium.com/urbint-engineering/using-smoteboost-and-rusboost-to-deal-with-class-imbalance-c18f8bf5b805" rel="nofollow noreferrer">article</a> which looks into SMOTE and RUS to address the imbalance. So I have defined the following 3 models:</p>&#xA;...
python scikit learn plotting
1
Plotting multiple precision-recall curves in one plot -- (python scikit learn plotting) <p>I have an imbalanced dataset and I was reading this <a href="https://medium.com/urbint-engineering/using-smoteboost-and-rusboost-to-deal-with-class-imbalance-c18f8bf5b805" rel="nofollow noreferrer">article</a> which looks into SM...
habedi/stack-exchange-dataset
81,395
Area under the ROC curve approximation
<p>I wanted to compute the Area under the ROC curve for a logistic regression model in the context of binary classification. For that I computed, for a list of thresholds, say 0.1 0.2 ... 0.9, the TPR and FPR. I have thus</p>&#xA;<pre><code> (TPR_threshold1, ... TPR_thresholdN)&#xA; (FPR_threshold1, ... FPR_thresholdN)...
machine learning classification logistic regression
1
Area under the ROC curve approximation -- (machine learning classification logistic regression) <p>I wanted to compute the Area under the ROC curve for a logistic regression model in the context of binary classification. For that I computed, for a list of thresholds, say 0.1 0.2 ... 0.9, the TPR and FPR. I have thus</p...
habedi/stack-exchange-dataset
81,404
Binary classification of 2d vectors with neural networks
<p>I'm trying to make a neural network learn a 2D shape. I have an <span class="math-container">$n\times m$</span> grid of points with a binary function defined on it, equal to <span class="math-container">$1$</span> when the point is in the shape and <span class="math-container">$0$</span> when it isn't. I want my net...
deep learning
1
Binary classification of 2d vectors with neural networks -- (deep learning) <p>I'm trying to make a neural network learn a 2D shape. I have an <span class="math-container">$n\times m$</span> grid of points with a binary function defined on it, equal to <span class="math-container">$1$</span> when the point is in the sh...
habedi/stack-exchange-dataset
81,413
What does it mean when the model Learning Curve displays this behavior?
<p>I made a classification LSTM model and it seemed to be working as intended until I increased the number of epochs. That's when I noticed that the Validation and Training curves cross each other at a certain point:</p>&#xA;<p><a href="https://i.stack.imgur.com/IJsQr.png" rel="nofollow noreferrer"><img src="https://i....
machine learning deep learning lstm
1
What does it mean when the model Learning Curve displays this behavior? -- (machine learning deep learning lstm) <p>I made a classification LSTM model and it seemed to be working as intended until I increased the number of epochs. That's when I noticed that the Validation and Training curves cross each other at a certa...
habedi/stack-exchange-dataset
81,418
Semantic similarity between two or more sentences
<p>I need to determine how similar sentences (in meaning) are to one another.&#xA;In order to do it, I have been considering an algorithm (cosine similarity) to determine the similarity between sentences. I have thought as appropriate Word2vec or wordnet to build features for similarity.</p>&#xA;<p>If you have used thi...
python nlp word2vec cosine distance semantic similarity
1
Semantic similarity between two or more sentences -- (python nlp word2vec cosine distance semantic similarity) <p>I need to determine how similar sentences (in meaning) are to one another.&#xA;In order to do it, I have been considering an algorithm (cosine similarity) to determine the similarity between sentences. I ha...
habedi/stack-exchange-dataset
81,438
DQN with decaying epsilon
<p>I'm new to reinforcement learning. I'm studying DQN with decaying epsilon. I came across such example:</p>&#xA;<blockquote>&#xA;<p>EPISODES = 91</p>&#xA;<p>GAMMA = 0.2</p>&#xA;<p>EPSILON_DECAY = 0.999</p>&#xA;<p>MIN_EPSILON = 0.01</p>&#xA;<p>MAX_EPSILON = 1</p>&#xA;</blockquote>&#xA;<p>My questions are:</p>&#xA;<ol>...
machine learning reinforcement learning dqn
1
DQN with decaying epsilon -- (machine learning reinforcement learning dqn) <p>I'm new to reinforcement learning. I'm studying DQN with decaying epsilon. I came across such example:</p>&#xA;<blockquote>&#xA;<p>EPISODES = 91</p>&#xA;<p>GAMMA = 0.2</p>&#xA;<p>EPSILON_DECAY = 0.999</p>&#xA;<p>MIN_EPSILON = 0.01</p>&#xA;<p>...
habedi/stack-exchange-dataset
81,443
How to normalize noisy data
<p>Suppose I have 1-D data which has some outliers, I want to normalize the data to be in the range [0,1].&#xA;I tried calculating the maximum value and the minimum value as follows:</p>&#xA;<pre><code>q1,q2,q3 = quartiles of the data&#xA;max = q3 + (q3-q1)*1.5&#xA;min = q1 - (q3-q1)*1.5&#xA;</code></pre>&#xA;<p>I used...
normalization
1
How to normalize noisy data -- (normalization) <p>Suppose I have 1-D data which has some outliers, I want to normalize the data to be in the range [0,1].&#xA;I tried calculating the maximum value and the minimum value as follows:</p>&#xA;<pre><code>q1,q2,q3 = quartiles of the data&#xA;max = q3 + (q3-q1)*1.5&#xA;min = q...
habedi/stack-exchange-dataset
81,451
Understand the equations of quantile regression forest (Meinshausen)?
<p>I am trying to implement a quantile regression forest (<a href="https://www.jmlr.org/papers/volume7/meinshausen06a/meinshausen06a.pdf" rel="nofollow noreferrer">https://www.jmlr.org/papers/volume7/meinshausen06a/meinshausen06a.pdf</a>).</p>&#xA;<p>But, I have some difficulties to understand how the quantiles are com...
machine learning statistics random forest prediction
1
Understand the equations of quantile regression forest (Meinshausen)? -- (machine learning statistics random forest prediction) <p>I am trying to implement a quantile regression forest (<a href="https://www.jmlr.org/papers/volume7/meinshausen06a/meinshausen06a.pdf" rel="nofollow noreferrer">https://www.jmlr.org/papers/...
habedi/stack-exchange-dataset
81,459
Group K-fold with target stratification
<p>I have a pd.DataFrame</p>&#xA;<pre><code>pd.DataFrame({&#xA; 'person': ['a', 'b', 'c', 'aa', 'bb', 'cc', 'aaa', 'bbb', 'ccc'],&#xA; 'group': [10, 10, 10, 20, 20, 20, 30, 30, 30],&#xA; 'target': [1, 2, 2, 3, 2, 3, 1, 2, 3]&#xA;})&#xA;</code></pre>&#xA;<p>I want to split df into train and test by <strong>grou...
scikit learn pandas cross validation
1
Group K-fold with target stratification -- (scikit learn pandas cross validation) <p>I have a pd.DataFrame</p>&#xA;<pre><code>pd.DataFrame({&#xA; 'person': ['a', 'b', 'c', 'aa', 'bb', 'cc', 'aaa', 'bbb', 'ccc'],&#xA; 'group': [10, 10, 10, 20, 20, 20, 30, 30, 30],&#xA; 'target': [1, 2, 2, 3, 2, 3, 1, 2, 3]&#xA;...
habedi/stack-exchange-dataset
81,476
How to stop a neural network from regressing to the mean
<p>I'm very familiar with neural networks for classification, but I'm trying a regression task for the first time. I'm finding that the network tends to go towards guessing a mean for the whole dataset rather than making case specific predictions.</p>&#xA;<p>What are the potential reasons for this behaviour and how can...
neural network regression
1
How to stop a neural network from regressing to the mean -- (neural network regression) <p>I'm very familiar with neural networks for classification, but I'm trying a regression task for the first time. I'm finding that the network tends to go towards guessing a mean for the whole dataset rather than making case specif...
habedi/stack-exchange-dataset
81,479
sklearn - How to create a sequential pipeline
<p><strong>Update:</strong> The examples in this post were updated</p>&#xA;<p>I am reposting this question here after not getting a clear answer in a <a href="https://stackoverflow.com/questions/63475704/sklearn-columntransformer-duplicate-columns-in-transformers">previous SO post</a></p>&#xA;<p>I am looking for a help...
python scikit learn data imputation pipelines
1
sklearn - How to create a sequential pipeline -- (python scikit learn data imputation pipelines) <p><strong>Update:</strong> The examples in this post were updated</p>&#xA;<p>I am reposting this question here after not getting a clear answer in a <a href="https://stackoverflow.com/questions/63475704/sklearn-columntrans...
habedi/stack-exchange-dataset
81,490
Encoding categorical data with pre-determined dictionary
<p>in case feature encoding, if I'd like to encode my values based on my pre-determined dictionary, how do I do that?</p>&#xA;<p>For instance, say, I've values as <code>[Red, Green, and Blue]</code> and I want to encode them as <code>[-1,0,1]</code> -1 for red, 0 for Green, 1 for Blue... I'll apply it to my feature. I...
python scikit learn feature engineering encoding categorical encoding
1
Encoding categorical data with pre-determined dictionary -- (python scikit learn feature engineering encoding categorical encoding) <p>in case feature encoding, if I'd like to encode my values based on my pre-determined dictionary, how do I do that?</p>&#xA;<p>For instance, say, I've values as <code>[Red, Green, and Bl...
habedi/stack-exchange-dataset
81,508
Question about BERT embeddings with high cosine similarity
<p>Under what circumstances would BERT assign two occurrences of the same word similar embeddings? If those occurrences are contained within similar syntactic relations with their co-occurrents?</p>&#xA;
nlp bert transformer cosine distance
1
Question about BERT embeddings with high cosine similarity -- (nlp bert transformer cosine distance) <p>Under what circumstances would BERT assign two occurrences of the same word similar embeddings? If those occurrences are contained within similar syntactic relations with their co-occurrents?</p>&#xA;
habedi/stack-exchange-dataset
81,511
Book suggestions
<p>Considering, I do have some knowledge about machine learning, python, data science through the courses I have done from sites like Udemy, Udacity, Edx.&#xA;However, I would like to read some books related to the subject matter. Could you please refer me to some helpful books related to machine learning, python.</p>&...
machine learning python books
1
Book suggestions -- (machine learning python books) <p>Considering, I do have some knowledge about machine learning, python, data science through the courses I have done from sites like Udemy, Udacity, Edx.&#xA;However, I would like to read some books related to the subject matter. Could you please refer me to some hel...
habedi/stack-exchange-dataset
81,522
How to obtain a count of the classes of a categorical var within a certain time interval for a time-stamped data?
<p>I have a dataframe with several categorical variables. But for simplicity let's assume there is only 1 categorical variables with 3 classes. I want to obtain the counts of these classes within a certain time-intervals, say 15mins. To make it easier to understand what I am looking for, here is a toy example and the o...
pandas python 3.x
1
How to obtain a count of the classes of a categorical var within a certain time interval for a time-stamped data? -- (pandas python 3.x) <p>I have a dataframe with several categorical variables. But for simplicity let's assume there is only 1 categorical variables with 3 classes. I want to obtain the counts of these cl...
habedi/stack-exchange-dataset
81,526
PyTorchs ConvTranspose2d padding parameter
<p>Im confused about what PyTorchs padding parameter does when using torch.nn.ConvTranspose2d.&#xA;The <a href="https://pytorch.org/docs/stable/generated/torch.nn.ConvTranspose2d.html" rel="nofollow noreferrer">docs</a> say that:</p>&#xA;<blockquote>&#xA;<p>&quot;The padding argument effectively adds dilation * (kernel...
cnn pytorch convolution convolutional neural network
1
PyTorchs ConvTranspose2d padding parameter -- (cnn pytorch convolution convolutional neural network) <p>Im confused about what PyTorchs padding parameter does when using torch.nn.ConvTranspose2d.&#xA;The <a href="https://pytorch.org/docs/stable/generated/torch.nn.ConvTranspose2d.html" rel="nofollow noreferrer">docs</a>...
habedi/stack-exchange-dataset
81,528
Support Vectors of SVM
<p>I have read somewhere that the value of slack variables of support vectors is not 0. Does that mean the points lying in the wrong region e.g a positive point lying in the negative region will also be a support vector? I have attached one picture as well which shows that points lying in the wrong region also support ...
machine learning classification svm
1
Support Vectors of SVM -- (machine learning classification svm) <p>I have read somewhere that the value of slack variables of support vectors is not 0. Does that mean the points lying in the wrong region e.g a positive point lying in the negative region will also be a support vector? I have attached one picture as well...
habedi/stack-exchange-dataset
81,529
How to backpropogate Convolution layer padding inputs with respect to output derivative
<p>I created a convolution network with 5 Conv blocks, let discuss the issue based on Conv block 4 &amp; 5</p>&#xA;<h2>Conv Block 4</h2>&#xA;<p>Input Image size : 28 * 28,&#xA;Padding size 1 : 30 * 30 (image size after padding),&#xA;Filter size : 3 * 3,&#xA;Convolution output image : 28 *...
deep learning cnn convolution
1
How to backpropogate Convolution layer padding inputs with respect to output derivative -- (deep learning cnn convolution) <p>I created a convolution network with 5 Conv blocks, let discuss the issue based on Conv block 4 &amp; 5</p>&#xA;<h2>Conv Block 4</h2>&#xA;<p>Input Image size : 28 * 28,&#xA;Padding size ...
habedi/stack-exchange-dataset
81,546
Interpretation of the data through scatter plot
<p>I was exploring the data and had observed the data points are forming a triangle on the lower side.<a href="https://i.stack.imgur.com/hm4r2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hm4r2.jpg" alt="enter image description here" /></a></p>&#xA;<pre><code>x-axis: Total items&#xA;y-axis: Cancel...
machine learning linear regression data analysis
1
Interpretation of the data through scatter plot -- (machine learning linear regression data analysis) <p>I was exploring the data and had observed the data points are forming a triangle on the lower side.<a href="https://i.stack.imgur.com/hm4r2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hm4r2.jp...
habedi/stack-exchange-dataset
81,564
Neural network regression is not dynamic enough to predict target range?
<p>I'm working with a CNN on a regression task, using MSE as the loss function. Here's a plot of predictions vs targets for the training set.</p>&#xA;<p><strong>Note: Legend is wrong. Blue = prediction vs target | Red = fit | Green = ground truth (x=x)</strong></p>&#xA;<p><a href="https://i.stack.imgur.com/WmuyD.png" r...
neural network regression cnn
1
Neural network regression is not dynamic enough to predict target range? -- (neural network regression cnn) <p>I'm working with a CNN on a regression task, using MSE as the loss function. Here's a plot of predictions vs targets for the training set.</p>&#xA;<p><strong>Note: Legend is wrong. Blue = prediction vs target ...
habedi/stack-exchange-dataset
81,565
Is it possible for a model with a large amount of data to perform very well and reach an extremely low cost within a single epoch?
<p>I am working on a project to detect human awareness levels <a href="https://sites.google.com/view/utarldd/home" rel="nofollow noreferrer">using this dataset</a>.</p>&#xA;<p>I preprocessed the video data as the following:</p>&#xA;<ol>&#xA;<li>Convert video to frames(taking a frame every 5 seconds.</li>&#xA;<li>Rotate...
deep learning tensorflow cnn
1
Is it possible for a model with a large amount of data to perform very well and reach an extremely low cost within a single epoch? -- (deep learning tensorflow cnn) <p>I am working on a project to detect human awareness levels <a href="https://sites.google.com/view/utarldd/home" rel="nofollow noreferrer">using this dat...
habedi/stack-exchange-dataset
81,576
How can I determine the relationship between spam and weekdays?
<p>I am trying to check if there is a correlation between spam emails and weekdays.&#xA;My dataset looks like as follows:</p>&#xA;<pre><code> Spam? Day&#xA;0 1.0 Saturday&#xA;1 1.0 Saturday&#xA;3 0.0 Saturday&#xA;5 1.0 Saturday&#xA;7 0.0 Friday&#xA;... ... ...&#xA;346 0.0 Friday&#xA;348 1.0 Friday&#xA;361 0....
python correlation numpy
1
How can I determine the relationship between spam and weekdays? -- (python correlation numpy) <p>I am trying to check if there is a correlation between spam emails and weekdays.&#xA;My dataset looks like as follows:</p>&#xA;<pre><code> Spam? Day&#xA;0 1.0 Saturday&#xA;1 1.0 Saturday&#xA;3 0.0 Saturday&#xA;5 1....
habedi/stack-exchange-dataset
81,583
Automating the training and deployment of the model as more data becomes available
<p>My question is about automating the training of the model as more data becomes available.</p>&#xA;<p>In this scenario, I have 1MM items that I split into training and test datasets to train, validate and ultimately deploy the model.</p>&#xA;<p>As more data becomes available on a daily basis, is it common in real-lif...
data
1
Automating the training and deployment of the model as more data becomes available -- (data) <p>My question is about automating the training of the model as more data becomes available.</p>&#xA;<p>In this scenario, I have 1MM items that I split into training and test datasets to train, validate and ultimately deploy th...
habedi/stack-exchange-dataset
81,593
Interpreting decision tree results after target encoding
<p>I am not sure how to interpret the results of my decision tree after I had used target encoding, could someone clarify? The example below doesn't need target encoding just for explanation of my confusion here.</p>&#xA;<p>For instance I am trying to classify if a fruit is rotten or not given its age and fruit type. I...
decision trees target encoding
1
Interpreting decision tree results after target encoding -- (decision trees target encoding) <p>I am not sure how to interpret the results of my decision tree after I had used target encoding, could someone clarify? The example below doesn't need target encoding just for explanation of my confusion here.</p>&#xA;<p>For...
habedi/stack-exchange-dataset
81,597
In Mini Batch Gradient Descent what happens to remaining examples
<p>Suppose my dataset has 1000 samples (X=1000) . I choose batch size of 32.<br />&#xA;As 1000 is not perfectly divisible by 32 , remainder is 8.</p>&#xA;<p>My question is what happens to the last 8 examples. Are they considered? If they are, will they effect the efficiency of my model.</p>&#xA;<pre><code>def next_batc...
neural network mini batch gradient descent
1
In Mini Batch Gradient Descent what happens to remaining examples -- (neural network mini batch gradient descent) <p>Suppose my dataset has 1000 samples (X=1000) . I choose batch size of 32.<br />&#xA;As 1000 is not perfectly divisible by 32 , remainder is 8.</p>&#xA;<p>My question is what happens to the last 8 example...
habedi/stack-exchange-dataset
81,600
How to apply multiple filter in Data Frame?
<p><strong>How to implement multiple filters for checking data cell in a range ?</strong></p>&#xA;<p>Suppose, I have a list of numbers like,</p>&#xA;<hr />&#xA;<pre><code>range_1 = [ 70 ,15,5,7,3,7,8,3,2, 63 ]&#xA;&#xA;# and&#xA;&#xA;range_1 = [ 50, 56, 80, 61, 83, 87, 13, 58, 43, 24, 84, 54, 64,36, 48 ]&#xA;&#xA;</c...
pandas feature selection data cleaning data science model text filter
1
How to apply multiple filter in Data Frame? -- (pandas feature selection data cleaning data science model text filter) <p><strong>How to implement multiple filters for checking data cell in a range ?</strong></p>&#xA;<p>Suppose, I have a list of numbers like,</p>&#xA;<hr />&#xA;<pre><code>range_1 = [ 70 ,15,5,7,3,7,8,3...
habedi/stack-exchange-dataset
81,613
How to handle fixed values for variables in pre-processing
<p>I have a dataset which contains few variables whose values do not change. Some of the variables are non-numeric (for example all values for that variable contain the value 5) and few variables are real-valued but all same values. When doing standardization of the variables so that each is a zero mean and variance 1,...
data science model preprocessing dummy variables
1
How to handle fixed values for variables in pre-processing -- (data science model preprocessing dummy variables) <p>I have a dataset which contains few variables whose values do not change. Some of the variables are non-numeric (for example all values for that variable contain the value 5) and few variables are real-va...
habedi/stack-exchange-dataset
81,628
With Stochastic Gradient Descent why we dont compute exact derivative of loss function?
<p>In a blog I read this:<br />&#xA;<em>With Stochastic Gradient Descent we don’t compute the exact derivate of our loss function. Instead, we’re estimating it on a small batch.</em><br />&#xA;<a href="https://towardsdatascience.com/stochastic-gradient-descent-with-momentum-a84097641a5d" rel="nofollow noreferrer">blog....
deep learning gradient descent mini batch gradient descent
1
With Stochastic Gradient Descent why we dont compute exact derivative of loss function? -- (deep learning gradient descent mini batch gradient descent) <p>In a blog I read this:<br />&#xA;<em>With Stochastic Gradient Descent we don’t compute the exact derivate of our loss function. Instead, we’re estimating it on a sma...
habedi/stack-exchange-dataset
81,632
Algorithm for Binary classification
<p>I have a data set with huge number of features ( Approximately 3000) and a binary target variable . The reason I have too many features is because of one hot encoding many categorical variables in my data set .</p>&#xA;<p>I think logistic regression might only work with small number of features .</p>&#xA;<p>So , g...
machine learning deep learning classification auc roc
1
Algorithm for Binary classification -- (machine learning deep learning classification auc roc) <p>I have a data set with huge number of features ( Approximately 3000) and a binary target variable . The reason I have too many features is because of one hot encoding many categorical variables in my data set .</p>&#xA;<...
habedi/stack-exchange-dataset
81,640
Object detection is not improving although loss is decreasing
<p>I am working on a project for detecting buildings from satellite images (using <a href="https://www.openstreetmap.org/#map=17/50.04263/13.36338" rel="nofollow noreferrer">OpenStreetMap</a> data as labels) using the <a href="https://github.com/tensorflow/models/tree/master/research/object_detection" rel="nofollow nor...
machine learning deep learning tensorflow computer vision object detection
1
Object detection is not improving although loss is decreasing -- (machine learning deep learning tensorflow computer vision object detection) <p>I am working on a project for detecting buildings from satellite images (using <a href="https://www.openstreetmap.org/#map=17/50.04263/13.36338" rel="nofollow noreferrer">Open...
habedi/stack-exchange-dataset
81,641
Time series binary classification probability smoothing
<p><strong>Problem</strong></p>&#xA;<p>Suppose we have trained binary classifier and want to predict value of <code>[x1, ..., x5]</code> with associated timestamps <code>[t1, ..., t5]</code>. We get the prediction as following: <code>[0.25, 0.99, 0.1, 0.75, 0.79]</code>.</p>&#xA;<p>Assume that I have the domain knowled...
classification time series
1
Time series binary classification probability smoothing -- (classification time series) <p><strong>Problem</strong></p>&#xA;<p>Suppose we have trained binary classifier and want to predict value of <code>[x1, ..., x5]</code> with associated timestamps <code>[t1, ..., t5]</code>. We get the prediction as following: <cod...
habedi/stack-exchange-dataset
81,654
Why Mini batch gradient descent is faster than gradient descent?
<p>According to me:</p>&#xA;<p><strong>Mini Batch Gradient Descent</strong> :<br />&#xA;1.It takes a specified batch number say 32.<br />&#xA;2.Evaluate loss on 32 examples.<br />&#xA;3.Update weights.<br />&#xA;4.Repeat until every example is complete.<br />&#xA;5.Repeat till a specified epoch.</p>&#xA;<p><strong>Grad...
deep learning gradient descent mini batch gradient descent
1
Why Mini batch gradient descent is faster than gradient descent? -- (deep learning gradient descent mini batch gradient descent) <p>According to me:</p>&#xA;<p><strong>Mini Batch Gradient Descent</strong> :<br />&#xA;1.It takes a specified batch number say 32.<br />&#xA;2.Evaluate loss on 32 examples.<br />&#xA;3.Updat...
habedi/stack-exchange-dataset
81,678
How to approach for predicting semantic similarity between two phrases
<p>I need pointers on the latest research, tools, and techniques for predicting semantic similarity between two phrases.</p>&#xA;<p><strong>Problem Statement</strong>: Given two propositions <code>A</code> and <code>B</code> with <code>A</code> know to be <code>true</code>, predict if <code>B</code> agrees, contradicts...
nlp learning semantic similarity
1
How to approach for predicting semantic similarity between two phrases -- (nlp learning semantic similarity) <p>I need pointers on the latest research, tools, and techniques for predicting semantic similarity between two phrases.</p>&#xA;<p><strong>Problem Statement</strong>: Given two propositions <code>A</code> and <...
habedi/stack-exchange-dataset
81,681
Bert for QuestionAnswering input exceeds 512
<p>I'm training Bert on question answering (in Spanish) and i have a large context, only the context exceeds 512, the total question + context is 10k, i found that longformer is bert like for long document, but there's no pretrained in spanish so, is there any idea get around bert.</p>&#xA;<p>What i tried is:</p>&#xA;<...
bert transformer question answering huggingface
1
Bert for QuestionAnswering input exceeds 512 -- (bert transformer question answering huggingface) <p>I'm training Bert on question answering (in Spanish) and i have a large context, only the context exceeds 512, the total question + context is 10k, i found that longformer is bert like for long document, but there's no ...
habedi/stack-exchange-dataset
81,685
Difference between Memory and Disk space
<p>I was watching this machine learning course by Andrew NG where he states memory requirement and disk space requirement separately while referring to machine learning algorithms.&#xA;What exactly is the difference and how are they occupied?</p>&#xA;
machine learning
1
Difference between Memory and Disk space -- (machine learning) <p>I was watching this machine learning course by Andrew NG where he states memory requirement and disk space requirement separately while referring to machine learning algorithms.&#xA;What exactly is the difference and how are they occupied?</p>&#xA;
habedi/stack-exchange-dataset
81,710
High validation loss, high validation accuracy
<p>I'm just getting started into the field of deep learning, and I completed my first model training using PyTorch.</p>&#xA;<p>I decided to use a pre-build model from torchvision, more specifically the mobilenet_v2 (<a href="https://pytorch.org/docs/stable/_modules/torchvision/models/mobilenet.html#mobilenet_v2" rel="n...
neural network deep learning pytorch
1
High validation loss, high validation accuracy -- (neural network deep learning pytorch) <p>I'm just getting started into the field of deep learning, and I completed my first model training using PyTorch.</p>&#xA;<p>I decided to use a pre-build model from torchvision, more specifically the mobilenet_v2 (<a href="https:...
habedi/stack-exchange-dataset
81,722
AUC ROC Curve multi class Classification
<p>Here is the part of the code for ROC AUC Curve calculation for multiple classes.</p>&#xA;<pre><code>n_classes= 5&#xA;&#xA;y_test = [0,1,1,2,3,4] #actual value&#xA;pred1 = [0,1,1,1,3,4] #predicted value&#xA;&#xA;&#xA;fpr = dict()&#xA;tpr = dict()&#xA;roc_auc = dict()&#xA;&#xA;for i in range(n_classes):&#xA; f...
python multiclass classification auc roc
1
AUC ROC Curve multi class Classification -- (python multiclass classification auc roc) <p>Here is the part of the code for ROC AUC Curve calculation for multiple classes.</p>&#xA;<pre><code>n_classes= 5&#xA;&#xA;y_test = [0,1,1,2,3,4] #actual value&#xA;pred1 = [0,1,1,1,3,4] #predicted value&#xA;&#xA;&#xA;fpr = dic...
habedi/stack-exchange-dataset
81,727
What would be the target input for Transformer Decoder during test phase?
<p>The Transformer Decoder takes in two inputs, the encoder's output, and the target sequence. How the target is fed into the decoder has been provided in this <a href="https://datascience.stackexchange.com/questions/51785/what-is-the-first-input-to-the-decoder-in-a-transformer-model" >answer </a></p>&#xA;<p>I am havin...
nlp transformer attention mechanism
1
What would be the target input for Transformer Decoder during test phase? -- (nlp transformer attention mechanism) <p>The Transformer Decoder takes in two inputs, the encoder's output, and the target sequence. How the target is fed into the decoder has been provided in this <a href="https://datascience.stackexchange.co...
habedi/stack-exchange-dataset
81,730
When I add regularization like L1,L2 , do I need more epochs to properly train my model?
<p>When I add regularization techniques in my model like L1 or L2 do i need more epochs to properly converge my model.</p>&#xA;<pre><code>for r in (None,&quot;L1&quot;,&quot;L2&quot;):&#xA; for max_iter in (30,45,60): &#xA; classifier=SGDClassifier(loss=&quot;log&quot;,penalty=r,max_iter=max_iter,l...
deep learning regularization
1
When I add regularization like L1,L2 , do I need more epochs to properly train my model? -- (deep learning regularization) <p>When I add regularization techniques in my model like L1 or L2 do i need more epochs to properly converge my model.</p>&#xA;<pre><code>for r in (None,&quot;L1&quot;,&quot;L2&quot;):&#xA; ...
habedi/stack-exchange-dataset
81,740
Ordering of standardization, pca, and/or tfidf for neural network
<p>I have 60k rows of text data. I have tokenized it into 55k columns. I am using a neural network to classify the data but have some questions about how to order my preprocessing steps. I have too much data for my hardware (doesn't fit in memory/too slow) so I am using PCA to reduce dimensions.</p>&#xA;<ol>&#xA;<li><p...
neural network nlp pca text classification tfidf
1
Ordering of standardization, pca, and/or tfidf for neural network -- (neural network nlp pca text classification tfidf) <p>I have 60k rows of text data. I have tokenized it into 55k columns. I am using a neural network to classify the data but have some questions about how to order my preprocessing steps. I have too mu...
habedi/stack-exchange-dataset
81,741
Cleaning data with two fields mixed in the same column?
<p>I am working on a template for a dashboard that is giving me some serious trouble. The format the data comes in is highly unstructured. In the image below, circled items are &quot;Site Names&quot;, data is Month-level.</p>&#xA;<p>The issue is that the &quot;Site Names&quot; are mixed in with the Month, <em>with an i...
data cleaning excel
1
Cleaning data with two fields mixed in the same column? -- (data cleaning excel) <p>I am working on a template for a dashboard that is giving me some serious trouble. The format the data comes in is highly unstructured. In the image below, circled items are &quot;Site Names&quot;, data is Month-level.</p>&#xA;<p>The is...
habedi/stack-exchange-dataset
81,762
Can i expect good results having low correlation attributes?
<p>This was a question i saw in an interview for a data scientist position:</p>&#xA;<p>&quot;Here is the following correlation heatmap that i got from my attributes. Regarding the correlation of each feature with the dependent variable (<code>target/class</code>), it is noticeable that correlations are not very express...
machine learning classification visualization correlation
1
Can i expect good results having low correlation attributes? -- (machine learning classification visualization correlation) <p>This was a question i saw in an interview for a data scientist position:</p>&#xA;<p>&quot;Here is the following correlation heatmap that i got from my attributes. Regarding the correlation of e...
habedi/stack-exchange-dataset
81,775
As RELU is not differentiable when it touches the x-axis, doesn't it effect training?
<p>When I read about activation functions , I read that the reason we don't use step function is because, it is non differentiable which leads to problem in gradient descent.<br />&#xA;I am a beginner in deep learning , as Relu is almost a linear function and also non differentiable where it touches x-axis , why it per...
neural network deep learning activation function
1
As RELU is not differentiable when it touches the x-axis, doesn't it effect training? -- (neural network deep learning activation function) <p>When I read about activation functions , I read that the reason we don't use step function is because, it is non differentiable which leads to problem in gradient descent.<br />...
habedi/stack-exchange-dataset
81,778
CNN: How do I handle Blurred images in the dataset?
<p>I have 30% blurred images in each classes. I have a total of 10 classes. I'm not allowed to drop these blurred images. How do I train the model to get better accuracy for both blurred and nonblurred training dataset ? Currently, I'm at 11% accuracy.</p>&#xA;<p>The images were blurred using a Gaussian blur.</p>&#xA;<...
deep learning cnn image classification computer vision gaussian
1
CNN: How do I handle Blurred images in the dataset? -- (deep learning cnn image classification computer vision gaussian) <p>I have 30% blurred images in each classes. I have a total of 10 classes. I'm not allowed to drop these blurred images. How do I train the model to get better accuracy for both blurred and nonblurr...
habedi/stack-exchange-dataset
81,779
Machine learning algorithms and Computer Vision technologies for detecting 52 playing cards deck
<p><a href="https://en.wikipedia.org/wiki/Standard_52-card_deck" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Standard_52-card_deck</a></p>&#xA;<p><a href="https://en.wikipedia.org/wiki/Playing_card" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Playing_card</a></p>&#xA;<p><a href="https://www.goog...
machine learning image classification computer vision
1
Machine learning algorithms and Computer Vision technologies for detecting 52 playing cards deck -- (machine learning image classification computer vision) <p><a href="https://en.wikipedia.org/wiki/Standard_52-card_deck" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Standard_52-card_deck</a></p>&#xA;<p><a hre...
habedi/stack-exchange-dataset
81,783
How we can identify the problem of Overfitting and underfitting and maintain bias?
<p>Basically, I'm new to the data science field, and <code>I'm getting a little bit of confusion about overfitting and underfitting.</code></p>&#xA;<p>Are <strong>overfitting and underfitting</strong> is totally depending upon the number of datasets or the behavior of data ?</p>&#xA;<blockquote>&#xA;<p>Can anyone expla...
machine learning deep learning statistics overfitting
1
How we can identify the problem of Overfitting and underfitting and maintain bias? -- (machine learning deep learning statistics overfitting) <p>Basically, I'm new to the data science field, and <code>I'm getting a little bit of confusion about overfitting and underfitting.</code></p>&#xA;<p>Are <strong>overfitting and...
habedi/stack-exchange-dataset
81,786
How we can Identify Specific Feature from a larger amount of Dataset?
<p>In <strong>Machine Learning</strong>, we need to play with any kind of datasets.</p>&#xA;<p>In the Dataset, There are too many records and features, Some datasets had lots of features <em>(sometimes it's called <code>columns</code>)</em>,</p>&#xA;<p>So the main problem for a data scientist is to know the behavior of...
dataset pandas feature selection data cleaning data analysis
1
How we can Identify Specific Feature from a larger amount of Dataset? -- (dataset pandas feature selection data cleaning data analysis) <p>In <strong>Machine Learning</strong>, we need to play with any kind of datasets.</p>&#xA;<p>In the Dataset, There are too many records and features, Some datasets had lots of featur...
habedi/stack-exchange-dataset
81,796
feature importance after classification
<p>I have time series data and more or less 200 features for each sample, I used a recurrent neural network for the binary classification task.&#xA;After the classification I would like to know which features contribute most to one of the target(let's say target=1). Any suggested method? Thank you</p>&#xA;
classification rnn
1
feature importance after classification -- (classification rnn) <p>I have time series data and more or less 200 features for each sample, I used a recurrent neural network for the binary classification task.&#xA;After the classification I would like to know which features contribute most to one of the target(let's say ...
habedi/stack-exchange-dataset
81,799
Why we can't Remove features with missing values in Data Preprocessing
<p>In a <strong>Real Time Dataset</strong>, There are many missing values available in the Dataset and also we need to deal with data preprocessing. And there are many ways to minimize the problem of missing values preprocessing.</p>&#xA;<p>So, Can we use <code>mean</code>, <code>median</code>, <code>standerd deviation...
machine learning pandas feature selection data cleaning missing data
1
Why we can't Remove features with missing values in Data Preprocessing -- (machine learning pandas feature selection data cleaning missing data) <p>In a <strong>Real Time Dataset</strong>, There are many missing values available in the Dataset and also we need to deal with data preprocessing. And there are many ways to...
habedi/stack-exchange-dataset
81,807
How to handle images of different sizes that are smaller than the input layer of a deep learning model?
<p>I am performing human awareness detection and have trained my model using transfer learning with MobileNetV2. This model expects a tensor of dimension [Null,224,224,3].</p>&#xA;<p>I have applied face detection using BlazeFace which uses an input of [128,128,3] on the input video stream and cropped the detected faces...
machine learning python neural network deep learning cnn
1
How to handle images of different sizes that are smaller than the input layer of a deep learning model? -- (machine learning python neural network deep learning cnn) <p>I am performing human awareness detection and have trained my model using transfer learning with MobileNetV2. This model expects a tensor of dimension ...
habedi/stack-exchange-dataset
81,811
What is the difference between maximum likelihood hypothesis and maximum a posteriori hypothesis?
<p>I am a student and I am studying machine learning. I am focusing on the concept of <strong>Bayesian learning</strong> and I have studied the <strong>maximum likelihood hypothesis</strong> and the <strong>maximum a posteriori hypothesis</strong>.</p>&#xA;<p>I have seen that the <strong>maximum likelihood hypothesis</...
machine learning statistics probability bayesian
1
What is the difference between maximum likelihood hypothesis and maximum a posteriori hypothesis? -- (machine learning statistics probability bayesian) <p>I am a student and I am studying machine learning. I am focusing on the concept of <strong>Bayesian learning</strong> and I have studied the <strong>maximum likeliho...
habedi/stack-exchange-dataset
81,818
EfficientNet function composition or Hadamard
<p>In the page 3 of the paper of <a href="https://arxiv.org/abs/1905.11946" rel="nofollow noreferrer">EfficientNet</a>, there is a equation&#xA;<span class="math-container">$$\mathcal{N} = \bigodot_{i=1...s} \mathcal{F}_{i}^{L_i} \big(X_{\langle H_i, W_i, C_i \rangle}\big)$$</span>&#xA;where <span class="math-container...
deep learning keras cnn computer vision convolutional neural network
1
EfficientNet function composition or Hadamard -- (deep learning keras cnn computer vision convolutional neural network) <p>In the page 3 of the paper of <a href="https://arxiv.org/abs/1905.11946" rel="nofollow noreferrer">EfficientNet</a>, there is a equation&#xA;<span class="math-container">$$\mathcal{N} = \bigodot_{i...
habedi/stack-exchange-dataset
81,824
Distinguish randomly generated texts from reasonable for human texts
<p>I have strings short texts of 2 types:&#xA;<code>'23jd2032n0d2mn', 'fn830n30rn83', 'fhui29n4ok', 'qn4foml', ...</code>&#xA;and&#xA;<code>'sweetie23', 'king3prussia', 'maryjesus', 'lovedog4and_kitties', ...</code></p>&#xA;<p>Is there a way to distinguish one type from another?</p>&#xA;<p>I've tried to vectorize texts...
classification nlp text text classification text generation
1
Distinguish randomly generated texts from reasonable for human texts -- (classification nlp text text classification text generation) <p>I have strings short texts of 2 types:&#xA;<code>'23jd2032n0d2mn', 'fn830n30rn83', 'fhui29n4ok', 'qn4foml', ...</code>&#xA;and&#xA;<code>'sweetie23', 'king3prussia', 'maryjesus', 'lov...
habedi/stack-exchange-dataset
81,834
How to structure the output layer of an MLP that finds the quadrant of an arbitrary point in a rectangle?
<p>I'm trying to write a neural network that outputs the quadrant of a rectangle that an arbitrary point lies in. This rectangle has its upper left at {0, 0} and its lower right at {1, 1} (e.g. point {0.25, 0.25} should return 'upper left', and point {0.75, 0.75} should return 'lower right').</p>&#xA;<p>I'm confused ab...
neural network classification mlp
1
How to structure the output layer of an MLP that finds the quadrant of an arbitrary point in a rectangle? -- (neural network classification mlp) <p>I'm trying to write a neural network that outputs the quadrant of a rectangle that an arbitrary point lies in. This rectangle has its upper left at {0, 0} and its lower rig...
habedi/stack-exchange-dataset
81,852
Replace values that starts with "<" in a data frame in r
<p>I am new to R and would like some assistance on replacing multiple values in a large dataset with many variables to NA at once in r.</p>&#xA;<p>I want all the cells with &quot;&lt;<strong>0.01, &lt;0.02, and many others with &lt; sign at the beginning</strong>&quot; to be changed to NA.&#xA;<a href="https://i.stack....
r
1
Replace values that starts with "<" in a data frame in r -- (r) <p>I am new to R and would like some assistance on replacing multiple values in a large dataset with many variables to NA at once in r.</p>&#xA;<p>I want all the cells with &quot;&lt;<strong>0.01, &lt;0.02, and many others with &lt; sign at the beginning</...
habedi/stack-exchange-dataset
81,853
Matrix notation in Sutton and Barto
<p>On pg. 206 of Barto and Sutton's <em>Reinforcement Learning</em>, there is a curious statement about the result of a scalar product:</p>&#xA;<p><a href="https://i.stack.imgur.com/CmzfQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CmzfQ.png" alt="enter image description here" /></a></p>&#xA;<p>A...
machine learning reinforcement learning matrix
1
Matrix notation in Sutton and Barto -- (machine learning reinforcement learning matrix) <p>On pg. 206 of Barto and Sutton's <em>Reinforcement Learning</em>, there is a curious statement about the result of a scalar product:</p>&#xA;<p><a href="https://i.stack.imgur.com/CmzfQ.png" rel="nofollow noreferrer"><img src="htt...
habedi/stack-exchange-dataset
81,856
How to build a database of image data for machine learning?
<p>I want to build a database of image data for machine learning. But how should this be done? I'm assuming people don't just dump all of their image data into a folder? Do they use a relational database management system, like MySQL? Or do they use a NoSQL database, like MongoDB? Is there a textbook that explores this...
machine learning dataset data image classification image
1
How to build a database of image data for machine learning? -- (machine learning dataset data image classification image) <p>I want to build a database of image data for machine learning. But how should this be done? I'm assuming people don't just dump all of their image data into a folder? Do they use a relational dat...
habedi/stack-exchange-dataset
81,862
Feature Selection - Conditional Entropy
<p>I've developed an algorithm to define conditional entropy for feature selection in text classification. I'm following the formula at Machine Learning from Text by Charu C. Aggarwal (5.2.2). The author mentions that Conditional Entropy values are between (0, log(number of classes)) in which my case is (0, 0.6931472)....
feature selection text mining feature extraction
1
Feature Selection - Conditional Entropy -- (feature selection text mining feature extraction) <p>I've developed an algorithm to define conditional entropy for feature selection in text classification. I'm following the formula at Machine Learning from Text by Charu C. Aggarwal (5.2.2). The author mentions that Conditio...
habedi/stack-exchange-dataset
81,863
Problem with converting string to dummy variables
<p>I'm new in data science, I have data which want to work on it, I omitted extra columns and convert it to 4 columns <strong>( Product, Date, Market, Demand )</strong> . in this data <strong>Product</strong> and <strong>Market</strong> are string, I know for working on this data must convert them. I want to convert th...
data data analysis dummy variables
1
Problem with converting string to dummy variables -- (data data analysis dummy variables) <p>I'm new in data science, I have data which want to work on it, I omitted extra columns and convert it to 4 columns <strong>( Product, Date, Market, Demand )</strong> . in this data <strong>Product</strong> and <strong>Market</s...
habedi/stack-exchange-dataset
81,866
Why does the overfitting decreases if we choose K to be large in K-nearest neighbors?
<p>I am studying machine learning and I am focusing on <strong>K-nearest neighbors</strong> . I have understood the algorithm, but I have still a doubt, which is on <strong>how to choose the K for the number of neighbors</strong>.</p>&#xA;<p>I have seen that choosing <strong><span class="math-container">$K=1$</span></...
machine learning classification machine learning model overfitting k nn
1
Why does the overfitting decreases if we choose K to be large in K-nearest neighbors? -- (machine learning classification machine learning model overfitting k nn) <p>I am studying machine learning and I am focusing on <strong>K-nearest neighbors</strong> . I have understood the algorithm, but I have still a doubt, whi...
habedi/stack-exchange-dataset
81,872
How should I sample from a mixture distribution?
<p>Let's say we have a mixture distribution, defined by density <span class="math-container">$f(x)= w_1 p_1(x) + w_2 p_2(x)$</span>, where <span class="math-container">$w_i$</span> is a scalar weight. Furthermore, we have efficient methods to evaluate the pdf and cdf/icdf for the distribution <span class="math-containe...
python pytorch sampling scipy
1
How should I sample from a mixture distribution? -- (python pytorch sampling scipy) <p>Let's say we have a mixture distribution, defined by density <span class="math-container">$f(x)= w_1 p_1(x) + w_2 p_2(x)$</span>, where <span class="math-container">$w_i$</span> is a scalar weight. Furthermore, we have efficient meth...
habedi/stack-exchange-dataset
81,875
Using constants in input of a ML Model
<p>I'm currently building a binary classifier.</p>&#xA;<p>My input is a sequence of 32 time-steps.</p>&#xA;<p>Certain time-steps of the input will be constant (ex: t-0 will always be 0, t-5 will always be 9, etc)</p>&#xA;<p>Does it make sense to add these time-steps as features into the model? Im thinking its not since...
machine learning classification machine learning model
1
Using constants in input of a ML Model -- (machine learning classification machine learning model) <p>I'm currently building a binary classifier.</p>&#xA;<p>My input is a sequence of 32 time-steps.</p>&#xA;<p>Certain time-steps of the input will be constant (ex: t-0 will always be 0, t-5 will always be 9, etc)</p>&#xA;...
habedi/stack-exchange-dataset
81,881
What is the meaning of Face Recognition in wild and in static?
<p>What is meant by when someone says face recognition on wild dataset and on static dataset?</p>&#xA;
deep learning computer vision
1
What is the meaning of Face Recognition in wild and in static? -- (deep learning computer vision) <p>What is meant by when someone says face recognition on wild dataset and on static dataset?</p>&#xA;
habedi/stack-exchange-dataset