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
65,562
Is GridSearchCV in combination with ImageDataGenerator possible and recommendable?
<p>I want to optimize some hyperparameters for a CNN architecture by using GridSearchCV (Scikit-Learn) in combination with Data Augmentation (ImageDataGenerator from Keras).&#xA;However, GridSearchCV only offers the fit function and not the fit_generator function.&#xA;Is it even recommended to use data augmentation wit...
keras scikit learn grid search data augmentation gridsearchcv
1
Is GridSearchCV in combination with ImageDataGenerator possible and recommendable? -- (keras scikit learn grid search data augmentation gridsearchcv) <p>I want to optimize some hyperparameters for a CNN architecture by using GridSearchCV (Scikit-Learn) in combination with Data Augmentation (ImageDataGenerator from Kera...
habedi/stack-exchange-dataset
65,564
Why cant RNN learn long term dependencies=?
<p>In Colah's blog, he explain this.</p>&#xA;&#xA;<blockquote>&#xA; <p>In theory, RNNs are absolutely capable of handling such “long-term&#xA; dependencies.” A human could carefully pick parameters for them to&#xA; solve toy problems of this form. Sadly, in practice, RNNs don’t seem&#xA; to be able to learn them. T...
rnn
1
Why cant RNN learn long term dependencies=? -- (rnn) <p>In Colah's blog, he explain this.</p>&#xA;&#xA;<blockquote>&#xA; <p>In theory, RNNs are absolutely capable of handling such “long-term&#xA; dependencies.” A human could carefully pick parameters for them to&#xA; solve toy problems of this form. Sadly, in practi...
habedi/stack-exchange-dataset
65,569
How to interpret dummy variable in ML prediction?
<p>I am working on a binary classification problem where I have a mix of continuous and categorical variables.</p>&#xA;&#xA;<p>Categorical variables were created by me using <code>get_dummies</code> function in pandas.</p>&#xA;&#xA;<p>Now my questions are,</p>&#xA;&#xA;<p>1) I see that there is a parameter called <code...
machine learning deep learning data mining feature selection dummy variables
1
How to interpret dummy variable in ML prediction? -- (machine learning deep learning data mining feature selection dummy variables) <p>I am working on a binary classification problem where I have a mix of continuous and categorical variables.</p>&#xA;&#xA;<p>Categorical variables were created by me using <code>get_dumm...
habedi/stack-exchange-dataset
65,585
Decision tree with final decision being a linear regression
<p>Question:&#xA;I want to implement a decision tree with each leaf being a linear regression, does such a model exist (preferable in sklearn)?</p>&#xA;&#xA;<p><strong>Example case 1:</strong></p>&#xA;&#xA;<p>Mockup data is generated using the formula:</p>&#xA;&#xA;<pre><code>y = int(x) + x * 1.5&#xA;</code></pre>&#xA;...
python scikit learn decision trees
1
Decision tree with final decision being a linear regression -- (python scikit learn decision trees) <p>Question:&#xA;I want to implement a decision tree with each leaf being a linear regression, does such a model exist (preferable in sklearn)?</p>&#xA;&#xA;<p><strong>Example case 1:</strong></p>&#xA;&#xA;<p>Mockup data...
habedi/stack-exchange-dataset
65,601
Is there a paper accomplishing finding physical law from observation without premade perception, using machine learning?
<p>For example:&#xA;Isaac Newton finds law of universal gravitation just by looking a falling apple, without any premade perception of that phenomenon. Is it possible to accomplish that kind of discovery using machine learning?</p>&#xA;
machine learning neural network unsupervised learning
1
Is there a paper accomplishing finding physical law from observation without premade perception, using machine learning? -- (machine learning neural network unsupervised learning) <p>For example:&#xA;Isaac Newton finds law of universal gravitation just by looking a falling apple, without any premade perception of that ...
habedi/stack-exchange-dataset
65,603
Terminology - regression with one output and multiple output variables
<p>I am trying to predict the response when the input is represented by Fourier transform. These form the features and are typically represented as a vector, <span class="math-container">$x_1,x_2,...,x_d$</span> where <span class="math-container">$d$</span> is the length of the fourier transform. Based on my understand...
time series regression prediction terminology
1
Terminology - regression with one output and multiple output variables -- (time series regression prediction terminology) <p>I am trying to predict the response when the input is represented by Fourier transform. These form the features and are typically represented as a vector, <span class="math-container">$x_1,x_2,.....
habedi/stack-exchange-dataset
65,608
XGBoost Feature Importance, Permutation Importance, and Model Evaluation Criteria
<p>I have built an XGBoost classification model in Python on an imbalanced dataset (~1 million positive values and ~12 million negative values), where the features are binary user interaction with web page elements (e.g. did the user scroll to reviews or not) and the target is a binary retail action. My ultimate goal w...
classification xgboost evaluation predictor importance
1
XGBoost Feature Importance, Permutation Importance, and Model Evaluation Criteria -- (classification xgboost evaluation predictor importance) <p>I have built an XGBoost classification model in Python on an imbalanced dataset (~1 million positive values and ~12 million negative values), where the features are binary use...
habedi/stack-exchange-dataset
65,624
How to assess that a cross entropy based model has converged
<p>I have a question regarding cross entropy convergence using Stochastic Gradient Descent. I am a little bit confused about how the convergence should be assessed. Should we treat the model as converged if the loss hit minimum on any single example or may be a certain number of examples? I am asking because what if th...
cnn loss function convergence
1
How to assess that a cross entropy based model has converged -- (cnn loss function convergence) <p>I have a question regarding cross entropy convergence using Stochastic Gradient Descent. I am a little bit confused about how the convergence should be assessed. Should we treat the model as converged if the loss hit mini...
habedi/stack-exchange-dataset
65,641
How can I compare my regressors?
<p>I am trying to build a regressor for a dataset which gives info about students' school performance and the probability of getting admitted in the University of their choice.</p>&#xA;&#xA;<p>The first 5 observations look like this :</p>&#xA;&#xA;<pre><code> GRE_Score TOEFL_Score Uni_Rating LOR CGPA Research ...
machine learning regression rnn model selection k nn
1
How can I compare my regressors? -- (machine learning regression rnn model selection k nn) <p>I am trying to build a regressor for a dataset which gives info about students' school performance and the probability of getting admitted in the University of their choice.</p>&#xA;&#xA;<p>The first 5 observations look like t...
habedi/stack-exchange-dataset
65,652
Tableau: Clustering based on value-range for map coloring
<p>Is there a possibility to cluster coloring for certain statistical ranges?</p>&#xA;&#xA;<p>This is what I have been able to achieve so far. </p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/6owX8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6owX8.png" alt="enter image description here"></a></...
clustering tableau
1
Tableau: Clustering based on value-range for map coloring -- (clustering tableau) <p>Is there a possibility to cluster coloring for certain statistical ranges?</p>&#xA;&#xA;<p>This is what I have been able to achieve so far. </p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/6owX8.png" rel="nofollow noreferrer"><img s...
habedi/stack-exchange-dataset
65,655
Val_accuracy (val_acc) very low
<p>We have a data set that is converted from signal data to video. We want to classify these images using convolution. We tried many different methods but val acc is consistently low. Training accuracy is 99% and val_acc is 40%. We need your help in this respect. Thank you</p>&#xA;&#xA;<pre><code>weight_decay=0.0005&#x...
deep learning cnn convolution
1
Val_accuracy (val_acc) very low -- (deep learning cnn convolution) <p>We have a data set that is converted from signal data to video. We want to classify these images using convolution. We tried many different methods but val acc is consistently low. Training accuracy is 99% and val_acc is 40%. We need your help in thi...
habedi/stack-exchange-dataset
65,663
Evaluating a IR system (Precision and Recall)
<p>I am studying by now IR system, in the field of valuation of IR system outputs related to a specific query but I need some help to understand it properly. </p>&#xA;&#xA;<p>My book states that when an IR system has to be evaluated, we need a test document collection, a set of query examples, a valuation (relevant or ...
information retrieval
1
Evaluating a IR system (Precision and Recall) -- (information retrieval) <p>I am studying by now IR system, in the field of valuation of IR system outputs related to a specific query but I need some help to understand it properly. </p>&#xA;&#xA;<p>My book states that when an IR system has to be evaluated, we need a tes...
habedi/stack-exchange-dataset
65,666
Does cross_validate in scikit-learn automatically fits and train the model?
<pre><code># from the titanic dataset&#xA;X = df.drop(columns="survived")&#xA;y = df.survived&#xA;scoring = ['accuracy','precision','roc_auc','f1',]&#xA;from sklearn.model_selection import cross_validate&#xA;from sklearn.linear_model import (LogisticRegression)&#xA;def model_LR(): #logstic Regression&#xA; index = ["...
machine learning scikit learn cross validation
1
Does cross_validate in scikit-learn automatically fits and train the model? -- (machine learning scikit learn cross validation) <pre><code># from the titanic dataset&#xA;X = df.drop(columns="survived")&#xA;y = df.survived&#xA;scoring = ['accuracy','precision','roc_auc','f1',]&#xA;from sklearn.model_selection import cro...
habedi/stack-exchange-dataset
65,692
Training on derived features that won't be present in a test set
<p>So I have an odd real-world problem in which the data that's going to be fed to a categorical predictive model has (a few) certain features, and when <em>building</em> a model I can bolt on additional datasets that add context to some of those features, but when it's going to be <em>running live</em> I won't be able...
classification predictive modeling
1
Training on derived features that won't be present in a test set -- (classification predictive modeling) <p>So I have an odd real-world problem in which the data that's going to be fed to a categorical predictive model has (a few) certain features, and when <em>building</em> a model I can bolt on additional datasets th...
habedi/stack-exchange-dataset
65,707
What does scaling a gradient do?
<p>In the <a href="https://arxiv.org/src/1911.08265v1/anc/pseudocode.py" rel="nofollow noreferrer">MuZero paper pseudocode</a>, they have the following line of code:</p>&#xA;&#xA;<pre><code>hidden_state = tf.scale_gradient(hidden_state, 0.5)&#xA;</code></pre>&#xA;&#xA;<p><strong>What does this do? Why is it there?</str...
machine learning machine learning model ai deepmind
1
What does scaling a gradient do? -- (machine learning machine learning model ai deepmind) <p>In the <a href="https://arxiv.org/src/1911.08265v1/anc/pseudocode.py" rel="nofollow noreferrer">MuZero paper pseudocode</a>, they have the following line of code:</p>&#xA;&#xA;<pre><code>hidden_state = tf.scale_gradient(hidden_...
habedi/stack-exchange-dataset
65,718
How to perform bootstrap validation?
<p>I am working on a binary classification problem.</p>&#xA;&#xA;<p>I ran cross-validation and grid-search on train data. Later I validated the model on my test data as shown below</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>logreg=LogisticRegression(random_state=41)&#xA;logreg_cv=GridSearchCV(logreg,o...
machine learning deep learning data mining predictive modeling sampling
1
How to perform bootstrap validation? -- (machine learning deep learning data mining predictive modeling sampling) <p>I am working on a binary classification problem.</p>&#xA;&#xA;<p>I ran cross-validation and grid-search on train data. Later I validated the model on my test data as shown below</p>&#xA;&#xA;<pre class="...
habedi/stack-exchange-dataset
65,725
What is the difference between horizontal and vertical ensemble?
<p>I am looking at different ways to do model ensembling and I came across the terms horizontal and vertical blending/ensembling but it is not well defined. </p>&#xA;&#xA;<p>My questions will be:</p>&#xA;&#xA;<ol>&#xA;<li>What is the difference between <strong>horizontal and vertical blending</strong>?</li>&#xA;<li>In ...
machine learning python predictive modeling ensemble
1
What is the difference between horizontal and vertical ensemble? -- (machine learning python predictive modeling ensemble) <p>I am looking at different ways to do model ensembling and I came across the terms horizontal and vertical blending/ensembling but it is not well defined. </p>&#xA;&#xA;<p>My questions will be:</...
habedi/stack-exchange-dataset
65,726
How to explain the connection between the input layer and H1 of this CNN Architecture?
<p>I am currently reading the paper proposed by LeCun et al. for handwritten zip code recognition. There is this figure below visualizing the CNN architecture. But I do not really understand how the connection between Layer H1 and input layer makes sense. If there are 12 kernels with size 5x5, shouldn't the layer H1 be...
cnn learning
1
How to explain the connection between the input layer and H1 of this CNN Architecture? -- (cnn learning) <p>I am currently reading the paper proposed by LeCun et al. for handwritten zip code recognition. There is this figure below visualizing the CNN architecture. But I do not really understand how the connection betwe...
habedi/stack-exchange-dataset
65,732
1: 10 rule in logistic regression - EPV
<p>I have a dataset with 4712 records. <code>Label Yes</code> - 1558 records and <code>Label No</code> - 3554 records.</p>&#xA;&#xA;<p>I read online that <code>1:10 rule</code> is based on the frequency of lower occurring class.</p>&#xA;&#xA;<p>In my case, frequency of lower occurring class is 1558</p>&#xA;&#xA;<p>Acco...
machine learning deep learning predictive modeling feature selection logistic regression
1
1: 10 rule in logistic regression - EPV -- (machine learning deep learning predictive modeling feature selection logistic regression) <p>I have a dataset with 4712 records. <code>Label Yes</code> - 1558 records and <code>Label No</code> - 3554 records.</p>&#xA;&#xA;<p>I read online that <code>1:10 rule</code> is based ...
habedi/stack-exchange-dataset
65,740
About the maximum likelihood, when we convert the maximization problem into minimization, why we take the negative?
<p>On <a href="http://www.cs.toronto.edu/~bonner/courses/2019f/csc411/lectures/04_prob_classif_handout.pdf" rel="nofollow noreferrer">page 12</a>, we take <span class="math-container">$log$</span> on both side. </p>&#xA;&#xA;<p><span class="math-container">$\max_{\boldsymbol{w}}L\boldsymbol({w})=\max_{w}\displaystyle\p...
logistic regression
1
About the maximum likelihood, when we convert the maximization problem into minimization, why we take the negative? -- (logistic regression) <p>On <a href="http://www.cs.toronto.edu/~bonner/courses/2019f/csc411/lectures/04_prob_classif_handout.pdf" rel="nofollow noreferrer">page 12</a>, we take <span class="math-contai...
habedi/stack-exchange-dataset
65,745
Batch Normalization vs Other Normalization Techniques
<p>In the context of neural networks, I understand that batch normalization ensures that activation at each layer of the neural net does not 'blow-up' and cause a bias in the network. However, I don't understand why it would be used as opposed to other normalization techniques such as Cosine or Weight normalization, th...
neural network normalization
1
Batch Normalization vs Other Normalization Techniques -- (neural network normalization) <p>In the context of neural networks, I understand that batch normalization ensures that activation at each layer of the neural net does not 'blow-up' and cause a bias in the network. However, I don't understand why it would be used...
habedi/stack-exchange-dataset
65,746
MultinomialNB predict_proba doesnt return labels with the probability
<p>I have a model what looks like this</p>&#xA;&#xA;<pre><code>Product_names= [&#xA; 'Dress white',&#xA; 'Pullover shirt',&#xA; 'etc'&#xA;&#xA;&#xA;]&#xA;&#xA;category_labels = [&#xA; 'Female-&gt;Clothes-&gt;T-shirts',&#xA; 'Female-&gt;Jeans-&gt;Skinny',&#xA; 'etc'&#xA;]&#xA;</code></pre>&#xA;&#xA;<p>I u...
machine learning python multilabel classification nlp
1
MultinomialNB predict_proba doesnt return labels with the probability -- (machine learning python multilabel classification nlp) <p>I have a model what looks like this</p>&#xA;&#xA;<pre><code>Product_names= [&#xA; 'Dress white',&#xA; 'Pullover shirt',&#xA; 'etc'&#xA;&#xA;&#xA;]&#xA;&#xA;category_labels = [&#xA...
habedi/stack-exchange-dataset
65,747
Skin Detection From a Face Image
<p>I have photos of people's faces, and I want to detect each person's skin color for later use. I don't want to use predetermined color ranges, instead I want to determine each person's color and then use it to detect occlusions in this person's later photos. The training face images are taken under the same condition...
python computer vision opencv
1
Skin Detection From a Face Image -- (python computer vision opencv) <p>I have photos of people's faces, and I want to detect each person's skin color for later use. I don't want to use predetermined color ranges, instead I want to determine each person's color and then use it to detect occlusions in this person's later...
habedi/stack-exchange-dataset
65,751
Why replay memory store old states and action rather than Q-value (Deep Q-learning)
<p>Here is the algorithm use in Google's DeepMind Atari <a href="http://web.stanford.edu/class/psych209/Readings/MnihEtAlHassibis15NatureControlDeepRL.pdf" rel="nofollow noreferrer">paper</a></p>&#xA;&#xA;<p>The replay memory D store transition (old_state, action performed, reward, new_state)</p>&#xA;&#xA;<p>The <em>ol...
reinforcement learning
1
Why replay memory store old states and action rather than Q-value (Deep Q-learning) -- (reinforcement learning) <p>Here is the algorithm use in Google's DeepMind Atari <a href="http://web.stanford.edu/class/psych209/Readings/MnihEtAlHassibis15NatureControlDeepRL.pdf" rel="nofollow noreferrer">paper</a></p>&#xA;&#xA;<p>...
habedi/stack-exchange-dataset
65,762
Does it make sense to expand word embeddings so that each array index is a feature input or should the embedding itself be a model input?
<p>If you are building a DNN, say, with two layers, and you want to use embeddings as one of your feature inputs, what's the best way to input the embedding?</p>&#xA;&#xA;<p>I'm trying to understand if I should break the embeddings up so that every array value in the embedding becomes its own input feature to the model...
neural network feature engineering embeddings deep learning
1
Does it make sense to expand word embeddings so that each array index is a feature input or should the embedding itself be a model input? -- (neural network feature engineering embeddings deep learning) <p>If you are building a DNN, say, with two layers, and you want to use embeddings as one of your feature inputs, wha...
habedi/stack-exchange-dataset
65,769
feature selection using genetic algorithm in Python?
<p>I have a dataset of 4712 records and 60+ features working on a binary classification problem. I already tried out all the feature selection approaches like <code>filter, embedded and wrapper</code> but am just curious to learn and try <code>genetic algorithm</code> for feature selection.</p>&#xA;&#xA;<p>The reason f...
machine learning deep learning data mining predictive modeling feature selection
1
feature selection using genetic algorithm in Python? -- (machine learning deep learning data mining predictive modeling feature selection) <p>I have a dataset of 4712 records and 60+ features working on a binary classification problem. I already tried out all the feature selection approaches like <code>filter, embedded...
habedi/stack-exchange-dataset
65,783
PyTorch: How to use pytorch pretrained for single channel image
<p>If I have to create a model in pytorch for images having only single channel. How can I transform my model to adopt to this new architecture without having the need to compromise the <em>pre-trained</em> weights on which it has been trained upon.</p>&#xA;
computer vision pytorch transfer learning
1
PyTorch: How to use pytorch pretrained for single channel image -- (computer vision pytorch transfer learning) <p>If I have to create a model in pytorch for images having only single channel. How can I transform my model to adopt to this new architecture without having the need to compromise the <em>pre-trained</em> we...
habedi/stack-exchange-dataset
65,787
Auto ML vs Manual ML for a project
<p>I recently was introduced to a AUTO ML library based on <code>genetic programming</code> called <code>tpot</code>. Thanks to @Noah Weber. I have few questions</p>&#xA;&#xA;<p>1) When we have AUTO ML, why do people usually spend time on <code>Feature selection</code> or preprocessing etc? I mean they do at-least redu...
machine learning deep learning data mining predictive modeling automl
1
Auto ML vs Manual ML for a project -- (machine learning deep learning data mining predictive modeling automl) <p>I recently was introduced to a AUTO ML library based on <code>genetic programming</code> called <code>tpot</code>. Thanks to @Noah Weber. I have few questions</p>&#xA;&#xA;<p>1) When we have AUTO ML, why do ...
habedi/stack-exchange-dataset
65,791
How to select best feature set and not ranking for tree based models?
<p>I am currently using <code>feature selection</code> approaches like <code>filter, wrapper, embedded</code> etc.</p>&#xA;&#xA;<p>All these methods give different set of features and I rank them based on their frequency of occurrence in other feature selection approach.</p>&#xA;&#xA;<p>Ex: If <code>Age</code> occurs i...
machine learning deep learning data mining predictive modeling feature selection
1
How to select best feature set and not ranking for tree based models? -- (machine learning deep learning data mining predictive modeling feature selection) <p>I am currently using <code>feature selection</code> approaches like <code>filter, wrapper, embedded</code> etc.</p>&#xA;&#xA;<p>All these methods give different ...
habedi/stack-exchange-dataset
65,802
For outliers treatment, clipping, winsorizing or removing?
<p>I came across two different techniques for treating outliers <strong>winsorization</strong>, <strong>clipping</strong> and <strong>removing</strong>:</p>&#xA;&#xA;<ul>&#xA;<li><p><a href="https://en.wikipedia.org/wiki/Winsorizing" rel="nofollow noreferrer">Winsorizing</a>: Consider the data set consisting of:&#xA;{9...
machine learning preprocessing outlier
1
For outliers treatment, clipping, winsorizing or removing? -- (machine learning preprocessing outlier) <p>I came across two different techniques for treating outliers <strong>winsorization</strong>, <strong>clipping</strong> and <strong>removing</strong>:</p>&#xA;&#xA;<ul>&#xA;<li><p><a href="https://en.wikipedia.org/w...
habedi/stack-exchange-dataset
65,804
NumPy -- ImportError: PyInit__multiarray_umath
<p>I'm facing the below error while importing NumPy library. I have tried all of the suggestions advised by Python in its error log, but no luck.</p>&#xA;&#xA;<p>Strangely, when I use Python's OS library and print the "PATH" environment variable, it appends the below automatically, which I don't find in the Windows <co...
python numpy python 3.x
1
NumPy -- ImportError: PyInit__multiarray_umath -- (python numpy python 3.x) <p>I'm facing the below error while importing NumPy library. I have tried all of the suggestions advised by Python in its error log, but no luck.</p>&#xA;&#xA;<p>Strangely, when I use Python's OS library and print the "PATH" environment variabl...
habedi/stack-exchange-dataset
65,806
Why joint probability in generative models?
<p>I have been reading about generative models for past few days and there's one question that's bugging me. Many sources(<a href="https://en.wikipedia.org/wiki/Generative_model" rel="nofollow noreferrer">Wiki</a>, <a href="https://developers.google.com/machine-learning/gan/generative" rel="nofollow noreferrer">Google ...
generative models
1
Why joint probability in generative models? -- (generative models) <p>I have been reading about generative models for past few days and there's one question that's bugging me. Many sources(<a href="https://en.wikipedia.org/wiki/Generative_model" rel="nofollow noreferrer">Wiki</a>, <a href="https://developers.google.com...
habedi/stack-exchange-dataset
65,814
Different encoders applied to a dataset
<p>I have a dataset which have both categorical features with high cardinality (>8000) and low cardinality (4 or 5). &#xA;Would that be ok to encode the high cardinality ones with one encoder (target encoder, for example) and the others with low cardinality with another encoder (one hot encoder) and put everything toge...
categorical data encoding categorical encoding
1
Different encoders applied to a dataset -- (categorical data encoding categorical encoding) <p>I have a dataset which have both categorical features with high cardinality (>8000) and low cardinality (4 or 5). &#xA;Would that be ok to encode the high cardinality ones with one encoder (target encoder, for example) and th...
habedi/stack-exchange-dataset
65,815
Chose among highly correlated variables
<p>I am working on a Kaggle dataset and I am trying to build a predictive model for the "Chance of Admit" (dependent variable) of students to the university of their interest. </p>&#xA;&#xA;<p>Below you can find the correlation among all (independent and dependent) variables. We can quickly observe that only "GRE Score...
regression correlation
1
Chose among highly correlated variables -- (regression correlation) <p>I am working on a Kaggle dataset and I am trying to build a predictive model for the "Chance of Admit" (dependent variable) of students to the university of their interest. </p>&#xA;&#xA;<p>Below you can find the correlation among all (independent a...
habedi/stack-exchange-dataset
65,824
R: Error when using Aggregate function to compile monthly means into yearly means
<p>Disclaimer: I'm extremely new to R and have been getting by with using google as my professor.</p>&#xA;&#xA;<p>I have a somewhat large collection of monthly values over a period of several years from several different locations. I am attempting to use the aggregate function to calculate the yearly means for each loc...
r time series
1
R: Error when using Aggregate function to compile monthly means into yearly means -- (r time series) <p>Disclaimer: I'm extremely new to R and have been getting by with using google as my professor.</p>&#xA;&#xA;<p>I have a somewhat large collection of monthly values over a period of several years from several differen...
habedi/stack-exchange-dataset
65,828
How does L1 regularization make low-value features more zero than L2?
<p>Below formulas, L1 and L2 regularization</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/X7Tgb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X7Tgb.png" alt="enter image description here"></a></p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/MgGhk.png" rel="nofollow noreferrer"><img src="htt...
neural network deep learning regularization
1
How does L1 regularization make low-value features more zero than L2? -- (neural network deep learning regularization) <p>Below formulas, L1 and L2 regularization</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/X7Tgb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X7Tgb.png" alt="enter image descr...
habedi/stack-exchange-dataset
65,832
Which metric to choose for tracking model performance?
<p>I am working on a binary classification problem with class proportion of 33:67.</p>&#xA;&#xA;<p>Currently what I am doing is running multiple models like <code>LR</code>,<code>SVM</code>,<code>RF</code>,<code>XgBoost</code> for classification.</p>&#xA;&#xA;<p><code>RF</code> and <code>Xgboost</code> models perform b...
machine learning deep learning data mining predictive modeling statistics
1
Which metric to choose for tracking model performance? -- (machine learning deep learning data mining predictive modeling statistics) <p>I am working on a binary classification problem with class proportion of 33:67.</p>&#xA;&#xA;<p>Currently what I am doing is running multiple models like <code>LR</code>,<code>SVM</co...
habedi/stack-exchange-dataset
65,835
Multi-label classification using output quantization
<h2>Problem statement</h2>&#xA;&#xA;<p>It's a fact that in order to train the network for multilabel-dataset, a one-hot-vector output is usually used.</p>&#xA;&#xA;<p><strong>Example:</strong></p>&#xA;&#xA;<blockquote>&#xA; <p>dog [1 0 0]</p>&#xA; &#xA; <p>cat [0 1 0]</p>&#xA; &#xA; <p>rabbit ...
machine learning
1
Multi-label classification using output quantization -- (machine learning) <h2>Problem statement</h2>&#xA;&#xA;<p>It's a fact that in order to train the network for multilabel-dataset, a one-hot-vector output is usually used.</p>&#xA;&#xA;<p><strong>Example:</strong></p>&#xA;&#xA;<blockquote>&#xA; <p>dog [1 0 ...
habedi/stack-exchange-dataset
65,836
How curvature information in second order optimization methods helps
<p>It is said that second order optimization methods in neural networks work better than first order because they contain information about rate of change of gradient or the curvature. This information helps to choose a better step size for moving forward on the error surface. It is not clear as to how the rate of chan...
neural network optimization gradient descent
1
How curvature information in second order optimization methods helps -- (neural network optimization gradient descent) <p>It is said that second order optimization methods in neural networks work better than first order because they contain information about rate of change of gradient or the curvature. This information...
habedi/stack-exchange-dataset
65,854
How to train Ner Model having 1 entity?
<p>I am Creating a Custom NER (named entity recognition ) Model using bi directional LSTM and CRF.</p>&#xA;&#xA;<p>During Study on Ner i see all example includes Multiple entities per sentence. &#xA;For eample this sentence includes 2 entities</p>&#xA;&#xA;<blockquote>&#xA; <p>(jhon lives in Us) jhon = S-Per , US=S-C...
machine learning deep learning lstm
1
How to train Ner Model having 1 entity? -- (machine learning deep learning lstm) <p>I am Creating a Custom NER (named entity recognition ) Model using bi directional LSTM and CRF.</p>&#xA;&#xA;<p>During Study on Ner i see all example includes Multiple entities per sentence. &#xA;For eample this sentence includes 2 enti...
habedi/stack-exchange-dataset
65,857
How to incorporate keyboard positions on character level embeddings?
<p>I am working with NLP and have <strong>character level embeddings</strong>.</p>&#xA;&#xA;<p>I have embeddings learned from Wikipedia text.</p>&#xA;&#xA;<p>Now, I want to learn embeddings from chat data (where misspellings and abbreviations are way more common). Usually, the character <code>n</code> doesn't follow fr...
neural network nlp feature engineering word embeddings
1
How to incorporate keyboard positions on character level embeddings? -- (neural network nlp feature engineering word embeddings) <p>I am working with NLP and have <strong>character level embeddings</strong>.</p>&#xA;&#xA;<p>I have embeddings learned from Wikipedia text.</p>&#xA;&#xA;<p>Now, I want to learn embeddings f...
habedi/stack-exchange-dataset
65,864
NLP : variations of a text without modifying it's meaning
<p>I am currently working on the automation of recurring reports (weekly 30-50 pages reports for around 100 districts). Those reports have a mostly fixed form : maps, graphs, data tables and small zone of text.</p>&#xA;&#xA;<p>Apart for some discussion around colors and legends, it isn't difficult to automate the produ...
nlp neural style transfer
1
NLP : variations of a text without modifying it's meaning -- (nlp neural style transfer) <p>I am currently working on the automation of recurring reports (weekly 30-50 pages reports for around 100 districts). Those reports have a mostly fixed form : maps, graphs, data tables and small zone of text.</p>&#xA;&#xA;<p>Apar...
habedi/stack-exchange-dataset
65,865
NLP: How to group sub-field into fields?
<p>Suppose I have a list of strings that captures a sub-field of academic research and would like to group them as higher-level fields.&#xA;For example, </p>&#xA;&#xA;<pre><code>'Quantum Mechanics' =&gt; 'Physics'&#xA;'Abstract Algebra' =&gt; 'Mathematics'&#xA;....&#xA;</code></pre>&#xA;&#xA;<p>My understanding is t...
nlp
1
NLP: How to group sub-field into fields? -- (nlp) <p>Suppose I have a list of strings that captures a sub-field of academic research and would like to group them as higher-level fields.&#xA;For example, </p>&#xA;&#xA;<pre><code>'Quantum Mechanics' =&gt; 'Physics'&#xA;'Abstract Algebra' =&gt; 'Mathematics'&#xA;....&#...
habedi/stack-exchange-dataset
65,909
ML Project - Achieve 2 Objectives
<p>I have a dataset with 5K records focused on binary classification. I am posting it here to seek your suggestions on project methodology</p>&#xA;&#xA;<p>Currently what is my objective is </p>&#xA;&#xA;<p>1) Run statsmodel logistic regression to find risk factors that influence the outcome</p>&#xA;&#xA;<p>2) Then buil...
machine learning deep learning data mining predictive modeling machine learning model
1
ML Project - Achieve 2 Objectives -- (machine learning deep learning data mining predictive modeling machine learning model) <p>I have a dataset with 5K records focused on binary classification. I am posting it here to seek your suggestions on project methodology</p>&#xA;&#xA;<p>Currently what is my objective is </p>&#...
habedi/stack-exchange-dataset
65,922
Is there any difference between a weak learner and a weak classifier?
<p>While reading about decision tree ensembles <a href="https://arxiv.org/abs/1908.06951" rel="nofollow noreferrer">Gradient Boosting</a>, <a href="https://en.wikipedia.org/wiki/AdaBoost" rel="nofollow noreferrer">AdaBoost</a> etc.</p>&#xA;<p>I have found the following two concepts <strong>weak learner</strong> and <st...
machine learning decision trees xgboost supervised learning ensemble modeling
1
Is there any difference between a weak learner and a weak classifier? -- (machine learning decision trees xgboost supervised learning ensemble modeling) <p>While reading about decision tree ensembles <a href="https://arxiv.org/abs/1908.06951" rel="nofollow noreferrer">Gradient Boosting</a>, <a href="https://en.wikipedi...
habedi/stack-exchange-dataset
65,925
Best clustering algorithm to identify clusters and determine the closet cluster each individual response is near?
<p>I have a survey where each question is related to a different 'shopper' type (there are 5 types so 5 questions). Each question is either binary (True/False) or scale based.</p>&#xA;&#xA;<p>IE:</p>&#xA;&#xA;<pre><code>1. Do you like to shop at our physical location store ? (True/False)&#xA;&#xA;2. Do our discounts en...
clustering algorithms
1
Best clustering algorithm to identify clusters and determine the closet cluster each individual response is near? -- (clustering algorithms) <p>I have a survey where each question is related to a different 'shopper' type (there are 5 types so 5 questions). Each question is either binary (True/False) or scale based.</p>...
habedi/stack-exchange-dataset
65,936
why we have run make.sh file initially in darknet and YOLO object detection?
<p>In have seen a couple of text and objection detection algorithm wher the first step everyone dose is to install cython and run a make.sh file . why we have run make.sh file initially in darknet/YOLO object detection ?</p>&#xA;&#xA;<p>Below are the 2 links im referring to build yolo algorithm using darknet and im not...
neural network cnn object detection object recognition yolo
1
why we have run make.sh file initially in darknet and YOLO object detection? -- (neural network cnn object detection object recognition yolo) <p>In have seen a couple of text and objection detection algorithm wher the first step everyone dose is to install cython and run a make.sh file . why we have run make.sh file in...
habedi/stack-exchange-dataset
65,942
What to choose: an overfit model with higher evaluation score or a non-overfit model with lower one?
<p>For lack of a better term, overfit here means a higher discrepancy between train and validation score and non-overfit means a lower discrepancy.</p>&#xA;&#xA;<p>This "dilemma" just showed in neural network model I've recently working on. I trained the network with 10-fold cross-validation and got overfitted model (0...
machine learning overfitting
1
What to choose: an overfit model with higher evaluation score or a non-overfit model with lower one? -- (machine learning overfitting) <p>For lack of a better term, overfit here means a higher discrepancy between train and validation score and non-overfit means a lower discrepancy.</p>&#xA;&#xA;<p>This "dilemma" just s...
habedi/stack-exchange-dataset
65,948
Can colored images have more than 3 channel values?
<p>I was reading this well-known <a href="https://arxiv.org/pdf/1505.04597.pdf" rel="nofollow noreferrer">paper</a> and noticed something in figure 1 below:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/VFjKl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VFjKl.png" alt="enter image description...
cnn image classification
1
Can colored images have more than 3 channel values? -- (cnn image classification) <p>I was reading this well-known <a href="https://arxiv.org/pdf/1505.04597.pdf" rel="nofollow noreferrer">paper</a> and noticed something in figure 1 below:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/VFjKl.png" rel="nofollow noref...
habedi/stack-exchange-dataset
65,951
How neural style transfer work in pytorch?
<p>I am using <a href="https://github.com/AyushExel/Neural-Style-Transfer/blob/master/styleTransfer.py" rel="nofollow noreferrer">this pytorch script</a> to learn and understand neural style transfer. I understood most part of the code but having some hard time understanding some parts of the code.</p>&#xA;&#xA;<p>In ...
python deep learning pytorch convolutional neural network neural style transfer
1
How neural style transfer work in pytorch? -- (python deep learning pytorch convolutional neural network neural style transfer) <p>I am using <a href="https://github.com/AyushExel/Neural-Style-Transfer/blob/master/styleTransfer.py" rel="nofollow noreferrer">this pytorch script</a> to learn and understand neural style t...
habedi/stack-exchange-dataset
65,952
Threshold to consider new feature as a new finding to a model?
<p>I am working on binary classification problem with 5K records and 60 features.</p>&#xA;&#xA;<p>Through feature selection, I narrowed it down to 14 features.</p>&#xA;&#xA;<p>In existing literature, I see that there are well-known 5 features.</p>&#xA;&#xA;<p>I started my project with an aim to find new feature that ca...
machine learning deep learning predictive modeling statistics feature selection
1
Threshold to consider new feature as a new finding to a model? -- (machine learning deep learning predictive modeling statistics feature selection) <p>I am working on binary classification problem with 5K records and 60 features.</p>&#xA;&#xA;<p>Through feature selection, I narrowed it down to 14 features.</p>&#xA;&#xA...
habedi/stack-exchange-dataset
65,961
How can I perform categorical encoding when the dataset is too large for memory?
<p>I generally do preprocessing before fitting estimators using Scikit-Learn. My latest project is using significantly more data than I have used in the past, and whilst I know I can use online learning with either Keras using <code>.fit_generator()</code> or sklearn using <code>.partial_fit()</code>, I'm kinda at a lo...
python scikit learn preprocessing categorical data
1
How can I perform categorical encoding when the dataset is too large for memory? -- (python scikit learn preprocessing categorical data) <p>I generally do preprocessing before fitting estimators using Scikit-Learn. My latest project is using significantly more data than I have used in the past, and whilst I know I can ...
habedi/stack-exchange-dataset
65,963
What is a manifold for Unsupervised Learning?
<p>I've been watching Dr. G. Hinton lectures on Neural Networks in Machine Learning, and in one of the lectures he explains what the goals of Unsupervised Learning are. </p>&#xA;&#xA;<p>I am having trouble understanding the part where high-dimensional inputs such as images live on or near a low-dimensional manifold (or...
machine learning neural network unsupervised learning
1
What is a manifold for Unsupervised Learning? -- (machine learning neural network unsupervised learning) <p>I've been watching Dr. G. Hinton lectures on Neural Networks in Machine Learning, and in one of the lectures he explains what the goals of Unsupervised Learning are. </p>&#xA;&#xA;<p>I am having trouble understan...
habedi/stack-exchange-dataset
65,980
Classification when variables are in ranges
<p>I want to classify my data and some of my variables are ranges.</p>&#xA;&#xA;<p>I classify location so for example, school, the hours that people are at school are from 7:00 to 14:00, some of my variables are categorical (working day) and some of them numerics(frequency of visiting in a month).</p>&#xA;&#xA;<p>I tho...
python classification categorical data supervised learning
1
Classification when variables are in ranges -- (python classification categorical data supervised learning) <p>I want to classify my data and some of my variables are ranges.</p>&#xA;&#xA;<p>I classify location so for example, school, the hours that people are at school are from 7:00 to 14:00, some of my variables are ...
habedi/stack-exchange-dataset
65,983
Machine learning dataframe dimension concept vs NumPy dimension
<p>From <a href="https://rads.stackoverflow.com/amzn/click/com/152095140X" rel="nofollow noreferrer" rel="nofollow noreferrer">Machine Learning for Absolute Beginners: A Plain English Introduction</a>:</p>&#xA;&#xA;<blockquote>&#xA; <p>Contained in each column is a feature. A feature is also known as variable, a dimen...
machine learning python r numpy
1
Machine learning dataframe dimension concept vs NumPy dimension -- (machine learning python r numpy) <p>From <a href="https://rads.stackoverflow.com/amzn/click/com/152095140X" rel="nofollow noreferrer" rel="nofollow noreferrer">Machine Learning for Absolute Beginners: A Plain English Introduction</a>:</p>&#xA;&#xA;<blo...
habedi/stack-exchange-dataset
65,984
Maximize one data point
<p>I am completely new to data science and looking to narrow down the search and reduce the learning curve required to solve problems like the one given below</p>&#xA;&#xA;<hr>&#xA;&#xA;<p>I have a data set with 7 columns , &#xA;Column A(all positive decimal) is the data point I want to maximize.&#xA;Column B and C are...
machine learning python scikit learn data mining optimization
1
Maximize one data point -- (machine learning python scikit learn data mining optimization) <p>I am completely new to data science and looking to narrow down the search and reduce the learning curve required to solve problems like the one given below</p>&#xA;&#xA;<hr>&#xA;&#xA;<p>I have a data set with 7 columns , &#xA;...
habedi/stack-exchange-dataset
65,992
Why and how to match variables in logistic regression?
<p>I have a dataset of ~4.7K records focused on binary classification with 60 features. class 1 is of 1554 records and class 2 is of 3558 records.</p>&#xA;&#xA;<p>Now I would like to find the risk factors that influences the outcome which is disease present or not. This is a supervised learning problem</p>&#xA;&#xA;<p>...
machine learning predictive modeling statistics logistic regression machine learning model
1
Why and how to match variables in logistic regression? -- (machine learning predictive modeling statistics logistic regression machine learning model) <p>I have a dataset of ~4.7K records focused on binary classification with 60 features. class 1 is of 1554 records and class 2 is of 3558 records.</p>&#xA;&#xA;<p>Now I ...
habedi/stack-exchange-dataset
65,995
TensorFlow Sigmoid activation function as output layer - value interpretation
<p>My TensorFlow model has the following structure. It aims to solve a binary classification problem where the labels are either 0 or 1. The output layer uses a sigmoid activation function with 1 output.</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>model = keras.Sequential([&#xA; layers.Dense(10, act...
python keras tensorflow activation function
1
TensorFlow Sigmoid activation function as output layer - value interpretation -- (python keras tensorflow activation function) <p>My TensorFlow model has the following structure. It aims to solve a binary classification problem where the labels are either 0 or 1. The output layer uses a sigmoid activation function with...
habedi/stack-exchange-dataset
65,997
In which cases are non-linear learning methods preferred than logistic regression in classification problems?
<p>We know that neural networks and other learning methods can have better performance relative to logistic regression in some non-linear classification problems. But, it is known too that logistic regression can separate classes with a line that can be curvy if only we add more predictors that are a square, cube, etc ...
machine learning regression
1
In which cases are non-linear learning methods preferred than logistic regression in classification problems? -- (machine learning regression) <p>We know that neural networks and other learning methods can have better performance relative to logistic regression in some non-linear classification problems. But, it is kno...
habedi/stack-exchange-dataset
66,002
Algorithm selection rationale (Random Forest vs Logistic Regression vs SVM)
<p>I want to understand the criteria of selection of ML algorithms, i.e., what are the guidelines on which algorithm to be selected in which case?</p>&#xA;<p>The reasons I know are:</p>&#xA;<ol>&#xA;<li>Logistic regression to be picked in case we want to advise the impact on y variable on what changes on any x variable...
machine learning algorithms
1
Algorithm selection rationale (Random Forest vs Logistic Regression vs SVM) -- (machine learning algorithms) <p>I want to understand the criteria of selection of ML algorithms, i.e., what are the guidelines on which algorithm to be selected in which case?</p>&#xA;<p>The reasons I know are:</p>&#xA;<ol>&#xA;<li>Logistic...
habedi/stack-exchange-dataset
66,003
How to Bootstrap dataset for 10000 AUC scores?
<p>I am new to ML and trying to learn the nuances. I work on a binary classification problem with 5K records. Label 1 is 1554 and Label 0 is 3554.</p>&#xA;&#xA;<p>What I currently do is </p>&#xA;&#xA;<p>1) split the data into train(70%) and test(30%)</p>&#xA;&#xA;<p>2) initiate a model --> <code>logreg=LogisticRegress...
machine learning deep learning statistics cross validation machine learning model
1
How to Bootstrap dataset for 10000 AUC scores? -- (machine learning deep learning statistics cross validation machine learning model) <p>I am new to ML and trying to learn the nuances. I work on a binary classification problem with 5K records. Label 1 is 1554 and Label 0 is 3554.</p>&#xA;&#xA;<p>What I currently do is ...
habedi/stack-exchange-dataset
66,005
How to use random forest model to new data?
<p>I am new to this Data Science field. I have a question to apply Random forest to new data.</p>&#xA;&#xA;<p>I have this table.</p>&#xA;&#xA;<pre><code>Y prop_A prop_B&#xA;A 0.8 0.2&#xA;A 0.7 0.3&#xA;B 0.5 0.5&#xA;B 0.4 0.6&#xA;B 0.1 0.9&#xA;</code></pre>&#xA;&#xA;<p>I assumed that if the prop...
random forest prediction
1
How to use random forest model to new data? -- (random forest prediction) <p>I am new to this Data Science field. I have a question to apply Random forest to new data.</p>&#xA;&#xA;<p>I have this table.</p>&#xA;&#xA;<pre><code>Y prop_A prop_B&#xA;A 0.8 0.2&#xA;A 0.7 0.3&#xA;B 0.5 0.5&#xA;B 0.4 0.6&#...
habedi/stack-exchange-dataset
66,009
Multilingual Bert sentence vector captures language used more than meaning - working as interned?
<p>Playing around with BERT, I downloaded the Huggingface Multilingual Bert and entered three sentences, saving their sentence vectors (the embedding of <code>[CLS]</code>), then translated them via Google Translate, passed them through the model and saved their sentence vectors.</p>&#xA;&#xA;<p>I then compared the res...
deep learning nlp pytorch bert
1
Multilingual Bert sentence vector captures language used more than meaning - working as interned? -- (deep learning nlp pytorch bert) <p>Playing around with BERT, I downloaded the Huggingface Multilingual Bert and entered three sentences, saving their sentence vectors (the embedding of <code>[CLS]</code>), then transla...
habedi/stack-exchange-dataset
66,013
How to use scikit metrics for a statsmodel or vice versa?
<p>Am working on binary classification problem with 5K records. Label 1 is 1554 and Label 0 is 3558.</p>&#xA;&#xA;<p>I did refer this <a href="https://stackoverflow.com/questions/24059018/statsmodels-score">post</a> but not sure whether it is updated now or anyone has any way to compute this metrics</p>&#xA;&#xA;<p>Cur...
machine learning deep learning statistics logistic regression machine learning model
1
How to use scikit metrics for a statsmodel or vice versa? -- (machine learning deep learning statistics logistic regression machine learning model) <p>Am working on binary classification problem with 5K records. Label 1 is 1554 and Label 0 is 3558.</p>&#xA;&#xA;<p>I did refer this <a href="https://stackoverflow.com/que...
habedi/stack-exchange-dataset
66,015
Identifying similar data points
<p>I have a data set where customers who are non-delinquent with us have defaulted with others. So from the total data set, 30% are those who defaulted with others but 70% are those who are good with us and other others as well.</p>&#xA;<p>With the help of 30% customers who defaulted with others (being good/non-delinqu...
machine learning dataset
1
Identifying similar data points -- (machine learning dataset) <p>I have a data set where customers who are non-delinquent with us have defaulted with others. So from the total data set, 30% are those who defaulted with others but 70% are those who are good with us and other others as well.</p>&#xA;<p>With the help of 3...
habedi/stack-exchange-dataset
66,031
TensorFlow / Keras: What is stateful = True in LSTM layers?
<p>Could you elaborate on this argument? I found <a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/LSTM?version=stable" rel="noreferrer">the brief explanation from the docs</a> unsatisfying:</p>&#xA;&#xA;<blockquote>&#xA; <p>stateful: Boolean (default False). If True, the last state for each sample a...
deep learning tensorflow lstm rnn gru
1
TensorFlow / Keras: What is stateful = True in LSTM layers? -- (deep learning tensorflow lstm rnn gru) <p>Could you elaborate on this argument? I found <a href="https://www.tensorflow.org/api_docs/python/tf/keras/layers/LSTM?version=stable" rel="noreferrer">the brief explanation from the docs</a> unsatisfying:</p>&#xA;...
habedi/stack-exchange-dataset
66,033
Which feature selection technique to pickup(Boruta vs RFE vs step selection)
<p>I have data with 103 columns. I would like to understand which algorithm is best for feature selection and what may be the logic to call any feature as best. </p>&#xA;&#xA;<pre><code>I run below feature selection algorithms and below is the output:&#xA;&#xA; 1) Boruta(given 11 variables as important)&#xA; 2) R...
machine learning r feature selection
1
Which feature selection technique to pickup(Boruta vs RFE vs step selection) -- (machine learning r feature selection) <p>I have data with 103 columns. I would like to understand which algorithm is best for feature selection and what may be the logic to call any feature as best. </p>&#xA;&#xA;<pre><code>I run below fea...
habedi/stack-exchange-dataset
66,034
sklearn SimpleImputer too slow for categorical data represented as string values
<p>I have a data set with categorical features represented as string values and I want to fill-in missing values in it. I’ve tried to use sklearn’s <code>SimpleImputer</code> but it takes too much time to fulfill the task as compared to pandas. Both methods produce the same output.</p>&#xA;&#xA;<p>Here is the code to r...
python scikit learn pandas preprocessing
1
sklearn SimpleImputer too slow for categorical data represented as string values -- (python scikit learn pandas preprocessing) <p>I have a data set with categorical features represented as string values and I want to fill-in missing values in it. I’ve tried to use sklearn’s <code>SimpleImputer</code> but it takes too m...
habedi/stack-exchange-dataset
66,040
Machine learning model bundled with a library vs. an API
<p>I am thinking to "deploy" a machine learning model (in pickle it is sized 3 megabytes) and after discussing with my developer colleagues, they said it would be better if the model is packed as a python library instead of a microservice (like a rest API).</p>&#xA;&#xA;<p>I wanted to ask what's your view on this: Pick...
python predictive modeling data product
1
Machine learning model bundled with a library vs. an API -- (python predictive modeling data product) <p>I am thinking to "deploy" a machine learning model (in pickle it is sized 3 megabytes) and after discussing with my developer colleagues, they said it would be better if the model is packed as a python library inste...
habedi/stack-exchange-dataset
66,067
How to approach TF-IDf based analysis?
<p><strong>Problem statement :</strong></p>&#xA;&#xA;<p>We have documents with list of words in them.&#xA;Overall these documents are classified into 2 group (say, good quality vs bad)</p>&#xA;&#xA;<p>docs -</p>&#xA;&#xA;<pre><code>doc1 = [w1,w2,w3,w4]&#xA;doc2 = [w4,w3,w3,w4]&#xA;doc3 = [w2,w4,w8,w1]&#xA;doc4 = [w5,w4...
scikit learn nlp text mining tfidf
1
How to approach TF-IDf based analysis? -- (scikit learn nlp text mining tfidf) <p><strong>Problem statement :</strong></p>&#xA;&#xA;<p>We have documents with list of words in them.&#xA;Overall these documents are classified into 2 group (say, good quality vs bad)</p>&#xA;&#xA;<p>docs -</p>&#xA;&#xA;<pre><code>doc1 = [w...
habedi/stack-exchange-dataset
66,071
How to save and load model from unsupervised learning?
<p>[Beginner]</p>&#xA;&#xA;<p>Sorry if this is dumb question. </p>&#xA;&#xA;<p>I am following the model from this <a href="https://towardsdatascience.com/k-medoids-clustering-on-iris-data-set-1931bf781e05" rel="nofollow noreferrer">article</a> and below. </p>&#xA;&#xA;<pre><code>import pandas as pd&#xA;import numpy as ...
clustering machine learning model
1
How to save and load model from unsupervised learning? -- (clustering machine learning model) <p>[Beginner]</p>&#xA;&#xA;<p>Sorry if this is dumb question. </p>&#xA;&#xA;<p>I am following the model from this <a href="https://towardsdatascience.com/k-medoids-clustering-on-iris-data-set-1931bf781e05" rel="nofollow norefe...
habedi/stack-exchange-dataset
66,086
Skewed Data doesnt follow normal distribution
<p>My data (continuous) is highly skewed and it doesn't follow the normal distribution. Using <code>sns.distplot</code> I found out that <strong>exponweib</strong> fits the data better.</p>&#xA;&#xA;<p>How to deal with this?</p>&#xA;&#xA;<p>My end goal is to use the data for machine learning model (SVM).</p>&#xA;
machine learning python data cleaning
1
Skewed Data doesnt follow normal distribution -- (machine learning python data cleaning) <p>My data (continuous) is highly skewed and it doesn't follow the normal distribution. Using <code>sns.distplot</code> I found out that <strong>exponweib</strong> fits the data better.</p>&#xA;&#xA;<p>How to deal with this?</p>&#x...
habedi/stack-exchange-dataset
66,094
How are samples selected from training data in Xgboost
<p>In Random Forest, each tree is not fed with the full batch of training data, only a sample.</p>&#xA;&#xA;<p>How does this work for Xgboost? If this sampling happens as well, how does it work for this ML algorithm?</p>&#xA;
machine learning decision trees xgboost sampling
1
How are samples selected from training data in Xgboost -- (machine learning decision trees xgboost sampling) <p>In Random Forest, each tree is not fed with the full batch of training data, only a sample.</p>&#xA;&#xA;<p>How does this work for Xgboost? If this sampling happens as well, how does it work for this ML algor...
habedi/stack-exchange-dataset
66,124
Does variance and standard deviation both measure how spread out the numbers are?
<p>I've heard from different sources that, standard deviation measures how spread out the numbers are. But I've also heard the same for variance.</p>&#xA;&#xA;<p>Is it technically correct to say this statement for both std and var?</p>&#xA;
machine learning statistics variance
1
Does variance and standard deviation both measure how spread out the numbers are? -- (machine learning statistics variance) <p>I've heard from different sources that, standard deviation measures how spread out the numbers are. But I've also heard the same for variance.</p>&#xA;&#xA;<p>Is it technically correct to say t...
habedi/stack-exchange-dataset
66,140
Clustering algorithm which does not require to tell the number of clusters
<p>I have a dataframe with 2 columns of numerical values. I want to apply a clustering algorithm to put all the entries into the same group, which have a relatively small distance to the other entries. But which clustering algorithm can I use, although I do not know how many groups will be formed? It would be ideal if ...
clustering dataframe distance
1
Clustering algorithm which does not require to tell the number of clusters -- (clustering dataframe distance) <p>I have a dataframe with 2 columns of numerical values. I want to apply a clustering algorithm to put all the entries into the same group, which have a relatively small distance to the other entries. But whic...
habedi/stack-exchange-dataset
66,159
what are the steps in adaboosting?
<p>I went through adaboost tutorial and below are my simplified understanding:</p>&#xA;&#xA;<ol>&#xA;<li>Sample weight of equal value is given to all sample in dataset.</li>&#xA;<li>Stumps are created which uses only one feature from data set.</li>&#xA;<li>Using total error and sample weight stump importance is calcula...
machine learning decision trees data science model adaboost
1
what are the steps in adaboosting? -- (machine learning decision trees data science model adaboost) <p>I went through adaboost tutorial and below are my simplified understanding:</p>&#xA;&#xA;<ol>&#xA;<li>Sample weight of equal value is given to all sample in dataset.</li>&#xA;<li>Stumps are created which uses only one...
habedi/stack-exchange-dataset
66,164
About batches in stateful RNN
<blockquote>&#xA; <p>..., to create proper consecutive batches, where the nth input sequence in a batch starts off exactly where the nth input sequence ended in the previous batch. <br><br> &#xA; Géron, Aurélien. Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow (Kindle Locations 12018-12020). O'Reil...
rnn
1
About batches in stateful RNN -- (rnn) <blockquote>&#xA; <p>..., to create proper consecutive batches, where the nth input sequence in a batch starts off exactly where the nth input sequence ended in the previous batch. <br><br> &#xA; Géron, Aurélien. Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow...
habedi/stack-exchange-dataset
66,183
Including the validation file in the training process after tunning
<p>Should I include the validation file in the training process after finishing the tuning process (e.g. searching for params using the validation file)?</p>&#xA;
machine learning training hyperparameter tuning
1
Including the validation file in the training process after tunning -- (machine learning training hyperparameter tuning) <p>Should I include the validation file in the training process after finishing the tuning process (e.g. searching for params using the validation file)?</p>&#xA;
habedi/stack-exchange-dataset
66,189
Classify pdf files - image approach vs. text approach
<p>I'm about to start a project with the objective to classify PDF-documents. I'm wondering if there's a best practice approach to tackle this problem.</p>&#xA;&#xA;<p>Concretely I'm wondering if one of the following two approaches performs usually better:</p>&#xA;&#xA;<ol>&#xA;<li>use an OCR reader to convert the file...
classification multiclass classification
1
Classify pdf files - image approach vs. text approach -- (classification multiclass classification) <p>I'm about to start a project with the objective to classify PDF-documents. I'm wondering if there's a best practice approach to tackle this problem.</p>&#xA;&#xA;<p>Concretely I'm wondering if one of the following two...
habedi/stack-exchange-dataset
66,194
How to recognize product based on image using neural network?
<p>Company has many products in their offer (some about 100,000), some of these are very similar to each other. In database there is available only one image per product. </p>&#xA;&#xA;<p>Company want to make possible to recognize product based on video camera and display its specification. Is it possible to train new ...
neural network image recognition image preprocessing
1
How to recognize product based on image using neural network? -- (neural network image recognition image preprocessing) <p>Company has many products in their offer (some about 100,000), some of these are very similar to each other. In database there is available only one image per product. </p>&#xA;&#xA;<p>Company want...
habedi/stack-exchange-dataset
66,201
Method to assess text credibility
<p>I am searching for an automated method (ideally a python package) that produces a score to assess the <em>credibility</em> of a given text (e.g. from a webpage).</p>&#xA;&#xA;<p>I am <strong>not</strong> searching for: </p>&#xA;&#xA;<ul>&#xA;<li>text <em>complexity</em> assessments (i.e. how long sentences are and h...
python nlp text filter
1
Method to assess text credibility -- (python nlp text filter) <p>I am searching for an automated method (ideally a python package) that produces a score to assess the <em>credibility</em> of a given text (e.g. from a webpage).</p>&#xA;&#xA;<p>I am <strong>not</strong> searching for: </p>&#xA;&#xA;<ul>&#xA;<li>text <em>...
habedi/stack-exchange-dataset
66,202
Using Majority Class to Predict Minority Class
<p>Suppose I want to train a binary model in order to predict the probability of who will buy a personal loan and in the dataset only 5 percent of the examples are people who marked as bought a personal loan. So, in this scenario maybe I can leverage downsampling or upsampling to balance the dataset, but if my dataset ...
prediction class imbalance sampling binary
1
Using Majority Class to Predict Minority Class -- (prediction class imbalance sampling binary) <p>Suppose I want to train a binary model in order to predict the probability of who will buy a personal loan and in the dataset only 5 percent of the examples are people who marked as bought a personal loan. So, in this scen...
habedi/stack-exchange-dataset
66,206
Need some advice on approach to select only the informative emojis from the data set?
<p>I have a giant data set from a local elections, which contains hashtags, emojis, and comments. I wanted to make a network analysis using only emojis. </p>&#xA;&#xA;<p>So far I have a network analysis graph made in R which looks like this:&#xA;<a href="https://i.stack.imgur.com/b3UPd.jpg" rel="nofollow noreferrer"><i...
data mining data cleaning visualization algorithms social network analysis
1
Need some advice on approach to select only the informative emojis from the data set? -- (data mining data cleaning visualization algorithms social network analysis) <p>I have a giant data set from a local elections, which contains hashtags, emojis, and comments. I wanted to make a network analysis using only emojis. <...
habedi/stack-exchange-dataset
66,207
What is purpose of the [CLS] token and why is its encoding output important?
<p>I am reading <a href="http://jalammar.github.io/a-visual-guide-to-using-bert-for-the-first-time/" rel="noreferrer">this article on how to use BERT</a> by Jay Alammar and I understand things up until:</p>&#xA;&#xA;<blockquote>&#xA; <p>For sentence classification, we’re only only interested in BERT’s output for the [...
nlp sentiment analysis bert language model text classification
1
What is purpose of the [CLS] token and why is its encoding output important? -- (nlp sentiment analysis bert language model text classification) <p>I am reading <a href="http://jalammar.github.io/a-visual-guide-to-using-bert-for-the-first-time/" rel="noreferrer">this article on how to use BERT</a> by Jay Alammar and I ...
habedi/stack-exchange-dataset
66,208
How to convert Scikit Learn logistic regression model to TensorFlow
<p>I would like to use existing Scikit Learn LogisticRegression model in the <a href="https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-create" rel="nofollow noreferrer">BigQuery ML</a>. However, BQ ML currently has a hard limit of 50 unique labels and my model needs to handle more than...
scikit learn tensorflow
1
How to convert Scikit Learn logistic regression model to TensorFlow -- (scikit learn tensorflow) <p>I would like to use existing Scikit Learn LogisticRegression model in the <a href="https://cloud.google.com/bigquery-ml/docs/reference/standard-sql/bigqueryml-syntax-create" rel="nofollow noreferrer">BigQuery ML</a>. How...
habedi/stack-exchange-dataset
66,224
R: Producing multiple plots (ggplot, geom_point) from a single CSV with multiple subcategories
<p>I have a collection of bacteria data from approximately 140 monitoring locations in California. I would like to produce a scatterplot for each monitoring location with the Sampling Date on the Y-axis and the Bacteria Data on the X-axis. The Sampling Date, Bacteria Data, and Monitoring Location all reside within thei...
r ggplot2 dplyr
1
R: Producing multiple plots (ggplot, geom_point) from a single CSV with multiple subcategories -- (r ggplot2 dplyr) <p>I have a collection of bacteria data from approximately 140 monitoring locations in California. I would like to produce a scatterplot for each monitoring location with the Sampling Date on the Y-axis a...
habedi/stack-exchange-dataset
66,243
Kernel selections in SVM
<p>I want to understand the kernel selection rationale in SVM.</p>&#xA;<p>Some basic things that I understand is if data is linear, then we must go for linear kernel and if it is non-linear, then others.</p>&#xA;<p>But the question is how to understand that the given data is linear or not, especially when it has many f...
machine learning predictive modeling svm linearly separable
1
Kernel selections in SVM -- (machine learning predictive modeling svm linearly separable) <p>I want to understand the kernel selection rationale in SVM.</p>&#xA;<p>Some basic things that I understand is if data is linear, then we must go for linear kernel and if it is non-linear, then others.</p>&#xA;<p>But the questio...
habedi/stack-exchange-dataset
66,244
Convert Numpy array with 'n' and 'y' into integer array of 0 and 1
<p>I have a NumPy array of strings: 'n', 'y', wanna convert it into integer array of 0, 1, how to convert it?</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>imp = SimpleImputer(missing_values=np.nan, strategy='most_frequent')&#xA;X = imp.fit_transform(X)&#xA;&#xA;X&#xA;&#xA;array([['n', 'y', 'n', ..., 'y'...
python numpy
1
Convert Numpy array with 'n' and 'y' into integer array of 0 and 1 -- (python numpy) <p>I have a NumPy array of strings: 'n', 'y', wanna convert it into integer array of 0, 1, how to convert it?</p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>imp = SimpleImputer(missing_values=np.nan, strategy='most_freque...
habedi/stack-exchange-dataset
66,254
Should I create a separate column for each Id value in a feature column or can I use the feature column as it is?
<p>I am working on developing a model for predicting, revenue that a movie will make. One of the features in the training set contains id of the series that a movie belongs to.Say, Star Wars series has Id 1, then the corresponding value in that column for "Return Of Jedi" movie will be 1.</p>&#xA;&#xA;<p>Should I creat...
machine learning feature selection linear regression
1
Should I create a separate column for each Id value in a feature column or can I use the feature column as it is? -- (machine learning feature selection linear regression) <p>I am working on developing a model for predicting, revenue that a movie will make. One of the features in the training set contains id of the ser...
habedi/stack-exchange-dataset
66,264
KeyError: 'i' and <listcomp> Error
<p>I am implementing the codes for <a href="https://www.kaggle.com/eray1yildiz/using-lstms-with-attention-for-emotion-recognition" rel="nofollow noreferrer">https://www.kaggle.com/eray1yildiz/using-lstms-with-attention-for-emotion-recognition</a>&#xA;which is an emotion analysis from the text. I am having some errors w...
python
1
KeyError: 'i' and <listcomp> Error -- (python) <p>I am implementing the codes for <a href="https://www.kaggle.com/eray1yildiz/using-lstms-with-attention-for-emotion-recognition" rel="nofollow noreferrer">https://www.kaggle.com/eray1yildiz/using-lstms-with-attention-for-emotion-recognition</a>&#xA;which is an emotion an...
habedi/stack-exchange-dataset
66,279
How to balance class weights correct for a CNN in Keras, given an unbalanced data set?
<p>I want to use class weights for training a CNN with a imbalanced data set.&#xA;The question arise if the sum of the weights of all examples have to stays the same?</p>&#xA;&#xA;<p>My previous plan was to use the function <code>compute_class_weight('balanced</code>,<code>np.unique(y_train),y_train)</code> function fr...
scikit learn cnn class imbalance
1
How to balance class weights correct for a CNN in Keras, given an unbalanced data set? -- (scikit learn cnn class imbalance) <p>I want to use class weights for training a CNN with a imbalanced data set.&#xA;The question arise if the sum of the weights of all examples have to stays the same?</p>&#xA;&#xA;<p>My previous ...
habedi/stack-exchange-dataset
66,282
In survival analysis, which is the correct way to introduce a variable which changes the survival rate but occurs at different times?
<p>I am making a survival analysis with a cox regression with proportional hazards, we want to analyze wheter the introduction of a phenomenon influences the time until the death of an individual.</p>&#xA;&#xA;<p>A similar example would be: We have patients which were given a medicine at different stages of the diseas...
survival analysis time
1
In survival analysis, which is the correct way to introduce a variable which changes the survival rate but occurs at different times? -- (survival analysis time) <p>I am making a survival analysis with a cox regression with proportional hazards, we want to analyze wheter the introduction of a phenomenon influences the...
habedi/stack-exchange-dataset
66,293
Machine learning methods for panel (longitudinal) data
<p>I have a panel data set, for example:</p>&#xA;&#xA;<pre><code>obj time Y x1 x2&#xA;1 1 0.1 1.28 0.02 &#xA;2 1 0.11 1.27 0.01 &#xA;1 2 -0.4 1.05 -0.06 &#xA;2 2 -0.3 1.11 -0.02 &#xA;1 3 -0.5 1.22 -0.06 &#xA;2...
machine learning neural network data
1
Machine learning methods for panel (longitudinal) data -- (machine learning neural network data) <p>I have a panel data set, for example:</p>&#xA;&#xA;<pre><code>obj time Y x1 x2&#xA;1 1 0.1 1.28 0.02 &#xA;2 1 0.11 1.27 0.01 &#xA;1 2 -0.4 1.05 -0....
habedi/stack-exchange-dataset
66,302
Resampling with Python SMOTE
<p>I am trying to do a simple ML re-sampling approach after the train-test split. However when I do this, it throws the below error. Can you please help me understand what this error is about?</p>&#xA;&#xA;<pre><code>KeyError: 'Only the Series name can be used for the key in Series dtype mappings.'&#xA;</code></pre>&#x...
machine learning neural network deep learning data mining smote
1
Resampling with Python SMOTE -- (machine learning neural network deep learning data mining smote) <p>I am trying to do a simple ML re-sampling approach after the train-test split. However when I do this, it throws the below error. Can you please help me understand what this error is about?</p>&#xA;&#xA;<pre><code>KeyEr...
habedi/stack-exchange-dataset
66,303
How to impute Missing values not the usual way?
<p>I have a dataset of 4712 records working on binary classification. Label 1 is 33% and Label 0 is 67%. I can't drop records because my sample is already small. Because there are few columns which has around 250-350 missing records.</p>&#xA;&#xA;<p>How do I know whether this is <code>missing at random</code>, <code>mi...
machine learning deep learning data mining predictive modeling missing data
1
How to impute Missing values not the usual way? -- (machine learning deep learning data mining predictive modeling missing data) <p>I have a dataset of 4712 records working on binary classification. Label 1 is 33% and Label 0 is 67%. I can't drop records because my sample is already small. Because there are few columns...
habedi/stack-exchange-dataset
66,305
Extracting name, date and total from a set of heterogeneous receipts
<p>So, this is how the problem goes: I am trying to extract information from scanned receipts like this,</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/mjAuJ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mjAuJ.png" alt="Receipt from New York, USA"></a></p>&#xA;&#xA;<p>What I have been told is t...
machine learning neural network deep learning nlp named entity recognition
1
Extracting name, date and total from a set of heterogeneous receipts -- (machine learning neural network deep learning nlp named entity recognition) <p>So, this is how the problem goes: I am trying to extract information from scanned receipts like this,</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/mjAuJ.png" rel=...
habedi/stack-exchange-dataset
66,318
Why results of statsmodel logreg is different from scikit-learn logreg?
<p>I am trying to do a binary classification. I have only 6 input variables and one output variables. Label 1 is 1554 records and Label 0 is 3558 records.</p>&#xA;&#xA;<p>As you can see below, the metrics that I get from these two are different. I am not sure what other info I can share more about this issue. I just tr...
machine learning predictive modeling logistic regression
1
Why results of statsmodel logreg is different from scikit-learn logreg? -- (machine learning predictive modeling logistic regression) <p>I am trying to do a binary classification. I have only 6 input variables and one output variables. Label 1 is 1554 records and Label 0 is 3558 records.</p>&#xA;&#xA;<p>As you can see ...
habedi/stack-exchange-dataset
66,320
How to evaluate performance of a new feature in a model?
<p>I am working on a binary classification where I have 4712 records with Label 1 being 1554 records and Label 0 being 3558 records.</p>&#xA;&#xA;<p>When I tried multiple models based on 6,7 and 8 features, I see the below results. Based on the newly added 7th or (7th &amp; 8th) feature, I see an AUC improvement only i...
machine learning neural network deep learning data mining predictive modeling
1
How to evaluate performance of a new feature in a model? -- (machine learning neural network deep learning data mining predictive modeling) <p>I am working on a binary classification where I have 4712 records with Label 1 being 1554 records and Label 0 being 3558 records.</p>&#xA;&#xA;<p>When I tried multiple models ba...
habedi/stack-exchange-dataset
66,338
Need of maxpooling layer in CNN and confusion regarding output size & number of parameters
<p>In my CNN architecture for binary classification, I have 2 convolutional layers, 2 maxpooling layers, 2 batchnormalization operations, 1 RELu and 1 fullyconnected layer.</p>&#xA;&#xA;<p><strong><em>Case1</em></strong>: When the number of channels, <span class="math-container">$d=1$</span>: </p>&#xA;&#xA;<p>In the fi...
classification cnn convolution mathematics
1
Need of maxpooling layer in CNN and confusion regarding output size & number of parameters -- (classification cnn convolution mathematics) <p>In my CNN architecture for binary classification, I have 2 convolutional layers, 2 maxpooling layers, 2 batchnormalization operations, 1 RELu and 1 fullyconnected layer.</p>&#xA;...
habedi/stack-exchange-dataset
66,345
Why ML model produces different results despite random_state defined? And how to set global random seed for sklearn
<p>I have been running few ML models on same set of data for a binary classification problem with class proportion of 33:67.</p>&#xA;<p>I had the same algorithms and same set of hyperparamters during yesterday and today's run.</p>&#xA;<p>Please note that I also have the parameter <code>random_state</code> in each estim...
machine learning deep learning statistics feature selection performance
1
Why ML model produces different results despite random_state defined? And how to set global random seed for sklearn -- (machine learning deep learning statistics feature selection performance) <p>I have been running few ML models on same set of data for a binary classification problem with class proportion of 33:67.</p...
habedi/stack-exchange-dataset