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
70,163
What is the current best state of the art algorithm for graph embedding of directed weighted graphs for binary classification?
<p>Sorry if this is a newbee question, I'm not an expert in data science, so this is the problem:</p>&#xA;&#xA;<p>We have a directed and weighted graph, which higher or lower weight values does not imply the importance of the edge (so preferably the embedding algorithm shouldn't consider higher weights as more importa...
deep learning classification graphs embeddings
1
What is the current best state of the art algorithm for graph embedding of directed weighted graphs for binary classification? -- (deep learning classification graphs embeddings) <p>Sorry if this is a newbee question, I'm not an expert in data science, so this is the problem:</p>&#xA;&#xA;<p>We have a directed and wei...
habedi/stack-exchange-dataset
70,170
TF2.0 DQN has a loss of 0?
<p>I am having a hard time understanding why my loss is constantly a <code>zero</code> when using DQN. &#xA;I'm trying to use the gym environment to play the game <code>CartPole-V0</code>.</p>&#xA;&#xA;<p>In the code below, &#xA;<code>r_batch</code> indicates rewards sampled from the replay buffer, and similarly s_batc...
tensorflow dqn
1
TF2.0 DQN has a loss of 0? -- (tensorflow dqn) <p>I am having a hard time understanding why my loss is constantly a <code>zero</code> when using DQN. &#xA;I'm trying to use the gym environment to play the game <code>CartPole-V0</code>.</p>&#xA;&#xA;<p>In the code below, &#xA;<code>r_batch</code> indicates rewards sampl...
habedi/stack-exchange-dataset
70,198
Feature-to-parameter mapping in neural networks
<p>For neural networks, can we tell which parameters are responsible for which features?</p>&#xA;&#xA;<p>For example, in an image classification task, each pixel of an image is a feature.&#xA;Can I somehow find out which parameters encode the learned information, say from the top-left pixel of my training instances?</p...
neural network deep learning cnn image classification interpretation
1
Feature-to-parameter mapping in neural networks -- (neural network deep learning cnn image classification interpretation) <p>For neural networks, can we tell which parameters are responsible for which features?</p>&#xA;&#xA;<p>For example, in an image classification task, each pixel of an image is a feature.&#xA;Can I ...
habedi/stack-exchange-dataset
70,221
Principle Component Analysis on multiple functions
<p>I am working on a research project that uses data of geometrical structure complexities of different land coverage types (primarily cities, pastures and natural structures). My supervisor has instructed me to use PCA for the reduction of dimensions, but I have trouble understanding how it would work on my data.&#xA;...
pca
1
Principle Component Analysis on multiple functions -- (pca) <p>I am working on a research project that uses data of geometrical structure complexities of different land coverage types (primarily cities, pastures and natural structures). My supervisor has instructed me to use PCA for the reduction of dimensions, but I h...
habedi/stack-exchange-dataset
70,222
Does the transformer decoder reuse previous tokens' intermediate states like GPT2?
<p>I recently read Jay Alammar's blogpost about GPT-2 (<a href="http://jalammar.github.io/illustrated-gpt2/" rel="nofollow noreferrer">http://jalammar.github.io/illustrated-gpt2/</a>) which I found quite clear appart from one point :&#xA;He explains that the decoder of GPT-2 processes input tokens one at a time, only a...
nlp transformer openai gpt
1
Does the transformer decoder reuse previous tokens' intermediate states like GPT2? -- (nlp transformer openai gpt) <p>I recently read Jay Alammar's blogpost about GPT-2 (<a href="http://jalammar.github.io/illustrated-gpt2/" rel="nofollow noreferrer">http://jalammar.github.io/illustrated-gpt2/</a>) which I found quite c...
habedi/stack-exchange-dataset
70,236
Word2Vec Implementation
<p>In word2vec why is the implementation of likelihood function multiplication of probabilities of finding a neighbouring word given a word? I didnt get why the probabilities should be multiplied.Is there a reason/intuition behind it ?</p>&#xA;
nlp word2vec
1
Word2Vec Implementation -- (nlp word2vec) <p>In word2vec why is the implementation of likelihood function multiplication of probabilities of finding a neighbouring word given a word? I didnt get why the probabilities should be multiplied.Is there a reason/intuition behind it ?</p>&#xA;
habedi/stack-exchange-dataset
70,255
How to improve results for clustering of words
<p>I have a list of words (names actually) on which I would like to apply some entity resolution.&#xA;My first guess was to create clusters of similar names so I could extract a representative entity from multiple name shapes.</p>&#xA;&#xA;<p>I need to specify that I have no labelled data, and I am not working on a doc...
clustering k means
1
How to improve results for clustering of words -- (clustering k means) <p>I have a list of words (names actually) on which I would like to apply some entity resolution.&#xA;My first guess was to create clusters of similar names so I could extract a representative entity from multiple name shapes.</p>&#xA;&#xA;<p>I need...
habedi/stack-exchange-dataset
70,258
Can you combine two xgboost models into one?
<p>If you have built two different xgbost models, with say 100 trees each, is it possible to combine into an xgboost model with 200 trees?</p>&#xA;
classification xgboost ensemble modeling
1
Can you combine two xgboost models into one? -- (classification xgboost ensemble modeling) <p>If you have built two different xgbost models, with say 100 trees each, is it possible to combine into an xgboost model with 200 trees?</p>&#xA;
habedi/stack-exchange-dataset
70,268
Unformatted data entries
<p>I have been working recently on an independent project using a <a href="https://www.unsw.adfa.edu.au/unsw-canberra-cyber/cybersecurity/ADFA-NB15-Datasets/" rel="nofollow noreferrer">database for Cybersecurity Attack</a> classification. I imported the database using Pandas (Python) and before starting the processing ...
python data mining pandas data cleaning dataframe
1
Unformatted data entries -- (python data mining pandas data cleaning dataframe) <p>I have been working recently on an independent project using a <a href="https://www.unsw.adfa.edu.au/unsw-canberra-cyber/cybersecurity/ADFA-NB15-Datasets/" rel="nofollow noreferrer">database for Cybersecurity Attack</a> classification. I...
habedi/stack-exchange-dataset
70,288
count_vectorizer.vocabulary_.items() and count_vectorizer.vocabulary_ Inconsistent number of returns
<pre><code># create a count vectorizer object&#xA;count_vectorizer = CountVectorizer()&#xA;&#xA;# fit the count vectorizer using the text data&#xA;count_vectorizer.fit(data['text'])&#xA;&#xA;# collect the vocabulary items used in the vectorizer&#xA;dictionary = count_vectorizer.vocabulary_.items()&#xA;</code></pre>&#xA...
machine learning nlp feature extraction
1
count_vectorizer.vocabulary_.items() and count_vectorizer.vocabulary_ Inconsistent number of returns -- (machine learning nlp feature extraction) <pre><code># create a count vectorizer object&#xA;count_vectorizer = CountVectorizer()&#xA;&#xA;# fit the count vectorizer using the text data&#xA;count_vectorizer.fit(data['...
habedi/stack-exchange-dataset
70,309
Time series regression
<p>I m new in the domain of machine learning. I m here to ask for some elucidation.&#xA;I have a data set presented as a time series( from a strain sensor coming from a wind turbine). In this time series, we can capture stop and start as u can see in the attached figure <a href="https://i.stack.imgur.com/48L8W.png" rel...
deep learning time series regression
1
Time series regression -- (deep learning time series regression) <p>I m new in the domain of machine learning. I m here to ask for some elucidation.&#xA;I have a data set presented as a time series( from a strain sensor coming from a wind turbine). In this time series, we can capture stop and start as u can see in the ...
habedi/stack-exchange-dataset
70,313
How to make a classification problem into a regression problem?
<p>I have data describing genes which each get 1 of 4 labels, I use this to train models to predict/label other unlabelled genes. I have a huge class imbalance with 10k genes in 1 label and 50-100 genes in the other 3 labels. Due to this imbalance I'm trying to change my labels into numeric values for a model to predic...
machine learning classification regression bioinformatics
1
How to make a classification problem into a regression problem? -- (machine learning classification regression bioinformatics) <p>I have data describing genes which each get 1 of 4 labels, I use this to train models to predict/label other unlabelled genes. I have a huge class imbalance with 10k genes in 1 label and 50-...
habedi/stack-exchange-dataset
70,348
Convolutional neural network block notation
<p>The paper by <a href="https://arxiv.org/pdf/1512.03385.pdf" rel="nofollow noreferrer">He et al. "Deep Residual Learning for Image Recognition"</a> illustrates their residual network in Figure 3 as follows:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/09OF9.png" rel="nofollow noreferrer"><img src="https://i.sta...
neural network deep learning image classification convolution
1
Convolutional neural network block notation -- (neural network deep learning image classification convolution) <p>The paper by <a href="https://arxiv.org/pdf/1512.03385.pdf" rel="nofollow noreferrer">He et al. "Deep Residual Learning for Image Recognition"</a> illustrates their residual network in Figure 3 as follows:<...
habedi/stack-exchange-dataset
70,349
A Loss of 55.2164 with a sparse_categorical_crossentropy in a sequential neural network?
<p>I'm following Aurélion Géron's book on Machine Learning.&#xA;The following code tries to evaluate a neural network with a sparse categorical cross entropy loss function, on the Fashion Mnist data set. How come I get such a strange value for loss?</p>&#xA;&#xA;<pre><code>import tensorflow as tf&#xA;from tensorflow i...
machine learning neural network keras categorical data
1
A Loss of 55.2164 with a sparse_categorical_crossentropy in a sequential neural network? -- (machine learning neural network keras categorical data) <p>I'm following Aurélion Géron's book on Machine Learning.&#xA;The following code tries to evaluate a neural network with a sparse categorical cross entropy loss functio...
habedi/stack-exchange-dataset
71,360
How to select the best features for Support Vector Classification
<p>I have a feature set that contains approximately 2 dozen features of technical analysis indicators. My own domain knowledge tells me that some of these features are better than others for predicitive power. But what methodical processes do I follow other than 'just a hunch', to go about refining the feature set to o...
machine learning scikit learn svm features
1
How to select the best features for Support Vector Classification -- (machine learning scikit learn svm features) <p>I have a feature set that contains approximately 2 dozen features of technical analysis indicators. My own domain knowledge tells me that some of these features are better than others for predicitive pow...
habedi/stack-exchange-dataset
71,384
Problem when using Autograd with nn.Embedding in Pytorch
<p>I am in trouble with taking derivatives of outputs <code>logits</code> with respect to the inputs <code>input_ids</code>. Here is an example of my input:</p>&#xA;&#xA;<pre><code># input_ids is a list of token ids got from BERT tokenizer&#xA;input_ids = torch.tensor([101., 1996., 2833., 2003., 2779., 1024., 6350., 10...
deep learning word embeddings pytorch
1
Problem when using Autograd with nn.Embedding in Pytorch -- (deep learning word embeddings pytorch) <p>I am in trouble with taking derivatives of outputs <code>logits</code> with respect to the inputs <code>input_ids</code>. Here is an example of my input:</p>&#xA;&#xA;<pre><code># input_ids is a list of token ids got ...
habedi/stack-exchange-dataset
71,385
Using MultiLabelBinarizer for SMOTE
<p>This is my first NLP project. I'm trying to use SMOTE for a classifier with 14 classes. I need to convert the classes into an array before using SMOTE. I tried using MultiLinearBinarizer but it does not seem to be working. From the stack trace, it seems like everything is getting converted. Do I need to convert som...
scikit learn nlp class imbalance data augmentation smote
1
Using MultiLabelBinarizer for SMOTE -- (scikit learn nlp class imbalance data augmentation smote) <p>This is my first NLP project. I'm trying to use SMOTE for a classifier with 14 classes. I need to convert the classes into an array before using SMOTE. I tried using MultiLinearBinarizer but it does not seem to be worki...
habedi/stack-exchange-dataset
71,392
How can I tell whether my Random-Forest model is overfitting?
<p>I was trying to generate predictions for Iris species using the UCI Machine Learning Iris dataset. I used a RandomForestClassifier with GridSearchCV and calculated the mean absolute error. However, upon generating predictions with the testing set it gave me a suspicious MAE of 0.000000, and a score of 1.0. Is it lik...
scikit learn random forest overfitting
1
How can I tell whether my Random-Forest model is overfitting? -- (scikit learn random forest overfitting) <p>I was trying to generate predictions for Iris species using the UCI Machine Learning Iris dataset. I used a RandomForestClassifier with GridSearchCV and calculated the mean absolute error. However, upon generati...
habedi/stack-exchange-dataset
71,393
Formula to calculate confidence value in Adaboost
<p>I am coding an AdaBoostClassifier with the two class variant of SAMME algorithm. Here is the code.</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>def I(flag):&#xA; return 1 if flag else 0&#xA;</code></pre>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>def sign(x):&#xA; return abs(x)/x ...
python classification scikit learn adaboost
1
Formula to calculate confidence value in Adaboost -- (python classification scikit learn adaboost) <p>I am coding an AdaBoostClassifier with the two class variant of SAMME algorithm. Here is the code.</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>def I(flag):&#xA; return 1 if flag else 0&#xA;</code></...
habedi/stack-exchange-dataset
71,398
'numpy.ndarray' object has no attribute 'plot'
<p>I am trying to balance my data set and using imblearn library for this but After performing fit operation when i try to see the data count in dependent variable its showing me below error</p>&#xA;&#xA;<hr>&#xA;&#xA;<p>AttributeError Traceback (most recent call last)&#xA; in &#xA;----> 1 y_...
pandas class imbalance
1
'numpy.ndarray' object has no attribute 'plot' -- (pandas class imbalance) <p>I am trying to balance my data set and using imblearn library for this but After performing fit operation when i try to see the data count in dependent variable its showing me below error</p>&#xA;&#xA;<hr>&#xA;&#xA;<p>AttributeError ...
habedi/stack-exchange-dataset
71,404
What do Python's pandas/matplotlib/seaborn bring to the table that Tableau does not?
<p>I spent the past year learning Python. As a person who thought coding was impossible to learn for those outside of the CS/IT sphere, I was obviously gobsmacked by the power of a few lines of Python code!</p>&#xA;&#xA;<p>Having arrived at an intermediate level overall, I was pretty proud of myself as it greatly expan...
python pandas matplotlib tableau
1
What do Python's pandas/matplotlib/seaborn bring to the table that Tableau does not? -- (python pandas matplotlib tableau) <p>I spent the past year learning Python. As a person who thought coding was impossible to learn for those outside of the CS/IT sphere, I was obviously gobsmacked by the power of a few lines of Pyt...
habedi/stack-exchange-dataset
71,431
how to get the classe names in an image classifer after predection?
<p>I made an image classifier of 80 classes of handwritten numbers then I tested my model and it worked pretty fine, the only problem that I have now is the display of the correct names of these classes.<br>&#xA;Dataset:&#xA;2 folders: [Train Folder===> 80 folders each has 110 images, Validation folder===> 80 folders e...
machine learning python neural network deep learning classification
1
how to get the classe names in an image classifer after predection? -- (machine learning python neural network deep learning classification) <p>I made an image classifier of 80 classes of handwritten numbers then I tested my model and it worked pretty fine, the only problem that I have now is the display of the correct...
habedi/stack-exchange-dataset
71,452
How to change random number of random elements in a column by group in R?
<p>I have the following data frame:</p>&#xA;&#xA;<pre><code>&gt;df&#xA; Name&#xA; 1 Ed&#xA; 2 Ed&#xA; 3 Bill&#xA; 4 Tom&#xA; 5 Tom&#xA; 6 Tom&#xA; 7 Ed&#xA; 8 Bill&#xA; 9 Bill&#xA;10 Bill&#xA;</code></pre>&#xA;&#xA;<p>My goal is that from each group by "Name" change the "Name" values 25-75% of random rows to "Name"+"...
r dataframe
1
How to change random number of random elements in a column by group in R? -- (r dataframe) <p>I have the following data frame:</p>&#xA;&#xA;<pre><code>&gt;df&#xA; Name&#xA; 1 Ed&#xA; 2 Ed&#xA; 3 Bill&#xA; 4 Tom&#xA; 5 Tom&#xA; 6 Tom&#xA; 7 Ed&#xA; 8 Bill&#xA; 9 Bill&#xA;10 Bill&#xA;</code></pre>&#xA;&#xA;<p>My goal i...
habedi/stack-exchange-dataset
71,454
How can my Pytorch based GAN output pure B&W with no grayscale?
<p>My goal is to create simple geometric line drawings in pure black and white. I do not need gray tones. Something like this (example of training image):</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/6gXyy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6gXyy.png" alt="enter image description h...
pytorch gan image
1
How can my Pytorch based GAN output pure B&W with no grayscale? -- (pytorch gan image) <p>My goal is to create simple geometric line drawings in pure black and white. I do not need gray tones. Something like this (example of training image):</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/6gXyy.png" rel="nofollow no...
habedi/stack-exchange-dataset
71,484
Three Staggered Values - Visualisation?
<p>I have 3 process parameters that independently cycle between zero and some peak value, as shown on this filled line time-series plot:&#xA;<a href="https://i.stack.imgur.com/BpLr7.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BpLr7.jpg" alt="enter image description here"></a></p>&#xA;&#xA;<p>Alth...
visualization plotting
1
Three Staggered Values - Visualisation? -- (visualization plotting) <p>I have 3 process parameters that independently cycle between zero and some peak value, as shown on this filled line time-series plot:&#xA;<a href="https://i.stack.imgur.com/BpLr7.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BpL...
habedi/stack-exchange-dataset
71,536
Why apply a 50:50 train test split?
<p>I am going through the "<strong>Text classification with TensorFlow Hub</strong>" <a href="https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/tutorials/keras/text_classification_with_hub.ipynb?authuser=1#scrollTo=zOMKywn4zReN" rel="nofollow noreferrer">tutorial</a>.&#xA;In this tutorial, a ...
tensorflow
1
Why apply a 50:50 train test split? -- (tensorflow) <p>I am going through the "<strong>Text classification with TensorFlow Hub</strong>" <a href="https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/tutorials/keras/text_classification_with_hub.ipynb?authuser=1#scrollTo=zOMKywn4zReN" rel="nofollo...
habedi/stack-exchange-dataset
71,554
Model to predict coronavirus (covid19) spread
<p>im new in data sience and machine learning but i have some mathematical and statistics backgroud. I really just want some information about models (like papers or raw models). So if you have any information please share them with me.</p>&#xA;&#xA;<p>thank you</p>&#xA;
machine learning predictive modeling statistics
1
Model to predict coronavirus (covid19) spread -- (machine learning predictive modeling statistics) <p>im new in data sience and machine learning but i have some mathematical and statistics backgroud. I really just want some information about models (like papers or raw models). So if you have any information please shar...
habedi/stack-exchange-dataset
71,564
What should return doc.ents if the doc have no entities, in spacy?
<p>I want to answer this question: "How many sentences contain named entities given a doc?"&#xA;and I have this piece of code as solution</p>&#xA;&#xA;<pre><code>nb = 0&#xA;&#xA;for sent in list(doc.sents):&#xA; if sent.ents:&#xA; nb = nb+1&#xA;&#xA;print(nb)&#xA;</code></pre>&#xA;&#xA;<p>But I am a little co...
nlp spacy implementation
1
What should return doc.ents if the doc have no entities, in spacy? -- (nlp spacy implementation) <p>I want to answer this question: "How many sentences contain named entities given a doc?"&#xA;and I have this piece of code as solution</p>&#xA;&#xA;<pre><code>nb = 0&#xA;&#xA;for sent in list(doc.sents):&#xA; if sent....
habedi/stack-exchange-dataset
71,576
How to use r2-score as a loss function in LightGBM?
<p>I am trying to implement a custom loss function in LightGBM for a regression problem. The intrinsic metrics do not help me much, because they penalise for outliers... Is there any way to use <code>r2_score</code> from <code>sklearn</code> as a loss function for LightGBM?</p>&#xA;
scikit learn regression xgboost loss function lightgbm
1
How to use r2-score as a loss function in LightGBM? -- (scikit learn regression xgboost loss function lightgbm) <p>I am trying to implement a custom loss function in LightGBM for a regression problem. The intrinsic metrics do not help me much, because they penalise for outliers... Is there any way to use <code>r2_score...
habedi/stack-exchange-dataset
71,577
Cannot create new percent columns from CSV file
<p>I am fairly new to coding and cannot figure out how to create the <strong>AB_perc</strong> and <strong>CD_perc</strong> columns in the Desired Output table below.</p>&#xA;&#xA;<p>The original csv file I am using has all sorts ot DNA sequencing data, so below is a simplified example of what I am trying to do. </p>&#...
pandas
1
Cannot create new percent columns from CSV file -- (pandas) <p>I am fairly new to coding and cannot figure out how to create the <strong>AB_perc</strong> and <strong>CD_perc</strong> columns in the Desired Output table below.</p>&#xA;&#xA;<p>The original csv file I am using has all sorts ot DNA sequencing data, so belo...
habedi/stack-exchange-dataset
71,602
Why GPU doesn't utilise System memory?
<p>I have noticed that more often when training huge Deep Learning models on consumer GPUs (like GTX 1050ti) The network often doesn't work. </p>&#xA;&#xA;<p>The reason is that the GPU just doesn't have enough memory to train the said network. This problem has solutions like using the CPU's cache memory for stora...
machine learning neural network gpu hardware cuda
1
Why GPU doesn't utilise System memory? -- (machine learning neural network gpu hardware cuda) <p>I have noticed that more often when training huge Deep Learning models on consumer GPUs (like GTX 1050ti) The network often doesn't work. </p>&#xA;&#xA;<p>The reason is that the GPU just doesn't have enough memory to ...
habedi/stack-exchange-dataset
71,607
How to order a python dataframe by adding the row values?
<p>I have the following dataframe:</p>&#xA;&#xA;<pre><code> M1 M2 M4 M5&#xA;N1 45 46 54 57&#xA;N2 32 36 29 56&#xA;N3 56 44 40 55&#xA;N4 57 43 42 54&#xA;</code></pre>&#xA;&#xA;<p>How is it possible to order it according to the sum of its lines, from the largest sum to the lowest? That is, N1 i...
python python 3.x
1
How to order a python dataframe by adding the row values? -- (python python 3.x) <p>I have the following dataframe:</p>&#xA;&#xA;<pre><code> M1 M2 M4 M5&#xA;N1 45 46 54 57&#xA;N2 32 36 29 56&#xA;N3 56 44 40 55&#xA;N4 57 43 42 54&#xA;</code></pre>&#xA;&#xA;<p>How is it possible to order it acc...
habedi/stack-exchange-dataset
71,615
Meaning of axes in Linear Discrimination Analysis
<p>Looking at the LDA of the Iris Dataset, which looks like this:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/HhtMA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HhtMA.png" alt="enter image description here"></a></p>&#xA;&#xA;<p>It's understandable that the 3 types of flowers have succesfuly...
lda
1
Meaning of axes in Linear Discrimination Analysis -- (lda) <p>Looking at the LDA of the Iris Dataset, which looks like this:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/HhtMA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HhtMA.png" alt="enter image description here"></a></p>&#xA;&#xA;<p>It's...
habedi/stack-exchange-dataset
71,616
low error, high CV(RMSE)?
<p>I am comparing 2 neural network models. I have used the model to make predictions on unseen data.</p>&#xA;&#xA;<ul>&#xA;<li><p>One model returns an error of 20.9% for y1, 36.6% for y2, &#xA;4.53% for y3 on unseen data, and a CV(RMSE) of 19.3.</p></li>&#xA;<li><p>The other returns an error of 15.5% for y1, 33.8% for ...
neural network statistics
1
low error, high CV(RMSE)? -- (neural network statistics) <p>I am comparing 2 neural network models. I have used the model to make predictions on unseen data.</p>&#xA;&#xA;<ul>&#xA;<li><p>One model returns an error of 20.9% for y1, 36.6% for y2, &#xA;4.53% for y3 on unseen data, and a CV(RMSE) of 19.3.</p></li>&#xA;<li>...
habedi/stack-exchange-dataset
71,630
ValueError: Error when checking input: expected conv2d_25_input to have shape (144, 256, 3) but got array with shape (256, 144, 3)
<p>I have built a CNN with images of size 720 (height) and 1280 (width). I attempt to re scale images to 144x256. However, I receive this error:</p>&#xA;&#xA;<pre><code>ValueError: Error when checking input: expected conv2d_25_input to have shape (144, 256, 3) but got array with shape (256, 144, 3)&#xA;</code></pre>&#x...
keras tensorflow cnn google colab
1
ValueError: Error when checking input: expected conv2d_25_input to have shape (144, 256, 3) but got array with shape (256, 144, 3) -- (keras tensorflow cnn google colab) <p>I have built a CNN with images of size 720 (height) and 1280 (width). I attempt to re scale images to 144x256. However, I receive this error:</p>&#...
habedi/stack-exchange-dataset
71,636
Standardizing features by one specific feature
<p>I am working on a project with a dataset that looks something like the following:</p>&#xA;&#xA;<pre><code> velocity accel_amp f_vert tau_vert f_pitch_filt tau&#xA;0 3.778595 -5.796777 2.400000 32.753227 1.600000 27.844535&#xA;1 1.970611 -6.087134 2.272727 32.6...
python dataset data data cleaning pca
1
Standardizing features by one specific feature -- (python dataset data data cleaning pca) <p>I am working on a project with a dataset that looks something like the following:</p>&#xA;&#xA;<pre><code> velocity accel_amp f_vert tau_vert f_pitch_filt tau&#xA;0 3.778595 -5.796777 2.40000...
habedi/stack-exchange-dataset
71,652
Is there a reference data set for ridge regression?
<p>In order to test an algorithm, I am looking for a reference data set for ridge regression in research papers. Kind of like the equivalent of MNIST but for regression.</p>&#xA;
dataset research ridge regression
1
Is there a reference data set for ridge regression? -- (dataset research ridge regression) <p>In order to test an algorithm, I am looking for a reference data set for ridge regression in research papers. Kind of like the equivalent of MNIST but for regression.</p>&#xA;
habedi/stack-exchange-dataset
71,658
In "Attention Is All You Need", why are the FFNs in (2) the same as two convolutions with kernel size 1?
<p>In addition, why do we need a FFN in each layer when we already have attention?</p>&#xA;&#xA;<p>Here's a screenshot of the relevant section from Vaswani et al. (2017):</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/T9qeu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T9qeu.png" alt="eScreensh...
convolution transformer attention mechanism research
1
In "Attention Is All You Need", why are the FFNs in (2) the same as two convolutions with kernel size 1? -- (convolution transformer attention mechanism research) <p>In addition, why do we need a FFN in each layer when we already have attention?</p>&#xA;&#xA;<p>Here's a screenshot of the relevant section from Vaswani e...
habedi/stack-exchange-dataset
71,678
Numeric variables in Decision trees
<p>If we have numeric variable, decision trees will use <code>&lt;</code> and <code>&gt;</code> comparisons as splitting criteria. Lets consider this case : If our target variable is <code>1</code> for even numeric value, and <code>0</code> for odd numeric value. How to deal with this type of variables? How to even ide...
decision trees
1
Numeric variables in Decision trees -- (decision trees) <p>If we have numeric variable, decision trees will use <code>&lt;</code> and <code>&gt;</code> comparisons as splitting criteria. Lets consider this case : If our target variable is <code>1</code> for even numeric value, and <code>0</code> for odd numeric value. ...
habedi/stack-exchange-dataset
71,689
What annotators are used in Cohen Kappa for classification problems?
<p>I am working on a classification problem using algorithms such as Logistic Regression, Support Vector Machines, Decision Trees, Random Forests and Naive Bayes. My data consists of binary class classification i.e. Fire(1) or No Fire(0). Due to the imbalance in data Cohen Kappa was recommended for evaluation of model ...
classification scikit learn binary
1
What annotators are used in Cohen Kappa for classification problems? -- (classification scikit learn binary) <p>I am working on a classification problem using algorithms such as Logistic Regression, Support Vector Machines, Decision Trees, Random Forests and Naive Bayes. My data consists of binary class classification ...
habedi/stack-exchange-dataset
71,692
Prepare data for an LSTM
<p>-I want to make a python program using the LSTM model to predict an output value that is 1 or 0.</p>&#xA;<p>-My data is stored in a .csv file of the form: (Example of the line)</p>&#xA;<p>Date time temperature wind value-output</p>&#xA;<p>10-02-2020 10:00 25 10 ...
lstm data
1
Prepare data for an LSTM -- (lstm data) <p>-I want to make a python program using the LSTM model to predict an output value that is 1 or 0.</p>&#xA;<p>-My data is stored in a .csv file of the form: (Example of the line)</p>&#xA;<p>Date time temperature wind value-output</p>&#xA;<p>10-02-2020 ...
habedi/stack-exchange-dataset
71,698
Smoothing or averaging plots to better represent trends and their variations
<p>My picture looks like this. It shows some percent variation but, due to fluctuations, curves are not very smooth at all.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/eZ1nY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eZ1nY.png" alt="enter image description here"></a></p>&#xA;&#xA;<p>I wou...
matplotlib plotting python 3.x
1
Smoothing or averaging plots to better represent trends and their variations -- (matplotlib plotting python 3.x) <p>My picture looks like this. It shows some percent variation but, due to fluctuations, curves are not very smooth at all.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/eZ1nY.png" rel="nofollow norefer...
habedi/stack-exchange-dataset
71,705
What does the term 'Facet' in Seaborn FacetGrid imply?
<p>I am a newbie to data science. I have a very basic understanding of Seaborn. My understanding is that it is used to plot grids. That said, I intend to have a better understanding of '<strong>FacetGrid</strong>' and the term '<strong>facet</strong>'. </p>&#xA;&#xA;<blockquote>&#xA; <p>FacetGrid is a multi-plot grid ...
visualization matplotlib seaborn python 3.x
1
What does the term 'Facet' in Seaborn FacetGrid imply? -- (visualization matplotlib seaborn python 3.x) <p>I am a newbie to data science. I have a very basic understanding of Seaborn. My understanding is that it is used to plot grids. That said, I intend to have a better understanding of '<strong>FacetGrid</strong>' an...
habedi/stack-exchange-dataset
71,710
Finding TN,FN, TP, and FN for arrays using confusion matrix
<p>My prediction results look like this</p>&#xA;&#xA;<p><strong>TestArray</strong></p>&#xA;&#xA;<pre><code>[1,0,0,0,1,0,1,...,1,0,1,1],&#xA;[1,0,1,0,0,1,0,...,0,1,1,1],&#xA;[0,1,1,1,1,1,0,...,0,1,1,1],&#xA;.&#xA;.&#xA;.&#xA;[1,1,0,1,1,0,1,...,0,1,1,1],&#xA;</code></pre>&#xA;&#xA;<p><strong>PredictionArray</strong></p>&...
python confusion matrix
1
Finding TN,FN, TP, and FN for arrays using confusion matrix -- (python confusion matrix) <p>My prediction results look like this</p>&#xA;&#xA;<p><strong>TestArray</strong></p>&#xA;&#xA;<pre><code>[1,0,0,0,1,0,1,...,1,0,1,1],&#xA;[1,0,1,0,0,1,0,...,0,1,1,1],&#xA;[0,1,1,1,1,1,0,...,0,1,1,1],&#xA;.&#xA;.&#xA;.&#xA;[1,1,0,...
habedi/stack-exchange-dataset
71,715
Heterogeneous clustering with text data
<p>I have a dataset which consists of multiple user ratings. Each rating looks similarly to:</p>&#xA;&#xA;<pre><code>| Taste | Flavour | Look | Enjoyed | ..... | Tag |&#xA;|-------|---------|------|---------|-------|--------|&#xA;| 4 | 2 | 2 | 3 | ..... | Banana |&#xA;| 5 | 4 | 1 | 2 ...
clustering word embeddings weighted data structured data
1
Heterogeneous clustering with text data -- (clustering word embeddings weighted data structured data) <p>I have a dataset which consists of multiple user ratings. Each rating looks similarly to:</p>&#xA;&#xA;<pre><code>| Taste | Flavour | Look | Enjoyed | ..... | Tag |&#xA;|-------|---------|------|---------|-------...
habedi/stack-exchange-dataset
71,719
Colab can not connect to GPU from a python file
<p>I am trying to run a github deep learning repository in Colab but I can not connect the python files to colab GPU. </p>&#xA;&#xA;<p>I can connect to GPU when writing a script in the colab notebook e.g. when I run this cod from a notebook cell :</p>&#xA;&#xA;<pre><code>import os, torch&#xA;print('Torch', torch.__vers...
colab learning torch
1
Colab can not connect to GPU from a python file -- (colab learning torch) <p>I am trying to run a github deep learning repository in Colab but I can not connect the python files to colab GPU. </p>&#xA;&#xA;<p>I can connect to GPU when writing a script in the colab notebook e.g. when I run this cod from a notebook cell ...
habedi/stack-exchange-dataset
71,734
How to compute AUC in gridsearchSV (multiclass problem)
<p>I'm working on a multiclass classification problem, comparing results from SVM and Random Forest classificators. I would like to use gridsearchCV for hyperparameters tuning and find that AUC is the most used metrics for this kind of problem.</p>&#xA;&#xA;<p>I know how to use other metrics of scoring like accuracy et...
scikit learn multiclass classification gridsearchcv scoring auc
1
How to compute AUC in gridsearchSV (multiclass problem) -- (scikit learn multiclass classification gridsearchcv scoring auc) <p>I'm working on a multiclass classification problem, comparing results from SVM and Random Forest classificators. I would like to use gridsearchCV for hyperparameters tuning and find that AUC i...
habedi/stack-exchange-dataset
71,751
Applying a keras model working with greyscale images to RGB images
<p>I followed this <a href="https://www.tensorflow.org/tutorials/keras/classification" rel="nofollow noreferrer">basic classification TensorFlow tutorial</a> using the <strong>Fashion MNIST</strong> dataset.&#xA;The training set contains 60,000 28x28 pixels greyscale images, split into 10 classes (trouser, pullover, sh...
python keras tensorflow
1
Applying a keras model working with greyscale images to RGB images -- (python keras tensorflow) <p>I followed this <a href="https://www.tensorflow.org/tutorials/keras/classification" rel="nofollow noreferrer">basic classification TensorFlow tutorial</a> using the <strong>Fashion MNIST</strong> dataset.&#xA;The training...
habedi/stack-exchange-dataset
71,755
Should you perform feature scaling/mean normalization when predicting with a model?
<p>Should you also perform feature scaling/mean normalization when predicting with a model, that was trained and tested on with feature scaling/mean normalization?</p>&#xA;
neural network deep learning training
1
Should you perform feature scaling/mean normalization when predicting with a model? -- (neural network deep learning training) <p>Should you also perform feature scaling/mean normalization when predicting with a model, that was trained and tested on with feature scaling/mean normalization?</p>&#xA;
habedi/stack-exchange-dataset
71,757
Strange out of memory while loading lots of pictures before input CNN for deep learning
<p>I’m using the TFlearn, and want to classify pictures to two category. But the strange out of memory while loading lots of pictures before input CNN for deep learning. The RAM is 64 G in my deep learning box. I using 482426 pictures(resize to 224 x 224) for training (241213 are A category, the other 241213 are B cate...
python deep learning image preprocessing linux
1
Strange out of memory while loading lots of pictures before input CNN for deep learning -- (python deep learning image preprocessing linux) <p>I’m using the TFlearn, and want to classify pictures to two category. But the strange out of memory while loading lots of pictures before input CNN for deep learning. The RAM is...
habedi/stack-exchange-dataset
71,768
Combining convolution operations
<p>Reading <a href="https://iamaaditya.github.io/2016/03/one-by-one-convolution/" rel="nofollow noreferrer">an article about 1x1 convolution</a>, I found this:</p>&#xA;&#xA;<blockquote>&#xA; <p>It should be noted that a <strong>two step convolution operation can always be combined into one</strong>, but in this case [...
neural network cnn convolution
1
Combining convolution operations -- (neural network cnn convolution) <p>Reading <a href="https://iamaaditya.github.io/2016/03/one-by-one-convolution/" rel="nofollow noreferrer">an article about 1x1 convolution</a>, I found this:</p>&#xA;&#xA;<blockquote>&#xA; <p>It should be noted that a <strong>two step convolution o...
habedi/stack-exchange-dataset
71,788
How to add jpg images information as a column in a data frame
<p>I have jpg images stored in a folder. For ex: 11_lion_king.jpg,22_avengers.jpg etc.</p>&#xA;&#xA;<p>I have a data frame as below:</p>&#xA;&#xA;<pre><code>data_movie.head()&#xA;&#xA;movie_id genre &#xA;11 ['action','comedy]&#xA;22 ['animation',comedy]&#xA;..........&#xA;</code></pre>&#xA;&#xA;<p>I want t...
python pandas image preprocessing
1
How to add jpg images information as a column in a data frame -- (python pandas image preprocessing) <p>I have jpg images stored in a folder. For ex: 11_lion_king.jpg,22_avengers.jpg etc.</p>&#xA;&#xA;<p>I have a data frame as below:</p>&#xA;&#xA;<pre><code>data_movie.head()&#xA;&#xA;movie_id genre &#xA;11 ['act...
habedi/stack-exchange-dataset
71,804
How to perform one hot encoding on multiple categorical columns
<p>I am trying to perform one-hot encoding on some categorical columns. From the tutorial I am following, I am supposed to do LabelEncoding before One hot encoding. I have successfully performed the labelencoding as shown below</p>&#xA;&#xA;<pre><code>#categorical data&#xA;categorical_cols = ['a', 'b', 'c', 'd'] &#xA;f...
scikit learn pandas
1
How to perform one hot encoding on multiple categorical columns -- (scikit learn pandas) <p>I am trying to perform one-hot encoding on some categorical columns. From the tutorial I am following, I am supposed to do LabelEncoding before One hot encoding. I have successfully performed the labelencoding as shown below</p>...
habedi/stack-exchange-dataset
71,812
How to get Euclidean Distance between feature maps
<p>I'm trying to find &quot;keyframes&quot; within a video using <a href="https://arxiv.org/abs/1601.07754" rel="nofollow noreferrer">this paper</a> however I'm a little new to machine learning and I'm stuck on the distance vector step. The goal is to calculate the distance vector between consecutive frames to detect a...
machine learning keras tensorflow cnn
1
How to get Euclidean Distance between feature maps -- (machine learning keras tensorflow cnn) <p>I'm trying to find &quot;keyframes&quot; within a video using <a href="https://arxiv.org/abs/1601.07754" rel="nofollow noreferrer">this paper</a> however I'm a little new to machine learning and I'm stuck on the distance ve...
habedi/stack-exchange-dataset
71,816
Please review my sketch of the Machine Learning process
<p>It's amazingly difficult to find an outline of the end-to-end machine learning process. As a total beginner, this lack of information is frustrating, so I decided to try scraping together my own process by looking at a lot of tutorials that all do it a slightly different way. </p>&#xA;&#xA;<p>I would like to have a ...
machine learning data cleaning preprocessing data imputation
1
Please review my sketch of the Machine Learning process -- (machine learning data cleaning preprocessing data imputation) <p>It's amazingly difficult to find an outline of the end-to-end machine learning process. As a total beginner, this lack of information is frustrating, so I decided to try scraping together my own ...
habedi/stack-exchange-dataset
71,818
Relative feature importance w.r.t hyperparameters
<p>Could changing the hyperparameters of a model change <strong><em>relative</em></strong> feature importance?</p>&#xA;
feature selection feature engineering
1
Relative feature importance w.r.t hyperparameters -- (feature selection feature engineering) <p>Could changing the hyperparameters of a model change <strong><em>relative</em></strong> feature importance?</p>&#xA;
habedi/stack-exchange-dataset
71,823
Optimising for Brier objective function directly gives worse Brier score than optimising with custom objective - what does it tell me?
<p>I am training an XGBoost model and as I care the most about resulting probabilities, not classification itself I have chosen Brier score as a metric for my model, so that probabilities would be well calibrated. I tuned my hyperparameters using <code>GridSearchCV</code> and <code>brier_score_loss</code> as a metric. ...
xgboost machine learning model optimization objective function
1
Optimising for Brier objective function directly gives worse Brier score than optimising with custom objective - what does it tell me? -- (xgboost machine learning model optimization objective function) <p>I am training an XGBoost model and as I care the most about resulting probabilities, not classification itself I h...
habedi/stack-exchange-dataset
71,833
scikit-learn RandomForestClassifier always hits 100% test accuracy
<p>I have been playing with a toy problem to compare the performance and behavior of several scikit-learn classifiers.</p>&#xA;&#xA;<p>Brief, I have one continuous variable X (which contains two samples of size N, each drawn from a distinct normal distributions) and a corresponding label y (either 0 or 1).</p>&#xA;&#xA...
scikit learn random forest accuracy
1
scikit-learn RandomForestClassifier always hits 100% test accuracy -- (scikit learn random forest accuracy) <p>I have been playing with a toy problem to compare the performance and behavior of several scikit-learn classifiers.</p>&#xA;&#xA;<p>Brief, I have one continuous variable X (which contains two samples of size N...
habedi/stack-exchange-dataset
71,839
extract classifier properties from pickled file
<p>I have <code>*.clf</code> file which I get from <code>fit()</code> of <code>sklearn</code>. I fit my data with <code>SVM</code> or <code>KNN</code> and want to show its properties when using it for predictions. For example I open earlier pickled classifier file and when I print it I get something like this:</p>&#xA;...
classification scikit learn pickle
1
extract classifier properties from pickled file -- (classification scikit learn pickle) <p>I have <code>*.clf</code> file which I get from <code>fit()</code> of <code>sklearn</code>. I fit my data with <code>SVM</code> or <code>KNN</code> and want to show its properties when using it for predictions. For example I open...
habedi/stack-exchange-dataset
71,843
Gradient for starting Backpropagation
<p>I was reading this nice tutorial about Pytorch's basics:</p>&#xA;&#xA;<p><a href="https://pytorch.org/tutorials/beginner/pytorch_with_examples.html" rel="nofollow noreferrer">https://pytorch.org/tutorials/beginner/pytorch_with_examples.html</a></p>&#xA;&#xA;<p>In the first example (pure Numpy), the author starts the...
neural network deep learning gradient descent backpropagation theory
1
Gradient for starting Backpropagation -- (neural network deep learning gradient descent backpropagation theory) <p>I was reading this nice tutorial about Pytorch's basics:</p>&#xA;&#xA;<p><a href="https://pytorch.org/tutorials/beginner/pytorch_with_examples.html" rel="nofollow noreferrer">https://pytorch.org/tutorials/...
habedi/stack-exchange-dataset
71,846
value of fit_generator parameters
<p>I am doing simple CNN based binary image classification on classifying types of waste as organic and recyclable using image augmentation. How ever I have a doubt.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/bMsx4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bMsx4.png" alt="First part of ...
python keras tensorflow cnn
1
value of fit_generator parameters -- (python keras tensorflow cnn) <p>I am doing simple CNN based binary image classification on classifying types of waste as organic and recyclable using image augmentation. How ever I have a doubt.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/bMsx4.png" rel="nofollow noreferrer"...
habedi/stack-exchange-dataset
71,850
Best approach to find optimal solution to linear equation by group in R
<p>I am currently modeling a pricing and discount system in R.</p>&#xA;&#xA;<p>My data frame looks as follows:</p>&#xA;&#xA;<pre class="lang-r prettyprint-override"><code>df = structure(&#xA; list(&#xA; Customers = structure(&#xA; c(1L, 1L, 1L, 2L, 2L, 2L),&#xA; .Label = c("A", "B"),&#xA; class = "fa...
r optimization
1
Best approach to find optimal solution to linear equation by group in R -- (r optimization) <p>I am currently modeling a pricing and discount system in R.</p>&#xA;&#xA;<p>My data frame looks as follows:</p>&#xA;&#xA;<pre class="lang-r prettyprint-override"><code>df = structure(&#xA; list(&#xA; Customers = structure...
habedi/stack-exchange-dataset
71,869
tensorboard showing the epoch loss and accuracy for validation data but not training data
<p>I am doing binary classification using CNN and viewing the results using tensorboard. The problem is that the tensorboard is not showing the loss and accuracy for training data.</p>&#xA;<p><a href="https://i.stack.imgur.com/w5Tbb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/w5Tbb.png" alt="This...
classification keras tensorflow cnn
1
tensorboard showing the epoch loss and accuracy for validation data but not training data -- (classification keras tensorflow cnn) <p>I am doing binary classification using CNN and viewing the results using tensorboard. The problem is that the tensorboard is not showing the loss and accuracy for training data.</p>&#xA;...
habedi/stack-exchange-dataset
71,870
Why do decision trees have low accuracy?
<p>It seems to be generally acknowledged that decision trees have low prediction accuracy. Is there a concise explanation for <em>why</em> they have low accuracy?</p>&#xA;&#xA;<p>I've read this so much, I've accepted it to be true, but I realize I don't have any intuition as to why it's true.</p>&#xA;&#xA;<p>As an exam...
decision trees machine learning model prediction accuracy esl
1
Why do decision trees have low accuracy? -- (decision trees machine learning model prediction accuracy esl) <p>It seems to be generally acknowledged that decision trees have low prediction accuracy. Is there a concise explanation for <em>why</em> they have low accuracy?</p>&#xA;&#xA;<p>I've read this so much, I've acce...
habedi/stack-exchange-dataset
71,873
Why is the curve for alternative hypothesis shifted compared to that of null hypothesis?
<p>In hypothesis testing the concept of type 1 and type 2 error is very important and very often we come across the graph shown below. I have trouble understanding why is the curve for alternative hypothesis shifted compared to the null hypothsis?&#xA;<a href="https://i.stack.imgur.com/3NO3M.png" rel="nofollow noreferr...
statistics
1
Why is the curve for alternative hypothesis shifted compared to that of null hypothesis? -- (statistics) <p>In hypothesis testing the concept of type 1 and type 2 error is very important and very often we come across the graph shown below. I have trouble understanding why is the curve for alternative hypothesis shifted...
habedi/stack-exchange-dataset
71,900
What is the origin of YOLO/darknet coordinates
<p>I am aware of that darknet/yolov3 outputs relative coordinates, would the coordinate (0,0) be at the bottom left, or at the top left?</p>&#xA;&#xA;<p>I am confused as opencv2 seems to have the <code>y=0</code> at the top of the image as is usual when working with matrices. Yet mathematicaly and intuitively (for me a...
image classification computer vision image recognition opencv yolo
1
What is the origin of YOLO/darknet coordinates -- (image classification computer vision image recognition opencv yolo) <p>I am aware of that darknet/yolov3 outputs relative coordinates, would the coordinate (0,0) be at the bottom left, or at the top left?</p>&#xA;&#xA;<p>I am confused as opencv2 seems to have the <code...
habedi/stack-exchange-dataset
71,908
GAN Loss Function Notation Clarification
<p>In the Generative Adversarial Network loss function, what do these mean?: <span class="math-container">$E_{x~p_{data}(x)}$</span> and <span class="math-container">$E_{z~p_{z}(z)}$</span> and how are they used in this context?</p>&#xA;
gan
1
GAN Loss Function Notation Clarification -- (gan) <p>In the Generative Adversarial Network loss function, what do these mean?: <span class="math-container">$E_{x~p_{data}(x)}$</span> and <span class="math-container">$E_{z~p_{z}(z)}$</span> and how are they used in this context?</p>&#xA;
habedi/stack-exchange-dataset
71,929
Not Access to Confusion Matrix in SVM.SVC.score Scikit-learn Python
<p>I used SVM.SVC function to classify. But when I wanted to calculate the weighted and unweighted average accuracy I couldn't access the confusion matrix. Because of svm.SVC.score only provides a classifier accuracy percentage. How can I calculate WAR and UAR?</p>&#xA;&#xA;<p>you can find part of my script below :</p>...
python classification scikit learn svm pca
1
Not Access to Confusion Matrix in SVM.SVC.score Scikit-learn Python -- (python classification scikit learn svm pca) <p>I used SVM.SVC function to classify. But when I wanted to calculate the weighted and unweighted average accuracy I couldn't access the confusion matrix. Because of svm.SVC.score only provides a classif...
habedi/stack-exchange-dataset
71,932
Multivariate Polynomial Feature generation
<p>I don't quite seem to understand the rules used to create the polynomial features when trying to find a polynomial model with Linear Regression in the multivariate setting. </p>&#xA;&#xA;<p>Let's say I have a two predictor variables <code>a</code> and <code>b</code>. When generating polynomial features (for example ...
linear regression
1
Multivariate Polynomial Feature generation -- (linear regression) <p>I don't quite seem to understand the rules used to create the polynomial features when trying to find a polynomial model with Linear Regression in the multivariate setting. </p>&#xA;&#xA;<p>Let's say I have a two predictor variables <code>a</code> and...
habedi/stack-exchange-dataset
71,949
find the difference between two columns in specific rows
<p>I have the following columns from one data frame</p>&#xA;&#xA;<pre><code> 0 1585742136995 &#xA; 1 1585742137014&#xA; 2 1585742137035&#xA; 3 1585742137058&#xA; 4 1585742137080&#xA; ... &#xA; 177809 1585570661653&#xA; 177810 1585570661675&#xA; 177811 1585...
python pandas dataframe
1
find the difference between two columns in specific rows -- (python pandas dataframe) <p>I have the following columns from one data frame</p>&#xA;&#xA;<pre><code> 0 1585742136995 &#xA; 1 1585742137014&#xA; 2 1585742137035&#xA; 3 1585742137058&#xA; 4 1585742137080&#xA; ....
habedi/stack-exchange-dataset
71,987
XGBoost Objective is Changed
<p>I am trying to use XGBoost in python for logistic regression. I am calling it as follows</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>import numpy as np&#xA;from xgboost import XGBClassifier&#xA;&#xA;x_train = np.array([[1], [2], [3], [4]])&#xA;y_train = np.array([0, .25, .75, 1])&#xA;&#xA;params = {...
python logistic regression xgboost
1
XGBoost Objective is Changed -- (python logistic regression xgboost) <p>I am trying to use XGBoost in python for logistic regression. I am calling it as follows</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>import numpy as np&#xA;from xgboost import XGBClassifier&#xA;&#xA;x_train = np.array([[1], [2], [3...
habedi/stack-exchange-dataset
71,994
How to add column name
<p>I have a dataset in which some columns have header but the other ones don't have. Therefore, I want to add column name only to those who doesn't have column name. I know how to add column names using header but I would like to know how to do this using index so that I can add column names only to the empty ones. An...
python pandas jupyter
1
How to add column name -- (python pandas jupyter) <p>I have a dataset in which some columns have header but the other ones don't have. Therefore, I want to add column name only to those who doesn't have column name. I know how to add column names using header but I would like to know how to do this using index so that...
habedi/stack-exchange-dataset
72,008
Calculate correlation between two sensors regarding the time
<p>I am new in all this, so I am sorry if I am asking something stupid. &#xA;I have two-time series - the measurement of the value by two sensors every 5 min and I want to see are the measurements correlated in time (are the measurements similar). So far now I only found questions related to autocorrelation and classic...
python time series pandas correlation
1
Calculate correlation between two sensors regarding the time -- (python time series pandas correlation) <p>I am new in all this, so I am sorry if I am asking something stupid. &#xA;I have two-time series - the measurement of the value by two sensors every 5 min and I want to see are the measurements correlated in time ...
habedi/stack-exchange-dataset
72,031
What does a conservative technique mean in the context of neural networks?
<p>I am reading <a href="https://towardsdatascience.com/indepth-layer-wise-relevance-propagation-340f95deb1ea" rel="nofollow noreferrer">this</a> article on Layer-wise relevance propagation method and I can't understand this particular paragraph</p>&#xA;&#xA;<blockquote>&#xA; <p>LRP is a conservative technique, meanin...
deep learning backpropagation explainable ai
1
What does a conservative technique mean in the context of neural networks? -- (deep learning backpropagation explainable ai) <p>I am reading <a href="https://towardsdatascience.com/indepth-layer-wise-relevance-propagation-340f95deb1ea" rel="nofollow noreferrer">this</a> article on Layer-wise relevance propagation metho...
habedi/stack-exchange-dataset
72,068
How do I use matrix math in irregular neural networks such as those generated from neuroevolution (NEAT)?
<p>I understand how to structure the matrix when every node in a layer is fully connected to every node in adjacent layers and I understand that in "irregular" neural networks I can just process each node individually. However, there are no explanations or examples online of how to structure a matrix for an "irregular"...
machine learning neural network rnn genetic algorithms matrix
1
How do I use matrix math in irregular neural networks such as those generated from neuroevolution (NEAT)? -- (machine learning neural network rnn genetic algorithms matrix) <p>I understand how to structure the matrix when every node in a layer is fully connected to every node in adjacent layers and I understand that in...
habedi/stack-exchange-dataset
72,086
How to ignore vectors of zeros (i.e. paddings) in Keras?
<p>I'm implementing a <code>LSTM</code> model with Keras. My dataset is composed by words and each word is an 837 long vector. I grouped the words in groups of 20 and to do this I padded them: initially I had groups of words of variable length and the maximum group length that I found was 20, this is why I padded all g...
python keras time series lstm word embeddings
1
How to ignore vectors of zeros (i.e. paddings) in Keras? -- (python keras time series lstm word embeddings) <p>I'm implementing a <code>LSTM</code> model with Keras. My dataset is composed by words and each word is an 837 long vector. I grouped the words in groups of 20 and to do this I padded them: initially I had gro...
habedi/stack-exchange-dataset
72,098
How to classify/cluster clients of an application of transport like the Uber Model?
<p>I have a question about User segmentation &#xA;I have a data-set of rides of an application that works at the same model as Uber. &#xA;The attributes I have : Reservation it means the id of the Ride and statutCourse means the status of the ride cancelled or finished .....&#xA;the Id client and the entreprise is the ...
machine learning classification dataset clustering
1
How to classify/cluster clients of an application of transport like the Uber Model? -- (machine learning classification dataset clustering) <p>I have a question about User segmentation &#xA;I have a data-set of rides of an application that works at the same model as Uber. &#xA;The attributes I have : Reservation it mea...
habedi/stack-exchange-dataset
72,105
Predicting correct match of French to English food descriptions
<p>I have a training and test set of food descriptions pairs (please, see example below)&#xA;First name in a pair is a name of food in French &#xA;and second word is this food description in English.&#xA;Traing set has also a <code>trans</code> field that is True for correct descriptions &#xA;and False for wrong descri...
classification nlp word embeddings machine translation
1
Predicting correct match of French to English food descriptions -- (classification nlp word embeddings machine translation) <p>I have a training and test set of food descriptions pairs (please, see example below)&#xA;First name in a pair is a name of food in French &#xA;and second word is this food description in Engli...
habedi/stack-exchange-dataset
72,121
How can I handle a column with list data?
<p>I have a dataset which I processed and created six features:</p>&#xA;&#xA;<pre><code>['session_id', 'startTime', 'endTime', 'timeSpent', 'ProductList',&#xA; 'totalProducts']&#xA;</code></pre>&#xA;&#xA;<p>And the target variable is a binary class (gender).</p>&#xA;&#xA;<p>The feature 'productList' is a list:</p>&#x...
machine learning classification data data cleaning feature engineering
1
How can I handle a column with list data? -- (machine learning classification data data cleaning feature engineering) <p>I have a dataset which I processed and created six features:</p>&#xA;&#xA;<pre><code>['session_id', 'startTime', 'endTime', 'timeSpent', 'ProductList',&#xA; 'totalProducts']&#xA;</code></pre>&#xA;&...
habedi/stack-exchange-dataset
72,130
Dimensionality reduction and prediction when all columns have approximately same variance
<p>I have a dataset of 25 columns where the goal is to predict the value of the 25th column based on the previous 24 columns. </p>&#xA;&#xA;<p>The dataset is quite big that's why I initially thought to proceed with PCA before doing any prediction. The problem is that PCA did not produce any good results in the sense th...
python dataset predictive modeling random forest pca
1
Dimensionality reduction and prediction when all columns have approximately same variance -- (python dataset predictive modeling random forest pca) <p>I have a dataset of 25 columns where the goal is to predict the value of the 25th column based on the previous 24 columns. </p>&#xA;&#xA;<p>The dataset is quite big that...
habedi/stack-exchange-dataset
72,150
How should labeled data from multiple annotators be prepared for ML text classification?
<p>My specific question is how NLP data from multiple human annotators should be aggregated - though general advice related to the question title is appreciated. One critical step that I've seen in research is to assess inter-annotator agreement by Cohen's kappa or some other suitable metric; I've also found research r...
nlp dataset annotation
1
How should labeled data from multiple annotators be prepared for ML text classification? -- (nlp dataset annotation) <p>My specific question is how NLP data from multiple human annotators should be aggregated - though general advice related to the question title is appreciated. One critical step that I've seen in resea...
habedi/stack-exchange-dataset
72,171
Size Issue when Plotting the Predicted Vaue
<p>I wrote a simple Stock Prediction Algorithm and got the predicted value. Then, I wanted to plot the relation between Adjusted close price and predicted value, but got the <code>ValueError: x and y must be the same size</code>. I tried to reshape it, but no luck. I'm having problem with the last 5 lines of the follow...
python matplotlib
1
Size Issue when Plotting the Predicted Vaue -- (python matplotlib) <p>I wrote a simple Stock Prediction Algorithm and got the predicted value. Then, I wanted to plot the relation between Adjusted close price and predicted value, but got the <code>ValueError: x and y must be the same size</code>. I tried to reshape it, ...
habedi/stack-exchange-dataset
72,179
Understanding how many biases are there in a neural network?
<p>I am trying to understand biases in neural nets, but different websites show very different answers. </p>&#xA;&#xA;<p>For example, how many biases is there in a fully connected neural network with a single input layer with 5 units and a single output layer with 4 units? And what about a fully connected neural networ...
machine learning neural network deep learning
1
Understanding how many biases are there in a neural network? -- (machine learning neural network deep learning) <p>I am trying to understand biases in neural nets, but different websites show very different answers. </p>&#xA;&#xA;<p>For example, how many biases is there in a fully connected neural network with a single...
habedi/stack-exchange-dataset
72,185
How are weights organized in Conv2D layers?
<p>I trained a model using Keras from this <a href="https://keras.io/examples/mnist_cnn/" rel="nofollow noreferrer">example</a>. The model summary showed me this result </p>&#xA;&#xA;<pre><code> Model: "sequential_1"&#xA;_________________________________________________________________&#xA;Layer (type) ...
keras cnn
1
How are weights organized in Conv2D layers? -- (keras cnn) <p>I trained a model using Keras from this <a href="https://keras.io/examples/mnist_cnn/" rel="nofollow noreferrer">example</a>. The model summary showed me this result </p>&#xA;&#xA;<pre><code> Model: "sequential_1"&#xA;_____________________________________...
habedi/stack-exchange-dataset
72,199
How to measure the distance (in generalized sense) between geographical regions?
<p>I need to construct a <strong>distance matrix</strong> for a few U.S. counties that are adjacent to one or another, and choosing the <strong>definition of distance</strong> is very tricky. The <strong>shortest path</strong> (i.e the minimum number of times one has to cross county borders to walk from A to B) and <st...
dataset distance geospatial
1
How to measure the distance (in generalized sense) between geographical regions? -- (dataset distance geospatial) <p>I need to construct a <strong>distance matrix</strong> for a few U.S. counties that are adjacent to one or another, and choosing the <strong>definition of distance</strong> is very tricky. The <strong>sh...
habedi/stack-exchange-dataset
72,206
Not able to restore attention model properly
<p>I am referring <a href="https://www.tensorflow.org/tutorials/text/nmt_with_attention" rel="nofollow noreferrer">this</a> article on building an attention model using tensorflow.</p>&#xA;&#xA;<p>I am trying to train a similar model on my dataset using google colab. Due to the session limit of colab and my large datas...
keras tensorflow nlp
1
Not able to restore attention model properly -- (keras tensorflow nlp) <p>I am referring <a href="https://www.tensorflow.org/tutorials/text/nmt_with_attention" rel="nofollow noreferrer">this</a> article on building an attention model using tensorflow.</p>&#xA;&#xA;<p>I am trying to train a similar model on my dataset u...
habedi/stack-exchange-dataset
72,259
Random Forest Stacking Experiment for Imbalanced Data-set Problem
<p>In order to solve a Imbalanced Dataset Problem, I experimented with Random Forest in the given manner (Somewhat inspired by Deep-Learning)</p>&#xA;&#xA;<p>Trained a Random Forest which will take in the input data and the predict probability of the label of the trained model will be used as a input to train another ...
scikit learn random forest boosting bagging
1
Random Forest Stacking Experiment for Imbalanced Data-set Problem -- (scikit learn random forest boosting bagging) <p>In order to solve a Imbalanced Dataset Problem, I experimented with Random Forest in the given manner (Somewhat inspired by Deep-Learning)</p>&#xA;&#xA;<p>Trained a Random Forest which will take in the ...
habedi/stack-exchange-dataset
72,286
Pipeline heterogeneous data
<p>I'm facing an issue I don't know how to solve, but as I'm a beginner probably there is an easy solution I can't find.</p>&#xA;&#xA;<p>I'm playing with the titanic dataset and I want to work with pipelines (In order to avoid data leakage using cross validation). For that reason I'm using two pipelines (one for numer...
python pipelines
1
Pipeline heterogeneous data -- (python pipelines) <p>I'm facing an issue I don't know how to solve, but as I'm a beginner probably there is an easy solution I can't find.</p>&#xA;&#xA;<p>I'm playing with the titanic dataset and I want to work with pipelines (In order to avoid data leakage using cross validation). For ...
habedi/stack-exchange-dataset
72,289
Compare ratings of players over different leagues
<p>I want to compare ratings of players from different leagues and predict rating of player in a league he/she didnt participate in. Rating of a player is estimated within a league where he was playing.&#xA;There are some <em>cross-observations</em> which are players that have ratings estimated for more then one league...
ranking sports
1
Compare ratings of players over different leagues -- (ranking sports) <p>I want to compare ratings of players from different leagues and predict rating of player in a league he/she didnt participate in. Rating of a player is estimated within a league where he was playing.&#xA;There are some <em>cross-observations</em> ...
habedi/stack-exchange-dataset
72,315
How to apply .replace() inside a column in a pandas data frame to clean data
<p>I have a pandas data frame where I want to replace all the values that are not numeric in one column for "" </p>&#xA;&#xA;<p>The error I'm getting in my code is the following:</p>&#xA;&#xA;<pre><code>ValueError: could not convert string to float: '690,276.00'&#xA;</code></pre>&#xA;&#xA;<p>Since I'm trying to convert...
python pandas
1
How to apply .replace() inside a column in a pandas data frame to clean data -- (python pandas) <p>I have a pandas data frame where I want to replace all the values that are not numeric in one column for "" </p>&#xA;&#xA;<p>The error I'm getting in my code is the following:</p>&#xA;&#xA;<pre><code>ValueError: could not...
habedi/stack-exchange-dataset
72,362
Is it possible to apply PCA on different subsets independently?
<p>I need to apply PCA on a rather big set of data, but my machine is not able to handle the workload. So I was considering to split randomly my original set into 4 subsets, apply PCA independently on each subset and finally join the 4 subsets to have the original one with the PCA.</p>&#xA;&#xA;<p>For my understanding ...
pca
1
Is it possible to apply PCA on different subsets independently? -- (pca) <p>I need to apply PCA on a rather big set of data, but my machine is not able to handle the workload. So I was considering to split randomly my original set into 4 subsets, apply PCA independently on each subset and finally join the 4 subsets to ...
habedi/stack-exchange-dataset
72,399
Scale out to between 0 and 1 before computing loss fucnction in keras
<p>Is there a way to scale the output of a CNN before computing the loss function in keras. It would have to work for batches as well. Specifically I am training images and the output is a probability map of each pixels for the entire batch. Then I compute the loss function with the ground truth data. The problem is th...
deep learning keras cnn
1
Scale out to between 0 and 1 before computing loss fucnction in keras -- (deep learning keras cnn) <p>Is there a way to scale the output of a CNN before computing the loss function in keras. It would have to work for batches as well. Specifically I am training images and the output is a probability map of each pixels f...
habedi/stack-exchange-dataset
72,408
Remove all columns where the entire column is null
<p>I have a very dirty csv where there are several columns with only null values.</p>&#xA;&#xA;<p>I would like to remove them. I am trying to select all columns where the count of null values in the column is not equal to the number of rows.</p>&#xA;&#xA;<p><code>clean_df = bucketed_df.select([c for c in bucketed_df.co...
python data cleaning apache spark pyspark
1
Remove all columns where the entire column is null -- (python data cleaning apache spark pyspark) <p>I have a very dirty csv where there are several columns with only null values.</p>&#xA;&#xA;<p>I would like to remove them. I am trying to select all columns where the count of null values in the column is not equal to ...
habedi/stack-exchange-dataset
72,415
Numpy ndarray holding string with unknown data type
<p>I ran the following code in a jupyter notebook cell</p>&#xA;&#xA;<pre><code>ndarrs=np.array(["1.2","1.5","1.6"], dtype=np.string_)&#xA;&#xA;print(ndarrs.dtype)&#xA;</code></pre>&#xA;&#xA;<p>It returned <code>|S3</code> as shown below.</p>&#xA;&#xA;<p>Can someone help me understand the meaning of this symbol?</p>&#xA...
python numpy
1
Numpy ndarray holding string with unknown data type -- (python numpy) <p>I ran the following code in a jupyter notebook cell</p>&#xA;&#xA;<pre><code>ndarrs=np.array(["1.2","1.5","1.6"], dtype=np.string_)&#xA;&#xA;print(ndarrs.dtype)&#xA;</code></pre>&#xA;&#xA;<p>It returned <code>|S3</code> as shown below.</p>&#xA;&#xA...
habedi/stack-exchange-dataset
72,420
Can BERT be used for predicting words?
<p>I have a question regarding the pre-training section (in particular, the Masked Language Model).</p>&#xA;&#xA;<p>In the example <em>Let's stick to improvisation in this skit</em>, by masking the word <em>improvisation</em>, after applying BERT (followed by the FFNN and Softmax), by looking at the probabilities of ea...
neural network deep learning bert transformer attention mechanism
1
Can BERT be used for predicting words? -- (neural network deep learning bert transformer attention mechanism) <p>I have a question regarding the pre-training section (in particular, the Masked Language Model).</p>&#xA;&#xA;<p>In the example <em>Let's stick to improvisation in this skit</em>, by masking the word <em>imp...
habedi/stack-exchange-dataset
72,422
What is the efficient way to use apply method in column of pandas Dataframe for large dataset?
<p>I have a dataset of approximate 1 hundred thousand records. I want to use apply method in each of the records for further data processing but it takes very long time to process (As apply method works linearly).&#xA;I have tried this in Google Colab by selecting GPU settings but still it is very slow. I also try "swi...
pandas preprocessing dataframe colab
1
What is the efficient way to use apply method in column of pandas Dataframe for large dataset? -- (pandas preprocessing dataframe colab) <p>I have a dataset of approximate 1 hundred thousand records. I want to use apply method in each of the records for further data processing but it takes very long time to process (As...
habedi/stack-exchange-dataset
72,433
Which graphical tools can be used to display uni- or bivariate continuous data?
<p>There are 4 options to this multiple question, </p>&#xA;&#xA;<ul>&#xA;<li>Scatterplots</li>&#xA;<li>Conditional density plots </li>&#xA;<li>Histograms</li>&#xA;<li>Boxplots</li>&#xA;</ul>&#xA;&#xA;<p>I chose Scatterplots and Histograms but the answer is either wrong or not enough, I haven't seen anything about condi...
r visualization rstudio
1
Which graphical tools can be used to display uni- or bivariate continuous data? -- (r visualization rstudio) <p>There are 4 options to this multiple question, </p>&#xA;&#xA;<ul>&#xA;<li>Scatterplots</li>&#xA;<li>Conditional density plots </li>&#xA;<li>Histograms</li>&#xA;<li>Boxplots</li>&#xA;</ul>&#xA;&#xA;<p>I chose ...
habedi/stack-exchange-dataset
72,438
NLP algorithm: sentiment with specific guidelines
<p>So I have this situation, I have filtered a bunch of single independent sentences that I filtered because they contain the word X (in my case, X = "budget"). if the meaning of the sentence is "budget increases/goes up/etc" my result is 1 and, if not, 0. all sentences hold such meaning (the word budget is not used in...
nlp sentiment analysis
1
NLP algorithm: sentiment with specific guidelines -- (nlp sentiment analysis) <p>So I have this situation, I have filtered a bunch of single independent sentences that I filtered because they contain the word X (in my case, X = "budget"). if the meaning of the sentence is "budget increases/goes up/etc" my result is 1 a...
habedi/stack-exchange-dataset
72,439
Why is my LSTM, stateful network getting 0 accuracy
<p>I'm building a NN to predict stock prices but I'm getting an accuracy of 0, I really don't know what hyper parameters to play with anymore but it seems to always get this accuracy</p>&#xA;&#xA;<h1>Build LSTM model</h1>&#xA;&#xA;<pre><code>&#xA;model.add(LSTM(&#xA; 50, activation="tanh", recurrent_activation="sigm...
keras numpy python 3.x
1
Why is my LSTM, stateful network getting 0 accuracy -- (keras numpy python 3.x) <p>I'm building a NN to predict stock prices but I'm getting an accuracy of 0, I really don't know what hyper parameters to play with anymore but it seems to always get this accuracy</p>&#xA;&#xA;<h1>Build LSTM model</h1>&#xA;&#xA;<pre><cod...
habedi/stack-exchange-dataset
72,455
Partial autocorrelation and Autocorrelation difference
<p>I have been trying to understand better the PACF and ACF, but I'm literally struggling. </p>&#xA;&#xA;<p>Have been using a series of articles like:&#xA;<a href="https://machinelearningmastery.com/gentle-introduction-autocorrelation-partial-autocorrelation/" rel="nofollow noreferrer">https://machinelearningmastery.co...
time series correlation
1
Partial autocorrelation and Autocorrelation difference -- (time series correlation) <p>I have been trying to understand better the PACF and ACF, but I'm literally struggling. </p>&#xA;&#xA;<p>Have been using a series of articles like:&#xA;<a href="https://machinelearningmastery.com/gentle-introduction-autocorrelation-p...
habedi/stack-exchange-dataset