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 |
|---|---|---|---|---|---|---|
87,550 | How to determine if dataset is a suitable representation of the context? | <p>How can I determine if the data I have collected is a good enough representation of the context? For example, I am working on an object detection system and have been building an image dataset. How can I know if my dataset represents the task? For example, I need to account for instances where the object is close up... | dataset data | 1 | How to determine if dataset is a suitable representation of the context? -- (dataset data)
<p>How can I determine if the data I have collected is a good enough representation of the context? For example, I am working on an object detection system and have been building an image dataset. How can I know if my dataset rep... | habedi/stack-exchange-dataset |
87,559 | What will happen if almost constant values for features? | <p>In a problem of an epidemiology dataset, is it desirable to keep the features that have almost constant values?
For example, In case of the feature, type_of_residence Large for 97 percent and Small for 2.7 percent of subjects. Is it okay to keep this feature?</p>
<p>My target variable is outcome of patients ... | machine learning feature selection preprocessing | 1 | What will happen if almost constant values for features? -- (machine learning feature selection preprocessing)
<p>In a problem of an epidemiology dataset, is it desirable to keep the features that have almost constant values?
For example, In case of the feature, type_of_residence Large for 97 percent and Small for ... | habedi/stack-exchange-dataset |
87,571 | Is a BiLSTM layer required if we use BERT? | <p>I am new to Deep learning based NLP and I have a doubt -
I am trying to build a NER model and I found some journals where people are relying on BERT-BiLSTM-CRF model for it. As far as I know BERT is a language model that scans the contexts in both the directions and embeds words according to the context. Now my ... | lstm bert named entity recognition | 1 | Is a BiLSTM layer required if we use BERT? -- (lstm bert named entity recognition)
<p>I am new to Deep learning based NLP and I have a doubt -
I am trying to build a NER model and I found some journals where people are relying on BERT-BiLSTM-CRF model for it. As far as I know BERT is a language model that scans the... | habedi/stack-exchange-dataset |
87,587 | Microsoft custom vision vs Tensorflow model? | <p>I am planning to implement my own image classifier model using TensorFlow instead of a custom vision platform.</p>
<p>what is the biggest difference between custom vision(<a href="https://www.customvision.ai/" rel="nofollow noreferrer">https://www.customvision.ai/</a>) vs TensorFlow?</p>
 | tensorflow data data science model | 1 | Microsoft custom vision vs Tensorflow model? -- (tensorflow data data science model)
<p>I am planning to implement my own image classifier model using TensorFlow instead of a custom vision platform.</p>
<p>what is the biggest difference between custom vision(<a href="https://www.customvision.ai/" rel="nofollow nore... | habedi/stack-exchange-dataset |
87,596 | Getting prediction labels from TensorFlow 2 ImageGenerator | <p>I have created Image Generators that I used for training on labeled data. Now I want to make predictions on unlabeled data using the generators. I created a test generator as follows:</p>
<pre><code>test_generator = gen_test.flow_from_directory(
 test_path,
 ... | machine learning classification keras tensorflow image classification | 1 | Getting prediction labels from TensorFlow 2 ImageGenerator -- (machine learning classification keras tensorflow image classification)
<p>I have created Image Generators that I used for training on labeled data. Now I want to make predictions on unlabeled data using the generators. I created a test generator as follows:... | habedi/stack-exchange-dataset |
87,597 | NLP data cleaning and word tokenizing | <p>I am new to NLP and have a dataset that has a bunch of (social media) messages on which I would like to try some methods like latent Dirichlet allocation (LDA). First, I need to clean the data of things like punctuation, emojis, etc. I'm not sure how to go about doing this in the most efficient and accurate manner. ... | python nlp data cleaning | 1 | NLP data cleaning and word tokenizing -- (python nlp data cleaning)
<p>I am new to NLP and have a dataset that has a bunch of (social media) messages on which I would like to try some methods like latent Dirichlet allocation (LDA). First, I need to clean the data of things like punctuation, emojis, etc. I'm not sure ho... | habedi/stack-exchange-dataset |
87,600 | AttributeError: 'numpy.ndarray' object has no attribute 'nan_to_num' | <p>I'm trying to run a Random Forest model from <a href="https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html" rel="nofollow noreferrer">sklearn</a> but I keep getting an error: <code>ValueError: Input contains NaN, infinity or a value too large for dtype('float32').</code></p>... | python scikit learn pandas random forest numpy | 1 | AttributeError: 'numpy.ndarray' object has no attribute 'nan_to_num' -- (python scikit learn pandas random forest numpy)
<p>I'm trying to run a Random Forest model from <a href="https://scikit-learn.org/stable/modules/generated/sklearn.ensemble.RandomForestClassifier.html" rel="nofollow noreferrer">sklearn</a> but I ke... | habedi/stack-exchange-dataset |
87,601 | CNN inference is slow on Jetson Nano | <p>I'm running what I believe is a pretty lightweight CNN on an nVidia Jetson Nano with Jetpack 4.4.
<a href="https://developer.nvidia.com/embedded/jetson-nano-dl-inference-benchmarks" rel="nofollow noreferrer">nVidia claims the Nano can run a ResNet-50 at 36fps</a>, so I expected my much smaller network to run at ... | keras cnn performance | 1 | CNN inference is slow on Jetson Nano -- (keras cnn performance)
<p>I'm running what I believe is a pretty lightweight CNN on an nVidia Jetson Nano with Jetpack 4.4.
<a href="https://developer.nvidia.com/embedded/jetson-nano-dl-inference-benchmarks" rel="nofollow noreferrer">nVidia claims the Nano can run a ResNet-5... | habedi/stack-exchange-dataset |
87,605 | IterativeImputer - Returning -0 and other wierd results | <p>I am using <code>IterativeImputer</code> to impute my dataset.</p>
<pre><code>from sklearn.experimental import enable_iterative_imputer 
from sklearn.impute import IterativeImputer

imp = IterativeImputer(random_state=0, max_iter=100, verbose=10)
imp.fit(hosp)

hosp_imputed = pd.DataFram... | machine learning scikit learn data cleaning | 1 | IterativeImputer - Returning -0 and other wierd results -- (machine learning scikit learn data cleaning)
<p>I am using <code>IterativeImputer</code> to impute my dataset.</p>
<pre><code>from sklearn.experimental import enable_iterative_imputer 
from sklearn.impute import IterativeImputer

imp = Iterati... | habedi/stack-exchange-dataset |
87,606 | What is the number of neurons for the input layer of the BERT? | <p>I think it is the vocab size. However I am not sure and I appreciate your help.</p>
 | bert transformer | 1 | What is the number of neurons for the input layer of the BERT? -- (bert transformer)
<p>I think it is the vocab size. However I am not sure and I appreciate your help.</p>
 | habedi/stack-exchange-dataset |
87,617 | Calculate the similarity between pairs of time series data | <p>I have 5 pieces of time series data. It is the weekly sales of 5 different stores (A,B,C,D,E). There are no missing values. A quick visual inspection shows that these 5 pieces of time series data have similar trend & seasonality.</p>
<p>I would like to calculate/quantify how similar Store B,C,D,E is to Store... | time series similarity cosine distance dynamic time warping | 1 | Calculate the similarity between pairs of time series data -- (time series similarity cosine distance dynamic time warping)
<p>I have 5 pieces of time series data. It is the weekly sales of 5 different stores (A,B,C,D,E). There are no missing values. A quick visual inspection shows that these 5 pieces of time series da... | habedi/stack-exchange-dataset |
87,626 | Xgboost : A variable specific Feature importance | <p>I have a data set something like this:</p>
<pre><code>data = [['Alex',10,13,1,0],['Bob',11,14,12,0],['Clarke',13,15,13,1],['bob',12,15,1,1]]
df = pd.DataFrame(data,columns = ["dealer","x","y","z","loss"])
</code></pre>
<p>I am trying to predict binary... | machine learning python classification xgboost features | 1 | Xgboost : A variable specific Feature importance -- (machine learning python classification xgboost features)
<p>I have a data set something like this:</p>
<pre><code>data = [['Alex',10,13,1,0],['Bob',11,14,12,0],['Clarke',13,15,13,1],['bob',12,15,1,1]]
df = pd.DataFrame(data,columns = ["dealer","... | habedi/stack-exchange-dataset |
87,630 | PyTorch: LSTM for time-series failing to learn | <p>I'm currently working on building an LSTM network to forecast time-series data using PyTorch. I tried to share all the code pieces that I thought would be helpful, but please feel free to let me know if there's anything further I can provide. I added some comments at the end of the post regarding what the underlying... | python deep learning time series lstm pytorch | 1 | PyTorch: LSTM for time-series failing to learn -- (python deep learning time series lstm pytorch)
<p>I'm currently working on building an LSTM network to forecast time-series data using PyTorch. I tried to share all the code pieces that I thought would be helpful, but please feel free to let me know if there's anything... | habedi/stack-exchange-dataset |
87,637 | What is the difference between GPT blocks and BERT blocks | <p>Nowadays many applications only use the Encoder and Decoder part of the Transformer respectively. I am having trouble understanding the difference though.</p>
<p>If GPT uses Decoder only and BERT uses Encoder only does this mean that the only difference between the two is basically in the masking part?</p>
<... | bert transformer openai gpt | 1 | What is the difference between GPT blocks and BERT blocks -- (bert transformer openai gpt)
<p>Nowadays many applications only use the Encoder and Decoder part of the Transformer respectively. I am having trouble understanding the difference though.</p>
<p>If GPT uses Decoder only and BERT uses Encoder only does thi... | habedi/stack-exchange-dataset |
87,657 | How to replace values in a numpy array? | <p>I'm learning how to implement and evaluate a Logistic Regression Model, for this I need to change the values of my array from strings to 0 & 1.</p>
<p>I have the following numpy ndarray as a result of a <code>DataFrame.values</code> call
<code>['PAIDOFF', 'COLLECTION', 'COLLECTION', 'PAIDOFF', 'PAIDOFF',... | python numpy | 1 | How to replace values in a numpy array? -- (python numpy)
<p>I'm learning how to implement and evaluate a Logistic Regression Model, for this I need to change the values of my array from strings to 0 & 1.</p>
<p>I have the following numpy ndarray as a result of a <code>DataFrame.values</code> call
<code>['P... | habedi/stack-exchange-dataset |
87,662 | Why does BERT embedding increase the number of tokens? | <p>I am new to DataScience and trying to implement BERT embedding for one of my problems. But I am having one doubt here.
I am trying to embed the following sentence with BERT - "Twinkle twinkle little star".
BERT tokenizer generates the following tokens - ['twin', '##kle', 'twin', '##kle', 'little', ... | nlp pytorch bert | 1 | Why does BERT embedding increase the number of tokens? -- (nlp pytorch bert)
<p>I am new to DataScience and trying to implement BERT embedding for one of my problems. But I am having one doubt here.
I am trying to embed the following sentence with BERT - "Twinkle twinkle little star".
BERT tokenizer g... | habedi/stack-exchange-dataset |
87,674 | What are the differences between MLP and DNN? | <p>So I have been reading about the topic for a while, but i did not find a clear answer why MLP and DNN are being used interchangeably even though there are some differences between them.</p>
<p>So far I have filtered some informations:</p>
<p>"The field of artificial neural networks is often just called ... | mlp deep learning | 1 | What are the differences between MLP and DNN? -- (mlp deep learning)
<p>So I have been reading about the topic for a while, but i did not find a clear answer why MLP and DNN are being used interchangeably even though there are some differences between them.</p>
<p>So far I have filtered some informations:</p>
<... | habedi/stack-exchange-dataset |
87,675 | Variance of product of a matrix and vector using Python | <p>I am trying to calculate the variance of the product of matrix A and vector b. As it was mathematically discussed on another post <a href="https://math.stackexchange.com/questions/2365166/what-is-the-variance-of-a-constant-matrix-times-a-random-vector">https://math.stackexchange.com/questions/2365166/what-is-the-var... | python | 1 | Variance of product of a matrix and vector using Python -- (python)
<p>I am trying to calculate the variance of the product of matrix A and vector b. As it was mathematically discussed on another post <a href="https://math.stackexchange.com/questions/2365166/what-is-the-variance-of-a-constant-matrix-times-a-random-vect... | habedi/stack-exchange-dataset |
87,691 | GridSearchCV with custom tune grid | <p>What is the best way to perform custom parameter search CV with the Scikit-learn API? I really like GridSearchCV. However for my case the <code>param_grid</code> parameter is inflexible because it will search over the entire span of parameter combinations. Ideally, I would like to provide my own parameter space in ... | scikit learn hyperparameter tuning grid search gridsearchcv | 1 | GridSearchCV with custom tune grid -- (scikit learn hyperparameter tuning grid search gridsearchcv)
<p>What is the best way to perform custom parameter search CV with the Scikit-learn API? I really like GridSearchCV. However for my case the <code>param_grid</code> parameter is inflexible because it will search over th... | habedi/stack-exchange-dataset |
87,692 | What is the name of this visualization with a circle and internal arcs? | <p>I came across this visualization where there is a circle with data points on the circle and internal lines (arcs or edges) between the points on the circle. What is the name of this type of visualization?</p>
<p><a href="https://i.stack.imgur.com/gbqW1.png" rel="nofollow noreferrer"><img src="https://i.stack.img... | visualization | 1 | What is the name of this visualization with a circle and internal arcs? -- (visualization)
<p>I came across this visualization where there is a circle with data points on the circle and internal lines (arcs or edges) between the points on the circle. What is the name of this type of visualization?</p>
<p><a href="h... | habedi/stack-exchange-dataset |
87,703 | Optimizing regression weights for NN outputs with PyTorch | <p>So I'm basically trying to fit a regression on the relation of the input and output of a neural network model. Then the idea is, that these estimated regression weights should be optimized to some specific target value (let's say matrix of ones). So the weights are optimized, but have a direct relation to the neural... | python neural network pytorch optimization | 1 | Optimizing regression weights for NN outputs with PyTorch -- (python neural network pytorch optimization)
<p>So I'm basically trying to fit a regression on the relation of the input and output of a neural network model. Then the idea is, that these estimated regression weights should be optimized to some specific targe... | habedi/stack-exchange-dataset |
87,739 | How to convert input numpy data to tensorflow tf.data to train model in tensorfow? | <p>I am working on an image classification problem using TensorFlow. I have converted my input image dataset and label into NumPy data but it takes more time and more ram to load all the data into memory because I have 90K images. I would like to use TensorFlow data API using <a href="https://www.tensorflow.org/api_doc... | deep learning keras tensorflow image classification data science model | 1 | How to convert input numpy data to tensorflow tf.data to train model in tensorfow? -- (deep learning keras tensorflow image classification data science model)
<p>I am working on an image classification problem using TensorFlow. I have converted my input image dataset and label into NumPy data but it takes more time and... | habedi/stack-exchange-dataset |
87,748 | How to apply Normalisation using the MinMaxScaler() to all Columns, but Exclude the Categorical? | <p>Below, I have the following datatset:</p>
<p><code>sample_df.head(2)</code></p>
<pre><code>ID S_LENGTH S_WIDTH P_LENGTH P_WIDTH SPECIES
-------------------------------------------------------------------
1 3.5 2.5 5.6 1.7 VIRGINICA
2 ... | machine learning python scikit learn pandas machine learning model | 1 | How to apply Normalisation using the MinMaxScaler() to all Columns, but Exclude the Categorical? -- (machine learning python scikit learn pandas machine learning model)
<p>Below, I have the following datatset:</p>
<p><code>sample_df.head(2)</code></p>
<pre><code>ID S_LENGTH S_WIDTH P_LENGTH P_WI... | habedi/stack-exchange-dataset |
87,756 | How to add a column for descending row numbers into dataset in R | <p>I am new to R and would like to insert a new column that numbers the row to a large dataset.</p>
<p>I have no idea how to use <code>'mutate()'</code> to insert this. Would appreciate any help.</p>
<p>Thanks.</p>
 | r dataset dplyr | 1 | How to add a column for descending row numbers into dataset in R -- (r dataset dplyr)
<p>I am new to R and would like to insert a new column that numbers the row to a large dataset.</p>
<p>I have no idea how to use <code>'mutate()'</code> to insert this. Would appreciate any help.</p>
<p>Thanks.</p>
 | habedi/stack-exchange-dataset |
87,760 | Is the output size of the last layer of a standard fully connected neural network the same as the input size? | <p>Let's say I have a neural net with Dense layers. The input layer has 3 neurons, the single hidden layer has 5 neurons, and the final output layer has 2 neurons.</p>
<p>For layer 1, 3 inputs go in and 5 inputs go out. For layer 2, the 5 inputs from layer 1 go in and 2 inputs go out. So for layer 3, would 2 inputs... | deep learning | 1 | Is the output size of the last layer of a standard fully connected neural network the same as the input size? -- (deep learning)
<p>Let's say I have a neural net with Dense layers. The input layer has 3 neurons, the single hidden layer has 5 neurons, and the final output layer has 2 neurons.</p>
<p>For layer 1, 3 i... | habedi/stack-exchange-dataset |
87,773 | Tuning the model parameters vs the parameter of optimizer for Deep Neural Networks? | <p>I understand that there are rarely general recipes in field of machine learning and the many results can be achieved only by trial and error, and are task specific as well.</p>
<p>My question is, if the model doesn't give a desired quality, but one may expect, that the model of this or similar architecture can a... | deep learning optimization | 1 | Tuning the model parameters vs the parameter of optimizer for Deep Neural Networks? -- (deep learning optimization)
<p>I understand that there are rarely general recipes in field of machine learning and the many results can be achieved only by trial and error, and are task specific as well.</p>
<p>My question is, i... | habedi/stack-exchange-dataset |
87,783 | How to detect misclasification data after multiclass classification? | <p>I have trained a neural network multi-class classification model with around 150 classes having around 85% accuracy. Once the model is trained and deployed, it's predicting on new data and I am saving the logs. Now I have to detect those data-points which is wrongly predicted by the model.
For example, The model... | machine learning deep learning tensorflow | 1 | How to detect misclasification data after multiclass classification? -- (machine learning deep learning tensorflow)
<p>I have trained a neural network multi-class classification model with around 150 classes having around 85% accuracy. Once the model is trained and deployed, it's predicting on new data and I am saving ... | habedi/stack-exchange-dataset |
87,791 | "Object" Detection in Textual Data | <p>I have a task where the input is a parsed document (i.e., full text in 1 string or tokens) and I need to classify parts of the text into say 5 classes (i.e., 5 tokens from the entire text are labeled into 5 different classes).</p>
<p>Example:</p>
<p>Document #1: "... cat ..." (the token "cat&q... | nlp object detection document understanding | 1 | "Object" Detection in Textual Data -- (nlp object detection document understanding)
<p>I have a task where the input is a parsed document (i.e., full text in 1 string or tokens) and I need to classify parts of the text into say 5 classes (i.e., 5 tokens from the entire text are labeled into 5 different classes).</p>&#x... | habedi/stack-exchange-dataset |
87,792 | How do I calculate distance of test data point from centroids in KMeans scikit-learn? | <p>I am using Kmeans clustering on my data
After training the model, I want to calculate the distance between Test Data points and CLuster centers.</p>
<p>How do I do it?</p>
<pre><code>My code is like below:


model = KMeans(clusters=2, random_state=42)

model.fit(X_train)

# ge... | python scikit learn k means | 1 | How do I calculate distance of test data point from centroids in KMeans scikit-learn? -- (python scikit learn k means)
<p>I am using Kmeans clustering on my data
After training the model, I want to calculate the distance between Test Data points and CLuster centers.</p>
<p>How do I do it?</p>
<pre><code>My ... | habedi/stack-exchange-dataset |
87,793 | Converting paragraphs into sentences | <p>I'm looking for ways to extract sentences from paragraphs of text containing different types of punctuations and all. I used <code>SpaCy</code>'s <code>Sentencizer</code> to begin with.</p>
<p>Sample input python list <code>abstracts</code>:</p>
<pre><code>["A total of 2337 articles were found, and, acc... | nlp spacy tokenization information extraction | 1 | Converting paragraphs into sentences -- (nlp spacy tokenization information extraction)
<p>I'm looking for ways to extract sentences from paragraphs of text containing different types of punctuations and all. I used <code>SpaCy</code>'s <code>Sentencizer</code> to begin with.</p>
<p>Sample input python list <code>a... | habedi/stack-exchange-dataset |
87,805 | ML/NN as Function Evaluator for further Optimization (maximization) - Practical Example | <p>I am working on a production optimization problem; a very similar idea to what is described by Vegard Flovik <a href="https://towardsdatascience.com/machine-learning-for-production-optimization-e460a0b82237" rel="nofollow noreferrer"><strong>How to use machine learning for production optimization</strong></a>. The f... | machine learning python neural network optimization | 1 | ML/NN as Function Evaluator for further Optimization (maximization) - Practical Example -- (machine learning python neural network optimization)
<p>I am working on a production optimization problem; a very similar idea to what is described by Vegard Flovik <a href="https://towardsdatascience.com/machine-learning-for-pr... | habedi/stack-exchange-dataset |
87,806 | Error when trying .transform for OrdinalEncoder from Scikit Learn | <p>I'm having a lot of issues using scikit learn recently and was hoping someone could help me with my problem. I can use other methods to ordinal encode but i want to figure this one out.</p>
<pre><code>for i in range(len(ordinal_orders)):
 ord_en = OrdinalEncoder(categories = {0:ordinal_orders[i]})
 X... | python scikit learn pandas preprocessing | 1 | Error when trying .transform for OrdinalEncoder from Scikit Learn -- (python scikit learn pandas preprocessing)
<p>I'm having a lot of issues using scikit learn recently and was hoping someone could help me with my problem. I can use other methods to ordinal encode but i want to figure this one out.</p>
<pre><code>... | habedi/stack-exchange-dataset |
87,808 | What is the difference between cache() vs prefetch() in tensorflow? | <p>I have gone through the TensorFlow documentation.</p>
<p>What is the difference between <code>cache()</code> vs <code>prefetch()</code> in TensorFlow?</p>
<p>When should I use the <code>cache()</code> function and when should I use the <code>prefetch()</code> function?</p>
 | deep learning tensorflow data science model | 1 | What is the difference between cache() vs prefetch() in tensorflow? -- (deep learning tensorflow data science model)
<p>I have gone through the TensorFlow documentation.</p>
<p>What is the difference between <code>cache()</code> vs <code>prefetch()</code> in TensorFlow?</p>
<p>When should I use the <code>cache(... | habedi/stack-exchange-dataset |
87,812 | Problem reading python code | <p>Can someone explain the following python code.</p>
<pre><code>value_geojson["features"][0]["properties"]["title"]
</code></pre>
<p>value_geojson is a geojson variable.
I like to think that I'm not a total python newbie but these are too many [] for me. I am a GeoJSON new... | python json | 1 | Problem reading python code -- (python json)
<p>Can someone explain the following python code.</p>
<pre><code>value_geojson["features"][0]["properties"]["title"]
</code></pre>
<p>value_geojson is a geojson variable.
I like to think that I'm not a total python newbie but the... | habedi/stack-exchange-dataset |
87,825 | How to determine whether a semantic concept is present in a string | <p>I need to find a way to detect if a large string contains a specific substring.</p>
<p>Imagine that I have a full contract page converted to string in my Python program. What I want to do is to say if a specific term (a smaller string than the whole page string) exists in the page converted to string. <strong>Th... | python text mining semantic similarity | 1 | How to determine whether a semantic concept is present in a string -- (python text mining semantic similarity)
<p>I need to find a way to detect if a large string contains a specific substring.</p>
<p>Imagine that I have a full contract page converted to string in my Python program. What I want to do is to say if a... | habedi/stack-exchange-dataset |
87,841 | What is the difference between trax vs tensorflow? | <p>What is the main difference between trax vs tensorflow?</p>
<p>both of them deep learning library and implemented by google team.</p>
<p><a href="https://github.com/google/trax" rel="noreferrer">https://github.com/google/trax</a></p>
<p><a href="https://github.com/tensorflow/tensorflow" rel="noreferrer">... | tensorflow data science model | 1 | What is the difference between trax vs tensorflow? -- (tensorflow data science model)
<p>What is the main difference between trax vs tensorflow?</p>
<p>both of them deep learning library and implemented by google team.</p>
<p><a href="https://github.com/google/trax" rel="noreferrer">https://github.com/google/tr... | habedi/stack-exchange-dataset |
87,849 | Is there a ready-made classifier to determine if webpage is an article or not? | <p>I am trying to solve a problem, where I have a set of URLs and I need to filter out only those that can be classified as an article (i.e. typically not include privacy policies, terms of usage, webpage for unsubscribing from a feed etc.).</p>
<p>Is there a trained classifier that can be used to filter these webp... | classification | 1 | Is there a ready-made classifier to determine if webpage is an article or not? -- (classification)
<p>I am trying to solve a problem, where I have a set of URLs and I need to filter out only those that can be classified as an article (i.e. typically not include privacy policies, terms of usage, webpage for unsubscribin... | habedi/stack-exchange-dataset |
87,851 | Will images modification get me a better machine learning model? | <p>Will images modification get me a better machine learning model?</p>
<p>I have the following scenario. Camera is fixed and does photos of a process. The process has a few states. Now I want to train a model given a photo to classify to which state, does the photo belong. I.e. what is the current state of the pro... | classification image classification machine learning model image .net | 1 | Will images modification get me a better machine learning model? -- (classification image classification machine learning model image .net)
<p>Will images modification get me a better machine learning model?</p>
<p>I have the following scenario. Camera is fixed and does photos of a process. The process has a few st... | habedi/stack-exchange-dataset |
87,853 | Trying to run a kaggle notebook | <p>I'm found an interesting <a href="https://www.kaggle.com/nphantawee/pump-sensor-data" rel="nofollow noreferrer">problem</a> on kaggle and more or less solved it with my limited knowledge of machine learning. I was curious how other people solved and checked the <a href="https://www.kaggle.com/artgor/simple-eda-and-m... | python kaggle | 1 | Trying to run a kaggle notebook -- (python kaggle)
<p>I'm found an interesting <a href="https://www.kaggle.com/nphantawee/pump-sensor-data" rel="nofollow noreferrer">problem</a> on kaggle and more or less solved it with my limited knowledge of machine learning. I was curious how other people solved and checked the <a h... | habedi/stack-exchange-dataset |
87,870 | Machine Learning for medical researchers | <p>My friend is a medical researcher and he want to use machine learning for prediction.</p>
<p>Is there any one who is not a computer science person and he learnt programming and machine learning in a very short time? And how?</p>
 | machine learning python deep learning data mining data science model | 1 | Machine Learning for medical researchers -- (machine learning python deep learning data mining data science model)
<p>My friend is a medical researcher and he want to use machine learning for prediction.</p>
<p>Is there any one who is not a computer science person and he learnt programming and machine learning in a... | habedi/stack-exchange-dataset |
87,874 | How to retrieve column names from applying a wrapper method in feature selection? | <p>This question probably has a simple answer to it, so I will get to the point...</p>
<p>How do I retrieve the names of the columns from applying a wrapper method in feature selection?</p>
<p>Code I have used:</p>
<pre><code>from mlxtend.feature_selection import SequentialFeatureSelector as SFS

X ... | machine learning python scikit learn feature selection | 1 | How to retrieve column names from applying a wrapper method in feature selection? -- (machine learning python scikit learn feature selection)
<p>This question probably has a simple answer to it, so I will get to the point...</p>
<p>How do I retrieve the names of the columns from applying a wrapper method in feature... | habedi/stack-exchange-dataset |
87,906 | Transformer model: Why are word embeddings scaled before adding positional encodings? | <p>While going over a <a href="https://www.tensorflow.org/tutorials/text/transformer" rel="noreferrer">Tensorflow tutorial for the Transformer model</a> I realized that their implementation of the Encoder layer (and the Decoder) scales word embeddings by sqrt of embedding dimension <strong>before</strong> adding positi... | tensorflow nlp transformer attention mechanism | 1 | Transformer model: Why are word embeddings scaled before adding positional encodings? -- (tensorflow nlp transformer attention mechanism)
<p>While going over a <a href="https://www.tensorflow.org/tutorials/text/transformer" rel="noreferrer">Tensorflow tutorial for the Transformer model</a> I realized that their impleme... | habedi/stack-exchange-dataset |
87,948 | The robustness of the Frobenius and L2,1 norms to the outlier | <p>I have a question about the properties of the Frobenius and L<span class="math-container">$_{2,1}$</span> norms. Why is the L<span class="math-container">$_{2,1}$</span> norm more robust to the outlier than the Frobenius norm?</p>
<p>PS: For a matrix <span class="math-container">$A\in\mathbb{R}^{n\times d}$</spa... | outlier | 1 | The robustness of the Frobenius and L2,1 norms to the outlier -- (outlier)
<p>I have a question about the properties of the Frobenius and L<span class="math-container">$_{2,1}$</span> norms. Why is the L<span class="math-container">$_{2,1}$</span> norm more robust to the outlier than the Frobenius norm?</p>
<p>PS: ... | habedi/stack-exchange-dataset |
87,951 | Flipping the labels in a classification problem | <p>Let us say A- we have a binary classifier with labels 1 as healthy and 0 as sick. The precision we got is 100% and the recall is 70%.</p>
<p>Now let us say B-we flip the labels where 0 is healthy and 1 as sick.</p>
<p>Are Precision and recall get flipped in their values if you flip the labels? So in the new... | machine learning classification binary | 1 | Flipping the labels in a classification problem -- (machine learning classification binary)
<p>Let us say A- we have a binary classifier with labels 1 as healthy and 0 as sick. The precision we got is 100% and the recall is 70%.</p>
<p>Now let us say B-we flip the labels where 0 is healthy and 1 as sick.</p>
<p... | habedi/stack-exchange-dataset |
87,974 | How to Connect Convolutional layer to Fully Connected layer in Pytorch while Implementing SRGAN | <p>I was implementing the SRGAN in PyTorch but while implementing the discriminator I was confused about how to add a fully connected layer of 1024 units after the final convolutional layer <a href="https://i.stack.imgur.com/hsgRq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hsgRq.png" alt="enter ... | python deep learning pytorch gan convolutional neural network | 1 | How to Connect Convolutional layer to Fully Connected layer in Pytorch while Implementing SRGAN -- (python deep learning pytorch gan convolutional neural network)
<p>I was implementing the SRGAN in PyTorch but while implementing the discriminator I was confused about how to add a fully connected layer of 1024 units aft... | habedi/stack-exchange-dataset |
87,983 | Selecting a boundary on a binary classifier to optimal precision and recall | <p>I have a logistic regression classifier that shows differing levels of performance for precision and recall at different probability boundaries as follows:</p>
<p><a href="https://i.stack.imgur.com/6KVfD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6KVfD.png" alt="enter image description he... | scikit learn logistic regression classifier | 1 | Selecting a boundary on a binary classifier to optimal precision and recall -- (scikit learn logistic regression classifier)
<p>I have a logistic regression classifier that shows differing levels of performance for precision and recall at different probability boundaries as follows:</p>
<p><a href="https://i.stack.... | habedi/stack-exchange-dataset |
88,002 | Get data from intermediate layers in a Pytorch model | <p>I was trying to implement SRGAN in PyTorch and I have to write a Content loss function that required me to fetch activations from intermediate layers for both the Generated Image & Original Image.<br/>
I'm using pretrained VGG-19 and according to the paper I need the ReLU activations<br/>
Can anybody gui... | deep learning cnn pytorch gan | 1 | Get data from intermediate layers in a Pytorch model -- (deep learning cnn pytorch gan)
<p>I was trying to implement SRGAN in PyTorch and I have to write a Content loss function that required me to fetch activations from intermediate layers for both the Generated Image & Original Image.<br/>
I'm using pretraine... | habedi/stack-exchange-dataset |
88,034 | How can I classify specific types of words in a document given I have the full text of the document and the labels | <p>I am working on a project that involves picking out specific kinds of objects from text. The documents I am going though are life sciences and biomedical in nature, and in these documents there are specific biomedical "objects" I want to pick out. The nature and variety of the text objects means I can't us... | machine learning classification nlp | 1 | How can I classify specific types of words in a document given I have the full text of the document and the labels -- (machine learning classification nlp)
<p>I am working on a project that involves picking out specific kinds of objects from text. The documents I am going though are life sciences and biomedical in natu... | habedi/stack-exchange-dataset |
88,043 | Finding cause and effect correlation in a dataset | <p>What methods might one use in order to find and analyze cause-and-effect in a dataset? An example might be something like plotting this:</p>
<pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot as plt
import numpy as np

n1 = np.array([100, 100, 150, 150, 150, 100, 100, 100, 100])... | python correlation | 1 | Finding cause and effect correlation in a dataset -- (python correlation)
<p>What methods might one use in order to find and analyze cause-and-effect in a dataset? An example might be something like plotting this:</p>
<pre class="lang-py prettyprint-override"><code>import matplotlib.pyplot as plt
import numpy a... | habedi/stack-exchange-dataset |
88,044 | Neural Network Optimization steps order | <p>I have a very basic question on the optimization algotithm, when I'm adjusting weights and biases in a NN, should I:</p>
<ol>
<li>Forward propagate and backpropagate to calculate gradient descent (DC) for each batch once and then repeat for <code>iterations_number</code> times.</li>
</ol>
<p>or</p>&#... | neural network deep learning gradient descent mini batch gradient descent | 1 | Neural Network Optimization steps order -- (neural network deep learning gradient descent mini batch gradient descent)
<p>I have a very basic question on the optimization algotithm, when I'm adjusting weights and biases in a NN, should I:</p>
<ol>
<li>Forward propagate and backpropagate to calculate gradient de... | habedi/stack-exchange-dataset |
88,058 | Is it mandatory to change the dtype='object' to 'category' before label encoding | <p>I have seen some people change the datatype(from object to category) of the feature they want to encode.</p>
 | scikit learn python 3.x | 1 | Is it mandatory to change the dtype='object' to 'category' before label encoding -- (scikit learn python 3.x)
<p>I have seen some people change the datatype(from object to category) of the feature they want to encode.</p>
 | habedi/stack-exchange-dataset |
88,061 | Why a sign of gradient (plus or minus) is not enough for finding a steepest ascend? | <p>Consider a simple 1-D function <span class="math-container">$y = x^2$</span> to find a maximum with the gradient ascent method.</p>
<p>If we start in point 3 on <code>x</code>-axis:
<span class="math-container">$$ \frac{\partial f}{\partial x} \biggr\rvert_{x=3} = 2x \biggr\rvert_{x=3} = 6 $$</span></p>&#x... | gradient descent learning rate gradient | 1 | Why a sign of gradient (plus or minus) is not enough for finding a steepest ascend? -- (gradient descent learning rate gradient)
<p>Consider a simple 1-D function <span class="math-container">$y = x^2$</span> to find a maximum with the gradient ascent method.</p>
<p>If we start in point 3 on <code>x</code>-axis:&#x... | habedi/stack-exchange-dataset |
88,067 | Representing the architecture of a deep CNN | <p>Suppose I am feeding a <span class="math-container">$60\times60$</span> RGB image as the input to deep CNN with the first layer created using the following Keras code <code>model.add(Conv2D(64, (3, 3), input_shape=(60, 60, 3)))</code>.</p>
<ol>
<li>Will 64 filters be created for each channel (red, green and ... | machine learning deep learning cnn | 1 | Representing the architecture of a deep CNN -- (machine learning deep learning cnn)
<p>Suppose I am feeding a <span class="math-container">$60\times60$</span> RGB image as the input to deep CNN with the first layer created using the following Keras code <code>model.add(Conv2D(64, (3, 3), input_shape=(60, 60, 3)))</code... | habedi/stack-exchange-dataset |
88,068 | Can a trained recognition model be used to generate a sample? | <p>Suppose we have trained a cat classification network. It takes in an image (as a vector) x and returns <span class="math-container">$\hat{y}\in(0,1)$</span>. The loss function is the typical cross entropy function. Shouldn't it be possible to now perform gradient descent on the space of images to obtain an example o... | deep learning image classification | 1 | Can a trained recognition model be used to generate a sample? -- (deep learning image classification)
<p>Suppose we have trained a cat classification network. It takes in an image (as a vector) x and returns <span class="math-container">$\hat{y}\in(0,1)$</span>. The loss function is the typical cross entropy function. ... | habedi/stack-exchange-dataset |
88,097 | why do transformers mask at every layer instead of just at the input layer? | <p>working thru the <a href="http://nlp.seas.harvard.edu/2018/04/03/attention" rel="nofollow noreferrer">annotated transformer</a>, I see that every layer in both the encoder (mask paddings) and decoder (mask padding + future positions) get masked. Why couldn't it be simplified to just one mask at the first layers of e... | neural network nlp transformer | 1 | why do transformers mask at every layer instead of just at the input layer? -- (neural network nlp transformer)
<p>working thru the <a href="http://nlp.seas.harvard.edu/2018/04/03/attention" rel="nofollow noreferrer">annotated transformer</a>, I see that every layer in both the encoder (mask paddings) and decoder (mask... | habedi/stack-exchange-dataset |
88,132 | Import image into Tensorflow model | <p>I trained a simple Handwriting model with Tensorflow and MNIST:</p>
<pre><code>(x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data()
x_train = x_train.astype('float32')/255
x_test = x_test.astype('float32')/255
model = keras.Sequential([
 keras.layers.Flatten(input_shape=(28... | deep learning tensorflow python 3.x | 1 | Import image into Tensorflow model -- (deep learning tensorflow python 3.x)
<p>I trained a simple Handwriting model with Tensorflow and MNIST:</p>
<pre><code>(x_train, y_train), (x_test, y_test) = keras.datasets.mnist.load_data()
x_train = x_train.astype('float32')/255
x_test = x_test.astype('float32')/255... | habedi/stack-exchange-dataset |
88,148 | Spectral Networks and Deep Locally Connected Networks on Graphs | <p>I’m reading the paper <a href="https://arxiv.org/abs/1312.6203" rel="nofollow noreferrer">Spectral Networks and Deep Locally Connected Networks on Graphs</a> and I’m having a hard time understanding the notation shown in the picture below (the scribbles are mine):
<a href="https://i.stack.imgur.com/4KzJF.jpg" re... | research graph neural network | 1 | Spectral Networks and Deep Locally Connected Networks on Graphs -- (research graph neural network)
<p>I’m reading the paper <a href="https://arxiv.org/abs/1312.6203" rel="nofollow noreferrer">Spectral Networks and Deep Locally Connected Networks on Graphs</a> and I’m having a hard time understanding the notation shown ... | habedi/stack-exchange-dataset |
88,162 | Cannot understand feature extraction | <p>I'm following an AI course and we've just entered the <em>deep learning</em> chapter. Speaking about the difference between classic machine learning models and deep learning, it turns out one of the most relevant points in favor of a neural network is that it doesn't need the <em><strong>feature extraction</strong><... | machine learning neural network deep learning feature engineering feature extraction | 1 | Cannot understand feature extraction -- (machine learning neural network deep learning feature engineering feature extraction)
<p>I'm following an AI course and we've just entered the <em>deep learning</em> chapter. Speaking about the difference between classic machine learning models and deep learning, it turns out on... | habedi/stack-exchange-dataset |
88,165 | What is the best way to deal with image sizes in object detection using YOLO v. 4? | <p>I am using <a href="https://github.com/AlexeyAB/darknet" rel="nofollow noreferrer">YOLO v. 4</a> to perform object detection and classification on a large number of images. I do this through the Python interface. My images are all sorts of sizes and aspect ratios.<br />
Examples of using Darknet / YOLO from the ... | preprocessing yolo | 1 | What is the best way to deal with image sizes in object detection using YOLO v. 4? -- (preprocessing yolo)
<p>I am using <a href="https://github.com/AlexeyAB/darknet" rel="nofollow noreferrer">YOLO v. 4</a> to perform object detection and classification on a large number of images. I do this through the Python interfac... | habedi/stack-exchange-dataset |
88,168 | Keras 1D CNN always predicts the same result even if accuracy is high on training set | <p>The validation accuracy of my 1D CNN is stuck on 0.5 and that's because I'm always getting the same prediction out of a balanced data set. At the same time my training accuracy keeps increasing and the loss decreasing as intended.</p>
<p>Strangely, if I do <code>model.evaluate()</code> on my training set (that h... | machine learning deep learning classification keras cnn | 1 | Keras 1D CNN always predicts the same result even if accuracy is high on training set -- (machine learning deep learning classification keras cnn)
<p>The validation accuracy of my 1D CNN is stuck on 0.5 and that's because I'm always getting the same prediction out of a balanced data set. At the same time my training ac... | habedi/stack-exchange-dataset |
88,170 | Understanding Learning Curves | <p>I would like to clarify my understanding of learning curves with two example plots below. I am experimenting with small data sets here between 500 and 1500 samples to clarify my understanding.</p>
<p>My understanding from the learning curve below is that underlying data must have a lot of noise and therefore the... | classification svm supervised learning k nn | 1 | Understanding Learning Curves -- (classification svm supervised learning k nn)
<p>I would like to clarify my understanding of learning curves with two example plots below. I am experimenting with small data sets here between 500 and 1500 samples to clarify my understanding.</p>
<p>My understanding from the learning... | habedi/stack-exchange-dataset |
88,186 | What layer to consider for embeddings when building a encoder-encoder model? | <p>I am currently building a encoder-encoder based model with cosine loss function. The dataset is supervised learning.</p>
<p>Here's a basic encoder,</p>
<pre><code>from tensorflow.keras import layers

class LSTMEncoder(layers.Layer):

 def __init__(self,
 units, # dimen... | machine learning python deep learning python 3.x | 1 | What layer to consider for embeddings when building a encoder-encoder model? -- (machine learning python deep learning python 3.x)
<p>I am currently building a encoder-encoder based model with cosine loss function. The dataset is supervised learning.</p>
<p>Here's a basic encoder,</p>
<pre><code>from tensorflow... | habedi/stack-exchange-dataset |
88,190 | Visualising feature selection results for multiple classifiers and feature subset sizes | <p>I am using information gain feature selection technique to get different features subset sizes for my dataset, like so:</p>
<pre class="lang-py prettyprint-override"><code>fs1 = SelectKBest(score_func=mutual_info_classif, k=10)
fs1.fit(X_train, y_train)
X_train_fs1 = fs1.transform(X_train)
X_test_fs1... | python visualization matplotlib | 1 | Visualising feature selection results for multiple classifiers and feature subset sizes -- (python visualization matplotlib)
<p>I am using information gain feature selection technique to get different features subset sizes for my dataset, like so:</p>
<pre class="lang-py prettyprint-override"><code>fs1 = SelectKBes... | habedi/stack-exchange-dataset |
88,201 | What’s the most suitable programming language for AI development? | <p>For the past couple of years I’ve been learning how to use Python to script. But I would like to start getting into scripting more things like computers and AI. So, with that said, and please no hate, what in your opinion would be best to script things like that? For example - <a href="https://en.wikipedia.org/wi... | python javascript | 1 | What’s the most suitable programming language for AI development? -- (python javascript)
<p>For the past couple of years I’ve been learning how to use Python to script. But I would like to start getting into scripting more things like computers and AI. So, with that said, and please no hate, what in your opinion woul... | habedi/stack-exchange-dataset |
88,222 | Using the whole dataset for testing (not validation) in case of small datasets | <p>for an object detection task I created a small dataset to train an object detector. The class frequency is more or less balanced, however I defined some additional attributes with environmental conditions for each image, which results in a rather uneven distribution of classes depending on the viewed attribute (e.g.... | dataset feature selection object detection validation | 1 | Using the whole dataset for testing (not validation) in case of small datasets -- (dataset feature selection object detection validation)
<p>for an object detection task I created a small dataset to train an object detector. The class frequency is more or less balanced, however I defined some additional attributes with... | habedi/stack-exchange-dataset |
88,223 | What is the difference between TDNN and CNN? | <p>I read about time delay neural network (TDNN) and I am not sure I understood it. From what I read it seems that tdnn works just like one dimensional convolutional neural network (CNN).</p>
<p>What are the differences between the architectures, if they exist?</p>
 | neural network deep learning cnn | 1 | What is the difference between TDNN and CNN? -- (neural network deep learning cnn)
<p>I read about time delay neural network (TDNN) and I am not sure I understood it. From what I read it seems that tdnn works just like one dimensional convolutional neural network (CNN).</p>
<p>What are the differences between the ... | habedi/stack-exchange-dataset |
88,245 | Using Palmer Penguins Dataset Instead of Iris Flower Dataset | <p>I have been trying to replace the Iris Flower dataset with the Palmer Penguin dataset for a neural network tutorial. I am using the tutorial at <a href="https://www.kaggle.com/antmarakis/another-neural-network-from-scratch" rel="nofollow noreferrer">https://www.kaggle.com/antmarakis/another-neural-network-from-scrat... | python neural network dataset | 1 | Using Palmer Penguins Dataset Instead of Iris Flower Dataset -- (python neural network dataset)
<p>I have been trying to replace the Iris Flower dataset with the Palmer Penguin dataset for a neural network tutorial. I am using the tutorial at <a href="https://www.kaggle.com/antmarakis/another-neural-network-from-scratc... | habedi/stack-exchange-dataset |
88,248 | Why fitting/training a model can be considered as learning? | <p>I was looking around and I can't find a good answer, I just want to know why it can be considered as learning and is not just "calibration" or "parametrization".</p>
<p>I feel the word "learning" is overqualified for the things the models do.</p>
<p>Thanks in advance.</p>
 | machine learning deep learning | 1 | Why fitting/training a model can be considered as learning? -- (machine learning deep learning)
<p>I was looking around and I can't find a good answer, I just want to know why it can be considered as learning and is not just "calibration" or "parametrization".</p>
<p>I feel the word "learni... | habedi/stack-exchange-dataset |
88,267 | What is the use of using width/height shift in data augmentation? | <p>I'm not sure to understand the use of augmentation data using width shift and height shift.</p>
<p>Say I have limited image data, and I want to create new data using Keras' ImageDataGenerator. To classify between images, I use CNNs. Since CNNs are translation invariant, aren't the translational shifts from keras... | keras dataset cnn image classification data augmentation | 1 | What is the use of using width/height shift in data augmentation? -- (keras dataset cnn image classification data augmentation)
<p>I'm not sure to understand the use of augmentation data using width shift and height shift.</p>
<p>Say I have limited image data, and I want to create new data using Keras' ImageDataGen... | habedi/stack-exchange-dataset |
88,275 | Which algorithm should I choose and why? | <p>My friend was reading a textbook and had this question:</p>
<p>Suppose that you observe <span class="math-container">$(X_1,Y_1),...,(X_{100}Y_{100})$</span>, which you assume to be i.i.d. copies of a random pair <span class="math-container">$(X,Y)$</span> taking values in <span class="math-container">$\mathbb{R}... | machine learning classification k nn lda | 1 | Which algorithm should I choose and why? -- (machine learning classification k nn lda)
<p>My friend was reading a textbook and had this question:</p>
<p>Suppose that you observe <span class="math-container">$(X_1,Y_1),...,(X_{100}Y_{100})$</span>, which you assume to be i.i.d. copies of a random pair <span class="m... | habedi/stack-exchange-dataset |
88,287 | Need help on Deep learning model on sentiment analysis | <p>Before I present my problem, please note that I am a newbie in deep learning and I am trying things for the first time. Most of my code/logic were adopted from various references in the internet.</p>
<p>Goal : Build a LSTM/CNN model to classify the IMDB reviews available in tensorflow datasets</p>
<p>Approac... | deep learning | 1 | Need help on Deep learning model on sentiment analysis -- (deep learning)
<p>Before I present my problem, please note that I am a newbie in deep learning and I am trying things for the first time. Most of my code/logic were adopted from various references in the internet.</p>
<p>Goal : Build a LSTM/CNN model to cla... | habedi/stack-exchange-dataset |
88,298 | What does IBA mean in imblearn classification report? | <p>imblearn is a python library for handling imbalanced data. A code for generating classification report is given below.</p>
<pre><code>import numpy as np
from imblearn.metrics import classification_report_imbalanced
y_true = [0, 1, 2, 2, 2]
y_pred = [0, 0, 2, 2, 1] 
target_names = ['class 0', 'cla... | python classification class imbalance imbalanced learn | 1 | What does IBA mean in imblearn classification report? -- (python classification class imbalance imbalanced learn)
<p>imblearn is a python library for handling imbalanced data. A code for generating classification report is given below.</p>
<pre><code>import numpy as np
from imblearn.metrics import classificatio... | habedi/stack-exchange-dataset |
88,300 | Test set larger than train set | <p>There is a two class dataset with 1121 values in total, having 230 from same class and 891 from the other class. The training set is choosen as 230+230=460 from both classes and the test set as the entire 1121 data.</p>
<p>1)Accuracy values are less than 0,50 even some are as low as 0,18 and 0,20. Does this make... | machine learning training class imbalance accuracy multilabel classification | 1 | Test set larger than train set -- (machine learning training class imbalance accuracy multilabel classification)
<p>There is a two class dataset with 1121 values in total, having 230 from same class and 891 from the other class. The training set is choosen as 230+230=460 from both classes and the test set as the entire... | habedi/stack-exchange-dataset |
88,301 | How to measure a almost (?) ordinal classification? | <p>I have a model where I predict classes to define instructions for a trader robot. <strong>The classes are -2, -1, 1 and 2</strong> (strong sell, light sell, light buy and strong buy) and I'm using a simple confusion matrix to asses the performance of the model, however I would like to know if there are other ways th... | classification confusion matrix | 1 | How to measure a almost (?) ordinal classification? -- (classification confusion matrix)
<p>I have a model where I predict classes to define instructions for a trader robot. <strong>The classes are -2, -1, 1 and 2</strong> (strong sell, light sell, light buy and strong buy) and I'm using a simple confusion matrix to as... | habedi/stack-exchange-dataset |
88,322 | How to interpret linear trends in residuals? | <p>I am trying to compare companies in the same industry and see how Profit and Number of employees correlated. My linear regression looks something like this:</p>
<p><a href="https://i.stack.imgur.com/Ci6Nj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ci6Nj.png" alt="enter image description h... | statistics linear regression | 1 | How to interpret linear trends in residuals? -- (statistics linear regression)
<p>I am trying to compare companies in the same industry and see how Profit and Number of employees correlated. My linear regression looks something like this:</p>
<p><a href="https://i.stack.imgur.com/Ci6Nj.png" rel="nofollow noreferrer... | habedi/stack-exchange-dataset |
88,325 | What is Deep learning approach to count the number of Diamonds in an image? | <p><a href="https://i.stack.imgur.com/7BFyX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7BFyX.png" alt="enter image description here" /></a>I am working on a project which involves counting the number of diamonds in the provided image. I have a set of images and a VIA annotated .json file which h... | deep learning cnn image segmentation vgg16 | 1 | What is Deep learning approach to count the number of Diamonds in an image? -- (deep learning cnn image segmentation vgg16)
<p><a href="https://i.stack.imgur.com/7BFyX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7BFyX.png" alt="enter image description here" /></a>I am working on a project which i... | habedi/stack-exchange-dataset |
88,326 | How to access GPT-3, BERT or alike? | <p>I am interested in accessing NLP models mentioned in scientific papers, to replicate some results and experiment.</p>
<p>But I only see waiting lists <a href="https://openai.com/blog/openai-api/" rel="nofollow noreferrer">https://openai.com/blog/openai-api/</a> and licenses granted in large commercial deals <a h... | nlp openai gpt pretraining | 1 | How to access GPT-3, BERT or alike? -- (nlp openai gpt pretraining)
<p>I am interested in accessing NLP models mentioned in scientific papers, to replicate some results and experiment.</p>
<p>But I only see waiting lists <a href="https://openai.com/blog/openai-api/" rel="nofollow noreferrer">https://openai.com/blog... | habedi/stack-exchange-dataset |
88,330 | How do the linear layers in the attention mechanism work? | <p>I think I now the answer to my question but I dont really get confirmation.
When taking a look at the multi-head-attention block as presented in "Attention Is All You Need" we can see that there are three linear layers applied on the key, query and value matrix. And then one layer at the end, which is ... | machine learning nlp transformer attention mechanism | 1 | How do the linear layers in the attention mechanism work? -- (machine learning nlp transformer attention mechanism)
<p>I think I now the answer to my question but I dont really get confirmation.
When taking a look at the multi-head-attention block as presented in "Attention Is All You Need" we can see tha... | habedi/stack-exchange-dataset |
88,331 | How to plot multiple models val and traing acc/loss curve from csv files? | <br>
I trained multiple CNN models, after that, I saved models details (Like , training/Validation Acc/Loss ) by callbacks by using this codes : 
<pre><code>tf.keras.callbacks.CSVLogger 
</code></pre>
<p>Now I have multiple models training-val acc-loss respective values in different <strong>csv files... | computer vision matplotlib | 1 | How to plot multiple models val and traing acc/loss curve from csv files? -- (computer vision matplotlib)
<br>
I trained multiple CNN models, after that, I saved models details (Like , training/Validation Acc/Loss ) by callbacks by using this codes : 
<pre><code>tf.keras.callbacks.CSVLogger 
</code></pre... | habedi/stack-exchange-dataset |
88,336 | What to replace outliers with? (supermarket transaction data) | <p>I have a transaction dataset from a supermarket. Let's say the average spend is $50.</p>
<p>I want to get each customer's average spend and rank them based on where they fall based on this $50 average spend.</p>
<p>For example:</p>
<p>John Doe's average spend is 150% of the overall average spend = "... | python pandas statistics outlier | 1 | What to replace outliers with? (supermarket transaction data) -- (python pandas statistics outlier)
<p>I have a transaction dataset from a supermarket. Let's say the average spend is $50.</p>
<p>I want to get each customer's average spend and rank them based on where they fall based on this $50 average spend.</p>&#... | habedi/stack-exchange-dataset |
88,346 | Why removing rows with NA values from the majority class improves model performance | <p>I have an imbalanced dataset like so:</p>
<pre class="lang-py prettyprint-override"><code>df['y'].value_counts(normalize=True) * 100
</code></pre>
<pre><code>No 92.769441
Yes 7.230559
Name: y, dtype: float64
</code></pre>
<p>The dataset consists of 13194 rows and 37 features.</p>&... | python pandas class imbalance missing data smote | 1 | Why removing rows with NA values from the majority class improves model performance -- (python pandas class imbalance missing data smote)
<p>I have an imbalanced dataset like so:</p>
<pre class="lang-py prettyprint-override"><code>df['y'].value_counts(normalize=True) * 100
</code></pre>
<pre><code>No 92... | habedi/stack-exchange-dataset |
88,353 | How to calculate the different metrics for multi class classification | <p>My confusion matrix has the following structure:</p>
<pre><code> (Predicted)

C= ( actual) [TN FP
 FN TP]
</code></pre>
<p>How can I calculate the Mathews Correlation Coefficient (MCC) value for multi-class expressed as
<code>MCC = (TP .* TN - FP .* FN)... | multiclass classification matlab confusion matrix | 1 | How to calculate the different metrics for multi class classification -- (multiclass classification matlab confusion matrix)
<p>My confusion matrix has the following structure:</p>
<pre><code> (Predicted)

C= ( actual) [TN FP
 FN TP]
</code></pre>
<p>How can I... | habedi/stack-exchange-dataset |
88,365 | ARIMA training super slow | <p>I am fitting ARIMA model (from statsmodels) on 20 000 elements dataset on a 24 CPU 200+GB RAM cloud server for over 24 hours now. It loads all the CPU's. But It takes so long... Is it how it works or is here something wrong?</p>
<p>p,d,q are just numbers</p>
<pre><code>from statsmodels.tsa.arima_model import... | machine learning deep learning time series arima | 1 | ARIMA training super slow -- (machine learning deep learning time series arima)
<p>I am fitting ARIMA model (from statsmodels) on 20 000 elements dataset on a 24 CPU 200+GB RAM cloud server for over 24 hours now. It loads all the CPU's. But It takes so long... Is it how it works or is here something wrong?</p>
<p>p... | habedi/stack-exchange-dataset |
88,371 | How can I save my learning rate on each finished epoch using Callbacks? | <p>I used LearningRateScheduler for my model training. I want to <strong>save learning rates on each epoch in CSV file (or other document files)</strong>. <br>
<strong>Is there any way to save those learning rates using callbacks?</strong></p>
 | computer vision | 1 | How can I save my learning rate on each finished epoch using Callbacks? -- (computer vision)
<p>I used LearningRateScheduler for my model training. I want to <strong>save learning rates on each epoch in CSV file (or other document files)</strong>. <br>
<strong>Is there any way to save those learning rates using ca... | habedi/stack-exchange-dataset |
88,395 | What I need to write in the line level of torch.vison for 21 classes? | <p>In this code I found , line labels = torch.ones((records.shape[0],), dtype=torch.int64) ,that there is only one class and 0 in the case of Faster RCNN is reserved for the Background. What would be for 21 classes?</p>
<pre><code>def __getitem__(self, index: int):

file_name = self.file_names[index]
r... | computer vision pytorch object detection | 1 | What I need to write in the line level of torch.vison for 21 classes? -- (computer vision pytorch object detection)
<p>In this code I found , line labels = torch.ones((records.shape[0],), dtype=torch.int64) ,that there is only one class and 0 in the case of Faster RCNN is reserved for the Background. What would be for... | habedi/stack-exchange-dataset |
88,410 | ValueError: Input 0 of layer conv1_pad is incompatible with the layer: expected ndim=4, found ndim=3. Full shape received: [None, 224, 3] | <p>I am trying to make a gender classifier. I am using MobileNet from Tensorflow with input shape as (224,224,3). After training the model, I tried to check if the model was working by passing an image to the model to predict, but it throws the error in the title. I tried debugging it and google the error and tried eve... | keras tensorflow image classification python 3.x | 1 | ValueError: Input 0 of layer conv1_pad is incompatible with the layer: expected ndim=4, found ndim=3. Full shape received: [None, 224, 3] -- (keras tensorflow image classification python 3.x)
<p>I am trying to make a gender classifier. I am using MobileNet from Tensorflow with input shape as (224,224,3). After training... | habedi/stack-exchange-dataset |
88,417 | what's the motivation behind BERT masking 2 words in a sentence? | <p><a href="https://arxiv.org/pdf/1810.04805.pdf" rel="nofollow noreferrer">bert</a> and the more recent <a href="https://arxiv.org/pdf/1910.10683.pdf" rel="nofollow noreferrer">t5</a> ablation study, agree that</p>
<blockquote>
<p>using a <strong>denoising</strong> objective always results in better downstream... | nlp bert language model | 1 | what's the motivation behind BERT masking 2 words in a sentence? -- (nlp bert language model)
<p><a href="https://arxiv.org/pdf/1810.04805.pdf" rel="nofollow noreferrer">bert</a> and the more recent <a href="https://arxiv.org/pdf/1910.10683.pdf" rel="nofollow noreferrer">t5</a> ablation study, agree that</p>
<block... | habedi/stack-exchange-dataset |
88,441 | Forecasting using Boosting methods on Non-stationary Time Series data | <p>Theoretical Noob question -</p>
<p>Can we use boosting methods to effectively forecast the future after being trained on a non-stationary time series? Or do you train/fit on the residual of the training set and then add seasonality/trend components while forecasting?</p>
<p>Thanks in advance.</p>
 | python time series data science model boosting | 1 | Forecasting using Boosting methods on Non-stationary Time Series data -- (python time series data science model boosting)
<p>Theoretical Noob question -</p>
<p>Can we use boosting methods to effectively forecast the future after being trained on a non-stationary time series? Or do you train/fit on the residual of t... | habedi/stack-exchange-dataset |
88,458 | References/tutorials about data mining and machine learning | <p>I am learning data analytics and I wonder if there are some good references and tutorials about machine learning, data analytics and data mining?</p>
<p>What I'm searching for is an understandable reference/tutorial, which isn't very technical and isn't very basic either, in other words the material begins with ... | machine learning reference request | 1 | References/tutorials about data mining and machine learning -- (machine learning reference request)
<p>I am learning data analytics and I wonder if there are some good references and tutorials about machine learning, data analytics and data mining?</p>
<p>What I'm searching for is an understandable reference/tutori... | habedi/stack-exchange-dataset |
88,498 | input shape of keras Sequential model | <p>i am new to neural networks using keras,
i have the following train samples input shape <strong>(150528, 1235)</strong> and output shape is <strong>(154457, 1235)</strong> where <strong>1235</strong> is the training examples,
how to put the input shape, i tried below but gave me a</p>
<pre><code>ValueErr... | keras mse sgd | 1 | input shape of keras Sequential model -- (keras mse sgd)
<p>i am new to neural networks using keras,
i have the following train samples input shape <strong>(150528, 1235)</strong> and output shape is <strong>(154457, 1235)</strong> where <strong>1235</strong> is the training examples,
how to put the input shape... | habedi/stack-exchange-dataset |
88,504 | Transformer architecture question | <p>I am hand-coding a transformer (<a href="https://arxiv.org/pdf/1706.03762.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1706.03762.pdf</a>) based primarily on the instructions I found at this blog: <a href="http://jalammar.github.io/illustrated-transformer/" rel="nofollow noreferrer">http://jalammar.github.io... | neural network deep learning nlp transformer attention mechanism | 1 | Transformer architecture question -- (neural network deep learning nlp transformer attention mechanism)
<p>I am hand-coding a transformer (<a href="https://arxiv.org/pdf/1706.03762.pdf" rel="nofollow noreferrer">https://arxiv.org/pdf/1706.03762.pdf</a>) based primarily on the instructions I found at this blog: <a href=... | habedi/stack-exchange-dataset |
88,507 | How to run unmodified Python program on GPU servers with scheduled GPUs? | <p>Say I have one server with 10 GPUs. I have a python program which detects available GPU and use all of them.</p>
<p>I have a couple of users who will run python (Machine learning or data mining) programs and use GPU.</p>
<p>I initially thought to use Hadoop, as I find Yarn is good at managing resources, incl... | clustering gpu apache hadoop cloud computing | 1 | How to run unmodified Python program on GPU servers with scheduled GPUs? -- (clustering gpu apache hadoop cloud computing)
<p>Say I have one server with 10 GPUs. I have a python program which detects available GPU and use all of them.</p>
<p>I have a couple of users who will run python (Machine learning or data min... | habedi/stack-exchange-dataset |
88,530 | How does tree-based algorithms handle linearly combined features? | <p>While I am aware that tree-based algorithms (e.g., DT, RF, XGBoost) are 'immune' to multi-collinearity, how do they handle linearly combined features?
For example, is there is any additional value or harm in including the three feature: a, b and a+b in the model?</p>
 | random forest decision trees xgboost linear algebra collinearity | 1 | How does tree-based algorithms handle linearly combined features? -- (random forest decision trees xgboost linear algebra collinearity)
<p>While I am aware that tree-based algorithms (e.g., DT, RF, XGBoost) are 'immune' to multi-collinearity, how do they handle linearly combined features?
For example, is there is a... | habedi/stack-exchange-dataset |
88,532 | Accuracy goes straight for about 200 epochs then start increasing | <p>Can anyone explain the following observation?</p>
<p>Why did the accuracies keep to be a straight line with a very smooth decrease of loss?</p>
<p>By the way, why is the loss lines so beautifully smooth for the first 400 epochs?</p>
<p>Is this because of the learning rate or other reasons?</p>
<p><a ... | machine learning deep learning | 1 | Accuracy goes straight for about 200 epochs then start increasing -- (machine learning deep learning)
<p>Can anyone explain the following observation?</p>
<p>Why did the accuracies keep to be a straight line with a very smooth decrease of loss?</p>
<p>By the way, why is the loss lines so beautifully smooth for ... | habedi/stack-exchange-dataset |
88,533 | Loading large numpy array (DAIC-WOZ) for LSTM model causes Out of memory errors | <p>I am working on using the DAIC-WOZ Dataset of audio and video extracts for depression detection. While training the audio files, which has three input of eGeMAPS, MFCC, and DENSENET arrays. They are input into a BLSTM model. I am using an AzureML server GPU-N6 for training.</p>
<p>machine specs : STANDARD_NV6 (... | deep learning tensorflow dataset memory | 1 | Loading large numpy array (DAIC-WOZ) for LSTM model causes Out of memory errors -- (deep learning tensorflow dataset memory)
<p>I am working on using the DAIC-WOZ Dataset of audio and video extracts for depression detection. While training the audio files, which has three input of eGeMAPS, MFCC, and DENSENET arrays. Th... | habedi/stack-exchange-dataset |
88,546 | How to train a model using a daunting huge training dataset | <p>I have an extremely huge dataset and I'm wondering me how could be the right way to set an experiment to use this data to train a model.</p>
<p>I understand that I can use data-reduction to, for instance, drop out some variables. In despite data-reduction can actually reduces the data amount, as I can see this t... | training bigdata | 1 | How to train a model using a daunting huge training dataset -- (training bigdata)
<p>I have an extremely huge dataset and I'm wondering me how could be the right way to set an experiment to use this data to train a model.</p>
<p>I understand that I can use data-reduction to, for instance, drop out some variables. I... | habedi/stack-exchange-dataset |
88,565 | Machine learning classification with time-domain signals how to ignore signal arrival time? | <p>I am training a Tensorflow classifier model with signal data (converting signals to the spectrograms).</p>
<p>I want the model to be <strong>insensitive</strong> to the arrival time of the signal within the fixed window.</p>
<p><strong>Moreover the model should classify both of these signals as the same.</st... | machine learning classification tensorflow image classification audio recognition | 1 | Machine learning classification with time-domain signals how to ignore signal arrival time? -- (machine learning classification tensorflow image classification audio recognition)
<p>I am training a Tensorflow classifier model with signal data (converting signals to the spectrograms).</p>
<p>I want the model to be <... | habedi/stack-exchange-dataset |
88,566 | whats wrong with the graph | <p>I wanted to plot a bar graph which shows covid cases reported in different regions in different regions of USA.</p>
<p>So here is my code:</p>
<pre><code>import pandas as pd
import matplotlib.pyplot as plt
datainput = pd.read_csv("MD_COVID-19.csv")
fig = plt.figure()
ax = fig.add_ax... | python pandas matplotlib | 1 | whats wrong with the graph -- (python pandas matplotlib)
<p>I wanted to plot a bar graph which shows covid cases reported in different regions in different regions of USA.</p>
<p>So here is my code:</p>
<pre><code>import pandas as pd
import matplotlib.pyplot as plt
datainput = pd.read_csv("MD_COVID... | habedi/stack-exchange-dataset |
88,583 | Which part should be frozen during transfer learning? | <p>I want to use transfer learning and fine tuning and I need to decide which part of
the original model will be used and which part will be frozen. I'm thinking about four possilbe cases:
small/large new dataset and this set is similar/not similar to the original dataset. What should be done to achieve best re... | machine learning transfer learning finetuning | 1 | Which part should be frozen during transfer learning? -- (machine learning transfer learning finetuning)
<p>I want to use transfer learning and fine tuning and I need to decide which part of
the original model will be used and which part will be frozen. I'm thinking about four possilbe cases:
small/large new da... | habedi/stack-exchange-dataset |
88,588 | Overlaying a line graph and an area graph: adding recession bars to a time series | <p>I am trying to reconstruct a time series graphs from FRED: <a href="https://fred.stlouisfed.org/series/LABSHPUSA156NRUG" rel="nofollow noreferrer">https://fred.stlouisfed.org/series/LABSHPUSA156NRUG</a> using Python. However, I am unable to get a clean figure where the time series is overlaid with the area graph rep... | time series | 1 | Overlaying a line graph and an area graph: adding recession bars to a time series -- (time series)
<p>I am trying to reconstruct a time series graphs from FRED: <a href="https://fred.stlouisfed.org/series/LABSHPUSA156NRUG" rel="nofollow noreferrer">https://fred.stlouisfed.org/series/LABSHPUSA156NRUG</a> using Python. H... | habedi/stack-exchange-dataset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.