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
52,309
Neural network or other algorithms?
<p>I have a <strong>regression</strong> problem, with a <strong>million</strong> rows or so, around <strong>10-15</strong> features.&#xA;What should work better on that particular setting? Neural network or regular regressors?</p>&#xA;
machine learning neural network regression
1
Neural network or other algorithms? -- (machine learning neural network regression) <p>I have a <strong>regression</strong> problem, with a <strong>million</strong> rows or so, around <strong>10-15</strong> features.&#xA;What should work better on that particular setting? Neural network or regular regressors?</p>&#xA;
habedi/stack-exchange-dataset
52,318
Manually creating plants images dataset for machine learning plant type classification and leaf segmentation
<p>A group I work with wants to create its own plants data set that will be used for multiple projects like plant type classification and leaf segmentation for starters.<br>&#xA;They are willing to provide all the means necessary for the creation of this data set. A partner agriculture company is willing to assist with...
deep learning classification dataset computer vision
1
Manually creating plants images dataset for machine learning plant type classification and leaf segmentation -- (deep learning classification dataset computer vision) <p>A group I work with wants to create its own plants data set that will be used for multiple projects like plant type classification and leaf segmentati...
habedi/stack-exchange-dataset
52,319
Plot misclassfied values in matplotlib
<p>I have two lists. One is target and another is predicted values in a binary classification. The target is always zero. And I have to plot the results of the prediction against target in such a way, that when I get a value of 1 in prediction, then i need to plot it with a black dot on a square plane. The plane should...
bigdata visualization plotting data analysis matplotlib
1
Plot misclassfied values in matplotlib -- (bigdata visualization plotting data analysis matplotlib) <p>I have two lists. One is target and another is predicted values in a binary classification. The target is always zero. And I have to plot the results of the prediction against target in such a way, that when I get a v...
habedi/stack-exchange-dataset
52,352
Why maximize ELBO in the variational autoencoder?
<p>For a variational autoencoder, we have that:</p>&#xA;&#xA;<p><span class="math-container">$$\mathcal{L}(x,\theta,\phi) := \mathbb{E}_{z \sim q_\phi(z|x)}[\log p_{\theta}(x|z)] -KL[q_{\phi}(z|x) ||p(z)] $$</span></p>&#xA;&#xA;<p>This is called the variational lower bound or evidence lower bound (ELBO). But I think wh...
neural network autoencoder vae
1
Why maximize ELBO in the variational autoencoder? -- (neural network autoencoder vae) <p>For a variational autoencoder, we have that:</p>&#xA;&#xA;<p><span class="math-container">$$\mathcal{L}(x,\theta,\phi) := \mathbb{E}_{z \sim q_\phi(z|x)}[\log p_{\theta}(x|z)] -KL[q_{\phi}(z|x) ||p(z)] $$</span></p>&#xA;&#xA;<p>Thi...
habedi/stack-exchange-dataset
52,353
k means clustering when k = n
<p>I want to find the minimum value of the objective function if we set K equal to the number of samples.</p>&#xA;&#xA;<p>I know the objective function is <span class="math-container">$J=\Sigma_{n=1}^{N}\Sigma_{k=1}^{K}r_{nk}||x_n-\mu_k||^2$</span>&#xA;And we take the derivative to get <span class="math-container">$\mu...
machine learning k means
1
k means clustering when k = n -- (machine learning k means) <p>I want to find the minimum value of the objective function if we set K equal to the number of samples.</p>&#xA;&#xA;<p>I know the objective function is <span class="math-container">$J=\Sigma_{n=1}^{N}\Sigma_{k=1}^{K}r_{nk}||x_n-\mu_k||^2$</span>&#xA;And we ...
habedi/stack-exchange-dataset
52,359
How can I measure if a population has the same distribution as other?
<p>Is there a <strong>population similarity index</strong> of some kind which could help me determine if two populations in two different datasets are the same or at least similar?</p>&#xA;&#xA;<p>The datasets have the exact same number of variables.</p>&#xA;&#xA;<p>I would like a measure which assess the similarity va...
classification dataset similarity
1
How can I measure if a population has the same distribution as other? -- (classification dataset similarity) <p>Is there a <strong>population similarity index</strong> of some kind which could help me determine if two populations in two different datasets are the same or at least similar?</p>&#xA;&#xA;<p>The datasets h...
habedi/stack-exchange-dataset
52,377
What does the huge number on top mean?
<p>I'm trying to visualize the neural network architecture. </p>&#xA;&#xA;<pre><code>from keras.utils import plot_model&#xA;plot_model(model, to_file='model.png', show_shapes=True)&#xA;</code></pre>&#xA;&#xA;<p>What does the huge number on top mean?</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/2jrlx.png" rel="nof...
keras
1
What does the huge number on top mean? -- (keras) <p>I'm trying to visualize the neural network architecture. </p>&#xA;&#xA;<pre><code>from keras.utils import plot_model&#xA;plot_model(model, to_file='model.png', show_shapes=True)&#xA;</code></pre>&#xA;&#xA;<p>What does the huge number on top mean?</p>&#xA;&#xA;<p><a h...
habedi/stack-exchange-dataset
52,383
Understanding softmax layer in Deep Neural Network
<p>In a DNN, once the logits vector is produced say </p>&#xA;&#xA;<p><span class="math-container">$[y_0,y_1]$</span> where the number of neuron in the logits layer is 2, the condition holds where <span class="math-container">$y_0 &gt;= 0$</span> and <span class="math-container">$y_1&lt;= 1$</span>. </p>&#xA;&#xA;<p>Thi...
machine learning neural network deep learning
1
Understanding softmax layer in Deep Neural Network -- (machine learning neural network deep learning) <p>In a DNN, once the logits vector is produced say </p>&#xA;&#xA;<p><span class="math-container">$[y_0,y_1]$</span> where the number of neuron in the logits layer is 2, the condition holds where <span class="math-cont...
habedi/stack-exchange-dataset
52,405
training neural nets for OCR
<p>we are trying to build an in house OCR system to extract alphanumeric strings from images (kindly note, most of our clients cant afford to send their data onto the cloud so it rules out any API from the googles and microsofts..and also tesseract is way too slow for our purpose ..we are talking 10's of users simultan...
cnn ocr
1
training neural nets for OCR -- (cnn ocr) <p>we are trying to build an in house OCR system to extract alphanumeric strings from images (kindly note, most of our clients cant afford to send their data onto the cloud so it rules out any API from the googles and microsofts..and also tesseract is way too slow for our purpo...
habedi/stack-exchange-dataset
52,407
Using sigmoid in binary DNN output layer instead of softmax?
<p>For a binary DNN, the output is <span class="math-container">$y_0 + y_1 = 1$</span> since they are the probability distribution, hence the sum must equate to 1. However, I've been told that <span class="math-container">$y_1$</span> is sufficient to represent the output of the DNN where:</p>&#xA;&#xA;<p><span class="...
machine learning neural network deep learning classification
1
Using sigmoid in binary DNN output layer instead of softmax? -- (machine learning neural network deep learning classification) <p>For a binary DNN, the output is <span class="math-container">$y_0 + y_1 = 1$</span> since they are the probability distribution, hence the sum must equate to 1. However, I've been told that ...
habedi/stack-exchange-dataset
52,413
Am I using optim.SGD incorrectly in pytorch?
<p>I am doing reinforcement learning in checkers.</p>&#xA;&#xA;<p>After each game the network beats itself, I calculate the loss of every individual position in the game, call backward(), and step(). I am beginning to believe that this is not how SGD is supposed to be used, and that I should be feeding it batches, say ...
gradient descent pytorch
1
Am I using optim.SGD incorrectly in pytorch? -- (gradient descent pytorch) <p>I am doing reinforcement learning in checkers.</p>&#xA;&#xA;<p>After each game the network beats itself, I calculate the loss of every individual position in the game, call backward(), and step(). I am beginning to believe that this is not ho...
habedi/stack-exchange-dataset
52,415
What should I check if model accuracy is no better than baseline level(random guess)
<p>I have a data with only 8 columns:</p>&#xA;&#xA;<ul>&#xA;<li>id</li>&#xA;<li>created_time</li>&#xA;<li>employee_id</li>&#xA;<li>rank position</li>&#xA;<li>hourly price</li>&#xA;<li>num_work_completed</li>&#xA;<li>work_category</li>&#xA;<li>hired</li>&#xA;</ul>&#xA;&#xA;<p>Hired is the target variable with 1 represen...
machine learning python predictive modeling data science model model selection
1
What should I check if model accuracy is no better than baseline level(random guess) -- (machine learning python predictive modeling data science model model selection) <p>I have a data with only 8 columns:</p>&#xA;&#xA;<ul>&#xA;<li>id</li>&#xA;<li>created_time</li>&#xA;<li>employee_id</li>&#xA;<li>rank position</li>&#...
habedi/stack-exchange-dataset
52,426
Softmax function result for already normalized probabilities
<p>Isn't the aim of softmax function normalizing the probabilities such that they all sum to 1? So when we apply this method to the already normalized numbers, it would change them. what do these new outcomes depict? Since they are changed, are they reliable?</p>&#xA;&#xA;<pre><code>from scipy import special&#xA;scipy....
cnn normalization softmax
1
Softmax function result for already normalized probabilities -- (cnn normalization softmax) <p>Isn't the aim of softmax function normalizing the probabilities such that they all sum to 1? So when we apply this method to the already normalized numbers, it would change them. what do these new outcomes depict? Since they ...
habedi/stack-exchange-dataset
52,432
Why is my test data accuracy higher than my training data?
<p>I'm using four years of data, training on the first 3 and testing on the fourth. Using LSTM w/ Keras. My test data set (which has no overlap at all with the training) is consistently performing better than my training data. How should I interpret this? It seems very unusual. Here's the trail end of the model output....
keras lstm accuracy
1
Why is my test data accuracy higher than my training data? -- (keras lstm accuracy) <p>I'm using four years of data, training on the first 3 and testing on the fourth. Using LSTM w/ Keras. My test data set (which has no overlap at all with the training) is consistently performing better than my training data. How shoul...
habedi/stack-exchange-dataset
52,435
Finding outliers in Image dataset
<p>I have been working on an image classification tasks for which I am extracting the image frames from the video stream collected for different classes.</p>&#xA;&#xA;<p>I have already trained an image classification model (using transfer learning) however due to the outliers (or overlap in the class distribution) accu...
deep learning cnn image classification image preprocessing
1
Finding outliers in Image dataset -- (deep learning cnn image classification image preprocessing) <p>I have been working on an image classification tasks for which I am extracting the image frames from the video stream collected for different classes.</p>&#xA;&#xA;<p>I have already trained an image classification model...
habedi/stack-exchange-dataset
52,441
Hand-crafted decision tree inspired from learned decision tree
<p><strong>Goal of this question</strong>:&#xA;As I am the only 'machine learning guy' in our group, I wanted to get an outsiders view, that is a sanity check if what I am doing adheres at least to 'decent practices' in machine learning (I know its not best practices :) ).</p>&#xA;&#xA;<p><strong>Problem setup</strong>...
classification decision trees feature engineering
1
Hand-crafted decision tree inspired from learned decision tree -- (classification decision trees feature engineering) <p><strong>Goal of this question</strong>:&#xA;As I am the only 'machine learning guy' in our group, I wanted to get an outsiders view, that is a sanity check if what I am doing adheres at least to 'dec...
habedi/stack-exchange-dataset
52,456
Is there a way (like planning algorithms) to draw a successive polyline to fill a specific shape (like triangle)?
<p>there is a specific shape (like triangle) area, i am trying to develop an program to draw a successive polyline inside the triangle to fill the triangle, one line 3 layers</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/QfRws.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QfRws.png" alt="ing">...
machine learning deep learning algorithms opencv
1
Is there a way (like planning algorithms) to draw a successive polyline to fill a specific shape (like triangle)? -- (machine learning deep learning algorithms opencv) <p>there is a specific shape (like triangle) area, i am trying to develop an program to draw a successive polyline inside the triangle to fill the trian...
habedi/stack-exchange-dataset
52,459
How can Clustering (Unsupervised Learning) be used to improve the accuracy of Linear Regression model (Supervised Learning)
<p>I came through this questions and I failed to find the right answer for it.</p>&#xA;&#xA;<p>How can Clustering (Unsupervised Learning) be used to improve the accuracy of Linear Regression model (Supervised Learning)?</p>&#xA;&#xA;<pre><code>a- Creating different models for different cluster groups.&#xA;b- Creating a...
machine learning linear regression unsupervised learning supervised learning
1
How can Clustering (Unsupervised Learning) be used to improve the accuracy of Linear Regression model (Supervised Learning) -- (machine learning linear regression unsupervised learning supervised learning) <p>I came through this questions and I failed to find the right answer for it.</p>&#xA;&#xA;<p>How can Clustering ...
habedi/stack-exchange-dataset
52,464
Random Forest application with 40+ Predictor Variables
<p>I am using R package <code>randomForest</code> to build a Random Forest model for classification. Ultimately, I need to choose <strong>one of five</strong> programs for a group of individuals based on historical data. The final variable that is being predicted is a categorical "1, 2, 3, 4, or 5" variable.</p>&#xA;&#...
machine learning classification r random forest
1
Random Forest application with 40+ Predictor Variables -- (machine learning classification r random forest) <p>I am using R package <code>randomForest</code> to build a Random Forest model for classification. Ultimately, I need to choose <strong>one of five</strong> programs for a group of individuals based on historic...
habedi/stack-exchange-dataset
52,475
Tokenisation with Spacy - how to get tokens to the left/right of token
<p>I am using Spacy for text tokenisation and getting stuck with it:</p>&#xA;&#xA;<pre><code>import spacy&#xA;nlp = spacy.load("en_core_web_sm")&#xA;mytext = "This is some sentence that spacy will not appreciate"&#xA;doc = nlp(mytext)&#xA;&#xA;for token in doc:&#xA; print(token.text, token.lemma_, token.pos_, token....
python nlp
1
Tokenisation with Spacy - how to get tokens to the left/right of token -- (python nlp) <p>I am using Spacy for text tokenisation and getting stuck with it:</p>&#xA;&#xA;<pre><code>import spacy&#xA;nlp = spacy.load("en_core_web_sm")&#xA;mytext = "This is some sentence that spacy will not appreciate"&#xA;doc = nlp(mytext...
habedi/stack-exchange-dataset
52,476
How to Use Shap Kernal Explainer with Pipeline models?
<p>I have a pandas DataFrame X. I would like to find the prediction explanation of a a particular model.</p>&#xA;&#xA;<p>My model is given below:</p>&#xA;&#xA;<pre><code>pipeline = Pipeline(steps= [&#xA; ('imputer', imputer_function()),&#xA; ('classifier', RandomForestClassifier()&#xA; ])&#xA;x_train, ...
machine learning machine learning model data science model ipython
1
How to Use Shap Kernal Explainer with Pipeline models? -- (machine learning machine learning model data science model ipython) <p>I have a pandas DataFrame X. I would like to find the prediction explanation of a a particular model.</p>&#xA;&#xA;<p>My model is given below:</p>&#xA;&#xA;<pre><code>pipeline = Pipeline(ste...
habedi/stack-exchange-dataset
52,501
Coordinate System's influence on $L$ distances (Manhattan and Euclidean)
<p>I don't understand this picture, which says if we change the coordinate system, we would have the same result for <span class="math-container">$L_2$</span> distance, whereas, our result would differ for <span class="math-container">$L_1$</span> distance. &#xA;What does it mean by coordinate system? <span class="math...
distance k nn manhattan
1
Coordinate System's influence on $L$ distances (Manhattan and Euclidean) -- (distance k nn manhattan) <p>I don't understand this picture, which says if we change the coordinate system, we would have the same result for <span class="math-container">$L_2$</span> distance, whereas, our result would differ for <span class=...
habedi/stack-exchange-dataset
52,505
Jaccard similarity calculate similarity
<p>It is not clear to me how to calculate similarity between two products from the example. </p>&#xA;&#xA;<p>How do they calculate that?</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/rnroW.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rnroW.jpg" alt="Jaccard similarity"></a></p>&#xA;
similarity jaccard coefficient
1
Jaccard similarity calculate similarity -- (similarity jaccard coefficient) <p>It is not clear to me how to calculate similarity between two products from the example. </p>&#xA;&#xA;<p>How do they calculate that?</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/rnroW.jpg" rel="nofollow noreferrer"><img src="https://i...
habedi/stack-exchange-dataset
52,516
Is it a good idea to use tensorflow instead of numpy for numerical approximations?
<p>I intend on perfroming some numerical approximations for a problem in physics. </p>&#xA;&#xA;<p>The main gist of the program will be to perform a svd on large sparse matrices and also calculating the trace of a large matrix. </p>&#xA;&#xA;<p>I used numpy/scipy and multiprocessing modules in python to do this, but it...
python tensorflow numpy
1
Is it a good idea to use tensorflow instead of numpy for numerical approximations? -- (python tensorflow numpy) <p>I intend on perfroming some numerical approximations for a problem in physics. </p>&#xA;&#xA;<p>The main gist of the program will be to perform a svd on large sparse matrices and also calculating the trace...
habedi/stack-exchange-dataset
52,542
Why does my linear regression model converge to a non-zero gradient value?
<p>I have a basic 2D Linear Regression model coded out (using gradient descent), yet it doesn't seem to work as well as it should. </p>&#xA;&#xA;<p>What I expect is that <code>m</code> and <code>c</code> should approach 4 and 3 respectively, and <code>m</code>'s slope or <code>c</code>'s slope should tend to 0; yet wha...
linear regression gradient descent
1
Why does my linear regression model converge to a non-zero gradient value? -- (linear regression gradient descent) <p>I have a basic 2D Linear Regression model coded out (using gradient descent), yet it doesn't seem to work as well as it should. </p>&#xA;&#xA;<p>What I expect is that <code>m</code> and <code>c</code> s...
habedi/stack-exchange-dataset
52,554
Normalized metric for comparing regression models performance
<p>I was recently trying to explain to someone whether performance of my estimation approach is good or bad. For instance, whether a model with <em>Mean Absolute Error</em> (MAE) of 17000 is a bad solution. It was also hard for me to explain whether performance loss by 225 (in terms of MAE), when switching from one mod...
scikit learn evaluation performance
1
Normalized metric for comparing regression models performance -- (scikit learn evaluation performance) <p>I was recently trying to explain to someone whether performance of my estimation approach is good or bad. For instance, whether a model with <em>Mean Absolute Error</em> (MAE) of 17000 is a bad solution. It was als...
habedi/stack-exchange-dataset
52,556
When I try to predict with my model I get an Attribute error
<p>After I've created my model using keras sequential, I tried to start predicting on a small sample to see if it would work however I get this error and I have no idea why.</p>&#xA;&#xA;<blockquote>&#xA; <p>error : AttributeError Traceback (most recent call last)&#xA; in () ----> 1 example_results&#xA; = model.pre...
linear regression
1
When I try to predict with my model I get an Attribute error -- (linear regression) <p>After I've created my model using keras sequential, I tried to start predicting on a small sample to see if it would work however I get this error and I have no idea why.</p>&#xA;&#xA;<blockquote>&#xA; <p>error : AttributeError Trac...
habedi/stack-exchange-dataset
52,580
How can I train a many-to-one RNN with an array of 2D matrices?
<p>I have eye tracking data for every word of a novel. Features for every word is given separately. I want to take groups of 100 words to make a sample and then use each of these samples as a single training instance (instead of a single word). My samples are 2D matrices of shape (no. of words, features). How can I tra...
data mining dataset feature extraction rnn
1
How can I train a many-to-one RNN with an array of 2D matrices? -- (data mining dataset feature extraction rnn) <p>I have eye tracking data for every word of a novel. Features for every word is given separately. I want to take groups of 100 words to make a sample and then use each of these samples as a single training ...
habedi/stack-exchange-dataset
52,582
Transfer learning for a regression problem
<p>if my understanding is correct, in case of image classification and NLP, if I have a pre-trained model, to train on new data, I can reshape the data according to the pre-trained model. So there is no problem even if the new data is slightly different from the previous data. I am trying to use transfer learning for ...
machine learning deep learning regression predictive modeling transfer learning
1
Transfer learning for a regression problem -- (machine learning deep learning regression predictive modeling transfer learning) <p>if my understanding is correct, in case of image classification and NLP, if I have a pre-trained model, to train on new data, I can reshape the data according to the pre-trained model. So t...
habedi/stack-exchange-dataset
52,583
K-Fold and Random Subsampling (RSS) Dataset generation?
<p>Let say if I have a large dataset of 300k instances with 200 features, I want to reduce its size. Can I apply K-Fold technique to the 200 features then the trimmed dataset are applied with RSS to trim the instances? Its like K-Fold to reduce Features then RSS to reduce instances then I get a small-scaled dataset wit...
machine learning dataset cross validation
1
K-Fold and Random Subsampling (RSS) Dataset generation? -- (machine learning dataset cross validation) <p>Let say if I have a large dataset of 300k instances with 200 features, I want to reduce its size. Can I apply K-Fold technique to the 200 features then the trimmed dataset are applied with RSS to trim the instances...
habedi/stack-exchange-dataset
52,584
Installing skmca python package
<p>I can't figure out how to install the python package named <strong>skmca</strong> ( MCA for sickit-learn ) : <a href="https://github.com/TomAugspurger/skmca" rel="nofollow noreferrer">https://github.com/TomAugspurger/skmca</a></p>&#xA;&#xA;<p>There is no <strong>pip</strong> or <strong>conda</strong> command availab...
python anaconda
1
Installing skmca python package -- (python anaconda) <p>I can't figure out how to install the python package named <strong>skmca</strong> ( MCA for sickit-learn ) : <a href="https://github.com/TomAugspurger/skmca" rel="nofollow noreferrer">https://github.com/TomAugspurger/skmca</a></p>&#xA;&#xA;<p>There is no <strong>p...
habedi/stack-exchange-dataset
52,593
Keras MLP Classifer Model not converging
<p>I'm trying to make MLP based classifier based on <strong>numerical</strong> and <strong>categorical</strong> data</p>&#xA;&#xA;<p>The <strong>train_X</strong> (Input) data that I'm working with is look like that</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/l9RYB.png" rel="nofollow noreferrer"><img src="https:...
machine learning python neural network keras mlp
1
Keras MLP Classifer Model not converging -- (machine learning python neural network keras mlp) <p>I'm trying to make MLP based classifier based on <strong>numerical</strong> and <strong>categorical</strong> data</p>&#xA;&#xA;<p>The <strong>train_X</strong> (Input) data that I'm working with is look like that</p>&#xA;&...
habedi/stack-exchange-dataset
52,594
What is the standard model for CNN to compare against other classifier technique?
<p>I have created a new method to do binary image classification. I think it would be interesting to compare it to the convolutional neural network that would do the same binary classification given the same data sets. The question I have is what would be a standard architecture of such CNN model? How much should I tun...
cnn data science model
1
What is the standard model for CNN to compare against other classifier technique? -- (cnn data science model) <p>I have created a new method to do binary image classification. I think it would be interesting to compare it to the convolutional neural network that would do the same binary classification given the same da...
habedi/stack-exchange-dataset
52,601
Is there any advantage in using Particle Swarm Optimization for clustering than K-Means?
<p>I have read some paper about using particle swarm optimization. It doesn't look give much different result than K-Means. I tried to use PSO for clustering but the result is pretty much the same with K-Means with some drawbacks like longer execution time and have a lot of different result caused by the random factor....
clustering optimization evolutionary algorithms
1
Is there any advantage in using Particle Swarm Optimization for clustering than K-Means? -- (clustering optimization evolutionary algorithms) <p>I have read some paper about using particle swarm optimization. It doesn't look give much different result than K-Means. I tried to use PSO for clustering but the result is pr...
habedi/stack-exchange-dataset
52,613
What does pandas describe() percentiles values tell about our data?
<p>Let say this is my dataframe</p>&#xA;&#xA;<pre><code>x=[0.09, 0.95, 0.93, 0.93, 0.34, 0.29, 0.14, 0.23, 0.91, 0.31, 0.62,&#xA; 0.29, 0.71, 0.26, 0.79, 0.3 , 0.1 , 0.73, 0.63, 0.61]&#xA;&#xA;x=pd.DataFrame(x)&#xA;</code></pre>&#xA;&#xA;<p>When we <code>x.describe()</code> this dataframe we get result as this</p...
python pandas
1
What does pandas describe() percentiles values tell about our data? -- (python pandas) <p>Let say this is my dataframe</p>&#xA;&#xA;<pre><code>x=[0.09, 0.95, 0.93, 0.93, 0.34, 0.29, 0.14, 0.23, 0.91, 0.31, 0.62,&#xA; 0.29, 0.71, 0.26, 0.79, 0.3 , 0.1 , 0.73, 0.63, 0.61]&#xA;&#xA;x=pd.DataFrame(x)&#xA;</code></pre...
habedi/stack-exchange-dataset
52,615
How to import statsmodels module to use OLS class?
<p>I am trying multiple Regression</p>&#xA;&#xA;<pre><code>import numpy as np&#xA;import pandas as pd&#xA;import matplotlib.pyplot as plt&#xA;&#xA;# Importing Dataset&#xA;dataset = pd.read_csv(&#xA; 'C:/Users/Rupali Singh/Desktop/ML A-Z/Machine Learning A-Z Template Folder/Part 2 - Regression/Section 5 - Multiple Li...
machine learning regression linear regression
1
How to import statsmodels module to use OLS class? -- (machine learning regression linear regression) <p>I am trying multiple Regression</p>&#xA;&#xA;<pre><code>import numpy as np&#xA;import pandas as pd&#xA;import matplotlib.pyplot as plt&#xA;&#xA;# Importing Dataset&#xA;dataset = pd.read_csv(&#xA; 'C:/Users/Rupali...
habedi/stack-exchange-dataset
52,626
Complete IPv4 Address List
<p>Is it possible to pull a complete list of all IPv4 addresses and put them into a text file? Since there are 4,294,967,296 IPv4 addresses and each one takes about 4 bytes I would guess the file would be about 17.179869184 GB. Is it possible to download all of these addresses into one .txt file?</p>&#xA;
text
1
Complete IPv4 Address List -- (text) <p>Is it possible to pull a complete list of all IPv4 addresses and put them into a text file? Since there are 4,294,967,296 IPv4 addresses and each one takes about 4 bytes I would guess the file would be about 17.179869184 GB. Is it possible to download all of these addresses into ...
habedi/stack-exchange-dataset
52,627
Why class weight is outperforming oversampling?
<p>I am applying both class_weight and oversampling (SMOTE) techniques on a multiclass classification problem and getting better results when using the class_weight technique. Could someone please explain what could be the cause of this difference?</p>&#xA;
multiclass classification class imbalance smote
1
Why class weight is outperforming oversampling? -- (multiclass classification class imbalance smote) <p>I am applying both class_weight and oversampling (SMOTE) techniques on a multiclass classification problem and getting better results when using the class_weight technique. Could someone please explain what could be ...
habedi/stack-exchange-dataset
52,630
.h5 file format does not close properly
<pre class="lang-py prettyprint-override"><code>import h5py #added&#xA;hf = h5py.File('../images.h5', 'w') #added&#xA;hf.close() #added&#xA;&#xA;h5_file = tables.open_file("images.h5", mode="w")&#xA;</code></pre>&#xA;&#xA;<p>I also tried: </p>&#xA;&#xA;<pre class="lang-py prettyprint-override"><code>h5py.File.close(hf)...
python data formats
1
.h5 file format does not close properly -- (python data formats) <pre class="lang-py prettyprint-override"><code>import h5py #added&#xA;hf = h5py.File('../images.h5', 'w') #added&#xA;hf.close() #added&#xA;&#xA;h5_file = tables.open_file("images.h5", mode="w")&#xA;</code></pre>&#xA;&#xA;<p>I also tried: </p>&#xA;&#xA;<p...
habedi/stack-exchange-dataset
52,632
Cross validation Vs. Train Validate Test
<p>I have a doubt regarding the cross validation approach and train-validation-test approach.</p>&#xA;&#xA;<p>I was told that I can split a dataset into 3 parts: </p>&#xA;&#xA;<ol>&#xA;<li>Train: we train the model.</li>&#xA;<li>Validation: we validate and adjust model parameters.</li>&#xA;<li>Test: never seen before d...
machine learning cross validation
1
Cross validation Vs. Train Validate Test -- (machine learning cross validation) <p>I have a doubt regarding the cross validation approach and train-validation-test approach.</p>&#xA;&#xA;<p>I was told that I can split a dataset into 3 parts: </p>&#xA;&#xA;<ol>&#xA;<li>Train: we train the model.</li>&#xA;<li>Validation:...
habedi/stack-exchange-dataset
52,658
About 1M rows of data. Should I restrict myself to few columns as well?
<p>I'm trying to build a predictive model from about 1 million rows of data. My goal is to predict a certain numerical value.</p>&#xA;&#xA;<p>I have the intuition that I should use very few numerical <strong>binary</strong> columns so I don't get data points that are too separated, a.k.a., the curse of dimensionality. ...
machine learning predictive modeling model selection
1
About 1M rows of data. Should I restrict myself to few columns as well? -- (machine learning predictive modeling model selection) <p>I'm trying to build a predictive model from about 1 million rows of data. My goal is to predict a certain numerical value.</p>&#xA;&#xA;<p>I have the intuition that I should use very few ...
habedi/stack-exchange-dataset
52,679
Elements of Statistical Learning - question on p. 12
<p>I am starting to work through Elements of Statistical Learning, and right off the bat I am coming across things that I don't understand. I would be grateful for any help from this community. Please let me know if this is not the appropriate forum to post these questions (in which case, if you're feeling extra-nice, ...
linear regression
1
Elements of Statistical Learning - question on p. 12 -- (linear regression) <p>I am starting to work through Elements of Statistical Learning, and right off the bat I am coming across things that I don't understand. I would be grateful for any help from this community. Please let me know if this is not the appropriate ...
habedi/stack-exchange-dataset
52,697
Understanding `get_combination_wise_output_matrix` when investigating a multi-label classification problem
<p>I am currently working on a multi-label classification problem. I am using the <a href="http://scikit.ml/index.html" rel="nofollow noreferrer">scikit-multilearn</a> library (further reading <a href="https://arxiv.org/pdf/1702.01460.pdf" rel="nofollow noreferrer">here</a>)</p>&#xA;&#xA;<p>I understand that train / te...
python scikit learn multilabel classification
1
Understanding `get_combination_wise_output_matrix` when investigating a multi-label classification problem -- (python scikit learn multilabel classification) <p>I am currently working on a multi-label classification problem. I am using the <a href="http://scikit.ml/index.html" rel="nofollow noreferrer">scikit-multilear...
habedi/stack-exchange-dataset
52,704
How to save a knn model?
<p>I need to save the results of a fit of the SKlearn NearestNeighbors model:</p>&#xA;&#xA;<pre><code>knn = NearestNeighbors(10)&#xA;knn.fit(my_data)&#xA;</code></pre>&#xA;&#xA;<p>How do you save to disk the traied <code>knn</code> using Python?</p>&#xA;
python scikit learn k nn
1
How to save a knn model? -- (python scikit learn k nn) <p>I need to save the results of a fit of the SKlearn NearestNeighbors model:</p>&#xA;&#xA;<pre><code>knn = NearestNeighbors(10)&#xA;knn.fit(my_data)&#xA;</code></pre>&#xA;&#xA;<p>How do you save to disk the traied <code>knn</code> using Python?</p>&#xA;
habedi/stack-exchange-dataset
52,714
May I use the same data in several time series intervals?
<p>I am playing with RNNs / LTSMs for a classification task in predicting financial data. </p>&#xA;&#xA;<p>I have a time-series going many years back, and are planning to divide it into a number of shorter time-intervals that will be used to obtain a classification.</p>&#xA;&#xA;<p>For example divide the data into rand...
machine learning time series lstm rnn finance
1
May I use the same data in several time series intervals? -- (machine learning time series lstm rnn finance) <p>I am playing with RNNs / LTSMs for a classification task in predicting financial data. </p>&#xA;&#xA;<p>I have a time-series going many years back, and are planning to divide it into a number of shorter time-...
habedi/stack-exchange-dataset
52,716
Autoencoder gets ~0% accuracy / doesn't train at all
<p>So I wanted to get into the topic of 'Autoencoder', and just tested how well it would work on random vectors of size 200.</p>&#xA;&#xA;<pre><code>model = keras.models.Sequential()&#xA;model.add(keras.layers.Dense(50, activation='tanh'))&#xA;model.add(keras.layers.Dense(200))&#xA;&#xA;&#xA;model.compile(optimizer='ad...
neural network deep learning keras autoencoder
1
Autoencoder gets ~0% accuracy / doesn't train at all -- (neural network deep learning keras autoencoder) <p>So I wanted to get into the topic of 'Autoencoder', and just tested how well it would work on random vectors of size 200.</p>&#xA;&#xA;<pre><code>model = keras.models.Sequential()&#xA;model.add(keras.layers.Dense...
habedi/stack-exchange-dataset
52,724
How to predict NaN (missing values) of a dataframe using ARIMA in Python?
<p>I have a dataframe <code>df_train</code> of shape (11808, 1) that looks as follows:</p>&#xA;&#xA;<pre><code>Datum Menge&#xA;2018-01-01 00:00:00 19.5&#xA;2018-01-01 00:15:00 19.0&#xA;2018-01-01 00:30:00 19.5&#xA;2018-01-01 00:45:00 19.5&#xA;2018-01-01 01:00:00 21.0&#xA;2018-01-01 01:15:00 19.5&#xA;2018-01-01 01:30:...
machine learning python forecasting time series
1
How to predict NaN (missing values) of a dataframe using ARIMA in Python? -- (machine learning python forecasting time series) <p>I have a dataframe <code>df_train</code> of shape (11808, 1) that looks as follows:</p>&#xA;&#xA;<pre><code>Datum Menge&#xA;2018-01-01 00:00:00 19.5&#xA;2018-01-01 00:15:00 19.0&#xA;2018-0...
habedi/stack-exchange-dataset
52,727
MinMaxScaler when LSTM predictions fall outside of training range?
<p>I am using MinMaxScaler on my training set and applying the transformations to my test set and inverse_transform to my model’s outputs. If this were, say, a stock prediction problem, my training set may have values between 1-200, but in the most recent time steps, the values are toward the high end of that range.</p...
scikit learn lstm rnn normalization feature scaling
1
MinMaxScaler when LSTM predictions fall outside of training range? -- (scikit learn lstm rnn normalization feature scaling) <p>I am using MinMaxScaler on my training set and applying the transformations to my test set and inverse_transform to my model’s outputs. If this were, say, a stock prediction problem, my trainin...
habedi/stack-exchange-dataset
52,730
Extracting email id gives error
<p>I am extracting email ids and storing them into a new column variable, but I am getting the issue:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/CrHpP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CrHpP.png" alt="enter image description here"></a></p>&#xA;&#xA;<pre><code> import re&#xA; ...
python nlp pandas nltk
1
Extracting email id gives error -- (python nlp pandas nltk) <p>I am extracting email ids and storing them into a new column variable, but I am getting the issue:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/CrHpP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CrHpP.png" alt="enter image descri...
habedi/stack-exchange-dataset
52,744
Test dataset with categorical variable value not present in train dataset & transformer
<p>I want to replace values of a categorical variable ( named 'six' ) by the mean of my target variable ( named 'target' ). </p>&#xA;&#xA;<p>I am fitting a transformer doing just that on a train dataset df and then transform the test dataset df2.</p>&#xA;&#xA;<p>How do I deal with a value appearing solely in the test d...
categorical data transformer
1
Test dataset with categorical variable value not present in train dataset & transformer -- (categorical data transformer) <p>I want to replace values of a categorical variable ( named 'six' ) by the mean of my target variable ( named 'target' ). </p>&#xA;&#xA;<p>I am fitting a transformer doing just that on a train dat...
habedi/stack-exchange-dataset
52,757
How does one individually extract elements from a tensor?
<p>Let us assume that I have a tensor in tensorflow with 2 elements.</p>&#xA;&#xA;<p>How do I extract these individual elements and perform calculations on them?</p>&#xA;&#xA;<pre><code>def multiplication(a):&#xA; return a[0]*a[1]&#xA;&#xA;def main():&#xA; sess=tf.Session&#xA; a=tf.constant([[2,3]])&#xA; an...
python deep learning tensorflow
1
How does one individually extract elements from a tensor? -- (python deep learning tensorflow) <p>Let us assume that I have a tensor in tensorflow with 2 elements.</p>&#xA;&#xA;<p>How do I extract these individual elements and perform calculations on them?</p>&#xA;&#xA;<pre><code>def multiplication(a):&#xA; return a...
habedi/stack-exchange-dataset
52,761
Massive variation in results with tensorflow and keras
<p>I'm new to Tensorflow and Keras and I some background knowledge of how CNN's work.&#xA;I'm using a basic sequential model based on the code by <a href="https://pythonprogramming.net/convolutional-neural-network-deep-learning-python-tensorflow-keras/" rel="nofollow noreferrer">https://pythonprogramming.net/convolutio...
keras tensorflow cnn variance
1
Massive variation in results with tensorflow and keras -- (keras tensorflow cnn variance) <p>I'm new to Tensorflow and Keras and I some background knowledge of how CNN's work.&#xA;I'm using a basic sequential model based on the code by <a href="https://pythonprogramming.net/convolutional-neural-network-deep-learning-py...
habedi/stack-exchange-dataset
52,764
How to detect cardboard boxes using Neural Network
<p>I'm trying to train a Neural Network how to detect cardboard boxes along with multiple classes of persons (people).</p>&#xA;&#xA;<p><strong>Although it's easy to detect persons and correctly classifies them, it's incredibly hard to detect cardboard boxes.</strong></p>&#xA;&#xA;<p>The boxes look like this:</p>&#xA;&#...
neural network deep learning cnn image classification
1
How to detect cardboard boxes using Neural Network -- (neural network deep learning cnn image classification) <p>I'm trying to train a Neural Network how to detect cardboard boxes along with multiple classes of persons (people).</p>&#xA;&#xA;<p><strong>Although it's easy to detect persons and correctly classifies them,...
habedi/stack-exchange-dataset
52,766
Should a Cluster Validity Index contain the same measure(s) as the Clustering Algorithm?
<p>I'm currently trying to use cluster analysis as a tool for time-series aggregation for a project of mine. The dataset is high-dimensional (386-d), so no chance in assessing the cluster validity visually.</p>&#xA;&#xA;<p>I'm using three different clustering algorithms (k-means++, k-medoids PAM, fuzzy c-means) to find...
clustering
1
Should a Cluster Validity Index contain the same measure(s) as the Clustering Algorithm? -- (clustering) <p>I'm currently trying to use cluster analysis as a tool for time-series aggregation for a project of mine. The dataset is high-dimensional (386-d), so no chance in assessing the cluster validity visually.</p>&#xA;...
habedi/stack-exchange-dataset
52,770
Complete IPv4 Address Space
<p>I know this was asked before, but I didn't get a definitive answer. I am trying to download a simple 17GB .txt file that contains the entire IPv4 address space. There must be a file like this already on the web.</p>&#xA;
text
1
Complete IPv4 Address Space -- (text) <p>I know this was asked before, but I didn't get a definitive answer. I am trying to download a simple 17GB .txt file that contains the entire IPv4 address space. There must be a file like this already on the web.</p>&#xA;
habedi/stack-exchange-dataset
52,775
A robust metric in the presence of class imbalance
<p>When evaluating the performance of a multiclass classification problem, on a highly imbalanced dataset, what is the most robust metric for this purpose?</p>&#xA;&#xA;<p>I read a paper that states:</p>&#xA;&#xA;<blockquote>&#xA; <p>"Average precision is a robust metric in the presence of class&#xA; imbalance since ...
classification multiclass classification evaluation class imbalance imbalanced learn
1
A robust metric in the presence of class imbalance -- (classification multiclass classification evaluation class imbalance imbalanced learn) <p>When evaluating the performance of a multiclass classification problem, on a highly imbalanced dataset, what is the most robust metric for this purpose?</p>&#xA;&#xA;<p>I read ...
habedi/stack-exchange-dataset
52,782
How to club the orders in such a way that maximum number of items are common amongst them?
<p>Consider the following data set:&#xA;The above table shows the quantity of each item used in the orders SO1 SO2 etc. I need to club the orders in such a way that maximum number of items are common amongst them.&#xA;For example: </p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/UbEaE.jpg" rel="nofollow noreferrer"...
python r data mining clustering data
1
How to club the orders in such a way that maximum number of items are common amongst them? -- (python r data mining clustering data) <p>Consider the following data set:&#xA;The above table shows the quantity of each item used in the orders SO1 SO2 etc. I need to club the orders in such a way that maximum number of item...
habedi/stack-exchange-dataset
52,783
If a neural network is a universal function approximator, is the irreducible error 0?
<p>How to marry the fact that (most) neural networks with a single hidden layer are universal function approximators with the fact that in the bias-variance decomposition we consider there to be an irreducible error?</p>&#xA;&#xA;<p>Can the irreducible error be 0? (Then it would be inappropriate named.)</p>&#xA;
neural network
1
If a neural network is a universal function approximator, is the irreducible error 0? -- (neural network) <p>How to marry the fact that (most) neural networks with a single hidden layer are universal function approximators with the fact that in the bias-variance decomposition we consider there to be an irreducible erro...
habedi/stack-exchange-dataset
52,797
Removing duplicates and keeping the last entry in pandas
<p>I have a table and I'm trying to remove all the duplicate and keep the<br>&#xA;the rows that has the latest datestamp.</p>&#xA;&#xA;<p>Here is the table:</p>&#xA;&#xA;<pre><code>email address orgin_date new_opt_in_date datestamp&#xA;123@ax.tu 1/1/1900 1/1/1900 3/15/2016&#xA;123@ax.t...
python pandas dataframe
1
Removing duplicates and keeping the last entry in pandas -- (python pandas dataframe) <p>I have a table and I'm trying to remove all the duplicate and keep the<br>&#xA;the rows that has the latest datestamp.</p>&#xA;&#xA;<p>Here is the table:</p>&#xA;&#xA;<pre><code>email address orgin_date new_opt_in_date da...
habedi/stack-exchange-dataset
52,814
Framing Sentences based on keywords
<p>Given a few specific words, which techniques of Natural Language Processing can I use to achieve creating a meaningful sentence from those words?</p>&#xA;&#xA;<p>eg.</p>&#xA;&#xA;<p><strong>Words:</strong>&#xA;jackets, highest sale, sweaters, lowest sale</p>&#xA;&#xA;<p><strong>Sentence:</strong>&#xA;Jackets exhibit...
nlp nlg
1
Framing Sentences based on keywords -- (nlp nlg) <p>Given a few specific words, which techniques of Natural Language Processing can I use to achieve creating a meaningful sentence from those words?</p>&#xA;&#xA;<p>eg.</p>&#xA;&#xA;<p><strong>Words:</strong>&#xA;jackets, highest sale, sweaters, lowest sale</p>&#xA;&#xA;...
habedi/stack-exchange-dataset
52,845
What is this called by gathering the meaning from a sentence?
<p>What would this process of gathering the meaning of a sentence be called? What would the segments derived from the sentence be called?</p>&#xA;&#xA;<pre><code>"John and Derrek both love cake"&#xA; -&gt; John loves cake&#xA; -&gt; Derrek loves cake&#xA;&#xA;"John was mad that the weather was rainy today"&#xA; ...
nlp
1
What is this called by gathering the meaning from a sentence? -- (nlp) <p>What would this process of gathering the meaning of a sentence be called? What would the segments derived from the sentence be called?</p>&#xA;&#xA;<pre><code>"John and Derrek both love cake"&#xA; -&gt; John loves cake&#xA; -&gt; Derrek lov...
habedi/stack-exchange-dataset
52,850
Survival regression with major event that won't happen
<p>I would like to do some survival regression about the duration before the "death" of an individual. The final purpose is to know, given an individual, how long it should take before he'll most likely "die" (probability of the survival function to be less than 0.1 for instance).</p>&#xA;&#xA;<p>My problem here is tha...
regression data survival analysis
1
Survival regression with major event that won't happen -- (regression data survival analysis) <p>I would like to do some survival regression about the duration before the "death" of an individual. The final purpose is to know, given an individual, how long it should take before he'll most likely "die" (probability of t...
habedi/stack-exchange-dataset
52,855
Relating two data sets at the row level where table one may correlate to zero or more rows in another
<p>I'm just looking for some high level recommendations on libraries, design patterns, or algorithms here. I obviously don't expect you to build a model for me.</p>&#xA;&#xA;<p>I would like to predict the monetary impact that an outage will have on the electric grid.</p>&#xA;&#xA;<p>I have data of historical outages th...
machine learning python r predictive modeling
1
Relating two data sets at the row level where table one may correlate to zero or more rows in another -- (machine learning python r predictive modeling) <p>I'm just looking for some high level recommendations on libraries, design patterns, or algorithms here. I obviously don't expect you to build a model for me.</p>&#x...
habedi/stack-exchange-dataset
52,857
Is the number of iterations in gradient tree boosting just the number of trees?
<p>I have been searching for a while and I just can't find any indication. When people talk about iterations in algorithms like XGBoost or LightGBM, or Catboost, do they mean how many decision trees i.e. base learners will be built? I.e. XGboost m=100 means the algorithm will build a total of 100 base learners, each ca...
machine learning xgboost boosting
1
Is the number of iterations in gradient tree boosting just the number of trees? -- (machine learning xgboost boosting) <p>I have been searching for a while and I just can't find any indication. When people talk about iterations in algorithms like XGBoost or LightGBM, or Catboost, do they mean how many decision trees i....
habedi/stack-exchange-dataset
52,859
30 Years Of Excel Test Data
<p>I am a CS intern at an industrial company that has 30 years of excel files that need to be analyzed. Looking at the data, only a fraction of the files need to be looked at and used. After those files are identified, I need to pull out values from specific columns. The real issue is that there is no standard excel fo...
python data java excel
1
30 Years Of Excel Test Data -- (python data java excel) <p>I am a CS intern at an industrial company that has 30 years of excel files that need to be analyzed. Looking at the data, only a fraction of the files need to be looked at and used. After those files are identified, I need to pull out values from specific colum...
habedi/stack-exchange-dataset
52,873
How to find optimal number of trees in random forest using Grid search in R?
<p>From below code, I am getting optimal number of mtry. What is this mtry ? and How should I find the optimal number of tree that to be assigned to Random forest algorithm so that it will give High accuracy. </p>&#xA;&#xA;<p>Any comment will be highly appreciated ! Thanks in Advance. </p>&#xA;&#xA;<pre><code>classifie...
machine learning r random forest machine learning model grid search
1
How to find optimal number of trees in random forest using Grid search in R? -- (machine learning r random forest machine learning model grid search) <p>From below code, I am getting optimal number of mtry. What is this mtry ? and How should I find the optimal number of tree that to be assigned to Random forest algorit...
habedi/stack-exchange-dataset
52,877
Finding Outliers in Resource Forecast Data
<p>Unsure if this is the correct place to place this, please close if so.</p>&#xA;&#xA;<p>I'm a workforce analyst at a large retail company, I own and maintain all the forecasting for our retail stores. This is based on Product Sales Forecast which I run through a model which has various tasks (such as changing items o...
pandas forecasting
1
Finding Outliers in Resource Forecast Data -- (pandas forecasting) <p>Unsure if this is the correct place to place this, please close if so.</p>&#xA;&#xA;<p>I'm a workforce analyst at a large retail company, I own and maintain all the forecasting for our retail stores. This is based on Product Sales Forecast which I ru...
habedi/stack-exchange-dataset
52,879
Is there a difference between np.matrix(np.array([0,0])) and np.matrix([0,0])?
<p>I was reading this <a href="https://www.johnwittenauer.net/machine-learning-exercises-in-python-part-1/" rel="nofollow noreferrer">code</a>, for implemnting linear regression from scratch:</p>&#xA;&#xA;<pre><code># convert from data frames to numpy matrices&#xA;X = np.matrix(X.values)&#xA;y = np.matrix(y.values)&#xA...
linear regression numpy matrix
1
Is there a difference between np.matrix(np.array([0,0])) and np.matrix([0,0])? -- (linear regression numpy matrix) <p>I was reading this <a href="https://www.johnwittenauer.net/machine-learning-exercises-in-python-part-1/" rel="nofollow noreferrer">code</a>, for implemnting linear regression from scratch:</p>&#xA;&#xA;...
habedi/stack-exchange-dataset
52,885
Classify samples based on other sample probabilities
<p>I was wondering if there's a way to train a classifier or set up a way of classifying after that can classify certain samples as some relationship between the previous two.</p>&#xA;&#xA;<p>I notice that, for example, when I use the <code>predict_proba</code> from scikit-learn's RandomForest, I can see the probabilit...
machine learning classification scikit learn decision trees
1
Classify samples based on other sample probabilities -- (machine learning classification scikit learn decision trees) <p>I was wondering if there's a way to train a classifier or set up a way of classifying after that can classify certain samples as some relationship between the previous two.</p>&#xA;&#xA;<p>I notice t...
habedi/stack-exchange-dataset
52,902
ValueError: Expected 2D array, got scalar array instead using predict method
<p>I am trying to get a predicted value instead of whole features for a particular level using predict method. </p>&#xA;&#xA;<pre><code>import numpy as np&#xA;import pandas as pd&#xA;import matplotlib.pyplot as plt&#xA;&#xA;#Importing Dataset&#xA;dataset = pd.read_csv('C:/Users/Rupali Singh/Desktop/ML A-Z/Machine Le...
machine learning regression prediction
1
ValueError: Expected 2D array, got scalar array instead using predict method -- (machine learning regression prediction) <p>I am trying to get a predicted value instead of whole features for a particular level using predict method. </p>&#xA;&#xA;<pre><code>import numpy as np&#xA;import pandas as pd&#xA;import matplo...
habedi/stack-exchange-dataset
52,946
Identifying users based on smartphone data (Google)
<p>I've heard that Google has now a technique to identify users based on the smartphone touch input (how the user is using the phone). I have found nothing about that online. Is there a paper or some article available explaining how this is done (e.g. what features are used)?</p>&#xA;
machine learning google
1
Identifying users based on smartphone data (Google) -- (machine learning google) <p>I've heard that Google has now a technique to identify users based on the smartphone touch input (how the user is using the phone). I have found nothing about that online. Is there a paper or some article available explaining how this i...
habedi/stack-exchange-dataset
52,956
How to create a stacked bar chart with gaps between values of each variables in Python
<p>I have a problem with creating a stacked bar chart in Python. I have data with 3 variables as below:</p>&#xA;&#xA;<p><code>A=[3,5,7] &#xA;B=[4,5,7]&#xA;C=[2,3,4,5,6,7]</code></p>&#xA;&#xA;<p>I would like to create a bar chart with gaps of values of each variable as below bar chart with gaps between values of each va...
python
1
How to create a stacked bar chart with gaps between values of each variables in Python -- (python) <p>I have a problem with creating a stacked bar chart in Python. I have data with 3 variables as below:</p>&#xA;&#xA;<p><code>A=[3,5,7] &#xA;B=[4,5,7]&#xA;C=[2,3,4,5,6,7]</code></p>&#xA;&#xA;<p>I would like to create a ba...
habedi/stack-exchange-dataset
52,968
Change values of a particular column to value_count()
<p>Suppose i have the following data set. I need to replace the value of a particular column by the value_count(). I saw few posts where it is done for the entire data set. I need to do it for a particular column.</p>&#xA;&#xA;<pre><code>data = pd.DataFrame({'Item 1': ['apple', 'potato', 'cheese', 'banana', 'cheese', '...
python pandas dataframe
1
Change values of a particular column to value_count() -- (python pandas dataframe) <p>Suppose i have the following data set. I need to replace the value of a particular column by the value_count(). I saw few posts where it is done for the entire data set. I need to do it for a particular column.</p>&#xA;&#xA;<pre><code...
habedi/stack-exchange-dataset
52,974
Convert .cbf to lossless image format with defined "dynamic range"
<p>We collected electron diffraction data and converted the data into <code>.cbf</code> (Crystallographic Binary File). Those are about 10'000 files. Now I would like to convert the .cbf into an image format like <code>.tif</code> but with a specified <strong>dynamic range</strong>.</p>&#xA;&#xA;<p>I tried it with fabI...
python
1
Convert .cbf to lossless image format with defined "dynamic range" -- (python) <p>We collected electron diffraction data and converted the data into <code>.cbf</code> (Crystallographic Binary File). Those are about 10'000 files. Now I would like to convert the .cbf into an image format like <code>.tif</code> but with a...
habedi/stack-exchange-dataset
52,983
Unable to use readline() for function() input
<p>I recently started learning R and was trying to make a script that would give specific values of a probability distribution. Ideally, in this script, there would be a list of probability distributions with an associated number. Users would be able to enter a number and it would print out a message while giving them ...
r
1
Unable to use readline() for function() input -- (r) <p>I recently started learning R and was trying to make a script that would give specific values of a probability distribution. Ideally, in this script, there would be a list of probability distributions with an associated number. Users would be able to enter a numbe...
habedi/stack-exchange-dataset
52,987
How to store a trained Random Forest model in python or matlab as a matrix
<p>Is it possible to store a random forest model in python (or matlab). Then use that trained model in a C program? </p>&#xA;&#xA;<p>I am trying to do this because I am making a myoelectric prosthetic, and you can only write to the chip we are using (PIC32MK0512MCF064) with C code. </p>&#xA;&#xA;<p>My first thought on ...
python random forest matlab
1
How to store a trained Random Forest model in python or matlab as a matrix -- (python random forest matlab) <p>Is it possible to store a random forest model in python (or matlab). Then use that trained model in a C program? </p>&#xA;&#xA;<p>I am trying to do this because I am making a myoelectric prosthetic, and you ca...
habedi/stack-exchange-dataset
52,993
Tool/dataset for matching first names and nicknames
<p>I'm trying to identify the same individuals in a large dataset where sometimes the individuals may be listed by their full first name (e.g., "Michael Douglas") and sometimes by its nickname (e.g., "Mike Douglas"). Does anyone know of a dataset that has (at least) English first names and their corresponding common ni...
dataset named entity recognition
1
Tool/dataset for matching first names and nicknames -- (dataset named entity recognition) <p>I'm trying to identify the same individuals in a large dataset where sometimes the individuals may be listed by their full first name (e.g., "Michael Douglas") and sometimes by its nickname (e.g., "Mike Douglas"). Does anyone k...
habedi/stack-exchange-dataset
53,009
Approximating multi-variable function with neural network in python
<p>I'm trying to use 2-5-1 neural network to approximate function <span class="math-container">$$x_1 \in[-3,3], x_2\in[-1,3], f(x_1,x_2)=\sin(2x_1+x_2)$$</span></p>&#xA;&#xA;<p>I used code from <a href="https://blog.zhaytam.com/2018/08/15/implement-neural-network-backpropagation/" rel="nofollow noreferrer">Implementin...
python neural network
1
Approximating multi-variable function with neural network in python -- (python neural network) <p>I'm trying to use 2-5-1 neural network to approximate function <span class="math-container">$$x_1 \in[-3,3], x_2\in[-1,3], f(x_1,x_2)=\sin(2x_1+x_2)$$</span></p>&#xA;&#xA;<p>I used code from <a href="https://blog.zhaytam....
habedi/stack-exchange-dataset
53,030
Feeding 3 consecutive video frames to a CNN to track a tennis ball
<p>I want to use CNN transfer learning to track a tennis ball from TV broadcasts of tennis matches. &#xA;I used VGG annotating tool <a href="http://www.robots.ox.ac.uk/~vgg/software/via/" rel="nofollow noreferrer">annotation tool link</a> (use version 1 of the tool for compatibility with matterport code) and have about...
cnn transfer learning faster rcnn difference
1
Feeding 3 consecutive video frames to a CNN to track a tennis ball -- (cnn transfer learning faster rcnn difference) <p>I want to use CNN transfer learning to track a tennis ball from TV broadcasts of tennis matches. &#xA;I used VGG annotating tool <a href="http://www.robots.ox.ac.uk/~vgg/software/via/" rel="nofollow n...
habedi/stack-exchange-dataset
53,047
How is Stochastic Gradient Descent used like Mini Batch gradient descent?
<p>As I know, Gradient Descent has three variants which are:</p>&#xA;<p>1- Batch Gradient Descent: processes all the training examples for each iteration of gradient descent.</p>&#xA;<p>2- Stochastic Gradient Descent: processes one training example per iteration. Hence, the parameters are being updated even after one i...
optimization gradient descent
1
How is Stochastic Gradient Descent used like Mini Batch gradient descent? -- (optimization gradient descent) <p>As I know, Gradient Descent has three variants which are:</p>&#xA;<p>1- Batch Gradient Descent: processes all the training examples for each iteration of gradient descent.</p>&#xA;<p>2- Stochastic Gradient De...
habedi/stack-exchange-dataset
53,058
Feature Selection with one-hot-encoded categorical data
<p>I have a dataset with 400+ columns. Almost 90% of these are categorical data with One-Hot-Encoding (OHE). I'm using the dataset for a classification problem.</p>&#xA;&#xA;<p>My professors asked me to perform feature selection using sequential forward selection (mlxtend). </p>&#xA;&#xA;<p>Is there really a point of d...
machine learning python feature selection categorical data
1
Feature Selection with one-hot-encoded categorical data -- (machine learning python feature selection categorical data) <p>I have a dataset with 400+ columns. Almost 90% of these are categorical data with One-Hot-Encoding (OHE). I'm using the dataset for a classification problem.</p>&#xA;&#xA;<p>My professors asked me ...
habedi/stack-exchange-dataset
53,059
Linear regression with white Gaussian noise
<p>I am new to machine learning , so this question may sound fundamental. My task is to estimate the parameter vector of the equation with the least squares method:</p>&#xA;&#xA;<p><span class="math-container">$y = \theta_0 + \theta_1x + \theta_2x^2 + η$</span></p>&#xA;&#xA;<p>Where η corresponds to white Gaussian nois...
linear regression linear algebra
1
Linear regression with white Gaussian noise -- (linear regression linear algebra) <p>I am new to machine learning , so this question may sound fundamental. My task is to estimate the parameter vector of the equation with the least squares method:</p>&#xA;&#xA;<p><span class="math-container">$y = \theta_0 + \theta_1x + ...
habedi/stack-exchange-dataset
53,063
What's a classifier capable of predicting a variable number of classes
<p>I want to solve what I understand as a classification problem regarding tagging. Let's say an Entity can have 0 or more tags and I want to be able to predict which tags (if any) an entity might get</p>&#xA;&#xA;<p>I would like the classifier to output 0 or more tags.</p>&#xA;&#xA;<p>I have never run into this kind o...
classification machine learning model multilabel classification
1
What's a classifier capable of predicting a variable number of classes -- (classification machine learning model multilabel classification) <p>I want to solve what I understand as a classification problem regarding tagging. Let's say an Entity can have 0 or more tags and I want to be able to predict which tags (if any)...
habedi/stack-exchange-dataset
53,067
Is there a scientific method for grouping continuous numbers for this problem
<p>I use python, and I have a list of numbers that contains 19 elements and I would like to divide this list into 6 groups or fewer. </p>&#xA;&#xA;<p>The list could have numbers between 0 and 1. and it mustn't be ordered, I need to keep it on its form and getting cut-off </p>&#xA;&#xA;<p><strong>list:</strong></p>&#...
python clustering
1
Is there a scientific method for grouping continuous numbers for this problem -- (python clustering) <p>I use python, and I have a list of numbers that contains 19 elements and I would like to divide this list into 6 groups or fewer. </p>&#xA;&#xA;<p>The list could have numbers between 0 and 1. and it mustn't be order...
habedi/stack-exchange-dataset
53,080
Why using a frozen embedding layer in an LSTM model
<p>I'm studying this LSTM mode:&#xA;<a href="https://www.kaggle.com/paoloripamonti/twitter-sentiment-analysis" rel="nofollow noreferrer">https://www.kaggle.com/paoloripamonti/twitter-sentiment-analysis</a></p>&#xA;&#xA;<p>They use a frozen embedding layer which uses an predefined matrix with for each word a 300 dim vec...
neural network lstm word embeddings sentiment analysis
1
Why using a frozen embedding layer in an LSTM model -- (neural network lstm word embeddings sentiment analysis) <p>I'm studying this LSTM mode:&#xA;<a href="https://www.kaggle.com/paoloripamonti/twitter-sentiment-analysis" rel="nofollow noreferrer">https://www.kaggle.com/paoloripamonti/twitter-sentiment-analysis</a></p...
habedi/stack-exchange-dataset
53,082
Key pixels, key "features" detection in CNNs
<p>I am working on a dataset but I don't know what the labels mean.&#xA;I was wondering if using CNNs there was a way to understand which pixels where most significant for the network.&#xA;A little bit in the way that running an SVM would show which pixels are the most usefull for the classification. &#xA;Or, if there ...
deep learning feature selection labels vgg16
1
Key pixels, key "features" detection in CNNs -- (deep learning feature selection labels vgg16) <p>I am working on a dataset but I don't know what the labels mean.&#xA;I was wondering if using CNNs there was a way to understand which pixels where most significant for the network.&#xA;A little bit in the way that running...
habedi/stack-exchange-dataset
53,100
Training textblob with 16k rows of labeled data won't work (only few are working)
<p>I've got labeled data in a csv which looks like:</p>&#xA;&#xA;<pre><code>title,type&#xA;Women Jacket A,Clothes&#xA;Mens Running Shoes B,Shoes&#xA;Children backpack,Bags&#xA;</code></pre>&#xA;&#xA;<p>and a script:</p>&#xA;&#xA;<pre><code>from textblob.classifiers import NaiveBayesClassifier&#xA;&#xA;with open('train_...
python classification multiclass classification naive bayes classifier
1
Training textblob with 16k rows of labeled data won't work (only few are working) -- (python classification multiclass classification naive bayes classifier) <p>I've got labeled data in a csv which looks like:</p>&#xA;&#xA;<pre><code>title,type&#xA;Women Jacket A,Clothes&#xA;Mens Running Shoes B,Shoes&#xA;Children back...
habedi/stack-exchange-dataset
53,106
Image features (spectral bands) other than RGB for image analysis
<p>What features can I derive from the image, other than its <code>RGB</code>, to help me analyze an image?</p>&#xA;&#xA;<p>Actually, I'm looking for some papers, etc about this. But I couldn't find. </p>&#xA;&#xA;<p>I know I can use some features like its lightness, etc. But I don't want a single value as lightness, I...
python image preprocessing
1
Image features (spectral bands) other than RGB for image analysis -- (python image preprocessing) <p>What features can I derive from the image, other than its <code>RGB</code>, to help me analyze an image?</p>&#xA;&#xA;<p>Actually, I'm looking for some papers, etc about this. But I couldn't find. </p>&#xA;&#xA;<p>I kno...
habedi/stack-exchange-dataset
53,109
Geometric interpretation of MLP output
<p>I am really interested in the geometric interpretation of perceptron outputs, mainly as a way to better understand what the network is really doing, but I can't seem to find much information on this topic.</p>&#xA;&#xA;<p>I know a perceptron with no hidden layers can be seen as defining a hyperplane in between two c...
classification perceptron mlp
1
Geometric interpretation of MLP output -- (classification perceptron mlp) <p>I am really interested in the geometric interpretation of perceptron outputs, mainly as a way to better understand what the network is really doing, but I can't seem to find much information on this topic.</p>&#xA;&#xA;<p>I know a perceptron w...
habedi/stack-exchange-dataset
53,110
Embedding Values in word2vec
<p>Are the embedding values for a particular word using word2vec Skipgram model the weights of the first layer or the softmax output of the function?&#xA;Does the embedding value change according to the training corpus?</p>&#xA;
machine learning nlp word2vec machine translation
1
Embedding Values in word2vec -- (machine learning nlp word2vec machine translation) <p>Are the embedding values for a particular word using word2vec Skipgram model the weights of the first layer or the softmax output of the function?&#xA;Does the embedding value change according to the training corpus?</p>&#xA;
habedi/stack-exchange-dataset
53,114
Creating a Object Detection model from scratch using Keras
<p>I have a dataset containing 330 images which contain guns. Along with the images, I have a text file associated with each image file which contains,</p>&#xA;<ul>&#xA;<li>The number of objects ( guns ) in the image.</li>&#xA;<li>Coordinates for bounding boxes around the gun in the image.</li>&#xA;</ul>&#xA;<p>I need ...
tensorflow computer vision feature extraction machine learning model object detection
1
Creating a Object Detection model from scratch using Keras -- (tensorflow computer vision feature extraction machine learning model object detection) <p>I have a dataset containing 330 images which contain guns. Along with the images, I have a text file associated with each image file which contains,</p>&#xA;<ul>&#xA;<...
habedi/stack-exchange-dataset
53,133
What should I master better for professional data science in economics and finance?
<p>First, excuse me for the noob and long question which is probably doesn’t even belong to here, I know there are several question been answered like this out there, but I think this is going to be up-to-date. Stack Overflow deleted my question and redirected me to here.</p>&#xA;&#xA;<p>I study economics and finance o...
python r matlab sql julia
1
What should I master better for professional data science in economics and finance? -- (python r matlab sql julia) <p>First, excuse me for the noob and long question which is probably doesn’t even belong to here, I know there are several question been answered like this out there, but I think this is going to be up-to-...
habedi/stack-exchange-dataset
53,134
How do I perform weighted loss in multiple outputs on a same model in Tensorflow?
<p>How do I perform weighted loss in multiple outputs on a same model in <code>Tensorflow</code>? This means I am using a model that is intended to have 3 outputs. I did this because I would like the network to learn the relationships of the input variables. More specifically, this is multi-output regression.</p>&#xA;&...
deep learning tensorflow rnn
1
How do I perform weighted loss in multiple outputs on a same model in Tensorflow? -- (deep learning tensorflow rnn) <p>How do I perform weighted loss in multiple outputs on a same model in <code>Tensorflow</code>? This means I am using a model that is intended to have 3 outputs. I did this because I would like the netw...
habedi/stack-exchange-dataset
53,136
Seeking advice on knowledge discovery
<p><strong>Background Information</strong></p>&#xA;&#xA;<p>I work for a fire department in Florida and the fire chief posed a question to me; At any given moment in time during the calendar year 2018, how many fire trucks are busy, how many are available, how many are standing by and how many are out of service? Using...
regression probability
1
Seeking advice on knowledge discovery -- (regression probability) <p><strong>Background Information</strong></p>&#xA;&#xA;<p>I work for a fire department in Florida and the fire chief posed a question to me; At any given moment in time during the calendar year 2018, how many fire trucks are busy, how many are availabl...
habedi/stack-exchange-dataset
53,138
Which comes first? Multiple Imputation, Splitting into train/test, or Standardization/Normalization
<p>I am working on a multi-class classification problem, with ~65 features and ~150K instances. 30% of features are categorical and the rest are numerical (continuous). I understand that <strong>standardization or normalization</strong> should be done <em>after</em> splitting the data into train and test subsets, but I...
multiclass classification normalization data imputation
1
Which comes first? Multiple Imputation, Splitting into train/test, or Standardization/Normalization -- (multiclass classification normalization data imputation) <p>I am working on a multi-class classification problem, with ~65 features and ~150K instances. 30% of features are categorical and the rest are numerical (con...
habedi/stack-exchange-dataset
53,144
Do we have to split our dataset into training & testing when using ARIMA model?
<p>I am working on a project where I predict the total quantities sold at the ITEM/DAY leve. As for the model, I decided to with an ARIMA model (I'm using R). For guidance, I decided to follow the two tutorials below:</p>&#xA;&#xA;<p>The first one <a href="https://www.datascience.com/blog/introduction-to-forecasting-wi...
r time series training forecasting
1
Do we have to split our dataset into training & testing when using ARIMA model? -- (r time series training forecasting) <p>I am working on a project where I predict the total quantities sold at the ITEM/DAY leve. As for the model, I decided to with an ARIMA model (I'm using R). For guidance, I decided to follow the two...
habedi/stack-exchange-dataset
53,152
Is there a Feature selection process for ARIMA model?
<p>I have a dataset representing sales per day for certain products. It contains 30000 observations and 6 features (target included). Since my task is to make a prediction about the number of pieces sold, I decided to use an ARIMA model (following this tutorial <a href="https://www.analyticsvidhya.com/blog/2018/08/auto...
time series predictive modeling feature selection
1
Is there a Feature selection process for ARIMA model? -- (time series predictive modeling feature selection) <p>I have a dataset representing sales per day for certain products. It contains 30000 observations and 6 features (target included). Since my task is to make a prediction about the number of pieces sold, I deci...
habedi/stack-exchange-dataset
53,153
Multiclass classification with high number of classes, high number of features and small sample size
<p>I am working on a biology related dataset with over 300K features, and I only have about 5K samples. I want my model to classify many classes. For this problem in particular the class is age. Each age such as 10 or 35 will be individual classes. So roughly 80 classes (range from 10 to 90) are needed for this problem...
classification regression feature selection dimensionality reduction regularization
1
Multiclass classification with high number of classes, high number of features and small sample size -- (classification regression feature selection dimensionality reduction regularization) <p>I am working on a biology related dataset with over 300K features, and I only have about 5K samples. I want my model to classif...
habedi/stack-exchange-dataset
53,171
Why does putting a 1/2 in front of the squared error make the math easier?
<p>Per wiki, the mean squared error (MSE) <a href="https://en.wikipedia.org/wiki/Mean_squared_error#Predictor" rel="nofollow noreferrer">looks</a> like:</p>&#xA;&#xA;<p><span class="math-container">$$&#xA;\operatorname {MSE} ={\frac {1}{m}}\sum _{i=1}^{m}(y_{i}-{\hat y_{i}})^{2}&#xA;$$</span></p>&#xA;&#xA;<p>The <a hre...
machine learning loss function
1
Why does putting a 1/2 in front of the squared error make the math easier? -- (machine learning loss function) <p>Per wiki, the mean squared error (MSE) <a href="https://en.wikipedia.org/wiki/Mean_squared_error#Predictor" rel="nofollow noreferrer">looks</a> like:</p>&#xA;&#xA;<p><span class="math-container">$$&#xA;\ope...
habedi/stack-exchange-dataset
53,178
What's the difference between Haar-like Features and Haar Cascades?
<p>Are they the same in terms of their algorithm? Or do they differ in their respective detection methods?</p>&#xA;
machine learning object detection opencv
1
What's the difference between Haar-like Features and Haar Cascades? -- (machine learning object detection opencv) <p>Are they the same in terms of their algorithm? Or do they differ in their respective detection methods?</p>&#xA;
habedi/stack-exchange-dataset