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 |
|---|---|---|---|---|---|---|
89,530 | What are good resources to learn the basics of graph theory | <p>I just spent half a day "debugging" a script that tried to get the betweenness centrality of a weighted graph with negative weights. However the package I used for that julia's <code>LightGraphs</code> uses Dijkstra's shortest paths, which require non-negative weights as input. I didn't know this, and thus... | neural network graphs | 1 | What are good resources to learn the basics of graph theory -- (neural network graphs)
<p>I just spent half a day "debugging" a script that tried to get the betweenness centrality of a weighted graph with negative weights. However the package I used for that julia's <code>LightGraphs</code> uses Dijkstra's sh... | habedi/stack-exchange-dataset |
89,534 | What is the difference between spiral, flame, aggregation data | <p>What is the difference between spiral, flame, aggregation data? What are the names of the columns, or what are the columns indicate?
For example, spiral is like to:</p>
<pre><code>31.95 7.95 3
31.15 7.3 3
30.45 6.65 3
29.7 6 3
28.9 5.55 3
28.05 5 3&#... | dataset clustering data analysis | 1 | What is the difference between spiral, flame, aggregation data -- (dataset clustering data analysis)
<p>What is the difference between spiral, flame, aggregation data? What are the names of the columns, or what are the columns indicate?
For example, spiral is like to:</p>
<pre><code>31.95 7.95 3
31.15 ... | habedi/stack-exchange-dataset |
89,537 | Performing anomalie detection on a battery volatge using LSTM-RNN | <p>I am trying to detect anomalies in a battery output voltage for one month.</p>
<p>I have the next data frame, as it is shown the data is collected each minute for each day so I have almost 1420 sample per day.</p>
<p><a href="https://i.stack.imgur.com/rsFWt.png" rel="nofollow noreferrer"><img src="https://i.... | time series regression lstm anomaly detection | 1 | Performing anomalie detection on a battery volatge using LSTM-RNN -- (time series regression lstm anomaly detection)
<p>I am trying to detect anomalies in a battery output voltage for one month.</p>
<p>I have the next data frame, as it is shown the data is collected each minute for each day so I have almost 1420 sa... | habedi/stack-exchange-dataset |
89,539 | How to decrease $R^2$ value and change it to positive value | <p>I'm working on a data, and use regression , as you see bellow:</p>
<pre><code>from sklearn.svm import SVR
regressor = SVR(kernel = 'linear')
regressor.fit(trainX,trainY)
</code></pre>
<p>above answer is:</p>
<pre><code>SVR(C=1.0, cache_size=200, coef0=0.0, degree=3, epsilon=0.1, gamma='scale'... | scikit learn regression data svm prediction | 1 | How to decrease $R^2$ value and change it to positive value -- (scikit learn regression data svm prediction)
<p>I'm working on a data, and use regression , as you see bellow:</p>
<pre><code>from sklearn.svm import SVR
regressor = SVR(kernel = 'linear')
regressor.fit(trainX,trainY)
</code></pre>
<p>a... | habedi/stack-exchange-dataset |
89,542 | Why is the idf important in tf-idf when it seems to just re-scale your features? | <p>I am trying to understand why tf-idf is useful. As I understand the formula to work out the tf-idf is:</p>
<p><a href="https://i.stack.imgur.com/q1cWM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q1cWM.png" alt="enter image description here" /></a></p>
<p>Can someone explain what is wro... | tfidf | 1 | Why is the idf important in tf-idf when it seems to just re-scale your features? -- (tfidf)
<p>I am trying to understand why tf-idf is useful. As I understand the formula to work out the tf-idf is:</p>
<p><a href="https://i.stack.imgur.com/q1cWM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q1c... | habedi/stack-exchange-dataset |
89,563 | Geolocation Based Anomaly Detection in IPs Using Isolation Forest | <p>I'm trying to detect anomalies based on geolocation from IP addresses on a server access log file. I have created two features country and geo_velocity, using the IP address and the timestamp of each request. However, since all the requests are from stationary clients and all the clients are from one country in the ... | scikit learn unsupervised learning anomaly detection gridsearchcv isolation forest | 1 | Geolocation Based Anomaly Detection in IPs Using Isolation Forest -- (scikit learn unsupervised learning anomaly detection gridsearchcv isolation forest)
<p>I'm trying to detect anomalies based on geolocation from IP addresses on a server access log file. I have created two features country and geo_velocity, using the ... | habedi/stack-exchange-dataset |
89,581 | Multiplying a dataframe by a larger one | <p>I have two dataframes <code>df1</code> and <code>df2</code> with the same columns but not the same row number.</p>
<p>I want to multiply them element-wise such that the smallest one (<code>df1</code>) fits into the first corresponding rows of the largest one (<code>df2</code>), and gives <code>0</code> for the r... | python pandas dataframe | 1 | Multiplying a dataframe by a larger one -- (python pandas dataframe)
<p>I have two dataframes <code>df1</code> and <code>df2</code> with the same columns but not the same row number.</p>
<p>I want to multiply them element-wise such that the smallest one (<code>df1</code>) fits into the first corresponding rows of t... | habedi/stack-exchange-dataset |
89,582 | Why are mBART50 language codes in an unusual format? | <p>I am trying to use <a href="https://huggingface.co/transformers/model_doc/mbart.html" rel="nofollow noreferrer">mBART</a> for multilingual translation(about 30 languages) but I am facing an issue with using it as I am currently using <a href="https://github.com/saffsd/langid.py" rel="nofollow noreferrer">langid</a> ... | machine translation | 1 | Why are mBART50 language codes in an unusual format? -- (machine translation)
<p>I am trying to use <a href="https://huggingface.co/transformers/model_doc/mbart.html" rel="nofollow noreferrer">mBART</a> for multilingual translation(about 30 languages) but I am facing an issue with using it as I am currently using <a hr... | habedi/stack-exchange-dataset |
89,600 | Keras/Tensorflow: model.predict() returns a list. How do I match the output with my class names? | <p>I have a CNN built in Keras. I have saved it and am now using the <code>model.predict()</code> function to make predictions from it. Whenever I run the following code,</p>
<pre><code>def prediction(path):
 import keras
 from keras.preprocessing.image import load_img, img_to_array 
 from kera... | python keras tensorflow cnn | 1 | Keras/Tensorflow: model.predict() returns a list. How do I match the output with my class names? -- (python keras tensorflow cnn)
<p>I have a CNN built in Keras. I have saved it and am now using the <code>model.predict()</code> function to make predictions from it. Whenever I run the following code,</p>
<pre><code>... | habedi/stack-exchange-dataset |
89,605 | IterativeImputer Evaluation | <p>I am having a hard time evaluating my model of <strong>imputation</strong>.</p>
<p>I used an iterative imputer model to fill in the missing values in all four columns.</p>
<p>For the model on the iterative imputer, I am using a Random forest model, here is my code for imputing:</p>
<pre><code>imp_mean = ... | python scikit learn pandas evaluation wikipedia | 1 | IterativeImputer Evaluation -- (python scikit learn pandas evaluation wikipedia)
<p>I am having a hard time evaluating my model of <strong>imputation</strong>.</p>
<p>I used an iterative imputer model to fill in the missing values in all four columns.</p>
<p>For the model on the iterative imputer, I am using a ... | habedi/stack-exchange-dataset |
89,630 | Why does my manual derivative of Layer Normalization imply no gradient flow? | <p>I recently tried computing the derivative of the layer norm function (<a href="https://arxiv.org/abs/1607.06450" rel="nofollow noreferrer">https://arxiv.org/abs/1607.06450</a>), an essential component of transformers, but the result suggests that no gradient flows through the operation, which can't be true.</p>
... | normalization transformer gradient | 1 | Why does my manual derivative of Layer Normalization imply no gradient flow? -- (normalization transformer gradient)
<p>I recently tried computing the derivative of the layer norm function (<a href="https://arxiv.org/abs/1607.06450" rel="nofollow noreferrer">https://arxiv.org/abs/1607.06450</a>), an essential component... | habedi/stack-exchange-dataset |
89,636 | what happens when a decision tree can't be split into further unit values? | <p>Suppose I have a dataset</p>
<pre><code>A B C D
1 1 1 0
1 1 0 0
1 1 0 1
1 0 1 1
</code></pre>
<p>Here A,B,C,D are my independent features and D is my dependent feature. Now if I make a decision tree here.</p>
<pre><code>A -> Yes/No = 2/2 - > Based on value 1-> 2/2 So we go fu... | classification decision trees classifier | 1 | what happens when a decision tree can't be split into further unit values? -- (classification decision trees classifier)
<p>Suppose I have a dataset</p>
<pre><code>A B C D
1 1 1 0
1 1 0 0
1 1 0 1
1 0 1 1
</code></pre>
<p>Here A,B,C,D are my independent features and D is my dependent feature.... | habedi/stack-exchange-dataset |
89,679 | Adding extra (meaningful) features does not improve model performance | <p>I am struggling with confusion matrices and their outputs. I thought to follow all the steps right, but unfortunately it seems that something is not going well.</p>
<p>I had a dataset built and labelled on my own. It shows a class imbalance so I decided to apply undersampling and oversampling, looking at F1-scor... | machine learning classification feature selection feature engineering confusion matrix | 1 | Adding extra (meaningful) features does not improve model performance -- (machine learning classification feature selection feature engineering confusion matrix)
<p>I am struggling with confusion matrices and their outputs. I thought to follow all the steps right, but unfortunately it seems that something is not going ... | habedi/stack-exchange-dataset |
89,684 | XLNET how to deal with text with more than 512 tokens? | <p>From what I searched online, XLNET model is pre-trained with 512 tokens, and <a href="https://github.com/zihangdai/xlnet/issues/80" rel="nofollow noreferrer">https://github.com/zihangdai/xlnet/issues/80</a> , I didn't find too much useful information on that either.
How does XLnet outperform BERT on long text wh... | bert text classification | 1 | XLNET how to deal with text with more than 512 tokens? -- (bert text classification)
<p>From what I searched online, XLNET model is pre-trained with 512 tokens, and <a href="https://github.com/zihangdai/xlnet/issues/80" rel="nofollow noreferrer">https://github.com/zihangdai/xlnet/issues/80</a> , I didn't find too much ... | habedi/stack-exchange-dataset |
89,692 | Plot Two Categorical Variables | <p>How to plot two categorical variables in Python or using any library? I want to plot the Playing Role of a Cricketer (Batsman, Bowler, etc.) VS Bought_By (Franchise Names, e.g., CSK, DC, etc.). The logic here is to plot the cricket role vs franchise.</p>
<p>The Columns:</p>
<p><code>df.Playing_Role</code>&#x... | python pandas data analysis seaborn | 1 | Plot Two Categorical Variables -- (python pandas data analysis seaborn)
<p>How to plot two categorical variables in Python or using any library? I want to plot the Playing Role of a Cricketer (Batsman, Bowler, etc.) VS Bought_By (Franchise Names, e.g., CSK, DC, etc.). The logic here is to plot the cricket role vs franc... | habedi/stack-exchange-dataset |
89,696 | Is it good practice to transform some variables and not others? | <p>I have a dataset with categorical variables encoded into numeric values, other variables that are continuous and have many outliers, and other continuous variable with a fairly normal distribution.</p>
<p>I was planning to use the sklearn preprocessing method .PowerTransformer in order to transform all of them, ... | machine learning classification dataset data analysis | 1 | Is it good practice to transform some variables and not others? -- (machine learning classification dataset data analysis)
<p>I have a dataset with categorical variables encoded into numeric values, other variables that are continuous and have many outliers, and other continuous variable with a fairly normal distributi... | habedi/stack-exchange-dataset |
89,703 | Adam Optimiser First Step | <p>Plotting the paths on the cost surface from different gradient descent optimisers on a toy example, I found that the Adam algorithm does not initially travel in the direction of steepest gradient (vanilla gradient descent did). Why might this be?</p>
<p>Later steps where affected by momentum etc but I would assu... | machine learning neural network gradient descent optimization momentum | 1 | Adam Optimiser First Step -- (machine learning neural network gradient descent optimization momentum)
<p>Plotting the paths on the cost surface from different gradient descent optimisers on a toy example, I found that the Adam algorithm does not initially travel in the direction of steepest gradient (vanilla gradient d... | habedi/stack-exchange-dataset |
89,717 | How match output (pred value) to input value | <p>I'm working with data(with 4 columns which are p(product), M(name of the store)), I want predict the demand of store for that I sued SVR on the data by theses formulation:</p>
<pre><code>dfn = pd.get_dummies(df)
x = dfn.drop(["demand"],axis=1)
y = dfn.demand
from sklearn.preprocessing impor... | python scikit learn predictive modeling data numpy | 1 | How match output (pred value) to input value -- (python scikit learn predictive modeling data numpy)
<p>I'm working with data(with 4 columns which are p(product), M(name of the store)), I want predict the demand of store for that I sued SVR on the data by theses formulation:</p>
<pre><code>dfn = pd.get_dummies(df)&... | habedi/stack-exchange-dataset |
89,734 | What is different between R2 and mean of R2 in multiclassification probelm? Which one is correct? | <p>I have a question. I have a big dataset (unfortunately confidential).</p>
<h2>What I did?</h2>
<p>I have trained my model with Naive-Bayes.</p>
<pre><code>BRNBReg=BernoulliNB(alpha=0.01, binarize=0.0, fit_prior=True, class_prior=None)
BRNBReg.fit(x_train,y_train)

#CrossValidation
cv_BRNB... | machine learning python scikit learn multiclass classification naive bayes classifier | 1 | What is different between R2 and mean of R2 in multiclassification probelm? Which one is correct? -- (machine learning python scikit learn multiclass classification naive bayes classifier)
<p>I have a question. I have a big dataset (unfortunately confidential).</p>
<h2>What I did?</h2>
<p>I have trained my mode... | habedi/stack-exchange-dataset |
89,744 | Neural network type question | <p>This <a href="https://www.neuraldesigner.com/blog/electricity_demand_forecasting" rel="nofollow noreferrer">web link</a> is to a site that talks about forecasting building electricity, like a time series regression concept.</p>
<p>In the article they talk about the NN architecture as:</p>
<blockquote>
<p... | neural network time series regression | 1 | Neural network type question -- (neural network time series regression)
<p>This <a href="https://www.neuraldesigner.com/blog/electricity_demand_forecasting" rel="nofollow noreferrer">web link</a> is to a site that talks about forecasting building electricity, like a time series regression concept.</p>
<p>In the art... | habedi/stack-exchange-dataset |
89,755 | How to use GridSearch for LinearSVC / Random Forest with time series data | <p>I have a question related on how to use the GridSearch to find the best models for my problem with time series data.</p>
<p>Every 3 rows is 1 one row in the original dataset. To make my time series problem a supervised one, I parsed like the one below. This was resolved from one of my previous question.</p>
... | machine learning time series feature selection training supervised learning | 1 | How to use GridSearch for LinearSVC / Random Forest with time series data -- (machine learning time series feature selection training supervised learning)
<p>I have a question related on how to use the GridSearch to find the best models for my problem with time series data.</p>
<p>Every 3 rows is 1 one row in the o... | habedi/stack-exchange-dataset |
89,776 | Conv1D layer input and output | <p>Consider the <a href="https://keras.io/api/layers/convolution_layers/convolution1d/" rel="nofollow noreferrer">following</a> code for Conv1D layer</p>
<pre><code># The inputs are 128-length vectors with 10 timesteps, and the batch size 
# is 4. 
input_shape = (4, 10, 128)
x = tf.random.normal(input... | keras convolutional neural network | 1 | Conv1D layer input and output -- (keras convolutional neural network)
<p>Consider the <a href="https://keras.io/api/layers/convolution_layers/convolution1d/" rel="nofollow noreferrer">following</a> code for Conv1D layer</p>
<pre><code># The inputs are 128-length vectors with 10 timesteps, and the batch size 
#... | habedi/stack-exchange-dataset |
89,778 | to generate consistent encoding for words in Keras using tf.keras.preprocessing.text.one_hot | <p>I am using keras(tensorflow) to convert text into encodings using <code>tensorflow.keras.preprocessing.text.one_hot</code></p>
<p>I have used it for training dataset as below</p>
<pre><code>from tensorflow.keras.preprocessing.text import one_hot

corpus = ['nice app']
onehot_repr = [one_hot(words... | python keras tensorflow nlp | 1 | to generate consistent encoding for words in Keras using tf.keras.preprocessing.text.one_hot -- (python keras tensorflow nlp)
<p>I am using keras(tensorflow) to convert text into encodings using <code>tensorflow.keras.preprocessing.text.one_hot</code></p>
<p>I have used it for training dataset as below</p>
<pre... | habedi/stack-exchange-dataset |
89,781 | How can I preprocess text to feed into a SVM? | <p>I am using an IMDB dataset which contains reviews of the movies in the column <strong>text</strong> and the rating 0 or 1 in the column <strong>label</strong>. I am preprocessing the text using <strong>Tfidf</strong> using sklearn.</p>
<p>The code for the above statement</p>
<pre class="lang-py prettyprint-o... | python nlp | 1 | How can I preprocess text to feed into a SVM? -- (python nlp)
<p>I am using an IMDB dataset which contains reviews of the movies in the column <strong>text</strong> and the rating 0 or 1 in the column <strong>label</strong>. I am preprocessing the text using <strong>Tfidf</strong> using sklearn.</p>
<p>The code for... | habedi/stack-exchange-dataset |
89,803 | cost-complexity-pruning-path with pipeline | <p>I'm using Kaggle's titanic set. I'm using pieplines and I'm trying to prune my decision tree and for that I want the cost_complexity_pruning_path. The last line of code produces the error:
<code> </code> <code> ValueError: could not convert string to float: 'male'</code> <code> </code>
Do you know what I'm d... | scikit learn decision trees pipelines pruning | 1 | cost-complexity-pruning-path with pipeline -- (scikit learn decision trees pipelines pruning)
<p>I'm using Kaggle's titanic set. I'm using pieplines and I'm trying to prune my decision tree and for that I want the cost_complexity_pruning_path. The last line of code produces the error:
<code> </code> <code> ValueErr... | habedi/stack-exchange-dataset |
89,819 | Normalized 2D tensor values are not in range 0-1 | <p>Below function takes in 2D tensor and normalizes it using broadcasting .The issue is except all values to be in range 0-1 but the result has values outside this range . How to get all values in 2D tensor in range 0-1</p>
<pre><code>def torch_normalize(tensor_list):
 means = tensor_list.mean(dim=1, keepdim... | python tensorflow pytorch normalization bert | 1 | Normalized 2D tensor values are not in range 0-1 -- (python tensorflow pytorch normalization bert)
<p>Below function takes in 2D tensor and normalizes it using broadcasting .The issue is except all values to be in range 0-1 but the result has values outside this range . How to get all values in 2D tensor in range 0-1</... | habedi/stack-exchange-dataset |
89,820 | What is the best way to cluster this kind of data? | <p>I have data that looks like this:
<a href="https://i.stack.imgur.com/uFhov.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uFhov.png" alt="enter image description here" /></a></p>
<p>The chart on the left is the trend and the smaller chart on the right is the box plot showing the distribut... | clustering statistics descriptive statistics | 1 | What is the best way to cluster this kind of data? -- (clustering statistics descriptive statistics)
<p>I have data that looks like this:
<a href="https://i.stack.imgur.com/uFhov.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uFhov.png" alt="enter image description here" /></a></p>
<p>The ch... | habedi/stack-exchange-dataset |
89,823 | Is addition of a random control variable a good idea, to ensure that results are correct? | <p>I'm dealing with a complex dataset with many patients who have a condition, and various qualities about these patients. I'm trying to determine patient outcome based on patient qualities.</p>
<p>I'm using <code>xgboost</code> Classifier to try to determine one of the patient outcomes.</p>
<p>In order to ens... | machine learning classification xgboost | 1 | Is addition of a random control variable a good idea, to ensure that results are correct? -- (machine learning classification xgboost)
<p>I'm dealing with a complex dataset with many patients who have a condition, and various qualities about these patients. I'm trying to determine patient outcome based on patient qual... | habedi/stack-exchange-dataset |
89,847 | Receipt fraud detection | <p>I'm developing an OCR service that scans receipts and assigns points to user, based on amount of money spent. But the problem is that user can forge fake receipts and redeem them for extra points. User takes picture of receipt in app, which sends it to server, so it's not possible for user to modify picture after ta... | deep learning ocr | 1 | Receipt fraud detection -- (deep learning ocr)
<p>I'm developing an OCR service that scans receipts and assigns points to user, based on amount of money spent. But the problem is that user can forge fake receipts and redeem them for extra points. User takes picture of receipt in app, which sends it to server, so it's n... | habedi/stack-exchange-dataset |
89,850 | Dealing with zeros when plotting log-scaled data | <p>I have a non-negative variable and I'd like to plot it, log-scaled</p>
<p>I'm trying to understand how to deal with <code>0</code>-values. One naive idea I had in mind is just to add <code>1</code> to all values (or some very low number greater than <code>1</code>)</p>
<p>What other options are available?</p... | python visualization plotting logarithmic | 1 | Dealing with zeros when plotting log-scaled data -- (python visualization plotting logarithmic)
<p>I have a non-negative variable and I'd like to plot it, log-scaled</p>
<p>I'm trying to understand how to deal with <code>0</code>-values. One naive idea I had in mind is just to add <code>1</code> to all values (or s... | habedi/stack-exchange-dataset |
89,888 | Metric for label imbalance | <p>I'm looking for a metric that can be used to quantify how imbalanced the labels are in a dataset.</p>
<p>I'm not looking for a strategy to solve the imbalance problem, I just want to present how imbalanced my dataset is. I've computed the ratio of the most frequent and least frequent labels which is probably an ... | classification class imbalance | 1 | Metric for label imbalance -- (classification class imbalance)
<p>I'm looking for a metric that can be used to quantify how imbalanced the labels are in a dataset.</p>
<p>I'm not looking for a strategy to solve the imbalance problem, I just want to present how imbalanced my dataset is. I've computed the ratio of th... | habedi/stack-exchange-dataset |
89,890 | Intuitive explanation of Adversarial machine learning | <p>How would you explain Adversarial machine learning in simple layman terms for a <a href="https://en.wikipedia.org/wiki/Science,_technology,_engineering,_and_mathematics" rel="nofollow noreferrer">non-STEM</a> person? What are the main ideas behind Adversarial machine learning?</p>
 | terminology definitions adversarial ml intuition | 1 | Intuitive explanation of Adversarial machine learning -- (terminology definitions adversarial ml intuition)
<p>How would you explain Adversarial machine learning in simple layman terms for a <a href="https://en.wikipedia.org/wiki/Science,_technology,_engineering,_and_mathematics" rel="nofollow noreferrer">non-STEM</a> ... | habedi/stack-exchange-dataset |
89,935 | How to calculate an average cliff date? | <p>Please let me know if this question belongs elsewhere.</p>
<p>In my simple data set focused on sales pursuit opportunities, I have the following columns available.</p>
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th style="text-align: left;">Pursuit Name</th>
<th ... | dataset data data science model | 1 | How to calculate an average cliff date? -- (dataset data data science model)
<p>Please let me know if this question belongs elsewhere.</p>
<p>In my simple data set focused on sales pursuit opportunities, I have the following columns available.</p>
<div class="s-table-container">
<table class="s-table">
... | habedi/stack-exchange-dataset |
89,936 | LinearRegression with fixed slope parameter | <p>I have some data <span class="math-container">$(x_{1},y_{1}), (x_{2},y_{2}), ..., (x_{n},y_{n})$</span>, where both <span class="math-container">$x$</span> and <span class="math-container">$y$</span> represent real numbers (float). I want use Scikit-learns LinearRegression model to fit a model of the form:</p>
<... | scikit learn linear regression | 1 | LinearRegression with fixed slope parameter -- (scikit learn linear regression)
<p>I have some data <span class="math-container">$(x_{1},y_{1}), (x_{2},y_{2}), ..., (x_{n},y_{n})$</span>, where both <span class="math-container">$x$</span> and <span class="math-container">$y$</span> represent real numbers (float). I wan... | habedi/stack-exchange-dataset |
89,940 | Multiple Regression, Classification and Boundary Poins | <p><a href="https://i.stack.imgur.com/KkvVm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KkvVm.png" alt="enter image description here" /></a></p>
<p>I have two gangs which are doing crimes. And i want to classify them.
Lets say I'm looking for a regression function:</p>
<pre><code> M(x... | classification regression | 1 | Multiple Regression, Classification and Boundary Poins -- (classification regression)
<p><a href="https://i.stack.imgur.com/KkvVm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KkvVm.png" alt="enter image description here" /></a></p>
<p>I have two gangs which are doing crimes. And i want to clas... | habedi/stack-exchange-dataset |
89,951 | Interpretation of Autocorrelation plot | <p>I am trying to understand better how to read the autocorrelation plot here for a timeseries data.</p>
<p>I ran the following code and got the output as a chart show below.</p>
<pre><code>from pandas.plotting import autocorrelation_plot
autocorrelation_plot(df("y"))
</code></pre>
<p>Here... | python time series | 1 | Interpretation of Autocorrelation plot -- (python time series)
<p>I am trying to understand better how to read the autocorrelation plot here for a timeseries data.</p>
<p>I ran the following code and got the output as a chart show below.</p>
<pre><code>from pandas.plotting import autocorrelation_plot
autoco... | habedi/stack-exchange-dataset |
89,953 | When the shallow network has a small number of neurons, how it will need more sum-product? | <p>I am reading <a href="https://arxiv.org/pdf/1402.1869.pdf" rel="nofollow noreferrer">a paper</a>, where I am not able to understand the meaning of the following statement, can someone please help.</p>
<blockquote>
<p>a shallow network requires exponentially many more sum-product hidden units
than a deep ... | machine learning deep learning | 1 | When the shallow network has a small number of neurons, how it will need more sum-product? -- (machine learning deep learning)
<p>I am reading <a href="https://arxiv.org/pdf/1402.1869.pdf" rel="nofollow noreferrer">a paper</a>, where I am not able to understand the meaning of the following statement, can someone please... | habedi/stack-exchange-dataset |
89,974 | What is the opposite of baseline? | <p>I have created a prediction model and on the one hand I have to compare it with other baseline models, and on the other hand, I have to compare it with the ideal approach (supported by additional data), so I would like to know how I can call it (antonym of baseline) in the research paper.</p>
 | machine learning theory methodology | 1 | What is the opposite of baseline? -- (machine learning theory methodology)
<p>I have created a prediction model and on the one hand I have to compare it with other baseline models, and on the other hand, I have to compare it with the ideal approach (supported by additional data), so I would like to know how I can call ... | habedi/stack-exchange-dataset |
89,986 | Feature extraction from sequence of images with Siamese Neural Network | <p>I am trying to train a neural network to recognize certain actions in short movies.</p>
<p>Each such movie consists of a fixed number of frames, each frame - the image is of course the same size, after preliminary preprocessing.</p>
<p>And now I'd like to do some feature extraction of each of these images us... | machine learning neural network deep learning computer vision siamese networks | 1 | Feature extraction from sequence of images with Siamese Neural Network -- (machine learning neural network deep learning computer vision siamese networks)
<p>I am trying to train a neural network to recognize certain actions in short movies.</p>
<p>Each such movie consists of a fixed number of frames, each frame - ... | habedi/stack-exchange-dataset |
89,987 | What is the advantage of a tensorflow.data.Dataset over a tensorflow.Tensor? | <p>I have my own input data class. It has x and y as well as test and train values (1 Tensor for each combination). I noticed there is a Dataset class built in to TensorFlow. What is the advantage of this class over a regular Tensor? Is it mainly around handling large datasets / laziness? It doesn't appear to have feat... | tensorflow | 1 | What is the advantage of a tensorflow.data.Dataset over a tensorflow.Tensor? -- (tensorflow)
<p>I have my own input data class. It has x and y as well as test and train values (1 Tensor for each combination). I noticed there is a Dataset class built in to TensorFlow. What is the advantage of this class over a regular T... | habedi/stack-exchange-dataset |
89,996 | Validation loss diverging away from the training loss | <p>I used the XLNET for a sentiment classifier in determining whether a comment is positive or negative. I was able to get good results</p>
<p><a href="https://i.stack.imgur.com/ICW9e.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ICW9e.png" alt="enter image description here" /></a></p>
<p>B... | neural network sentiment analysis transfer learning | 1 | Validation loss diverging away from the training loss -- (neural network sentiment analysis transfer learning)
<p>I used the XLNET for a sentiment classifier in determining whether a comment is positive or negative. I was able to get good results</p>
<p><a href="https://i.stack.imgur.com/ICW9e.png" rel="nofollow no... | habedi/stack-exchange-dataset |
90,003 | How to specify output_shape parameter in Lambda layer in Keras | <p>I don't understand how to specify the <code>output_shape</code> parameter in the <code>Lambda</code> layer in Keras/Tensorflow. The <a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/Lambda" rel="nofollow noreferrer">documentation</a> says:</p>
<blockquote>
<p>output_shape: Expected output s... | python deep learning keras tensorflow | 1 | How to specify output_shape parameter in Lambda layer in Keras -- (python deep learning keras tensorflow)
<p>I don't understand how to specify the <code>output_shape</code> parameter in the <code>Lambda</code> layer in Keras/Tensorflow. The <a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/Lambda" rel... | habedi/stack-exchange-dataset |
90,010 | is this problem a multiclass case? | <p>I'm trying to classify my textile design patterns<br>
(let's just think of it as medieval painting)<br></p>
<p>what I understand of "multilabel classification" is like this:<br>
it outputs multiple possible result out of all those classes (let's say classes are of some artists, style and techni... | machine learning keras tensorflow image classification | 1 | is this problem a multiclass case? -- (machine learning keras tensorflow image classification)
<p>I'm trying to classify my textile design patterns<br>
(let's just think of it as medieval painting)<br></p>
<p>what I understand of "multilabel classification" is like this:<br>
it outputs multiple po... | habedi/stack-exchange-dataset |
90,018 | Difference between zero-padding and character-padding in Recurrent Neural Networks | <p>For RNN's to work efficiently we vectorize the problem which results in an input matrix of shape</p>
<pre><code> (m, max_seq_len) 
</code></pre>
<p>where m is the number of examples, e.g. sentences, and max_seq_len is the maximum length that a sentence can have. Some examples have a smaller lengths th... | neural network nlp rnn sequence to sequence | 1 | Difference between zero-padding and character-padding in Recurrent Neural Networks -- (neural network nlp rnn sequence to sequence)
<p>For RNN's to work efficiently we vectorize the problem which results in an input matrix of shape</p>
<pre><code> (m, max_seq_len) 
</code></pre>
<p>where m is the number ... | habedi/stack-exchange-dataset |
90,026 | How to interpret training and testing accuracy which are almost the same? | <p>Note - I have read <a href="https://stats.stackexchange.com/questions/308471/training-accuracy-equal-to-test-accuracy-how-to-interpret">this</a> post but still don't understand</p>
<p>I have a Naive Bayes classifier, when I input my training data to test the accuracy, I get 63.05%. When I input my test data, the... | machine learning accuracy naive bayes classifier | 1 | How to interpret training and testing accuracy which are almost the same? -- (machine learning accuracy naive bayes classifier)
<p>Note - I have read <a href="https://stats.stackexchange.com/questions/308471/training-accuracy-equal-to-test-accuracy-how-to-interpret">this</a> post but still don't understand</p>
<p>I... | habedi/stack-exchange-dataset |
90,027 | How does the equation "dW = - (2 * (X^T ).dot(Y - Y_hat)) / m" comes in Linear Regression (using Matrix + Gradient Descent)? | <p>I was trying to code the Linear Regression in Python using Matrix Multiplication method using Gradient Descent and followed a code where there was no mention what is the loss but just a code as <strong>Per Iteration</strong>:</p>
<pre><code>y_hat = X.dot(W) + b

dW = - (2 * (X^T ).dot(Y - Y_hat)) / m # h... | machine learning regression linear regression gradient descent linear algebra | 1 | How does the equation "dW = - (2 * (X^T ).dot(Y - Y_hat)) / m" comes in Linear Regression (using Matrix + Gradient Descent)? -- (machine learning regression linear regression gradient descent linear algebra)
<p>I was trying to code the Linear Regression in Python using Matrix Multiplication method using Gradient Descen... | habedi/stack-exchange-dataset |
90,033 | Heat map and correlation among variables | <p>I would have a question on heat map and correlation among variables.
I created this heat map, looking at possible correlation among variables and target. I got very small values.
I wanted to set a small threshold, e.g., 0.05, for selecting features.
Do you think it makes sense, or should I exclude all of... | machine learning feature selection correlation heatmap | 1 | Heat map and correlation among variables -- (machine learning feature selection correlation heatmap)
<p>I would have a question on heat map and correlation among variables.
I created this heat map, looking at possible correlation among variables and target. I got very small values.
I wanted to set a small thres... | habedi/stack-exchange-dataset |
90,050 | Quick question on basic Basic concept of experience replay | <p>Due to my admitted newbie's understanding on the field, I'm about to ask a dummy question.</p>
<p>While sampling batches, for example experience replay buffer which contains number of samples, after getting <strong>n</strong> (size of a batch) of loss values through forward propagation, what way will the weights... | machine learning deep learning reinforcement learning | 1 | Quick question on basic Basic concept of experience replay -- (machine learning deep learning reinforcement learning)
<p>Due to my admitted newbie's understanding on the field, I'm about to ask a dummy question.</p>
<p>While sampling batches, for example experience replay buffer which contains number of samples, af... | habedi/stack-exchange-dataset |
90,062 | RF regressor for probabilites | <p>I am using sklearn multioutput RF regressor to learn statistics in my data. So my target contains several probabilities for the different features, and the sum of all these probabilities is one as they are fractions of how often the feature occurs.<br />
The RF actually learns this property even though I have no... | scikit learn regression random forest | 1 | RF regressor for probabilites -- (scikit learn regression random forest)
<p>I am using sklearn multioutput RF regressor to learn statistics in my data. So my target contains several probabilities for the different features, and the sum of all these probabilities is one as they are fractions of how often the feature occ... | habedi/stack-exchange-dataset |
90,066 | mean and variance of a dataset | <p>I have a simple question. Please see the below screenshot :
<a href="https://i.stack.imgur.com/76Sw3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/76Sw3.png" alt="enter image description here" /></a></p>
<p>It is from a midterm exam from a university : <a href="https://cedar.buffalo.edu/... | variance mean | 1 | mean and variance of a dataset -- (variance mean)
<p>I have a simple question. Please see the below screenshot :
<a href="https://i.stack.imgur.com/76Sw3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/76Sw3.png" alt="enter image description here" /></a></p>
<p>It is from a midterm exam from ... | habedi/stack-exchange-dataset |
90,067 | Looking for binary class datasets with high class imbalance, that also have intra-class imbalance in the minority class | <p>Newbie question alert...</p>
<p>For a college project I want to compare a few variants of SMOTE in terms of how much they improve classification of the minority class, over using random oversampling.</p>
<p>I have a specific interest in the idea that the minority class may contain small disjuncts that may th... | classification class imbalance beginner smote | 1 | Looking for binary class datasets with high class imbalance, that also have intra-class imbalance in the minority class -- (classification class imbalance beginner smote)
<p>Newbie question alert...</p>
<p>For a college project I want to compare a few variants of SMOTE in terms of how much they improve classificati... | habedi/stack-exchange-dataset |
90,083 | Feature Interactions vs Feature Importances | <p>Can somebody explain in-detailed differences between <a href="https://christophm.github.io/interpretable-ml-book/interaction.html" rel="nofollow noreferrer">Feature Interactions</a> and <a href="https://scikit-learn.org/stable/auto_examples/ensemble/plot_forest_importances.html" rel="nofollow noreferrer">Feature Imp... | feature engineering difference feature interaction feature importances | 1 | Feature Interactions vs Feature Importances -- (feature engineering difference feature interaction feature importances)
<p>Can somebody explain in-detailed differences between <a href="https://christophm.github.io/interpretable-ml-book/interaction.html" rel="nofollow noreferrer">Feature Interactions</a> and <a href="ht... | habedi/stack-exchange-dataset |
90,084 | How can i increase the memory of Jupyter? | <h2>What I have:</h2>
<p>I have a data set (35989 rows × 16109 columns) and is unfortunately confidential.</p>
<p>But i receive this error massage:</p>
<pre><code>Unable to allocate 4.32 GiB for an array with shape (16109, 35994) and data type float64
</code></pre>
<p>How can i solve this problem?</... | machine learning python jupyter | 1 | How can i increase the memory of Jupyter? -- (machine learning python jupyter)
<h2>What I have:</h2>
<p>I have a data set (35989 rows × 16109 columns) and is unfortunately confidential.</p>
<p>But i receive this error massage:</p>
<pre><code>Unable to allocate 4.32 GiB for an array with shape (16109, 35994)... | habedi/stack-exchange-dataset |
90,089 | Changing order of LabelEncoder() result | <p>Assume I have a multi-class classification task. The labels are:</p>
<ul>
<li>Class 1</li>
<li>Class 2</li>
<li>Class 3</li>
</ul>
<p>After LabelEncoder(), the labels are transformed into 0-1-2.</p>
<p>My questions are:</p>
<ul>
<li>Do the labels have to start from 0?</li>
<li... | scikit learn multilabel classification labels encoder | 1 | Changing order of LabelEncoder() result -- (scikit learn multilabel classification labels encoder)
<p>Assume I have a multi-class classification task. The labels are:</p>
<ul>
<li>Class 1</li>
<li>Class 2</li>
<li>Class 3</li>
</ul>
<p>After LabelEncoder(), the labels are transformed into 0-1-2.... | habedi/stack-exchange-dataset |
90,096 | What is the input of LSTM network? | <p>Hello I am trying to understand LSTMs but have a few problems:</p>
<ol>
<li><p>What is the input? Since LSTM is seq2seq I would think it is a sequence of words, but in a Codecademy lesson is mentioned that each sentence is represented as a matrix with a bunch of vectors containing 1 or 0 for the timestep -&g... | deep learning keras tensorflow lstm rnn | 1 | What is the input of LSTM network? -- (deep learning keras tensorflow lstm rnn)
<p>Hello I am trying to understand LSTMs but have a few problems:</p>
<ol>
<li><p>What is the input? Since LSTM is seq2seq I would think it is a sequence of words, but in a Codecademy lesson is mentioned that each sentence is repres... | habedi/stack-exchange-dataset |
90,103 | How to select the best parameters for GridSearchCV? | <p>I've created a couple of models during some assignments and hackathons using algorithms such as Random Forest and XGBoost and used GridSearchCV to find the best combination of parameters. But what I'm not able to understand is how to select those parameters for GridSearchCV. I randomly put the parameters such as</p>... | machine learning python algorithms | 1 | How to select the best parameters for GridSearchCV? -- (machine learning python algorithms)
<p>I've created a couple of models during some assignments and hackathons using algorithms such as Random Forest and XGBoost and used GridSearchCV to find the best combination of parameters. But what I'm not able to understand i... | habedi/stack-exchange-dataset |
90,119 | How to run a saved tensorflow model in the browser? | <p>After doing my hello world models, I would like to let them available at Github pages, which means that I need to serve the model only with static files. Is it possible?</p>
<p>All the tutorials I found requires nodejs or some backend</p>
 | tensorflow javascript | 1 | How to run a saved tensorflow model in the browser? -- (tensorflow javascript)
<p>After doing my hello world models, I would like to let them available at Github pages, which means that I need to serve the model only with static files. Is it possible?</p>
<p>All the tutorials I found requires nodejs or some backend... | habedi/stack-exchange-dataset |
90,132 | Set value for column based on two other columns in pandas dataframe | <p>I have a dataframe that has contracts with different order dates and I need to create a new column that assign a number to each contract if it has more than one order date. For example my sample dataframe looks something like this:</p>
<pre class="lang-py prettyprint-override"><code>df = pd.DataFrame({'contract'... | python pandas efficiency | 1 | Set value for column based on two other columns in pandas dataframe -- (python pandas efficiency)
<p>I have a dataframe that has contracts with different order dates and I need to create a new column that assign a number to each contract if it has more than one order date. For example my sample dataframe looks somethin... | habedi/stack-exchange-dataset |
90,145 | LDA topic model has 0-weight topics, is that normal? | <p>While experimenting with different number of topics for the Gensim implementation of LDA, I found that for a high number of topics, the output often consists of topics with all weights equal to zero. Is this an indication of an implementation mistake or is this normal and just an indication that I should use fewer t... | python topic model gensim | 1 | LDA topic model has 0-weight topics, is that normal? -- (python topic model gensim)
<p>While experimenting with different number of topics for the Gensim implementation of LDA, I found that for a high number of topics, the output often consists of topics with all weights equal to zero. Is this an indication of an imple... | habedi/stack-exchange-dataset |
90,149 | Function growing faster for negative inputs than for positives | <p>I am working on a regression problem where I want to model the loss function in a way that it "punishes" to big errors much more than small errors (so I am in the realm of exponential functions) but also in a way that is punishes a negative error much more than a positive error.</p>
<p>So for example:<... | loss function | 1 | Function growing faster for negative inputs than for positives -- (loss function)
<p>I am working on a regression problem where I want to model the loss function in a way that it "punishes" to big errors much more than small errors (so I am in the realm of exponential functions) but also in a way that is puni... | habedi/stack-exchange-dataset |
90,155 | Extracting Names using NER | Spacy | <p>I'm new to NER and I've been trying to extract names using Spacy. Here's my code:</p>
<pre class="lang-py prettyprint-override"><code>import spacy
spacy_nlp = spacy.load('en_core_web_sm')

doc = spacy_nlp(text.strip())

# create sets to hold words 
named_entities = set()
money_entitie... | nlp text mining spacy | 1 | Extracting Names using NER | Spacy -- (nlp text mining spacy)
<p>I'm new to NER and I've been trying to extract names using Spacy. Here's my code:</p>
<pre class="lang-py prettyprint-override"><code>import spacy
spacy_nlp = spacy.load('en_core_web_sm')

doc = spacy_nlp(text.strip())

# create se... | habedi/stack-exchange-dataset |
90,162 | Replace part column value with value from another column of same dataframe | <p>I have a dataframe with two columns:</p>
<pre><code>Name DATE
Name1 20200126
Name2 20200127
Name#DATE# 20200210
</code></pre>
<p>I need to replace all the #DATE# with the data from the DATE column, and get something like this:</p>
<pre><code>Name 
... | python pandas | 1 | Replace part column value with value from another column of same dataframe -- (python pandas)
<p>I have a dataframe with two columns:</p>
<pre><code>Name DATE
Name1 20200126
Name2 20200127
Name#DATE# 20200210
</code></pre>
<p>I need to replace all the #DATE# with the ... | habedi/stack-exchange-dataset |
90,175 | Comparing ML models to baselines | <p>When comparing ML models with baseline or "dummy" models, are there best practices for building and comparing baselines?</p>
<p>I'm doing a binary classification task where 40% of the samples are class_0 (untreated class), and the other 60% are class_1 (treated/positive class).</p>
<p>I have two ba... | classification scikit learn random forest model evaluations | 1 | Comparing ML models to baselines -- (classification scikit learn random forest model evaluations)
<p>When comparing ML models with baseline or "dummy" models, are there best practices for building and comparing baselines?</p>
<p>I'm doing a binary classification task where 40% of the samples are class_0 (... | habedi/stack-exchange-dataset |
90,177 | Tricky stacking models in keras | <p>I'm trying to write a model with keras, that is built as shown below:</p>
<pre><code> | +-----+
 +->+------+ | |
+--->| NN |------>| |
| +------+ | |
| | | |
| +->+------+ | |
+--->| NN |------&g... | neural network keras rnn | 1 | Tricky stacking models in keras -- (neural network keras rnn)
<p>I'm trying to write a model with keras, that is built as shown below:</p>
<pre><code> | +-----+
 +->+------+ | |
+--->| NN |------>| |
| +------+ | |
| | | |&#... | habedi/stack-exchange-dataset |
90,227 | Approach for training multilingual NER | <p>I am working on multilingual (English, Arabic, Chinese) NER and I met a problem: how to tokenize data?</p>
<p>My train data provides sentence and list of spans for each named entity.</p>
<p>e.g.</p>
<pre><code>
[('The', 'DT'),
 ('company', 'NN'),
 ('said', 'VBD'),
 ('it', 'PRP'),
 ('b... | nlp named entity recognition | 1 | Approach for training multilingual NER -- (nlp named entity recognition)
<p>I am working on multilingual (English, Arabic, Chinese) NER and I met a problem: how to tokenize data?</p>
<p>My train data provides sentence and list of spans for each named entity.</p>
<p>e.g.</p>
<pre><code>
[('The', 'DT'),&#... | habedi/stack-exchange-dataset |
90,234 | What if My Word is not in Bert model vocabulary? | <p>I am doing NER using Bert Model. I have encountered some words in my datasets which is not a part of bert vocabulary and i am getting the same error while converting words to ids. Can someone help me in this?</p>
<p>Below is the code i am using for bert.</p>
<pre><code>df = pd.read_csv("drive/My Drive/P... | keras bert | 1 | What if My Word is not in Bert model vocabulary? -- (keras bert)
<p>I am doing NER using Bert Model. I have encountered some words in my datasets which is not a part of bert vocabulary and i am getting the same error while converting words to ids. Can someone help me in this?</p>
<p>Below is the code i am using for... | habedi/stack-exchange-dataset |
90,262 | Difference between rulefit & skope-rules Python Packages | <p><a href="https://github.com/christophM/rulefit" rel="nofollow noreferrer">RuleFit</a> is an implementation of a rule-based prediction algorithm based on the <a href="http://statweb.stanford.edu/%7Ejhf/ftp/RuleFit.pdf" rel="nofollow noreferrer">rulefit algorithm from Friedman and Popescu (PDF)</a>.</p>
<p><a href... | machine learning statistics algorithms rulefit skope rules | 1 | Difference between rulefit & skope-rules Python Packages -- (machine learning statistics algorithms rulefit skope rules)
<p><a href="https://github.com/christophM/rulefit" rel="nofollow noreferrer">RuleFit</a> is an implementation of a rule-based prediction algorithm based on the <a href="http://statweb.stanford.edu/%7... | habedi/stack-exchange-dataset |
90,288 | Using the curse of dimensionality for encoding non-ordered (nominal) categorical variables of high cardinality | <p>When the dimension is high, all data are approximately at the same distance away from each other. This makes distance-based methods such as k-nearest neighbors less useful if the data are more or less uniformly distributed. This is also referred to as the curse of dimensionality.</p>
<p>However, why not to make ... | machine learning preprocessing categorical data dimensionality reduction categorical encoding | 1 | Using the curse of dimensionality for encoding non-ordered (nominal) categorical variables of high cardinality -- (machine learning preprocessing categorical data dimensionality reduction categorical encoding)
<p>When the dimension is high, all data are approximately at the same distance away from each other. This make... | habedi/stack-exchange-dataset |
90,289 | Could you generate search queries to poison data analysis by a search engine? | <p>A simple problem with search engines is that you have to trust that they will not build a profile of search queries you submit. (Without Tor or e.g. homomorphic encryption, that is.)</p>
<p>Suppose we put together a search engine server with a use policy that permits constant queries being sent by paid customers... | search engine adversarial ml | 1 | Could you generate search queries to poison data analysis by a search engine? -- (search engine adversarial ml)
<p>A simple problem with search engines is that you have to trust that they will not build a profile of search queries you submit. (Without Tor or e.g. homomorphic encryption, that is.)</p>
<p>Suppose we ... | habedi/stack-exchange-dataset |
90,290 | Decoder Transformer feedforward | <p>I have a question about the decoder transformer feed forward during training.</p>
<p>Let's pick an example: input data <code>"i love the sun"</code> traduction i want to predict (italian traduction) <code>"io amo il sole"</code>.</p>
<p>Now i feed the encoder with the input "i love t... | neural network deep learning transformer attention mechanism masking | 1 | Decoder Transformer feedforward -- (neural network deep learning transformer attention mechanism masking)
<p>I have a question about the decoder transformer feed forward during training.</p>
<p>Let's pick an example: input data <code>"i love the sun"</code> traduction i want to predict (italian traduction... | habedi/stack-exchange-dataset |
90,309 | Implementing the Trapezoid rule without the formula for the curve | <p>I know that if I have some function f(x) that describes a curve, I can approximate the area under the curve using the trapezoid rule as follows:</p>
<pre><code>def auc(f, a, b, n): 
 
 subinterval = (b - a) / n 
 
 s = f(a) + f(b)
 i = 1
 while i < n: 
 s... | python statistics mathematics auc roc | 1 | Implementing the Trapezoid rule without the formula for the curve -- (python statistics mathematics auc roc)
<p>I know that if I have some function f(x) that describes a curve, I can approximate the area under the curve using the trapezoid rule as follows:</p>
<pre><code>def auc(f, a, b, n): 
 
 subin... | habedi/stack-exchange-dataset |
90,342 | Vertical concatenation in a df based on column value_python | <p>Is there any way to concatenate vertically a specific column from my df (concat1), considering/filtering values from another column (col_value)?</p>
<p>My df looks like this:</p>
<pre><code>col_value concat1 
data1 x;y;z 
data1 d;f;h
data1 p;c;j&#... | python pandas | 1 | Vertical concatenation in a df based on column value_python -- (python pandas)
<p>Is there any way to concatenate vertically a specific column from my df (concat1), considering/filtering values from another column (col_value)?</p>
<p>My df looks like this:</p>
<pre><code>col_value concat1 
data1 ... | habedi/stack-exchange-dataset |
90,347 | Calculating correlation for categorical variables | <p>I am struggling to find out a suitable way to calculate correlation coefficient for categorical variables. <code>Pearson's coefficient</code> is not supported for categorical features. I want to find out features with most highest influence on the target variable. My objectives are:</p>
<ol>
<li>Correlation ... | categorical data descriptive statistics pearsons correlation coefficient | 1 | Calculating correlation for categorical variables -- (categorical data descriptive statistics pearsons correlation coefficient)
<p>I am struggling to find out a suitable way to calculate correlation coefficient for categorical variables. <code>Pearson's coefficient</code> is not supported for categorical features. I wa... | habedi/stack-exchange-dataset |
90,349 | Terminology to distinguish between ML methods and optimization methods (PSO, ACO..) | <p>I am currently writing a scientific thesis which consists of two parts. In the first part I am building ML models with neural networks, support vectors etc. and the second part is about finding global minima for optimization objectives with optimization methods like Particle Swarm Optimization, Ant Colony Optimizati... | machine learning optimization terminology | 1 | Terminology to distinguish between ML methods and optimization methods (PSO, ACO..) -- (machine learning optimization terminology)
<p>I am currently writing a scientific thesis which consists of two parts. In the first part I am building ML models with neural networks, support vectors etc. and the second part is about ... | habedi/stack-exchange-dataset |
90,374 | Very bad results for input-output mapping using an Artifical Neural Network | <p>I'd like to hear the opinion of an expert for artifical neural networks on a problem that I try to solve. I just started to use articial neural networks and want to train an ANN with 3 inputs and 3 outputs by using 3375 data points. The goal is to map the 3 inputs to the 3 outputs. For that purpose I use a multilaye... | neural network deep learning keras tensorflow | 1 | Very bad results for input-output mapping using an Artifical Neural Network -- (neural network deep learning keras tensorflow)
<p>I'd like to hear the opinion of an expert for artifical neural networks on a problem that I try to solve. I just started to use articial neural networks and want to train an ANN with 3 input... | habedi/stack-exchange-dataset |
90,381 | Problem with binning | <p>I am trying to change continuous data points to categorical by using binning. I know two techniques, i) equal width bins ii) bins with equal number of elements.
My questions are:</p>
<ol>
<li>Which type of binning is appropriate for which kind of problem?</li>
<li>I use <code>pandas</code> for my dat... | data feature engineering categorical data numerical | 1 | Problem with binning -- (data feature engineering categorical data numerical)
<p>I am trying to change continuous data points to categorical by using binning. I know two techniques, i) equal width bins ii) bins with equal number of elements.
My questions are:</p>
<ol>
<li>Which type of binning is appropriat... | habedi/stack-exchange-dataset |
90,385 | Read csv file and save images from the output | <p>I have created some code that reads my CSV file and converts the dataset to a grayscale image. I want to know if there is any possible way to read through each row in the dataset and save each of the images created from the rows?</p>
<p>So far, I have got this code that reads the CSV files and creates an image u... | machine learning dataset pandas numpy | 1 | Read csv file and save images from the output -- (machine learning dataset pandas numpy)
<p>I have created some code that reads my CSV file and converts the dataset to a grayscale image. I want to know if there is any possible way to read through each row in the dataset and save each of the images created from the rows... | habedi/stack-exchange-dataset |
90,395 | Using user defined function in groupby | <p>I am trying to use the groupby functionality in order to do the following given this example dataframe:</p>
<pre><code>dates = ['2020-03-01','2020-03-01','2020-03-01','2020-03-01','2020-03-01',
 '2020-03-10','2020-03-10','2020-03-10','2020-03-10','2020-03-10']
values = [1,2,3,4,5,10,20,30,40,50]&#... | pandas groupby | 1 | Using user defined function in groupby -- (pandas groupby)
<p>I am trying to use the groupby functionality in order to do the following given this example dataframe:</p>
<pre><code>dates = ['2020-03-01','2020-03-01','2020-03-01','2020-03-01','2020-03-01',
 '2020-03-10','2020-03-10','2020-03-10','2020-03-... | habedi/stack-exchange-dataset |
90,396 | How to interpret the Mean squared error value in a regression model? | <p>I'm working on a simple linear regression model to predict 'Label' based on 'feature'. The two variables seems to be highly correlate corr=0.99. After splitting the data sample for to training and testing sets. I make predictions and evaluate the model.</p>
<pre><code>metrics.mean_squared_error(Label_test,Label_... | machine learning python regression predictive modeling rmse | 1 | How to interpret the Mean squared error value in a regression model? -- (machine learning python regression predictive modeling rmse)
<p>I'm working on a simple linear regression model to predict 'Label' based on 'feature'. The two variables seems to be highly correlate corr=0.99. After splitting the data sample for to... | habedi/stack-exchange-dataset |
90,409 | What's the best way to generate similar words? | <p>Hi all I'm fairly up to date with all the NLP tasks out there (nlpprogress.com, paperswithcode.com) and great tools like (nltk, flair, huggingface etc). I want to take a single word, and predict a similar word, a little like the old "Google Sets" feature except extrapolating from a single example. I'm thin... | semantic similarity | 1 | What's the best way to generate similar words? -- (semantic similarity)
<p>Hi all I'm fairly up to date with all the NLP tasks out there (nlpprogress.com, paperswithcode.com) and great tools like (nltk, flair, huggingface etc). I want to take a single word, and predict a similar word, a little like the old "Google... | habedi/stack-exchange-dataset |
90,412 | Why is backpropagation used for finding the loss gradient? | <p>I am relatively new to the world of machine learning. After getting a general idea of the concept, I tried creating a program for training a deep learning network from scratch. My goal was to use as little outside resources/help as possible and figure out every step and issue on my own. Now that I'm done, I'm compar... | machine learning deep learning loss function gradient descent backpropagation | 1 | Why is backpropagation used for finding the loss gradient? -- (machine learning deep learning loss function gradient descent backpropagation)
<p>I am relatively new to the world of machine learning. After getting a general idea of the concept, I tried creating a program for training a deep learning network from scratch... | habedi/stack-exchange-dataset |
90,416 | Are there readily available models that can handle conditional correlation? | <p>I've been working my way through the features of the <a href="https://www.kaggle.com/c/house-prices-advanced-regression-techniques/overview" rel="nofollow noreferrer">Kaggle House Prices</a> dataset (Note: this is a non-ranking entry, so this is just for exercises), and I've found a couple situations where there is ... | regression feature selection feature engineering correlation | 1 | Are there readily available models that can handle conditional correlation? -- (regression feature selection feature engineering correlation)
<p>I've been working my way through the features of the <a href="https://www.kaggle.com/c/house-prices-advanced-regression-techniques/overview" rel="nofollow noreferrer">Kaggle H... | habedi/stack-exchange-dataset |
90,441 | How does the Transformer predict n steps into the future? | <p>I have barely been able to find an implementation of the Transformer (that is not bloated nor confusing), and the one that I've used as reference was the PyTorch implementation. However, the Pytorch implementation requires you to pass the input (<em>src</em>) and the target (<em>tgt</em>) tensors for every step, rat... | tensorflow pytorch transformer sequence to sequence | 1 | How does the Transformer predict n steps into the future? -- (tensorflow pytorch transformer sequence to sequence)
<p>I have barely been able to find an implementation of the Transformer (that is not bloated nor confusing), and the one that I've used as reference was the PyTorch implementation. However, the Pytorch imp... | habedi/stack-exchange-dataset |
90,448 | Do we need to do multiple times deep learning and average ROC? | <p>Do we need to do multiple times deep learning and average ROC(AUC)?</p>
<p>Since we've might get different ROC(AUC) every round we train and test (by KERAS)</p>
<p>Is it necessary to average ROC(AUC) with multiple times training and testing?
(or just choose the best round?)</p>
 | machine learning deep learning keras | 1 | Do we need to do multiple times deep learning and average ROC? -- (machine learning deep learning keras)
<p>Do we need to do multiple times deep learning and average ROC(AUC)?</p>
<p>Since we've might get different ROC(AUC) every round we train and test (by KERAS)</p>
<p>Is it necessary to average ROC(AUC) with... | habedi/stack-exchange-dataset |
90,459 | What is a "shot" in machine learning? | <p>I keep on hearing this term "shot" used in machine learning.</p>
<p><strong>Is a "shot" well-defined?</strong></p>
<p>From what I can tell, "shot" is a synonym for "example". Most machine learning systems seem to be "multi-shot" meaning you have a huge datase... | machine learning | 1 | What is a "shot" in machine learning? -- (machine learning)
<p>I keep on hearing this term "shot" used in machine learning.</p>
<p><strong>Is a "shot" well-defined?</strong></p>
<p>From what I can tell, "shot" is a synonym for "example". Most machine learning systems seem... | habedi/stack-exchange-dataset |
90,465 | Neural network: does bias equal to zero, is the same as, a layer without bias? | <p>Question as in the title. Does bias equal to zero, is the same as, removing bias from the layer? Here's a pytorch implementation to showcase what I mean.</p>
<pre><code>class MLP_without_bias(torch.nn.Module):
 def __init__(self):
 super().__init__() 

 # Bias set as False
 ... | neural network pytorch bias | 1 | Neural network: does bias equal to zero, is the same as, a layer without bias? -- (neural network pytorch bias)
<p>Question as in the title. Does bias equal to zero, is the same as, removing bias from the layer? Here's a pytorch implementation to showcase what I mean.</p>
<pre><code>class MLP_without_bias(torch.nn.... | habedi/stack-exchange-dataset |
90,489 | Is there potentially data leakage during imputation for time-varying sensor data? | <p>I have a time-varying dataset that contains some missing data. I have sensors that continuously monitor some properties at evenly-spaced intervals and I would like to impute the missing values using basic interpolation for both the training and test set. This is a time-series binary classification problem (e.g., bas... | classification time series data imputation data leakage | 1 | Is there potentially data leakage during imputation for time-varying sensor data? -- (classification time series data imputation data leakage)
<p>I have a time-varying dataset that contains some missing data. I have sensors that continuously monitor some properties at evenly-spaced intervals and I would like to impute ... | habedi/stack-exchange-dataset |
90,513 | Understanding features vs labels in a dataset | <p>I am in the process of splitting a dataset into a train and test dataset. Before I start, this is all relatively new to me. So, from my understanding, a label is the output, and a feature is an input. My model will detect malware, and so my dataset is filled with malware executables and non-malware executables (whic... | machine learning dataset machine learning model | 1 | Understanding features vs labels in a dataset -- (machine learning dataset machine learning model)
<p>I am in the process of splitting a dataset into a train and test dataset. Before I start, this is all relatively new to me. So, from my understanding, a label is the output, and a feature is an input. My model will det... | habedi/stack-exchange-dataset |
90,562 | How much imbalance in a training set is a problem? | <p>In a simple binary classification problem, at what point does majority class to minority class become significant become significant? Intuitively, I would expect a 3:1 ratio to not be an issue, maybe not even a 10:1 ratio. But a 100:1 ratio certainly does require some action. What might be this cutoff?</p>
<p>As... | classification class imbalance | 1 | How much imbalance in a training set is a problem? -- (classification class imbalance)
<p>In a simple binary classification problem, at what point does majority class to minority class become significant become significant? Intuitively, I would expect a 3:1 ratio to not be an issue, maybe not even a 10:1 ratio. But a 1... | habedi/stack-exchange-dataset |
90,578 | Extract key phrases for binary outcome | <p>I have a set of phrases that lead to a binary outcome (accept/reject) and I was wondering what techniques are most helpful for extracting key phrases that are most likely to determine the outcome, given that I have a training set of data that has the English-language phrase and the observed outcome.</p>
<p>To il... | nlp semi supervised learning | 1 | Extract key phrases for binary outcome -- (nlp semi supervised learning)
<p>I have a set of phrases that lead to a binary outcome (accept/reject) and I was wondering what techniques are most helpful for extracting key phrases that are most likely to determine the outcome, given that I have a training set of data that h... | habedi/stack-exchange-dataset |
90,592 | Effect of removing duplicates on Random Forest Regression | <p>I have a dataset with several million samples that have 5 features and 1 target, which I am using for a regression model. With very large sample counts some models (like Random Forests) become very large (several GB when pickled).</p>
<p>These data often have duplicates or near duplicates - these are real obser... | machine learning random forest | 1 | Effect of removing duplicates on Random Forest Regression -- (machine learning random forest)
<p>I have a dataset with several million samples that have 5 features and 1 target, which I am using for a regression model. With very large sample counts some models (like Random Forests) become very large (several GB when p... | habedi/stack-exchange-dataset |
90,622 | What issue is there, when training this network with gradient descent? | <p>Suppose we have the following fully connected network made of perceptrons with a sign function as the activation unit, what issue arises, when trying to train this network with gradient descent?
<a href="https://i.stack.imgur.com/TAwJW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TAwJW.jpg"... | gradient descent backpropagation perceptron | 1 | What issue is there, when training this network with gradient descent? -- (gradient descent backpropagation perceptron)
<p>Suppose we have the following fully connected network made of perceptrons with a sign function as the activation unit, what issue arises, when trying to train this network with gradient descent?&#x... | habedi/stack-exchange-dataset |
90,623 | Imputing missing value based on filtering result of another column | <div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>C1</th>
<th>C2</th>
</tr>
</thead>
<tbody>
<tr>
<td>A</td>
<td>x</td>
</tr>
<tr>
<td>A</td>
<td>y</td>
</tr>
<tr>
<td>A</td>
<td>z</td>
</tr>
<tr>
<td>A</td>&#... | python pandas missing data | 1 | Imputing missing value based on filtering result of another column -- (python pandas missing data)
<div class="s-table-container">
<table class="s-table">
<thead>
<tr>
<th>C1</th>
<th>C2</th>
</tr>
</thead>
<tbody>
<tr>
<td>A</td>
<td>x</td>
</tr>
<tr>
<td>A</td>&... | habedi/stack-exchange-dataset |
90,643 | Why do my target labels need to begin at 0 for sparse categorical cross entropy to work? | <p>I'm following a guide <a href="https://keras.io/examples/vision/oxford_pets_image_segmentation/" rel="nofollow noreferrer">here</a> to implement image segmentation in Keras.</p>
<p>One thing I'm confused about are these lines:</p>
<pre><code># Ground truth labels are 1, 2, 3. Subtract one to make them 0, 1, ... | python keras cnn categorical data sparse | 1 | Why do my target labels need to begin at 0 for sparse categorical cross entropy to work? -- (python keras cnn categorical data sparse)
<p>I'm following a guide <a href="https://keras.io/examples/vision/oxford_pets_image_segmentation/" rel="nofollow noreferrer">here</a> to implement image segmentation in Keras.</p>
... | habedi/stack-exchange-dataset |
90,644 | How do you search for content, not words? | <p>Given a string that describes a situation or method, are there algorithms that create fingerprints out of it, compare it with a corpus to then point to pages where a similiar concept is being discussed?</p>
<p>The simple form is word search.</p>
<p>You search for word X and X appears in a text whose excerpt ... | deep learning nlp | 1 | How do you search for content, not words? -- (deep learning nlp)
<p>Given a string that describes a situation or method, are there algorithms that create fingerprints out of it, compare it with a corpus to then point to pages where a similiar concept is being discussed?</p>
<p>The simple form is word search.</p>&#x... | habedi/stack-exchange-dataset |
90,654 | Implementing U-Net segmentation model without padding | <p>I'm trying to implement the U-Net CNN as per the published paper <a href="https://arxiv.org/pdf/1505.04597.pdf" rel="nofollow noreferrer">here</a>.</p>
<p>I've followed the paper architecture as closely as possible but I'm hitting an error when trying to carry out the first concatenation:</p>
<p><a href="htt... | keras cnn image segmentation | 1 | Implementing U-Net segmentation model without padding -- (keras cnn image segmentation)
<p>I'm trying to implement the U-Net CNN as per the published paper <a href="https://arxiv.org/pdf/1505.04597.pdf" rel="nofollow noreferrer">here</a>.</p>
<p>I've followed the paper architecture as closely as possible but I'm hi... | habedi/stack-exchange-dataset |
90,657 | Is my CNN model overfitting? | <p><a href="https://i.stack.imgur.com/6M332.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6M332.png" alt="enter image description here" /></a></p>
<p>I'm training a standard CNN. Attached my training curve. My model:</p>
<pre><code>Model: "functional_35"
______________________... | deep learning keras tensorflow cnn | 1 | Is my CNN model overfitting? -- (deep learning keras tensorflow cnn)
<p><a href="https://i.stack.imgur.com/6M332.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6M332.png" alt="enter image description here" /></a></p>
<p>I'm training a standard CNN. Attached my training curve. My model:</p>
<... | habedi/stack-exchange-dataset |
90,659 | Adjusting imbalance in classification problem reduce precision, accuracy but increase recall | <p>I've learned that adjusting imbalanced data when training a CNN affects model performance which got me thinking "what about in ML?" so I've done some testing on my own, you can check it out here -> <a href="https://haneulkim.medium.com/handling-imbalanced-class-in-machine-learning-classifiers-1b5c528f42... | machine learning python class imbalance | 1 | Adjusting imbalance in classification problem reduce precision, accuracy but increase recall -- (machine learning python class imbalance)
<p>I've learned that adjusting imbalanced data when training a CNN affects model performance which got me thinking "what about in ML?" so I've done some testing on my own, ... | habedi/stack-exchange-dataset |
90,668 | is it possible to decide model without any data? | <p>Today I just faced a very unique demand from my superior. He asked me whether I can make a model first before we gather the data for training because we don't have any data yet. <br>
I was utterly confused about what to do with this. Did anyone have any suggestion how should I approach modelling without any data... | data science model model selection real world use cases | 1 | is it possible to decide model without any data? -- (data science model model selection real world use cases)
<p>Today I just faced a very unique demand from my superior. He asked me whether I can make a model first before we gather the data for training because we don't have any data yet. <br>
I was utterly confus... | habedi/stack-exchange-dataset |
90,683 | What method/algorithm for constrained multi-target regression | <p>I am working with <strong>three dimensional</strong> measurement data and want to model them using a <strong>multivariate linear regression</strong>.
I have already implemented a simple gradient descent algorithm to solve the classic regression problem</p>
<p><span class="math-container">$y = \beta_0 + \beta... | regression gradient descent optimization multi output | 1 | What method/algorithm for constrained multi-target regression -- (regression gradient descent optimization multi output)
<p>I am working with <strong>three dimensional</strong> measurement data and want to model them using a <strong>multivariate linear regression</strong>.
I have already implemented a simple gradie... | habedi/stack-exchange-dataset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.