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
90,687
Has anyone heard of a model similar to a random forest which fits a linear regression model in its leaf nodes?
<p>That is, each leaf node in each decision tree learns a linear model.</p>&#xA;<p>Anyone heard of this kind of model? Even better, anyone know of implementations?</p>&#xA;
random forest linear regression
1
Has anyone heard of a model similar to a random forest which fits a linear regression model in its leaf nodes? -- (random forest linear regression) <p>That is, each leaf node in each decision tree learns a linear model.</p>&#xA;<p>Anyone heard of this kind of model? Even better, anyone know of implementations?</p>&#xA;
habedi/stack-exchange-dataset
90,714
Is feature importance from classification a good way to select features for clustering?
<p>I have a large data set with many features (70). By doing preprocessing (removing features with too many missing values and those that are not correlated with the binary target variable) I have arrived at 15 features. I am now using a decision tree to perform classification with respect to these 15 features and the ...
machine learning classification clustering decision trees feature importances
1
Is feature importance from classification a good way to select features for clustering? -- (machine learning classification clustering decision trees feature importances) <p>I have a large data set with many features (70). By doing preprocessing (removing features with too many missing values and those that are not cor...
habedi/stack-exchange-dataset
90,718
Hot to use the formula model in t.test
<p>I am trying to better understand the formula model for two sample t-tests in R. When I calculate the test in the formula model I get a wrong result.</p>&#xA;<pre class="lang-r prettyprint-override"><code>set.seed(41)&#xA;df = data.frame(x1=c(rep(1, 10), rep(0, 10))+ rnorm(20, mean = 0, sd = 0.1),&#xA; ...
r statistics
1
Hot to use the formula model in t.test -- (r statistics) <p>I am trying to better understand the formula model for two sample t-tests in R. When I calculate the test in the formula model I get a wrong result.</p>&#xA;<pre class="lang-r prettyprint-override"><code>set.seed(41)&#xA;df = data.frame(x1=c(rep(1, 10), rep(0,...
habedi/stack-exchange-dataset
90,727
Resampling : My dataset is categorical or numerical?
<p>I have a dataset with 203 variables. Like age&gt;40 (0 -yes, 1-no), gender(0 or 1), used or not 200 types of drugs (one hot encoded into 200 variables), and one target variable (0 or 1). This is an imbalanced dataset where Counter({0: 5607, 1: 1717}).</p>&#xA;<p><strong>May I know what kind of resampling strategy I ...
dataset class imbalance binary features self study
1
Resampling : My dataset is categorical or numerical? -- (dataset class imbalance binary features self study) <p>I have a dataset with 203 variables. Like age&gt;40 (0 -yes, 1-no), gender(0 or 1), used or not 200 types of drugs (one hot encoded into 200 variables), and one target variable (0 or 1). This is an imbalanced...
habedi/stack-exchange-dataset
90,742
Sentence embeddings with LSTM to classify the sentences is not working
<p>I am trying to build LSTM NN to classify the sentences. I have seen many examples where sentences are converted to word vectors using glove, word2Vec and so on here is an <a href="https://blog.keras.io/using-pre-trained-word-embeddings-in-a-keras-model.html" rel="nofollow noreferrer">example of it</a>. This solution...
keras tensorflow lstm word embeddings text classification
1
Sentence embeddings with LSTM to classify the sentences is not working -- (keras tensorflow lstm word embeddings text classification) <p>I am trying to build LSTM NN to classify the sentences. I have seen many examples where sentences are converted to word vectors using glove, word2Vec and so on here is an <a href="htt...
habedi/stack-exchange-dataset
90,769
sklearn package with AttributeError: 'MissingValues' object has no attribute 'to_list'
<p>I am currently trying to reproduce this tutorial on building a <a href="https://github.com/ni79ls/har-keras-cnn" rel="nofollow noreferrer">CNN based time series classifier for human activity recognition.</a></p>&#xA;<p>My setup is:</p>&#xA;<ul>&#xA;<li>Windows 10, Pycharm IDE with a new project for this tutorial, Py...
python keras scikit learn tensorflow cnn
1
sklearn package with AttributeError: 'MissingValues' object has no attribute 'to_list' -- (python keras scikit learn tensorflow cnn) <p>I am currently trying to reproduce this tutorial on building a <a href="https://github.com/ni79ls/har-keras-cnn" rel="nofollow noreferrer">CNN based time series classifier for human ac...
habedi/stack-exchange-dataset
90,771
Why does an imbalanced data set badly effect distance measures like Mahalanobis?
<p>I'm relatively new to data science and I am struggling to understand why the <strong>Mahalanobis distance</strong> (or any other distance measure) applied to an imbalanced data-set becomes inaccurate. I have a data set that consists of three classes A, B and C. There are <strong>100 observations for class A, 60 for ...
data class imbalance similarity distance
1
Why does an imbalanced data set badly effect distance measures like Mahalanobis? -- (data class imbalance similarity distance) <p>I'm relatively new to data science and I am struggling to understand why the <strong>Mahalanobis distance</strong> (or any other distance measure) applied to an imbalanced data-set becomes i...
habedi/stack-exchange-dataset
90,772
NameError 'np' is not defined after importing np_utils
<p>I am running a MNIST example in a Jupyter notebook running in an Anaconda virtual environment. I have tried to run the code below (not yet finished, I was testing it) when it comes up with an error (can be seen below the code).</p>&#xA;<pre><code>(X_train, y_train), (X_test, y_test) = mnist.load_data()&#xA;&#xA;#pri...
python keras
1
NameError 'np' is not defined after importing np_utils -- (python keras) <p>I am running a MNIST example in a Jupyter notebook running in an Anaconda virtual environment. I have tried to run the code below (not yet finished, I was testing it) when it comes up with an error (can be seen below the code).</p>&#xA;<pre><co...
habedi/stack-exchange-dataset
90,783
There could be a problem with the linear layer after the attention inside a transformer?
<p>My question regards this image:</p>&#xA;<p><a href="https://i.stack.imgur.com/eZNUO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eZNUO.png" alt="enter image description here" /></a></p>&#xA;<p>It seems that after the multi head attention there is a linear layer as they mention also from here:&#...
deep learning neural network transformer attention mechanism masking
1
There could be a problem with the linear layer after the attention inside a transformer? -- (deep learning neural network transformer attention mechanism masking) <p>My question regards this image:</p>&#xA;<p><a href="https://i.stack.imgur.com/eZNUO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eZN...
habedi/stack-exchange-dataset
90,820
unable to predict by LinearRegression
<p><a href="https://i.stack.imgur.com/MQoEo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MQoEo.png" alt="enter image description here" /></a>&#xA;Should I add <code>csv</code> as text in SO question? There's lot more data.</p>&#xA;<pre><code>%matplotlib inline&#xA;plt.xlabel('Year')&#xA;plt.ylabel...
machine learning scikit learn linear regression jupyter
1
unable to predict by LinearRegression -- (machine learning scikit learn linear regression jupyter) <p><a href="https://i.stack.imgur.com/MQoEo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MQoEo.png" alt="enter image description here" /></a>&#xA;Should I add <code>csv</code> as text in SO question?...
habedi/stack-exchange-dataset
90,824
Is CRF suitable for multi-words Named Entity Recognition?
<p>I've a problem where I should create a custom NER by using <a href="https://sklearn-crfsuite.readthedocs.io/en/latest/tutorial.html" rel="nofollow noreferrer">sklearn CRF</a>. In the official tutorial, they are using CoNLL2002 corpus is available in NLTK where the entities are represented with a single word but in m...
scikit learn nlp named entity recognition
1
Is CRF suitable for multi-words Named Entity Recognition? -- (scikit learn nlp named entity recognition) <p>I've a problem where I should create a custom NER by using <a href="https://sklearn-crfsuite.readthedocs.io/en/latest/tutorial.html" rel="nofollow noreferrer">sklearn CRF</a>. In the official tutorial, they are u...
habedi/stack-exchange-dataset
90,832
find value which occurred more times in a group from data frame column R
<p>I have a data frame with latitude and longitude of a particular place. one place can have multiple lat, longs and those lat, long values can be same or different. I need to find the correct lat, long based on no.of occurances of lat, long for particular place.</p>&#xA;<p>example input data frame</p>&#xA;<pre><code>d...
r
1
find value which occurred more times in a group from data frame column R -- (r) <p>I have a data frame with latitude and longitude of a particular place. one place can have multiple lat, longs and those lat, long values can be same or different. I need to find the correct lat, long based on no.of occurances of lat, lon...
habedi/stack-exchange-dataset
90,845
Finding an appropriate binary classification algorithm for time series data intervals
<p>Maybe someone here has experience in this matter and can point me in the right direction. I want to classify parts of an interval of numerical movement data as either resting or not resting. I have training data of what resting intervals look like. And am looking for the right algorithm to tackle this problem. I don...
machine learning classification time series r python 3.x
1
Finding an appropriate binary classification algorithm for time series data intervals -- (machine learning classification time series r python 3.x) <p>Maybe someone here has experience in this matter and can point me in the right direction. I want to classify parts of an interval of numerical movement data as either re...
habedi/stack-exchange-dataset
90,848
Overall AUC higher than all "stratified" AUCs
<p>For one of my binary classification models, I have observed this (Simpson's Rule-esque) paradox. The AUC on the test set as a whole is 0.8.</p>&#xA;<p>Gender is one of the model's features. So I decided to produce a &quot;bias&quot; report, for which I calculated AUCs for each of the Male and Female subgroups. Bu...
metric auc roc
1
Overall AUC higher than all "stratified" AUCs -- (metric auc roc) <p>For one of my binary classification models, I have observed this (Simpson's Rule-esque) paradox. The AUC on the test set as a whole is 0.8.</p>&#xA;<p>Gender is one of the model's features. So I decided to produce a &quot;bias&quot; report, for whic...
habedi/stack-exchange-dataset
90,854
Plot overlapping time series
<p>I'm trying to plot my test set and test set predictions to check the differences and see how my autoencoder reconstructed the data, but since I have a test set 30x10 I have a huge visualization problem:&#xA;<a href="https://i.stack.imgur.com/nwK7d.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nw...
python time series matplotlib plotting
1
Plot overlapping time series -- (python time series matplotlib plotting) <p>I'm trying to plot my test set and test set predictions to check the differences and see how my autoencoder reconstructed the data, but since I have a test set 30x10 I have a huge visualization problem:&#xA;<a href="https://i.stack.imgur.com/nw...
habedi/stack-exchange-dataset
90,864
Extracting Products Name from Unstructured text
<p>I have unstructured text like this</p>&#xA;<pre><code>Sample1&#xA;From: Gujarat, IN &#xA;To: Kerala, IN&#xA;Milk and egg, 100kg &#xA;Please handle with care. &#xA;&#xA;Sample2 &#xA;Hello,&#xA;(Tooth Brush and Paste)120KG in total&#xA;P/U: London, GB&#xA;Dest: QC, Canada&#xA;Keep the product away from heat&#xA;F:111-...
python nlp text mining named entity recognition spacy
1
Extracting Products Name from Unstructured text -- (python nlp text mining named entity recognition spacy) <p>I have unstructured text like this</p>&#xA;<pre><code>Sample1&#xA;From: Gujarat, IN &#xA;To: Kerala, IN&#xA;Milk and egg, 100kg &#xA;Please handle with care. &#xA;&#xA;Sample2 &#xA;Hello,&#xA;(Tooth Brush and P...
habedi/stack-exchange-dataset
90,899
Create a single time series plot of multiple devices
<p>I have a dataset where there are stored the measurements of 30 devices. Each device has about 4000 values and it is structured as well:</p>&#xA;<pre><code>device01 0.02;0.13;1.15;0.10;8.30;........;4.20&#xA;device02 0.06;0.13;1.40;0.03;7.40;........;6.30&#xA;........&#xA;device30 0.03;0.24;1.10;0.43;4.40;........;2....
python time series matplotlib
1
Create a single time series plot of multiple devices -- (python time series matplotlib) <p>I have a dataset where there are stored the measurements of 30 devices. Each device has about 4000 values and it is structured as well:</p>&#xA;<pre><code>device01 0.02;0.13;1.15;0.10;8.30;........;4.20&#xA;device02 0.06;0.13;1.4...
habedi/stack-exchange-dataset
90,900
How to work with input which is a combination of metadata+ vectorized text data + image pixel data to build a Regression Model (predict views)?
<p>There are 4 datasets (all in csv format), each has a uniqueID column by which each record can be identified. Image and text datasets are dense datasets.(need to be converted to ndarray).</p>&#xA;<p>Can someone suggest how to use all these 4 datasets for building a regression model?</p>&#xA;<p>This is how the dataset...
python nlp regression sparse metadata
1
How to work with input which is a combination of metadata+ vectorized text data + image pixel data to build a Regression Model (predict views)? -- (python nlp regression sparse metadata) <p>There are 4 datasets (all in csv format), each has a uniqueID column by which each record can be identified. Image and text datase...
habedi/stack-exchange-dataset
90,910
What will be the input_shape of tf.keras.layers.Conv3D be for these inputs
<p>I have many videos, and each video is made up of 37 images (there are 37 frames in the whole video). And the dimension of each image is <code>(100, 100, 3)</code>.... So the shape of my dataset is <code>[num_of_videos, 37, 100, 100, 3]</code></p>&#xA;<p>If I want to pass these videos thorugh the <code>tf.keras.layer...
machine learning deep learning neural network convolutional neural network convolution
1
What will be the input_shape of tf.keras.layers.Conv3D be for these inputs -- (machine learning deep learning neural network convolutional neural network convolution) <p>I have many videos, and each video is made up of 37 images (there are 37 frames in the whole video). And the dimension of each image is <code>(100, 10...
habedi/stack-exchange-dataset
90,923
What is the upscaling factor in super resolution with deep learning?
<p>I have been reading papers on single image super resolution (SISR) and I frequently encounter X3 upscaling factor, X4 upscaling factors.</p>&#xA;<p>Example: <a href="https://arxiv.org/pdf/1609.04802.pdf" rel="nofollow noreferrer">SRGAN mentioning x4 upscaling factor</a></p>&#xA;<p>It would be wonderful if anyone cou...
deep learning computer vision
1
What is the upscaling factor in super resolution with deep learning? -- (deep learning computer vision) <p>I have been reading papers on single image super resolution (SISR) and I frequently encounter X3 upscaling factor, X4 upscaling factors.</p>&#xA;<p>Example: <a href="https://arxiv.org/pdf/1609.04802.pdf" rel="nofo...
habedi/stack-exchange-dataset
90,930
Detecting original vs. edited (reposted / recompressed) image
<p>I'm trying to create something to help solve this problem:</p>&#xA;<p><a href="https://xkcd.com/1683/" rel="nofollow noreferrer"><img src="https://imgs.xkcd.com/comics/digital_data.png" alt="" /></a></p>&#xA;<p>My goal is that, given two images where one is an edit of the other, produce a system that outputs which o...
machine learning image
1
Detecting original vs. edited (reposted / recompressed) image -- (machine learning image) <p>I'm trying to create something to help solve this problem:</p>&#xA;<p><a href="https://xkcd.com/1683/" rel="nofollow noreferrer"><img src="https://imgs.xkcd.com/comics/digital_data.png" alt="" /></a></p>&#xA;<p>My goal is that,...
habedi/stack-exchange-dataset
90,936
Is there an appropriate use of adjusting class weights for a balanced dataset?
<p>I ask this because I am currently working with a CNN model built for diagnosis of pneumonia. Originally, I followed a notebook on kaggle to build the model and thereby learn what each bit of code is for, etc.&#xA;The dataset used was rather imbalanced, with a far greater number of pneumonia cases than normal (health...
python keras tensorflow dataset convolutional neural network
1
Is there an appropriate use of adjusting class weights for a balanced dataset? -- (python keras tensorflow dataset convolutional neural network) <p>I ask this because I am currently working with a CNN model built for diagnosis of pneumonia. Originally, I followed a notebook on kaggle to build the model and thereby lear...
habedi/stack-exchange-dataset
90,939
How does class_weight work in Decision Tree?
<p>I am interested in Cost-Sensitive learning. And I am trying to understand how <code>class_weight</code> in DecisionTree works in terms of math. I read a lot of articles that there are a lot of algorithms Cost Sensitive Decision Tree. So what exactly does <code>class_weight</code> do in Decision Tree?</p>&#xA;
python classification scikit learn decision trees class imbalance
1
How does class_weight work in Decision Tree? -- (python classification scikit learn decision trees class imbalance) <p>I am interested in Cost-Sensitive learning. And I am trying to understand how <code>class_weight</code> in DecisionTree works in terms of math. I read a lot of articles that there are a lot of algorith...
habedi/stack-exchange-dataset
90,949
Visualizing a Perceptron
<p>I wanted to visualize how a perceptron learns, so I made a class that performs gradient descent. To show the decision, I plot a plane showing where positive examples and negative examples are, according to the perception. I also plot the decision line. Right now, this is the output:</p>&#xA;<p><a href="https://i.sta...
perceptron
1
Visualizing a Perceptron -- (perceptron) <p>I wanted to visualize how a perceptron learns, so I made a class that performs gradient descent. To show the decision, I plot a plane showing where positive examples and negative examples are, according to the perception. I also plot the decision line. Right now, this is the ...
habedi/stack-exchange-dataset
90,970
What is feature channels mentioned in U-Net?
<p>I was reading the <a href="https://arxiv.org/pdf/1505.04597.pdf" rel="nofollow noreferrer">U-Net paper</a> for medical image segmentation. I had a doubt in the architecture. The authors mention that the max pooling layers in contraction path double the number feature channels while Downsampling.&#xA;Can anyone expla...
deep learning cnn
1
What is feature channels mentioned in U-Net? -- (deep learning cnn) <p>I was reading the <a href="https://arxiv.org/pdf/1505.04597.pdf" rel="nofollow noreferrer">U-Net paper</a> for medical image segmentation. I had a doubt in the architecture. The authors mention that the max pooling layers in contraction path double ...
habedi/stack-exchange-dataset
90,975
keras mnist dataset
<p>I am learning <a href="https://www.youtube.com/watch?v=iqQgED9vV7k&amp;list=PLeo1K3hjS3uu7CxAacxVndI4bE_o3BDtO&amp;index=7" rel="nofollow noreferrer">Neural Network</a>.&#xA;I was running following source code</p>&#xA;<pre><code>import tensorflow as tf&#xA;from tensorflow import keras&#xA;import matplotlib.pyplot as...
python keras tensorflow jupyter mnist
1
keras mnist dataset -- (python keras tensorflow jupyter mnist) <p>I am learning <a href="https://www.youtube.com/watch?v=iqQgED9vV7k&amp;list=PLeo1K3hjS3uu7CxAacxVndI4bE_o3BDtO&amp;index=7" rel="nofollow noreferrer">Neural Network</a>.&#xA;I was running following source code</p>&#xA;<pre><code>import tensorflow as tf&#...
habedi/stack-exchange-dataset
90,981
Understanding time series anomaly detection using Autoencoder
<p>I'm studying how to detect anomalies in the time series using an Autoeconder. In particular, I'm following the guide posted in the <a href="https://keras.io/examples/timeseries/timeseries_anomaly_detection/" rel="nofollow noreferrer">Keras website</a>, but I don't understand why they are creating and how can I adapt...
python keras time series autoencoder anomaly detection
1
Understanding time series anomaly detection using Autoencoder -- (python keras time series autoencoder anomaly detection) <p>I'm studying how to detect anomalies in the time series using an Autoeconder. In particular, I'm following the guide posted in the <a href="https://keras.io/examples/timeseries/timeseries_anomaly...
habedi/stack-exchange-dataset
91,011
train_test_split() Error: cannot reshape array of size 900000 into shape (100,100,3)
<p>I am fairly new to python and I have a program for data classification using the k-nearest neighbor method. But I encountered an error when running the program.</p>&#xA;<ul>&#xA;<li>Here my source code:</li>&#xA;</ul>&#xA;<pre><code>import os&#xA;&#xA;import numpy as np&#xA;&#xA;import cv2&#xA;&#xA;from sklearn.neig...
python k nn
1
train_test_split() Error: cannot reshape array of size 900000 into shape (100,100,3) -- (python k nn) <p>I am fairly new to python and I have a program for data classification using the k-nearest neighbor method. But I encountered an error when running the program.</p>&#xA;<ul>&#xA;<li>Here my source code:</li>&#xA;</u...
habedi/stack-exchange-dataset
91,033
What is the intuition of using clustering for performing feature engineering in machine learning tasks?
<p>I am trying to implement the research paper <a href="https://www.researchgate.net/publication/313067390_Combining_Boosted_Trees_with_Metafeature_Engineering_for_Predictive_Maintenance" rel="nofollow noreferrer">Combining Boosted Trees with Metafeature Engineering for Predictive Maintenance</a>. The paper has a secti...
machine learning classification clustering feature engineering
1
What is the intuition of using clustering for performing feature engineering in machine learning tasks? -- (machine learning classification clustering feature engineering) <p>I am trying to implement the research paper <a href="https://www.researchgate.net/publication/313067390_Combining_Boosted_Trees_with_Metafeature_...
habedi/stack-exchange-dataset
91,041
Does REPEATED K-fold cross validation make sense with Random Forest?
<p>When using random forest, would using normal cross-validation and just taking the average results from multiple models with different random states give me the same results as using Repeated K-fold cross validation?</p>&#xA;<p>Repeated K-fold cross-validation basically repeats cross-validation with multiple differen...
machine learning random forest cross validation
1
Does REPEATED K-fold cross validation make sense with Random Forest? -- (machine learning random forest cross validation) <p>When using random forest, would using normal cross-validation and just taking the average results from multiple models with different random states give me the same results as using Repeated K-fo...
habedi/stack-exchange-dataset
91,043
Mathematical bias and weight vs machine learning bias and weight
<p>I am a little confused about the term Bias and Weight with respect to machine learning.</p>&#xA;<p>Say we want to predict the heights of people whose weights are given. So plot weights to x-axis and height to yaxis. To find out the linear relationship between height and weight we draw a straight line that shows the ...
machine learning predictive modeling linear regression bias weight initialization
1
Mathematical bias and weight vs machine learning bias and weight -- (machine learning predictive modeling linear regression bias weight initialization) <p>I am a little confused about the term Bias and Weight with respect to machine learning.</p>&#xA;<p>Say we want to predict the heights of people whose weights are giv...
habedi/stack-exchange-dataset
91,051
How to professionally spell library names such as "scikit learn"?
<p>For example for inclusion in a CV. This is mostly a question of whether one should use capital letters or not.</p>&#xA;<p>Usually I search the library to find how the library name is spelled on the official page.</p>&#xA;<p>For scikit-learn it is spelled without capital letter, while most of the other letter has som...
scikit learn library
1
How to professionally spell library names such as "scikit learn"? -- (scikit learn library) <p>For example for inclusion in a CV. This is mostly a question of whether one should use capital letters or not.</p>&#xA;<p>Usually I search the library to find how the library name is spelled on the official page.</p>&#xA;<p>F...
habedi/stack-exchange-dataset
91,062
Need help understanding Hard SVM quadratic program equation
<p>This is from the textbook &quot;Understanding Machine Learning&quot; by Shalev-Schwarz p. 169.&#xA;<a href="https://i.stack.imgur.com/LgSFd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LgSFd.png" alt="enter image description here" /></a></p>&#xA;<p>Can anyone help me understand why the solution...
machine learning svm
1
Need help understanding Hard SVM quadratic program equation -- (machine learning svm) <p>This is from the textbook &quot;Understanding Machine Learning&quot; by Shalev-Schwarz p. 169.&#xA;<a href="https://i.stack.imgur.com/LgSFd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LgSFd.png" alt="enter im...
habedi/stack-exchange-dataset
91,069
The sum of multi-class prediction is not 1 using tensorflow and keras?
<p>I am studying how to do text classification with multiple labels using tensorflow. Let's say my model is like:</p>&#xA;<pre><code>model = tf.keras.Sequential([&#xA; tf.keras.layers.Embedding(vocab_size, 50, weights=[embedding_matrix], trainable=False),&#xA; tf.keras.layers.LSTM(128),&#xA; tf.keras.layers.De...
classification keras tensorflow predict sigmoid
1
The sum of multi-class prediction is not 1 using tensorflow and keras? -- (classification keras tensorflow predict sigmoid) <p>I am studying how to do text classification with multiple labels using tensorflow. Let's say my model is like:</p>&#xA;<pre><code>model = tf.keras.Sequential([&#xA; tf.keras.layers.Embedding...
habedi/stack-exchange-dataset
91,078
Set seed for a Class that calls Keras Models
<p>I have class that I use to optimize parameters of a Keras LSTM model. It is known that to set seed for keras, one must input the follow on its code. But what I'm not understanding is where to put it in the case of a class that will build and modify the models.</p>&#xA;<pre><code>from numpy.random import seed&#xA;see...
python keras tensorflow lstm
1
Set seed for a Class that calls Keras Models -- (python keras tensorflow lstm) <p>I have class that I use to optimize parameters of a Keras LSTM model. It is known that to set seed for keras, one must input the follow on its code. But what I'm not understanding is where to put it in the case of a class that will build ...
habedi/stack-exchange-dataset
91,098
with ML/DL model Is possible predict numbers of items required?
<p>I have a dataset is regarding ambulance call data.</p>&#xA;<p>Data sample:</p>&#xA;<pre><code> v_type district gender complaint age Month&#xA;0 Advanced District 1 Male Chest Pain 28 jan&#xA;1 Advanced District 2 Male Heart Problem 50 dec&#xA;2 General District 3 M...
machine learning deep learning neural network regression data science model
1
with ML/DL model Is possible predict numbers of items required? -- (machine learning deep learning neural network regression data science model) <p>I have a dataset is regarding ambulance call data.</p>&#xA;<p>Data sample:</p>&#xA;<pre><code> v_type district gender complaint age Month&#xA;0 Advanced...
habedi/stack-exchange-dataset
91,123
Is a multi-layer perceptron exactly the same as a simple fully connected neural network?
<p>I've been learning a little about StyleGans lately and somebody told me that a Multi-Layer Perceptron, MLP, is used in parts of the architecture for transforming noise. When I saw this person's code, it just looked like a normal 8-layer fully connected network (i.e. linear--&gt;relu--&gt;linear--&gt;relu--&gt;...)</...
deep learning neural network gan mlp
1
Is a multi-layer perceptron exactly the same as a simple fully connected neural network? -- (deep learning neural network gan mlp) <p>I've been learning a little about StyleGans lately and somebody told me that a Multi-Layer Perceptron, MLP, is used in parts of the architecture for transforming noise. When I saw this p...
habedi/stack-exchange-dataset
91,137
How to determine the inputshape of a ANN in Keras
<p>I started to use Keras for ANN and something that I do not really understand is which values to choose for the input_shape parameter of the first layer in an ANN? I know that the number should be equal to the inputs but how can I determine the order and the other value in the vector. For example, here is the code of...
neural network keras
1
How to determine the inputshape of a ANN in Keras -- (neural network keras) <p>I started to use Keras for ANN and something that I do not really understand is which values to choose for the input_shape parameter of the first layer in an ANN? I know that the number should be equal to the inputs but how can I determine t...
habedi/stack-exchange-dataset
91,141
Is it good practice to use SMOTE when you have a data set that has imbalanced classes when using BERT model for text classification?
<p>I had a question related to SMOTE. If you have a data set that is imbalanced, is it correct to use SMOTE when you are using BERT? I believe I read somewhere that you do not need to do this since BERT take this into account, but I'm unable to find the article where I read that. Either from your own research or experi...
bert smote oversampling
1
Is it good practice to use SMOTE when you have a data set that has imbalanced classes when using BERT model for text classification? -- (bert smote oversampling) <p>I had a question related to SMOTE. If you have a data set that is imbalanced, is it correct to use SMOTE when you are using BERT? I believe I read somewher...
habedi/stack-exchange-dataset
91,159
When does it make sense to add numbers with different units?
<p>Given two vectors containing numbers that have different natures / units, (example length in Meters and weight in Kilograms), does it make sense to calculate euclidean distance between these two vectors or cosine similarity?</p>&#xA;<p>The equations imply that you have to add <span class="math-container">$meters^2$<...
tfidf
1
When does it make sense to add numbers with different units? -- (tfidf) <p>Given two vectors containing numbers that have different natures / units, (example length in Meters and weight in Kilograms), does it make sense to calculate euclidean distance between these two vectors or cosine similarity?</p>&#xA;<p>The equat...
habedi/stack-exchange-dataset
91,161
Do I load all files at once or one at a time?
<p>I currently have <span class="math-container">$1700+$</span> CSV files. Each of them is in the same format and structure, give or take a row or possibly a column at the end. Each CSV is <span class="math-container">$\approx 3.8$</span> MB.</p>&#xA;<p>I need to perform a transformation on each file</p>&#xA;<ol>&#xA;<...
dataset optimization processing julia
1
Do I load all files at once or one at a time? -- (dataset optimization processing julia) <p>I currently have <span class="math-container">$1700+$</span> CSV files. Each of them is in the same format and structure, give or take a row or possibly a column at the end. Each CSV is <span class="math-container">$\approx 3.8$...
habedi/stack-exchange-dataset
91,167
In Neural network, if one node is deleted, where should other nodes be connected?
<p>If it's a fully connected neural network, should we just remove those lines that were originally connected to the deleted node, and hence no actual changes on the remaining nodes? Except there weights and bias will be updated?</p>&#xA;
neural network
1
In Neural network, if one node is deleted, where should other nodes be connected? -- (neural network) <p>If it's a fully connected neural network, should we just remove those lines that were originally connected to the deleted node, and hence no actual changes on the remaining nodes? Except there weights and bias will ...
habedi/stack-exchange-dataset
91,177
How to best visualize or capture time interval between lab measurements?
<p>I have a table like as shown below</p>&#xA;<pre><code>subject_id lab_test_id lab_test_date value difference&#xA;&#xA;&quot;10005606&quot; &quot;20364112&quot; &quot;2143-12-06 02:32:00&quot; &quot;1.3&quot; &quot;13:10:00&quot;&#xA;&quot;10005606&quot; &quot;20364112&quot; &quot;2143-12-06 15:4...
machine learning deep learning data mining data cleaning visualization
1
How to best visualize or capture time interval between lab measurements? -- (machine learning deep learning data mining data cleaning visualization) <p>I have a table like as shown below</p>&#xA;<pre><code>subject_id lab_test_id lab_test_date value difference&#xA;&#xA;&quot;10005606&quot; &quot;20364112&...
habedi/stack-exchange-dataset
91,185
Prevent model from over-focusing on strong features
<p>I have a classification model (DNN/Linear layers with some transformers and other things later). The input to the model are several different modalities of different lengths and different amounts of information. I am trying to mitigate the dimensionality difference by projecting different modalities into the same di...
machine learning deep learning neural network machine learning model
1
Prevent model from over-focusing on strong features -- (machine learning deep learning neural network machine learning model) <p>I have a classification model (DNN/Linear layers with some transformers and other things later). The input to the model are several different modalities of different lengths and different amo...
habedi/stack-exchange-dataset
91,196
Efficient way to create matrix that shows if data exits per day
<p>So I have a dataset containing different ID's and the time the data was created.</p>&#xA;<pre><code> ID Date&#xA;0 123123 2021-03-24 12:43:13.494000+00:00&#xA;1 123412 2021-03-24 12:43:13.494000+00:00&#xA;2 123123 2021-03-24 12:43:15.935000+00:00&#xA;3 234234 ...
dataframe matrix
1
Efficient way to create matrix that shows if data exits per day -- (dataframe matrix) <p>So I have a dataset containing different ID's and the time the data was created.</p>&#xA;<pre><code> ID Date&#xA;0 123123 2021-03-24 12:43:13.494000+00:00&#xA;1 123412 2021-03-24 12:43:13.49400...
habedi/stack-exchange-dataset
91,209
Would a neural network trained on extracted features have the same accuracy as a full network with frozen layers?
<p>Let's say that I train two neural networks on the exact same dataset.</p>&#xA;<ol>&#xA;<li>The first network is a <code>VGG19</code> model with frozen convolutional layers so only the top dense layers are getting optimized.</li>&#xA;<li>The second network is composed <strong>only of dense layers</strong>, with exact...
machine learning neural network keras optimization feature extraction
1
Would a neural network trained on extracted features have the same accuracy as a full network with frozen layers? -- (machine learning neural network keras optimization feature extraction) <p>Let's say that I train two neural networks on the exact same dataset.</p>&#xA;<ol>&#xA;<li>The first network is a <code>VGG19</c...
habedi/stack-exchange-dataset
92,224
How to deal with class imbalance problem in natural language processing?
<p>I am doing a NLP binary classification task, using Bert + softmax layer on top of it. The network uses cross-entropy loss.</p>&#xA;<p>When the ratio of positive class to negative class is 1:1 or 1:2, the model performs well on correctly classifying both classes(accuracy for each class is around 0.92).</p>&#xA;<p>Whe...
classification class imbalance nlp bert
1
How to deal with class imbalance problem in natural language processing? -- (classification class imbalance nlp bert) <p>I am doing a NLP binary classification task, using Bert + softmax layer on top of it. The network uses cross-entropy loss.</p>&#xA;<p>When the ratio of positive class to negative class is 1:1 or 1:2,...
habedi/stack-exchange-dataset
92,227
reliability of human-level evaluation of the interpretability quality of a model
<p>Christoph Molnar, in his book <a href="https://christophm.github.io/interpretable-ml-book/" rel="nofollow noreferrer">Interpretable Machine Learning</a>, writes that</p>&#xA;<blockquote>&#xA;<p>Human level evaluation (simple task) is a simplified application level&#xA;evaluation. The difference is that these experim...
machine learning methodology
1
reliability of human-level evaluation of the interpretability quality of a model -- (machine learning methodology) <p>Christoph Molnar, in his book <a href="https://christophm.github.io/interpretable-ml-book/" rel="nofollow noreferrer">Interpretable Machine Learning</a>, writes that</p>&#xA;<blockquote>&#xA;<p>Human le...
habedi/stack-exchange-dataset
92,231
Autenocoder and anomaly detection task
<p>I'm trying to create an autoencoder for the anomaly detection task, but I'm noticing that even if it performs very well on the training set, it starts to stop recreating half of the test set. I tried with more than 10 models, (LSTM, ConvAE, ConvLSTM) and all of them fails to reconstruct the time series in the same p...
time series autoencoder anomaly detection overfitting matplotlib
1
Autenocoder and anomaly detection task -- (time series autoencoder anomaly detection overfitting matplotlib) <p>I'm trying to create an autoencoder for the anomaly detection task, but I'm noticing that even if it performs very well on the training set, it starts to stop recreating half of the test set. I tried with mor...
habedi/stack-exchange-dataset
92,237
Drug Making Using Genetic Algorithms
<p>I want to create a drug using N different chemicals for fighting a bacterial infection those N chemicals are contained inside the drug in different quantities my work environment is a simulated one and I want to create the drug using genetic algorithms.</p>&#xA;<p>How can I use genetic algorithm for this problem. Wh...
machine learning neural network genetic algorithms
1
Drug Making Using Genetic Algorithms -- (machine learning neural network genetic algorithms) <p>I want to create a drug using N different chemicals for fighting a bacterial infection those N chemicals are contained inside the drug in different quantities my work environment is a simulated one and I want to create the d...
habedi/stack-exchange-dataset
92,250
Why is the optimal C chosen by GridSearchCV so small?
<p>I'm trying to use GridSearchCV to select the optimal C value in this simple SVM problem with non-separable samples. The issue I'm having is that when I run the code the optimal C is chosen to be ridiculously small (~e-18) so that the margin is expanded to contain all samples. Even when I alter the samples so that th...
scikit learn cross validation svm regularization
1
Why is the optimal C chosen by GridSearchCV so small? -- (scikit learn cross validation svm regularization) <p>I'm trying to use GridSearchCV to select the optimal C value in this simple SVM problem with non-separable samples. The issue I'm having is that when I run the code the optimal C is chosen to be ridiculously s...
habedi/stack-exchange-dataset
92,253
How do I calculate the accuracy for graph mining in terms of (top 1%)?
<p>I have 3600 samples in my dataset. I split the dataset into the <code>train (2700)</code> and <code>test (900)</code>.</p>&#xA;<p>My problem is related to <code>new link prediction</code>. I am using the <code>Common Neighbor (CN)</code> method. Using CN, we can predict new links based on the <code>score</code>. The...
machine learning data mining accuracy graphs confusion matrix
1
How do I calculate the accuracy for graph mining in terms of (top 1%)? -- (machine learning data mining accuracy graphs confusion matrix) <p>I have 3600 samples in my dataset. I split the dataset into the <code>train (2700)</code> and <code>test (900)</code>.</p>&#xA;<p>My problem is related to <code>new link predictio...
habedi/stack-exchange-dataset
92,269
BERT Masked Language Model question
<p>I have been reading about BERT from the internet, and from what I understand the point of masked language modelling for BERT pretraining is so that BERT will learn to guess a &quot;masked&quot; word from the context given. The loss function will be the lowest for output embeddings which are closest to the original m...
bert transformer
1
BERT Masked Language Model question -- (bert transformer) <p>I have been reading about BERT from the internet, and from what I understand the point of masked language modelling for BERT pretraining is so that BERT will learn to guess a &quot;masked&quot; word from the context given. The loss function will be the lowest...
habedi/stack-exchange-dataset
92,270
Input layer is incompatible even when dimensions (apparently) match
<p>I am making a sequential neural network for classification, with 3 dense layers, which will be trained on a simple synthetic dataset. The description of dataset is as follows:</p>&#xA;<ul>&#xA;<li>Data and class labels are integers. They are 2000 each.</li>&#xA;<li>There is only a single feature column (populated by...
machine learning keras python 3.x
1
Input layer is incompatible even when dimensions (apparently) match -- (machine learning keras python 3.x) <p>I am making a sequential neural network for classification, with 3 dense layers, which will be trained on a simple synthetic dataset. The description of dataset is as follows:</p>&#xA;<ul>&#xA;<li>Data and clas...
habedi/stack-exchange-dataset
92,281
How can precision be less than one in Leave-One-Subject-Out binary classification if each subject contains only one class
<p>Say I'm trying to classify a medical condition.</p>&#xA;<p>Theres only two classes: Sick and Healthy.</p>&#xA;<p>I build a model and I can't split the data because I don't want data from the same patient being in training and test set. So I elect to use Leave-One-Subject-Out, training the model on all subject except...
machine learning classification scikit learn machine learning model cross validation
1
How can precision be less than one in Leave-One-Subject-Out binary classification if each subject contains only one class -- (machine learning classification scikit learn machine learning model cross validation) <p>Say I'm trying to classify a medical condition.</p>&#xA;<p>Theres only two classes: Sick and Healthy.</p>...
habedi/stack-exchange-dataset
92,300
How to use data generator for regression keras?
<p>I am using the Keras data generator to load data from a directory. I am basically dealing with a regression i.e there is a numerical value for each of my images in the range <code>[-1 1]</code>. I am using the following code to load images from the directory:</p>&#xA;<pre><code>df=pd.DataFrame(columns=['Image','Stee...
neural network keras tensorflow regression convolutional neural network
1
How to use data generator for regression keras? -- (neural network keras tensorflow regression convolutional neural network) <p>I am using the Keras data generator to load data from a directory. I am basically dealing with a regression i.e there is a numerical value for each of my images in the range <code>[-1 1]</code...
habedi/stack-exchange-dataset
92,303
On what principle did Google's DeepMind learn to walk?
<p>I just saw <a href="https://www.youtube.com/watch?v=gn4nRCC9TwQ" rel="nofollow noreferrer">this video</a> on Youtube.</p>&#xA;<p>On what principle did Google's DeepMind learn to walk?</p>&#xA;<p>Was it Q-Learning or a Genetic Algorithm or Policy Gradient?</p>&#xA;
machine learning deep learning q learning genetic algorithms deepmind
1
On what principle did Google's DeepMind learn to walk? -- (machine learning deep learning q learning genetic algorithms deepmind) <p>I just saw <a href="https://www.youtube.com/watch?v=gn4nRCC9TwQ" rel="nofollow noreferrer">this video</a> on Youtube.</p>&#xA;<p>On what principle did Google's DeepMind learn to walk?</p>...
habedi/stack-exchange-dataset
92,309
How to interpret fast-rcnn metrics?
<p>I'm following this <a href="https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html" rel="nofollow noreferrer">tutorial</a> to fine tune Faster RCNN model, during training process a lot of statistics are produced however I don't know how to interpret them.</p>&#xA;<p>what are major characteristics to lo...
deep learning computer vision faster rcnn
1
How to interpret fast-rcnn metrics? -- (deep learning computer vision faster rcnn) <p>I'm following this <a href="https://pytorch.org/tutorials/intermediate/torchvision_tutorial.html" rel="nofollow noreferrer">tutorial</a> to fine tune Faster RCNN model, during training process a lot of statistics are produced however ...
habedi/stack-exchange-dataset
92,327
Organizing a csv file of multiple datasets into a list of Pandas dataframes
<p>I have a csv file, containing results from a Computational Fluid Dynamics (CFD) simulation (a sample of my csv file is attached as a google drive link; file size: 1,392KB). In particular, the csv file has information about multiple streamlines (number of streamlines may reach 1000 depending on the case). All the dat...
python pandas
1
Organizing a csv file of multiple datasets into a list of Pandas dataframes -- (python pandas) <p>I have a csv file, containing results from a Computational Fluid Dynamics (CFD) simulation (a sample of my csv file is attached as a google drive link; file size: 1,392KB). In particular, the csv file has information about...
habedi/stack-exchange-dataset
92,337
Obtaining column values for a dataframe from another dataframe based on a common column variable
<p>I have 2 dataframes:&#xA;<code>df1 = pd.DataFrame({&quot;animal&quot;: [Cat, Dog, Rat, Bull, Dog, Bull, Bull, Dog, Cat, Rat, Dog], &quot;lifeSpan&quot;: [2, 4, 6, 0, 4, 0, 0, 4, 2, 6, 4]})</code></p>&#xA;<p><code>df2 = pd.Dataframe({&quot;animal&quot;:[Bull, Cat, Rat, Dog]})</code>&#xA;The &quot;LifeSpan&quot; value...
python dataset pandas dataframe
1
Obtaining column values for a dataframe from another dataframe based on a common column variable -- (python dataset pandas dataframe) <p>I have 2 dataframes:&#xA;<code>df1 = pd.DataFrame({&quot;animal&quot;: [Cat, Dog, Rat, Bull, Dog, Bull, Bull, Dog, Cat, Rat, Dog], &quot;lifeSpan&quot;: [2, 4, 6, 0, 4, 0, 0, 4, 2, 6,...
habedi/stack-exchange-dataset
92,341
How to read the labeled enron dataset categories?
<p>I am trying to use the labeled Enron dataset (<a href="https://data.world/brianray/enron-email-dataset" rel="nofollow noreferrer">link</a>) but I am really confused about the labeling system they use. I understand the <code>Cat_[1-12]_level_weight</code> is some form of confidence level. This dataset labeled by mult...
classification nlp dataset feature engineering
1
How to read the labeled enron dataset categories? -- (classification nlp dataset feature engineering) <p>I am trying to use the labeled Enron dataset (<a href="https://data.world/brianray/enron-email-dataset" rel="nofollow noreferrer">link</a>) but I am really confused about the labeling system they use. I understand t...
habedi/stack-exchange-dataset
92,358
How to make a linear model with a constant value in R?
<p>I'm working on an unassessed homework problem from unpublished course notes of a statistics module from a second year university mathematics course.</p>&#xA;<p>I'm trying to plot a 2-parameter full linear model and a 1-parameter reduced linear model for the same data set. I can't figure out how to plot the 1-paramet...
rstudio self study linear models
1
How to make a linear model with a constant value in R? -- (rstudio self study linear models) <p>I'm working on an unassessed homework problem from unpublished course notes of a statistics module from a second year university mathematics course.</p>&#xA;<p>I'm trying to plot a 2-parameter full linear model and a 1-param...
habedi/stack-exchange-dataset
92,363
Different number of features in train vs test when using Label Encoding
<p>This is not a duplicate of <a href="https://datascience.stackexchange.com/questions/18956/different-number-of-features-in-train-vs-test/75047">Different number of features in train vs test</a></p>&#xA;<p>There are some categorical columns in my data, and the cardinality for each of them is large, so I chose to use L...
machine learning categorical data categorical encoding
1
Different number of features in train vs test when using Label Encoding -- (machine learning categorical data categorical encoding) <p>This is not a duplicate of <a href="https://datascience.stackexchange.com/questions/18956/different-number-of-features-in-train-vs-test/75047">Different number of features in train vs t...
habedi/stack-exchange-dataset
92,375
Image classification vs medical grading problems
<p>For image classification problems like cat vs dogs, the output layer is 2.</p>&#xA;<p>Image classification problems like diabetic retinopathy seem to be more of a grading classifier. Although the targets range from 0 to 4, (signifying the severity of the condition), is it better to have 1 as the output layer, or 5, ...
image classification kaggle
1
Image classification vs medical grading problems -- (image classification kaggle) <p>For image classification problems like cat vs dogs, the output layer is 2.</p>&#xA;<p>Image classification problems like diabetic retinopathy seem to be more of a grading classifier. Although the targets range from 0 to 4, (signifying ...
habedi/stack-exchange-dataset
92,393
Is sequential pattern mining possible with machine learning?
<p>I am curious if sequential pattern mining algoritmhs fill a unique gap or the same thing can be achieved with alternative methods for example wih machine learning or something else. Do you know any alternative methodology that can achieve the same thing? (For me this would be relevant, because if there is an alterna...
machine learning sequential pattern mining
1
Is sequential pattern mining possible with machine learning? -- (machine learning sequential pattern mining) <p>I am curious if sequential pattern mining algoritmhs fill a unique gap or the same thing can be achieved with alternative methods for example wih machine learning or something else. Do you know any alternativ...
habedi/stack-exchange-dataset
92,402
Using Sklearn's predefined split
<p>I am working on a binary classification task using SVM. The dataset is quite large so I don't want to use k-fold CV for parameter tuning, but instead a simple train-validation-test split. I have done the following:</p>&#xA;<pre><code>X_train, X_test, y_train, y_test = train_test_split(&#xA; X, y, stratify = y, te...
scikit learn cross validation hyperparameter tuning
1
Using Sklearn's predefined split -- (scikit learn cross validation hyperparameter tuning) <p>I am working on a binary classification task using SVM. The dataset is quite large so I don't want to use k-fold CV for parameter tuning, but instead a simple train-validation-test split. I have done the following:</p>&#xA;<pre...
habedi/stack-exchange-dataset
92,407
Audio not saving in google colab
<pre><code># all imports&#xA;from IPython.display import Javascript&#xA;from google.colab import output&#xA;from base64 import b64decode&#xA;&#xA;&#xA;RECORD = &quot;&quot;&quot;&#xA;const sleep = time =&gt; new Promise(resolve =&gt; setTimeout(resolve, time))&#xA;const b2text = blob =&gt; new Promise(resolve =&gt; {&...
python colab javascript
1
Audio not saving in google colab -- (python colab javascript) <pre><code># all imports&#xA;from IPython.display import Javascript&#xA;from google.colab import output&#xA;from base64 import b64decode&#xA;&#xA;&#xA;RECORD = &quot;&quot;&quot;&#xA;const sleep = time =&gt; new Promise(resolve =&gt; setTimeout(resolve, tim...
habedi/stack-exchange-dataset
92,422
Regression and Classification, which is better in financial market price prediction?
<p>I want to use a model to trade in finanical market.</p>&#xA;<p>which i have several features, like macd, rsi, or other common features.</p>&#xA;<p>and my target is to make a tradeable predict in every time point.</p>&#xA;<p>so my target can be:</p>&#xA;<ol>&#xA;<li>yield in a fixed time laster, like, 30 min. yt = cl...
machine learning linear regression finance
1
Regression and Classification, which is better in financial market price prediction? -- (machine learning linear regression finance) <p>I want to use a model to trade in finanical market.</p>&#xA;<p>which i have several features, like macd, rsi, or other common features.</p>&#xA;<p>and my target is to make a tradeable ...
habedi/stack-exchange-dataset
92,434
Integer encoding and weighing when one feature consists of more names
<p>Hello I am trying to make a content based movie recommendation system and one feature is genre of the movie. I will give an integer number to each genre randomly. However, some movies are of more than 1 genre. I will use tf-idf for weigthing these features. However, I am very confused that what to do when a movie is...
recommender system tfidf features weighted data
1
Integer encoding and weighing when one feature consists of more names -- (recommender system tfidf features weighted data) <p>Hello I am trying to make a content based movie recommendation system and one feature is genre of the movie. I will give an integer number to each genre randomly. However, some movies are of mor...
habedi/stack-exchange-dataset
92,442
3 images as one input in CNN (U-Net)
<p>I have been advised by my supervisor that if my U-Net segmentation network has RGB images at the input then I could use the channels for different images - median filter for R, normalization for G, canny-edge detection for B (example). I have no idea how to do that. Tried to find something similiar here but unfortun...
deep learning cnn convolutional neural network image preprocessing image segmentation
1
3 images as one input in CNN (U-Net) -- (deep learning cnn convolutional neural network image preprocessing image segmentation) <p>I have been advised by my supervisor that if my U-Net segmentation network has RGB images at the input then I could use the channels for different images - median filter for R, normalizatio...
habedi/stack-exchange-dataset
92,448
How to model the probability of detecting an image, given it is seen multiple times
<p>Are there any existing methods/models describing the probability of an object being detected by a computer vision algorithm given it is seen <span class="math-container">$n$</span> times at similar angles and orientations? I know that an autonomous car may, for example, have trouble recognizing a stop sign and as a ...
predictive modeling computer vision object detection probability self driving
1
How to model the probability of detecting an image, given it is seen multiple times -- (predictive modeling computer vision object detection probability self driving) <p>Are there any existing methods/models describing the probability of an object being detected by a computer vision algorithm given it is seen <span cla...
habedi/stack-exchange-dataset
92,472
Which policy gradient method is used for continuous action spaces?
<p>Which policy gradient method is used that deals with continuous action spaces?</p>&#xA;
machine learning deep learning reinforcement learning policy gradients
1
Which policy gradient method is used for continuous action spaces? -- (machine learning deep learning reinforcement learning policy gradients) <p>Which policy gradient method is used that deals with continuous action spaces?</p>&#xA;
habedi/stack-exchange-dataset
92,478
Improve Convolutional Autoencoder
<p>I just built a <strong>Convolutional Autoencoder</strong> to try to reconstruct a time series with shape <code>(4000, 10, 30)</code>. This is the code, I used a batch size of 32, but I think it is overfitting since it performs well on the training set but starts not reconstruction well in the validation and test set...
neural network keras convolutional neural network training autoencoder
1
Improve Convolutional Autoencoder -- (neural network keras convolutional neural network training autoencoder) <p>I just built a <strong>Convolutional Autoencoder</strong> to try to reconstruct a time series with shape <code>(4000, 10, 30)</code>. This is the code, I used a batch size of 32, but I think it is overfittin...
habedi/stack-exchange-dataset
92,499
Rescale parameter in data augmentation
<p>I'm a little bit lost about the rescale parameter in the <code>ImageDatagenerator</code> function.&#xA;I know that the rescale argument by itself does not augment my data and that by doing <code>rescale=1./255</code> it will convert the pixels in range [0,255] to range [0,1].</p>&#xA;<p>Currently, I'm only using ran...
keras cnn data augmentation
1
Rescale parameter in data augmentation -- (keras cnn data augmentation) <p>I'm a little bit lost about the rescale parameter in the <code>ImageDatagenerator</code> function.&#xA;I know that the rescale argument by itself does not augment my data and that by doing <code>rescale=1./255</code> it will convert the pixels i...
habedi/stack-exchange-dataset
92,509
Suitable metric choice for imbalanced multi-class dataset (classes have equal importance)
<p>What type of metrics I should use to evaluate my classification models, given that I have two imbalanced multi-class datasets (21 and 16 classes, respectively) where all classes have equal importance?</p>&#xA;<p>I am somehow convinced with macro-averaged-based metrics choice such as macro F1 and macro TNR, ...etc. A...
machine learning classification multiclass classification evaluation confusion matrix
1
Suitable metric choice for imbalanced multi-class dataset (classes have equal importance) -- (machine learning classification multiclass classification evaluation confusion matrix) <p>What type of metrics I should use to evaluate my classification models, given that I have two imbalanced multi-class datasets (21 and 16...
habedi/stack-exchange-dataset
92,525
Is it a good idea to combine fine tuning and feature extraction techniques?
<p>I have a normal/tumor medical images dataset and, for the same patients, also the relative genomics, and my goal is to predict if a patient has a tumor by combining all the information.</p>&#xA;<p>To achieve this, I am using a ResNet50 with imagenet weights to extract features from images, and other methods to extra...
machine learning deep learning feature extraction finetuning
1
Is it a good idea to combine fine tuning and feature extraction techniques? -- (machine learning deep learning feature extraction finetuning) <p>I have a normal/tumor medical images dataset and, for the same patients, also the relative genomics, and my goal is to predict if a patient has a tumor by combining all the in...
habedi/stack-exchange-dataset
92,531
when will the incareful features harm the model?
<p>I am working on financial prediction problem(time-series prediction problem).</p>&#xA;<p>I think feature engineering is importance in this problem. So i am careful to check the feature's effectiveness. And i perfer linear regression, because i think it's easy to explain, and I am not good at machine learning models...
machine learning feature selection feature engineering
1
when will the incareful features harm the model? -- (machine learning feature selection feature engineering) <p>I am working on financial prediction problem(time-series prediction problem).</p>&#xA;<p>I think feature engineering is importance in this problem. So i am careful to check the feature's effectiveness. And i ...
habedi/stack-exchange-dataset
92,532
KFold cross validation ambiguity
<p>I just studied K-Fold cross validation technique for finding model parameters and something seemed to be very confusing. Every tutorial I follow says that for K-Fold validation, the whole dataset will be split into K portions and K models will be fit with one portion as validation dataset each time. So, my doubt is ...
machine learning cross validation model selection
1
KFold cross validation ambiguity -- (machine learning cross validation model selection) <p>I just studied K-Fold cross validation technique for finding model parameters and something seemed to be very confusing. Every tutorial I follow says that for K-Fold validation, the whole dataset will be split into K portions and...
habedi/stack-exchange-dataset
92,547
Issue replicating AutoKeras StructuredDataClassifier
<p>I have a model that I generated using AutoKeras and I want to replicate the model so that I can construct it with keras tuner to do further hyperparameter tuning. But I am running into issues replicating the model. The model summary of the autokeras model is:</p>&#xA;<pre><code>Model: &quot;model&quot;&#xA;_________...
keras tensorflow
1
Issue replicating AutoKeras StructuredDataClassifier -- (keras tensorflow) <p>I have a model that I generated using AutoKeras and I want to replicate the model so that I can construct it with keras tuner to do further hyperparameter tuning. But I am running into issues replicating the model. The model summary of the au...
habedi/stack-exchange-dataset
92,550
Max Pooling in first Layer of CNN
<p>I am seeing, in all the notebooks that I found, that Max Pooling is never used in the first layer of a CNN. Why this? Is it a convention among data scientist to do not use max pooling in the first layer? Or is it an error to use in the first layer?</p>&#xA;
cnn image classification convolutional neural network pooling
1
Max Pooling in first Layer of CNN -- (cnn image classification convolutional neural network pooling) <p>I am seeing, in all the notebooks that I found, that Max Pooling is never used in the first layer of a CNN. Why this? Is it a convention among data scientist to do not use max pooling in the first layer? Or is it an ...
habedi/stack-exchange-dataset
92,560
Notebook for data science
<p>I'm searching for an online Jupiter notebook environment that allows collaborating in real-time. I've found that I've choice from two services Deepnote.com and DataLore by JetBrains. I have little experience with Deepnote and it starts to perform very poorly when you have a lot of cells in your notebook. If anyone h...
machine learning jupyter colab
1
Notebook for data science -- (machine learning jupyter colab) <p>I'm searching for an online Jupiter notebook environment that allows collaborating in real-time. I've found that I've choice from two services Deepnote.com and DataLore by JetBrains. I have little experience with Deepnote and it starts to perform very poo...
habedi/stack-exchange-dataset
92,574
How to best visualise two sets of data over several years?
<p>I have a set of data on crime statistics by police force and year, and another set of data showing police workforce numbers over the same period. I am trying to determine the best way to show this data. I have tried three alternatives but looking for preference out of these three or altnernatives that would show the...
visualization
1
How to best visualise two sets of data over several years? -- (visualization) <p>I have a set of data on crime statistics by police force and year, and another set of data showing police workforce numbers over the same period. I am trying to determine the best way to show this data. I have tried three alternatives but ...
habedi/stack-exchange-dataset
92,578
Do we have any method which handles the imbalanced classification with sample weighting instead of class weighting?
<p>I am looking for methods that use sample weighting instead of class weighting for the imbalanced classification. I think sample weighting is more precise than weighting all the samples from one class with the same weight. Am I thinking right? Is there any paper that discusses this issue?</p>&#xA;
class imbalance weighted data imbalanced data
1
Do we have any method which handles the imbalanced classification with sample weighting instead of class weighting? -- (class imbalance weighted data imbalanced data) <p>I am looking for methods that use sample weighting instead of class weighting for the imbalanced classification. I think sample weighting is more prec...
habedi/stack-exchange-dataset
92,581
Warning when plotting confusion matrix with all sample of one class
<p>I have two arrays: the first one with all the correct labels (they are all set to zero since each sample belong to the same class) and another one with all the labels predicted by my neural network. What I want do to is plot a simple confusion matrix to show the results. This is my code:</p>&#xA;<pre><code>test_labe...
python prediction confusion matrix plotting f1score
1
Warning when plotting confusion matrix with all sample of one class -- (python prediction confusion matrix plotting f1score) <p>I have two arrays: the first one with all the correct labels (they are all set to zero since each sample belong to the same class) and another one with all the labels predicted by my neural ne...
habedi/stack-exchange-dataset
92,608
How to use random forest with large number of categorical features and categories?
<p>I have 2 features <code>productName and productCategory</code> , both of them are strings. I have a category named <code>supplier</code>. There are 4000 suppliers and 500,000 items in test data. I don't think <code>one hot encoding</code> will be a good approach to deal with such a big data. How should i handle thes...
scikit learn random forest one hot encoding
1
How to use random forest with large number of categorical features and categories? -- (scikit learn random forest one hot encoding) <p>I have 2 features <code>productName and productCategory</code> , both of them are strings. I have a category named <code>supplier</code>. There are 4000 suppliers and 500,000 items in t...
habedi/stack-exchange-dataset
92,636
Incorrect visualisation using Plotly
<pre><code>kmeans = KMeans(n_clusters=4)&#xA;&#xA;model = kmeans.fit(europe_july)&#xA;pred = model.labels_&#xA;europe_july['cluster'] = pred&#xA;&#xA;pca = PCA(n_components=2)&#xA;pca_model = pca.fit_transform(europe_july)&#xA;data_transform = pd.DataFrame(data = pca_model, columns = ['PCA1', 'PCA2'])&#xA;data_transfor...
python clustering visualization plotly
1
Incorrect visualisation using Plotly -- (python clustering visualization plotly) <pre><code>kmeans = KMeans(n_clusters=4)&#xA;&#xA;model = kmeans.fit(europe_july)&#xA;pred = model.labels_&#xA;europe_july['cluster'] = pred&#xA;&#xA;pca = PCA(n_components=2)&#xA;pca_model = pca.fit_transform(europe_july)&#xA;data_transfo...
habedi/stack-exchange-dataset
92,640
In classification task, is it possible that a truly classified data has a higher loss compared to a miscallisfied data?
<p>Given a classifier using softmax, is it possible that say, for data point <code>a</code> which our model has correctly classified, has higher loss compared to data point <code>b</code> which is misclassified by our model?&#xA;If yes, please bring an example. If not, please prove.</p>&#xA;<p>=========================...
classification loss function softmax
1
In classification task, is it possible that a truly classified data has a higher loss compared to a miscallisfied data? -- (classification loss function softmax) <p>Given a classifier using softmax, is it possible that say, for data point <code>a</code> which our model has correctly classified, has higher loss compared...
habedi/stack-exchange-dataset
92,647
Encode the days of week as numeric variable
<p>I would like to understand if there is the possibility to encode the days of the week as a single numerical column to preserve the ordinal relationship between the days.</p>&#xA;<p>My task is a classification task.</p>&#xA;<p>So, something like this:</p>&#xA;<ul>&#xA;<li>Monday: 0</li>&#xA;<li>Thrusday: 1</li>&#xA;<...
classification encoding day
1
Encode the days of week as numeric variable -- (classification encoding day) <p>I would like to understand if there is the possibility to encode the days of the week as a single numerical column to preserve the ordinal relationship between the days.</p>&#xA;<p>My task is a classification task.</p>&#xA;<p>So, something ...
habedi/stack-exchange-dataset
92,654
Hi, im currently working for a company that has some inventory control problems
<p>First, I was asked by the manager to make a plot showing produced vs received items, its a multistage process so we are only in charge of one of the steps which is designing, I made the plot comparing Received cases vs produced here in my country, produced out of the country, total produced and % of advancement.</p>...
regression data data analysis plotting data product
1
Hi, im currently working for a company that has some inventory control problems -- (regression data data analysis plotting data product) <p>First, I was asked by the manager to make a plot showing produced vs received items, its a multistage process so we are only in charge of one of the steps which is designing, I mad...
habedi/stack-exchange-dataset
92,655
Two-tower net does not learn when made deep
<p>I have been trying to train a relatively simple two-tower net for recommendation. I am using PyTorch and the implementation is the following - basically embeddings layers for users and items, optional feed-forward net for both towers, dot product between the user and items representations, and sigmoid.</p>&#xA;<pre>...
neural network pytorch recommender system
1
Two-tower net does not learn when made deep -- (neural network pytorch recommender system) <p>I have been trying to train a relatively simple two-tower net for recommendation. I am using PyTorch and the implementation is the following - basically embeddings layers for users and items, optional feed-forward net for both...
habedi/stack-exchange-dataset
92,673
Should I report loss on the last batch or the entire training dataset?
<p>In the training loop below, you can see that <code>train_loss</code> represents the loss on the most recent batch.</p>&#xA;<p>Whereas the <code>eval_loss</code> is computed on the entire training dataset.</p>&#xA;<p>When I print it out, should I be recalculating the <code>train_loss</code> against the entire trainin...
deep learning neural network pytorch
1
Should I report loss on the last batch or the entire training dataset? -- (deep learning neural network pytorch) <p>In the training loop below, you can see that <code>train_loss</code> represents the loss on the most recent batch.</p>&#xA;<p>Whereas the <code>eval_loss</code> is computed on the entire training dataset....
habedi/stack-exchange-dataset
92,684
How to plot multiple bar charts with different infill and outline?
<p>I have the CSV's of data. I want to plot the distribution of every attribute or a single one to compare the distribution from other CSV's, Since all attributes are the same but the distribution is different from each other because I have made the synthetic data using the original one.&#xA;Just like shown below that ...
python visualization dataframe graphs matplotlib
1
How to plot multiple bar charts with different infill and outline? -- (python visualization dataframe graphs matplotlib) <p>I have the CSV's of data. I want to plot the distribution of every attribute or a single one to compare the distribution from other CSV's, Since all attributes are the same but the distribution is...
habedi/stack-exchange-dataset
92,699
Extracting and tagging/labeling text from pdfs
<p>I'm trying to extract paragraphs from 230 pdfs that have similar formats, and then label the paragraphs based on the pdf's section headings. Normally, I'd convert the pdf to txt files or extract the text using pdftools on R, but this would prevent me from distinguishing the text in headings -- which is bold, has a c...
text mining preprocessing
1
Extracting and tagging/labeling text from pdfs -- (text mining preprocessing) <p>I'm trying to extract paragraphs from 230 pdfs that have similar formats, and then label the paragraphs based on the pdf's section headings. Normally, I'd convert the pdf to txt files or extract the text using pdftools on R, but this would...
habedi/stack-exchange-dataset
92,705
Are there any tree-based models that use a genetic algorithm to generate the trees?
<p>I have a large dataset (195 features x 20m samples) that I have trained using XGBoost. I would like to see if a genetic algorithm can beat XGBoost since the data has so much noise it is prone to overfitting.</p>&#xA;<p>I would like to use a tree-based model so I don't have to standardize the data, and the features ...
machine learning python decision trees genetic algorithms
1
Are there any tree-based models that use a genetic algorithm to generate the trees? -- (machine learning python decision trees genetic algorithms) <p>I have a large dataset (195 features x 20m samples) that I have trained using XGBoost. I would like to see if a genetic algorithm can beat XGBoost since the data has so m...
habedi/stack-exchange-dataset
92,710
What is this PIP syntax: "azureml-dataset-runtime[pandas,fuse]"
<p>I came recently across this environment file:</p>&#xA;<pre class="lang-yaml prettyprint-override"><code>name: azureml_mnist&#xA;channels:&#xA; - conda-forge&#xA; - defaults&#xA;dependencies:&#xA; - ipykernel=5.5.3&#xA; - matplotlib=3.4.1&#xA; - python=3.8&#xA; - pip &#xA; - pip:&#xA; - azureml-dataset-run...
python pip
1
What is this PIP syntax: "azureml-dataset-runtime[pandas,fuse]" -- (python pip) <p>I came recently across this environment file:</p>&#xA;<pre class="lang-yaml prettyprint-override"><code>name: azureml_mnist&#xA;channels:&#xA; - conda-forge&#xA; - defaults&#xA;dependencies:&#xA; - ipykernel=5.5.3&#xA; - matplotlib=3...
habedi/stack-exchange-dataset
92,721
Large variation in cross-validation scores
<p>I'm training a CNN with 5-fold stratified cross-validation. On the first fold, my accuracy is ~80%, on each subsequent fold the accuracy is ~50%. Finally, upon fitting the entire training set my accuracy jumps back to ~80%. I can see that on the folds with bad performance the accuracy and loss never really change. I...
deep learning cnn cross validation
1
Large variation in cross-validation scores -- (deep learning cnn cross validation) <p>I'm training a CNN with 5-fold stratified cross-validation. On the first fold, my accuracy is ~80%, on each subsequent fold the accuracy is ~50%. Finally, upon fitting the entire training set my accuracy jumps back to ~80%. I can see ...
habedi/stack-exchange-dataset
92,730
my graph does does not showing correct results of fine tuning and transfer learning it is showing single line in each graph instead of two lines
<pre><code>acc += history_fine.history['accuracy']&#xA;&#xA;val_acc += history_fine.history['val_accuracy']&#xA;&#xA;loss += history_fine.history['loss']&#xA;&#xA;val_loss += history_fine.history['val_loss']&#xA;&#xA;plt.figure(figsize=(8, 8))&#xA;plt.subplot(2, 1, 1)&#xA;plt.plot(acc, label='Training Accuracy')&#xA;pl...
python
1
my graph does does not showing correct results of fine tuning and transfer learning it is showing single line in each graph instead of two lines -- (python) <pre><code>acc += history_fine.history['accuracy']&#xA;&#xA;val_acc += history_fine.history['val_accuracy']&#xA;&#xA;loss += history_fine.history['loss']&#xA;&#xA;...
habedi/stack-exchange-dataset
92,748
How to make a neural network output a specific number out of a certain range?
<p>I have a neural network with an Input layer, 2 hidden Dense layers and an Output layer.</p>&#xA;<p>I would like for each neuron in the Output layer to give me a number between 0 and 2 (either 0, 1 or 2), like so:</p>&#xA;<p><a href="https://i.stack.imgur.com/1CrhM.png" rel="nofollow noreferrer"><img src="https://i.s...
neural network regression deep learning
1
How to make a neural network output a specific number out of a certain range? -- (neural network regression deep learning) <p>I have a neural network with an Input layer, 2 hidden Dense layers and an Output layer.</p>&#xA;<p>I would like for each neuron in the Output layer to give me a number between 0 and 2 (either 0,...
habedi/stack-exchange-dataset
92,770
How to calculate convolution for 2nd conv Layer in CNN, Do we need to average across all feature maps?
<p>I understand that for the first layer (assuming we have a grayscale image) we calculate the convolution of 3*3 receptive field as a weighted sum of receptive weights with pixels</p>&#xA;<p><span class="math-container">$ x1 · w1 + x2 · w2 + x3·w3 + ... + xn · wn$</span></p>&#xA;<p>But for the second layer, where we a...
deep learning cnn convolutional neural network convolution
1
How to calculate convolution for 2nd conv Layer in CNN, Do we need to average across all feature maps? -- (deep learning cnn convolutional neural network convolution) <p>I understand that for the first layer (assuming we have a grayscale image) we calculate the convolution of 3*3 receptive field as a weighted sum of re...
habedi/stack-exchange-dataset
92,789
Using Linear Regression to Learn Polynomial Regression
<p>Let's start by considering one-dimensional data, i.e., <span class="math-container">$d=1$</span>. In OLS regression, we would learn the function&#xA;<span class="math-container">$$&#xA;f(x)=w_{0}+w_{1} x,&#xA;$$</span>&#xA;where <span class="math-container">$x$</span> is the data point and <span class="math-containe...
machine learning regression linear regression numpy
1
Using Linear Regression to Learn Polynomial Regression -- (machine learning regression linear regression numpy) <p>Let's start by considering one-dimensional data, i.e., <span class="math-container">$d=1$</span>. In OLS regression, we would learn the function&#xA;<span class="math-container">$$&#xA;f(x)=w_{0}+w_{1} x,&...
habedi/stack-exchange-dataset