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 |
|---|---|---|---|---|---|---|
58,413 | Subtract Rows of Matrix from rows of another matrix numpy | <p>I have two matrix V_r of shape(19, 300) and vecs of shape(100000, 300). I would like to subtract rows of V_r from from rows of vecs. Currently, I am achieving this with the following code. Is there a way to do it using broadcasting?</p>

<pre><code> list=[]
for v in V_r:
 a=np.linalg.norm(vecs-... | python numpy | 1 | Subtract Rows of Matrix from rows of another matrix numpy -- (python numpy)
<p>I have two matrix V_r of shape(19, 300) and vecs of shape(100000, 300). I would like to subtract rows of V_r from from rows of vecs. Currently, I am achieving this with the following code. Is there a way to do it using broadcasting?</p>
... | habedi/stack-exchange-dataset |
58,414 | Influence of trend on (supposedly) correlated time series | <p>TL;DR: What is the impact of a linear trend on the correlation between time series that are (most likely) not spuriously correlated?</p>

<hr>

<p>I'm currently trying to reconstruct/cross-validate an analysis delivered by one of my companies contractors.</p>

<p>The data is based on time ser... | time series pandas correlation scipy | 1 | Influence of trend on (supposedly) correlated time series -- (time series pandas correlation scipy)
<p>TL;DR: What is the impact of a linear trend on the correlation between time series that are (most likely) not spuriously correlated?</p>

<hr>

<p>I'm currently trying to reconstruct/cross-validate an ... | habedi/stack-exchange-dataset |
58,415 | How does the forward method get called in this pyTorch conv net? | <p>In this example network from <a href="https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html" rel="nofollow noreferrer">pyTorch tutorial</a></p>

<pre><code>import torch
import torch.nn as nn
import torch.nn.functional as F


class Net(nn.Module):

 def __in... | neural network pytorch | 1 | How does the forward method get called in this pyTorch conv net? -- (neural network pytorch)
<p>In this example network from <a href="https://pytorch.org/tutorials/beginner/blitz/neural_networks_tutorial.html" rel="nofollow noreferrer">pyTorch tutorial</a></p>

<pre><code>import torch
import torch.nn as nn&... | habedi/stack-exchange-dataset |
58,433 | Combining 'class_weight' with SMOTE | <p>This might sound a weird question, but I could not find enough details in sklearn documentation about 'class_weight'. Can we first oversample the dataset using SMOTE and then call the classifier with the 'class_weight' option? As my testing set is highly imbalanced, I want to penalize misclassifications for minority... | scikit learn multiclass classification class imbalance smote imbalanced learn | 1 | Combining 'class_weight' with SMOTE -- (scikit learn multiclass classification class imbalance smote imbalanced learn)
<p>This might sound a weird question, but I could not find enough details in sklearn documentation about 'class_weight'. Can we first oversample the dataset using SMOTE and then call the classifier wit... | habedi/stack-exchange-dataset |
58,434 | Why my Keras CNN model isn't learning | <p>My project have to decide if a image is 'pdr' or 'nonPdr', and I have 391 images (22 of PDR class, and the 369 of nonPdr)..</p>

<p>In my first model i was trying this: <a href="https://stackoverflow.com/questions/57663233/my-keras-cnn-return-the-same-output-value-how-can-i-fix-improve-my-code">https://stack... | machine learning python neural network cnn image classification | 1 | Why my Keras CNN model isn't learning -- (machine learning python neural network cnn image classification)
<p>My project have to decide if a image is 'pdr' or 'nonPdr', and I have 391 images (22 of PDR class, and the 369 of nonPdr)..</p>

<p>In my first model i was trying this: <a href="https://stackoverflow.co... | habedi/stack-exchange-dataset |
58,438 | Which classifier performs better when using 'class_weight'? | <p>I have used the 'class_weight' method to balance my multi-class classification problem, using Logistic Regression, Random Forest, and XGBoost classifiers. Among these three methods, logistic regression's performance for the minority classes is substantially higher than the other two models. Could someone please expl... | random forest logistic regression class imbalance | 1 | Which classifier performs better when using 'class_weight'? -- (random forest logistic regression class imbalance)
<p>I have used the 'class_weight' method to balance my multi-class classification problem, using Logistic Regression, Random Forest, and XGBoost classifiers. Among these three methods, logistic regression'... | habedi/stack-exchange-dataset |
58,439 | Sanity check: low PPV but high AUC scores? | <p>I have two algorithms running on a piece of data, both of which perform differently.</p>

<p>One of them (call it A) consistently gets a positive predictive value of about 0.75-0.78. Looking at the AUC of the Receiver operating characteristic it has a score of about 0.82</p>

<p>The second algorithm ... | accuracy metric | 1 | Sanity check: low PPV but high AUC scores? -- (accuracy metric)
<p>I have two algorithms running on a piece of data, both of which perform differently.</p>

<p>One of them (call it A) consistently gets a positive predictive value of about 0.75-0.78. Looking at the AUC of the Receiver operating characteristic it... | habedi/stack-exchange-dataset |
58,448 | What do we learn from training a dataset for logistic regression | <p>What do we learn from training our dataset in Logistic Resgression?
Like in Linear Regression, with the help of training set we are able to generate a best fit line(y = mx+c) where m and c come from training our dataset.
Similarly, once we train our model for logistic regression, what is that the model learn... | machine learning classification logistic regression probability | 1 | What do we learn from training a dataset for logistic regression -- (machine learning classification logistic regression probability)
<p>What do we learn from training our dataset in Logistic Resgression?
Like in Linear Regression, with the help of training set we are able to generate a best fit line(y = mx+c) wher... | habedi/stack-exchange-dataset |
58,454 | Explained definition of the norm in Ordinary Least Squares | <p>I have recently started learning <a href="https://scikit-learn.org/stable/modules/linear_model.html" rel="nofollow noreferrer">Scikit-learn</a> and I am not able to understand the below equation. Could anybody please explain?<br/>
<a href="https://i.stack.imgur.com/WwQHl.png" rel="nofollow noreferrer"><img src="... | scikit learn | 1 | Explained definition of the norm in Ordinary Least Squares -- (scikit learn)
<p>I have recently started learning <a href="https://scikit-learn.org/stable/modules/linear_model.html" rel="nofollow noreferrer">Scikit-learn</a> and I am not able to understand the below equation. Could anybody please explain?<br/>
<a hr... | habedi/stack-exchange-dataset |
58,463 | How many model parameters did Microsoft's 2015 ImageNet-winner network have? | <p>In 2015 a team of researchers from Microsoft <a href="https://blogs.microsoft.com/ai/microsoft-researchers-win-imagenet-computer-vision-challenge/" rel="nofollow noreferrer">won</a> the ImageNet contest with a network of 152 layers. </p>

<p>How many parameters did their model have?</p>
 | machine learning neural network image classification machine learning model | 1 | How many model parameters did Microsoft's 2015 ImageNet-winner network have? -- (machine learning neural network image classification machine learning model)
<p>In 2015 a team of researchers from Microsoft <a href="https://blogs.microsoft.com/ai/microsoft-researchers-win-imagenet-computer-vision-challenge/" rel="nofoll... | habedi/stack-exchange-dataset |
58,472 | Normal distribution and QQ plot | <p>I have data that I plotted with a normal distribution and a QQ plot. I was wondering especially in QQ plot it seems that 95.4% of the data is normally distributed.</p>

<p>My question is what does numbers meanings that above 2 sigmas in QQ plot? Should remove them or I need to transform this variable and mak... | statistics descriptive statistics | 1 | Normal distribution and QQ plot -- (statistics descriptive statistics)
<p>I have data that I plotted with a normal distribution and a QQ plot. I was wondering especially in QQ plot it seems that 95.4% of the data is normally distributed.</p>

<p>My question is what does numbers meanings that above 2 sigmas in Q... | habedi/stack-exchange-dataset |
58,484 | How to create dictionaries out of pandas dataframes? | <p>I import three csv-files with characteristics of countries (rows) and years (columns):</p>

<pre><code>country_data_m = 'country_data_m.csv'
m_year = pd.read_csv(country_data_m, nrows=161, index_col=0, header=0, sep=';', na_values=[""])

country_data_e = 'country_data_e.csv'
e_year = pd.read_... | python pandas | 1 | How to create dictionaries out of pandas dataframes? -- (python pandas)
<p>I import three csv-files with characteristics of countries (rows) and years (columns):</p>

<pre><code>country_data_m = 'country_data_m.csv'
m_year = pd.read_csv(country_data_m, nrows=161, index_col=0, header=0, sep=';', na_values=["... | habedi/stack-exchange-dataset |
58,491 | Are DBSCAN and dbscan from the sklearn.cluster package different? | <p>I'm new to <code>DBSCAN</code>. I was looking at a few examples online and came across a few instances where the following lines were used while importing the dbscan module: </p>

<pre><code>from sklearn.cluster.dbscan_ import DBSCAN
from sklearn.cluster.dbscan_ import dbscan
</code></pre>

<... | clustering unsupervised learning dbscan | 1 | Are DBSCAN and dbscan from the sklearn.cluster package different? -- (clustering unsupervised learning dbscan)
<p>I'm new to <code>DBSCAN</code>. I was looking at a few examples online and came across a few instances where the following lines were used while importing the dbscan module: </p>

<pre><code>from sk... | habedi/stack-exchange-dataset |
58,498 | Calculate coefficient w* | <p>I'm learning ML from Bishop's book. But I don't know that How should I calculate w* in the below picture.
<a href="https://i.stack.imgur.com/VbPLq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VbPLq.png" alt="enter image description here"></a></p>
 | linear regression | 1 | Calculate coefficient w* -- (linear regression)
<p>I'm learning ML from Bishop's book. But I don't know that How should I calculate w* in the below picture.
<a href="https://i.stack.imgur.com/VbPLq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VbPLq.png" alt="enter image description here"></a><... | habedi/stack-exchange-dataset |
58,506 | Interpreting a curve val_loss and loss in keras after training a model | <p><a href="https://i.stack.imgur.com/W0JuB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W0JuB.png" alt="mu"></a></p>

<p><a href="https://i.stack.imgur.com/Osp3x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Osp3x.png" alt="ee"></a></p>

<p>I am having trouble... | machine learning deep learning keras cross validation accuracy | 1 | Interpreting a curve val_loss and loss in keras after training a model -- (machine learning deep learning keras cross validation accuracy)
<p><a href="https://i.stack.imgur.com/W0JuB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/W0JuB.png" alt="mu"></a></p>

<p><a href="https://i.stack.imgu... | habedi/stack-exchange-dataset |
58,509 | Feature selection, is it possible to combine wrapper and embedded methods? | <p>I'm using neural network to predict PM10 concentration (a regression problem). Since the wrapper method is dependent on the model, so passing the neural network model that's optimized for all the features in the dataset won't work correctly (since every time the wrapper reduces the features in the dataset, the hidde... | machine learning python regression feature selection | 1 | Feature selection, is it possible to combine wrapper and embedded methods? -- (machine learning python regression feature selection)
<p>I'm using neural network to predict PM10 concentration (a regression problem). Since the wrapper method is dependent on the model, so passing the neural network model that's optimized ... | habedi/stack-exchange-dataset |
58,520 | How to create a parquet file from a query to a mysql table | <p>Updating a legacy ~ETL; on it's base it exports some tables of the prod DB to s3, the export contains a query. The export process generates a csv file using the following logic:</p>

<pre><code>res = sh.sed(
 sh.mysql(
 '-u',
 settings_dict['USER'],
 '--password={0}'.form... | python csv etl | 1 | How to create a parquet file from a query to a mysql table -- (python csv etl)
<p>Updating a legacy ~ETL; on it's base it exports some tables of the prod DB to s3, the export contains a query. The export process generates a csv file using the following logic:</p>

<pre><code>res = sh.sed(
 sh.mysql(
... | habedi/stack-exchange-dataset |
58,531 | How to change a Pandas dataframe into feature vector? | <p>I have a Pandas dataframe with 10 columns, 9 of which are features to be used to predict the 10th column.</p>

<p>How is it ossible to convert this Pandas dataframe into X and y vectors to use in a linear regression problem?</p>
 | python pandas dataframe | 1 | How to change a Pandas dataframe into feature vector? -- (python pandas dataframe)
<p>I have a Pandas dataframe with 10 columns, 9 of which are features to be used to predict the 10th column.</p>

<p>How is it ossible to convert this Pandas dataframe into X and y vectors to use in a linear regression problem?</... | habedi/stack-exchange-dataset |
58,532 | How to create correlation matrix but with only part of the rows? | <p>I would like to have correlation matrix like this one, but with only 3 bottom rows but all the columns. How can I generate it? </p>

<p><a href="https://i.stack.imgur.com/epeYP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/epeYP.png" alt="enter image description here"></a></p>

<... | python seaborn | 1 | How to create correlation matrix but with only part of the rows? -- (python seaborn)
<p>I would like to have correlation matrix like this one, but with only 3 bottom rows but all the columns. How can I generate it? </p>

<p><a href="https://i.stack.imgur.com/epeYP.png" rel="nofollow noreferrer"><img src="https:... | habedi/stack-exchange-dataset |
58,540 | How to compare a sentence with a paragraph and get its probability in terms of correctness? | <p>This is my first post on stackoverflow network and I am dealing with a machine learning.</p>

<p>Lets say I have a paragraph describing a rabbit and tortoise story. The story concludes that tortoise is a winner.</p>

<p>Now I want to train ML engine based on this paragraph. If I provide a statement a... | machine learning python scikit learn tensorflow pytorch | 1 | How to compare a sentence with a paragraph and get its probability in terms of correctness? -- (machine learning python scikit learn tensorflow pytorch)
<p>This is my first post on stackoverflow network and I am dealing with a machine learning.</p>

<p>Lets say I have a paragraph describing a rabbit and tortois... | habedi/stack-exchange-dataset |
58,546 | ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all() | <p>Firstly I have a pandas series of recommended product (recmd_prdt_list). In this series there is a possibility of presence of deleted products. So as to remove deleted products from the recommended products, I did the following :</p>

<pre><code>recmd_prdt_list = user_lookup['Recommended items']
recmd_p... | python pandas dataframe | 1 | ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all() -- (python pandas dataframe)
<p>Firstly I have a pandas series of recommended product (recmd_prdt_list). In this series there is a possibility of presence of deleted products. So as to remove deleted products f... | habedi/stack-exchange-dataset |
58,557 | Cross validation while preserving a column (not the target ) distribution | <p>So i'm doing <em>cross validation</em> and then i'm predicting using all the data on a test set ( a hold-out set ). My hold-out set has the <strong>same ratio</strong> on a column than the train ( seems thats how the test set was generated, a function that sampled it and tried to preserve the ratio for the <strong>t... | cross validation | 1 | Cross validation while preserving a column (not the target ) distribution -- (cross validation)
<p>So i'm doing <em>cross validation</em> and then i'm predicting using all the data on a test set ( a hold-out set ). My hold-out set has the <strong>same ratio</strong> on a column than the train ( seems thats how the test... | habedi/stack-exchange-dataset |
58,561 | Can I arbitrarily eliminate 20% of my training data if doing so significantly improves model accuracy? | <p>My dataset contains 2000 records with 125 meaningful fields 5 of which are distributed along highly skewed lognormal behavior.</p>

<p>I've found that if I eliminate all records below some threshold of this lognormal behavior (by combining the fields together then filtering for <code>Nth</code> percentile), ... | classification random forest | 1 | Can I arbitrarily eliminate 20% of my training data if doing so significantly improves model accuracy? -- (classification random forest)
<p>My dataset contains 2000 records with 125 meaningful fields 5 of which are distributed along highly skewed lognormal behavior.</p>

<p>I've found that if I eliminate all re... | habedi/stack-exchange-dataset |
58,565 | Conditional entropy calculation in python, H(Y|X) | <p>Input 
X: A numpy array whose size gives the number of instances. X contains each instance's attribute value. 
Y: A numpy array which contains each instance's corresponding target label.</p>

<p>Output : Conditional Entropy</p>

<p>Can you please help me code the conditional entropy calculati... | machine learning decision trees | 1 | Conditional entropy calculation in python, H(Y|X) -- (machine learning decision trees)
<p>Input 
X: A numpy array whose size gives the number of instances. X contains each instance's attribute value. 
Y: A numpy array which contains each instance's corresponding target label.</p>

<p>Output : Conditiona... | habedi/stack-exchange-dataset |
58,581 | T-DBSCAN - Implementing STOP logic | <p>I am attempting to implement the T-DBSCAN algorithm described in <a href="https://online-journals.org/index.php/i-joe/article/viewFile/3881/3315" rel="nofollow noreferrer">T-DBSCAN: A Spatiotemporal Density Clustering for GPS Trajectory Segmentation</a>. I have been able to implement most of the logic between the d... | data mining dbscan research implementation | 1 | T-DBSCAN - Implementing STOP logic -- (data mining dbscan research implementation)
<p>I am attempting to implement the T-DBSCAN algorithm described in <a href="https://online-journals.org/index.php/i-joe/article/viewFile/3881/3315" rel="nofollow noreferrer">T-DBSCAN: A Spatiotemporal Density Clustering for GPS Trajecto... | habedi/stack-exchange-dataset |
58,597 | Why models performs better If normalize test data and train data separately? | <p>Many threads (and courses) such as <a href="https://datascience.stackexchange.com/questions/27615/should-we-apply-normalization-to-test-data-as-well">this</a> and <a href="https://stackoverflow.com/questions/49444262/normalize-data-before-or-after-split-of-training-and-testing-data">this one</a> suggest that you sho... | machine learning neural network supervised learning normalization | 1 | Why models performs better If normalize test data and train data separately? -- (machine learning neural network supervised learning normalization)
<p>Many threads (and courses) such as <a href="https://datascience.stackexchange.com/questions/27615/should-we-apply-normalization-to-test-data-as-well">this</a> and <a hre... | habedi/stack-exchange-dataset |
58,603 | General equation for getting an idea of the scale of a machine learning project | <p>I'm writing an application for a project where we intend to teach a model to predict one aspect of an environment (traffic safety) using a database with 10 images (about 300x300px and, say, 256 colors) for each of either 100 000 or 15 million locations. </p>

<p>I must come to grasp with if both, one or none... | hardware project planning | 1 | General equation for getting an idea of the scale of a machine learning project -- (hardware project planning)
<p>I'm writing an application for a project where we intend to teach a model to predict one aspect of an environment (traffic safety) using a database with 10 images (about 300x300px and, say, 256 colors) for ... | habedi/stack-exchange-dataset |
58,605 | How to convert a non gaussian distribution into a gaussian destribution? | <p>Suppose I have a dataset inwhich there are few dimensions that distribution over them is non gaussian and this means, skewness is nonzero (possitive or negative). This is caused by some outliers in my data, which are not possible to be excluded manually.</p>

<p>Now my question is, How is it possible to conv... | dataset data cleaning preprocessing outlier | 1 | How to convert a non gaussian distribution into a gaussian destribution? -- (dataset data cleaning preprocessing outlier)
<p>Suppose I have a dataset inwhich there are few dimensions that distribution over them is non gaussian and this means, skewness is nonzero (possitive or negative). This is caused by some outliers ... | habedi/stack-exchange-dataset |
58,606 | ValueError: Error when checking input: expected conv2d_1_input to have 4 dimensions, but got array with shape (142, 1) | <p>I'm trying to pass all my images (71 for each class) from folder 'train' to model.fit.
The method ReadImages get these images and resize them (because are too big 4288x2848)....</p>

<p>But when i run my code throws this error:</p>

<pre><code>ValueError: Error when checking input: expected conv2... | machine learning python keras cnn image classification | 1 | ValueError: Error when checking input: expected conv2d_1_input to have 4 dimensions, but got array with shape (142, 1) -- (machine learning python keras cnn image classification)
<p>I'm trying to pass all my images (71 for each class) from folder 'train' to model.fit.
The method ReadImages get these images and resi... | habedi/stack-exchange-dataset |
58,626 | Precision Vs Recall Curve analysis | <p>I have the following averaged − curves with 4 models. Which one is the best?</p>

<p><a href="https://i.stack.imgur.com/XarYw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XarYw.png" alt="enter image description here"></a></p>
 | predictive modeling | 1 | Precision Vs Recall Curve analysis -- (predictive modeling)
<p>I have the following averaged − curves with 4 models. Which one is the best?</p>

<p><a href="https://i.stack.imgur.com/XarYw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XarYw.png" alt="enter image description here"></a></p>&#... | habedi/stack-exchange-dataset |
58,631 | Is There a Way to Re-Calibrate Predicted Probabilities After Using Class Weights? | <p>I have classification data with far more negative instances than positive instances. I have used class weights in my models and have achieved the discrimination I want but the predicted probabilities from the models do not match the actual probabilities in the modeling data. </p>

<p>Is there a way to adjust... | python prediction class imbalance | 1 | Is There a Way to Re-Calibrate Predicted Probabilities After Using Class Weights? -- (python prediction class imbalance)
<p>I have classification data with far more negative instances than positive instances. I have used class weights in my models and have achieved the discrimination I want but the predicted probabilit... | habedi/stack-exchange-dataset |
58,639 | My CNN model Accuracy doesn't increase (high loss and low acc) | <p>Well, I need to do a CNN to classify if a Image is from one or another class. But my model return high losses (6.~8.) and low accuracies (0.50 on max). I tried to include more layers, change my activation functions, and nothing works. My database is 142 .jpg imgs (71 for each class)</p>

<p>This is my code: ... | machine learning python cnn image classification image recognition | 1 | My CNN model Accuracy doesn't increase (high loss and low acc) -- (machine learning python cnn image classification image recognition)
<p>Well, I need to do a CNN to classify if a Image is from one or another class. But my model return high losses (6.~8.) and low accuracies (0.50 on max). I tried to include more layers... | habedi/stack-exchange-dataset |
58,641 | Regression Trees - Splitting and decision rules | <p>I understand that a regression tree is built by splitting a node, such that the MSE for the label/output variable is minimized in each of the two resulting nodes. 
I have two questions about this:</p>

<p>1.) 
Is the search for the optimal split even dependent from the input variables? The MSE could... | regression decision trees | 1 | Regression Trees - Splitting and decision rules -- (regression decision trees)
<p>I understand that a regression tree is built by splitting a node, such that the MSE for the label/output variable is minimized in each of the two resulting nodes. 
I have two questions about this:</p>

<p>1.) 
Is the searc... | habedi/stack-exchange-dataset |
58,649 | Evaluating pairwise distances between the output of a tf.keras.model | <p>I am trying to create a custom loss function in tensorflow. I am using tensorflow v2.0.rc0 for running the code. Following is the code and the function <code>min_dist_loss</code> computes the pairwise loss between the output of the neural network. Here's the code</p>

<pre class="lang-py prettyprint-override... | python deep learning keras tensorflow | 1 | Evaluating pairwise distances between the output of a tf.keras.model -- (python deep learning keras tensorflow)
<p>I am trying to create a custom loss function in tensorflow. I am using tensorflow v2.0.rc0 for running the code. Following is the code and the function <code>min_dist_loss</code> computes the pairwise loss... | habedi/stack-exchange-dataset |
58,656 | How to choose the model parameters (RandomizedSearchCV, .GridSearchCV) or manually | <p>Faced with the task of selecting parameters for the lightgbm model, the question accordingly arises, what is the best way to select them? I used the RandomizedSearchCV method, within 10 hours the parameters were selected, but there was no sense in it, the accuracy was the same as when manually entering the parameter... | machine learning python hyperparameter gridsearchcv lightgbm | 1 | How to choose the model parameters (RandomizedSearchCV, .GridSearchCV) or manually -- (machine learning python hyperparameter gridsearchcv lightgbm)
<p>Faced with the task of selecting parameters for the lightgbm model, the question accordingly arises, what is the best way to select them? I used the RandomizedSearchCV ... | habedi/stack-exchange-dataset |
58,666 | How to implement Classification and Anomaly detection (C++) | <p>I am creating a system using C++(DX11) and i'm reading raw data into my program, i want to classify what the 3D data-set i'm reading in is and detect any anomalies it may have when compared to a database of the same types of item. I've not really done much in regards to machine learning aside from simple KMeans and ... | machine learning classification anomaly detection c | 1 | How to implement Classification and Anomaly detection (C++) -- (machine learning classification anomaly detection c)
<p>I am creating a system using C++(DX11) and i'm reading raw data into my program, i want to classify what the 3D data-set i'm reading in is and detect any anomalies it may have when compared to a datab... | habedi/stack-exchange-dataset |
58,673 | Efficient environment for machine or deep learning in Python | <p>I am getting very frustrated working with either Google Colab or Azure notebooks (they are very slow and glitchy). Usually, I work with Jupyter notebooks to perform Machine Learning or Deep Learning tasks in Python. </p>

<p>Does anyone have any recommendations for a truly good performing alternative? It doe... | machine learning python deep learning | 1 | Efficient environment for machine or deep learning in Python -- (machine learning python deep learning)
<p>I am getting very frustrated working with either Google Colab or Azure notebooks (they are very slow and glitchy). Usually, I work with Jupyter notebooks to perform Machine Learning or Deep Learning tasks in Pytho... | habedi/stack-exchange-dataset |
58,683 | AWS : Workflow for deep learning | <p>I am using my company computer since I don't have another one or linux. Therefore, I am starting to use cloud resources to perform some tasks.</p>

<p>I have a very simple question: Since most cloud resources don't have a GUI, how can I perform simple checks e.g. visualizing the bounding boxes my algorithm h... | deep learning aws | 1 | AWS : Workflow for deep learning -- (deep learning aws)
<p>I am using my company computer since I don't have another one or linux. Therefore, I am starting to use cloud resources to perform some tasks.</p>

<p>I have a very simple question: Since most cloud resources don't have a GUI, how can I perform simple c... | habedi/stack-exchange-dataset |
58,686 | What is the accuracy majority class classifier? | <p>I have an SFrame and a model:</p>

<pre><code>train_data,test_data = products.random_split(.8, seed=0)
selected_words_model = graphlab.logistic_classifier.create(train_data,
 target='sentiment',
 ... | machine learning classification | 1 | What is the accuracy majority class classifier? -- (machine learning classification)
<p>I have an SFrame and a model:</p>

<pre><code>train_data,test_data = products.random_split(.8, seed=0)
selected_words_model = graphlab.logistic_classifier.create(train_data,
 ... | habedi/stack-exchange-dataset |
58,694 | 2D-Input to LSTM in Keras | <p>I have following problem: I would like to feed LSTM with </p>

<blockquote>
 <p>train_datagen.flow_from_directory</p>
</blockquote>

<p>The input is basically a spectrogram images converted from time-series into time-frequency-domain in PNG format that has a dimension of: timestep x frequenc... | neural network keras time series lstm rnn | 1 | 2D-Input to LSTM in Keras -- (neural network keras time series lstm rnn)
<p>I have following problem: I would like to feed LSTM with </p>

<blockquote>
 <p>train_datagen.flow_from_directory</p>
</blockquote>

<p>The input is basically a spectrogram images converted from time-series into time-fr... | habedi/stack-exchange-dataset |
58,709 | Python can't take input while using functions | <p>While building my model, I figured that it makes sense to reuse some of the code that I've been using for the train dataset, on the test set as well so I took the code performing mutual operations into one function definition. In this function, I am handling missing values and using its return to perform one-hot-en... | machine learning python scikit learn pandas kaggle | 1 | Python can't take input while using functions -- (machine learning python scikit learn pandas kaggle)
<p>While building my model, I figured that it makes sense to reuse some of the code that I've been using for the train dataset, on the test set as well so I took the code performing mutual operations into one function ... | habedi/stack-exchange-dataset |
58,713 | Python metaheuristic packages | <p>I need to use a metaheuristic algorithm to solve an optimization problem on a Python codebase.</p>

<p>Metaheuristics usually need to be written in C++ or Java as they involve a lot of iterations, while Python is weak from this point of view.</p>

<p>Questions:</p>

<ol>
<li>do any Python... | python optimization genetic algorithms | 1 | Python metaheuristic packages -- (python optimization genetic algorithms)
<p>I need to use a metaheuristic algorithm to solve an optimization problem on a Python codebase.</p>

<p>Metaheuristics usually need to be written in C++ or Java as they involve a lot of iterations, while Python is weak from this point o... | habedi/stack-exchange-dataset |
58,720 | Naive Bayes for Categorical Features (Non Binary) | <p>How do i use Naive Bayes Classifier (Using sklearn) for a Dataset 
considering that my feature set is categorical, ie more than 2 categories per feature are present. </p>

<ol>
<li>I've looked everywhere, some people have used GaussianNB even though
the data is categorical (1,2...8)</li>
</ol... | machine learning classification scikit learn categorical data naive bayes classifier | 1 | Naive Bayes for Categorical Features (Non Binary) -- (machine learning classification scikit learn categorical data naive bayes classifier)
<p>How do i use Naive Bayes Classifier (Using sklearn) for a Dataset 
considering that my feature set is categorical, ie more than 2 categories per feature are present. </p>&#x... | habedi/stack-exchange-dataset |
58,722 | Do timesteps must have the same temporal distance in training a RNN? | <p>I have a recurrent neural network with LSTM units that I want to train with batches of 6 timesteps. Each timestep is a record of a dataset and represents the temporal aggregation over 5 minutes of data taken every 10 seconds. Unfortunately, the dataset has temporal interruptions, so sometimes two successive records ... | machine learning time series lstm rnn | 1 | Do timesteps must have the same temporal distance in training a RNN? -- (machine learning time series lstm rnn)
<p>I have a recurrent neural network with LSTM units that I want to train with batches of 6 timesteps. Each timestep is a record of a dataset and represents the temporal aggregation over 5 minutes of data tak... | habedi/stack-exchange-dataset |
58,725 | Where to find height dataset, or datasets in General | <p>Hi there smart people,</p>

<p>I am new to data Science and wanted to take my first few steps. Unfortunately I struggle to find datasets or any data at all regarding my topics of interest.</p>

<p>For example, I wanted to build a simple program that takes a person's height and predicts the likely he... | machine learning dataset data databases | 1 | Where to find height dataset, or datasets in General -- (machine learning dataset data databases)
<p>Hi there smart people,</p>

<p>I am new to data Science and wanted to take my first few steps. Unfortunately I struggle to find datasets or any data at all regarding my topics of interest.</p>

<p>For e... | habedi/stack-exchange-dataset |
58,728 | What's the principal difference between ANN,RNN,DNN and CNN? | <p>I'm newer to deep learning domain.</p>

<p>I would like to know what is the principal difference between RNN,ANN,DNN and CNN?</p>

<p>How to implement those neural networks using the TensorFlow library?</p>
 | deep learning cnn rnn | 1 | What's the principal difference between ANN,RNN,DNN and CNN? -- (deep learning cnn rnn)
<p>I'm newer to deep learning domain.</p>

<p>I would like to know what is the principal difference between RNN,ANN,DNN and CNN?</p>

<p>How to implement those neural networks using the TensorFlow library?</p>
 | habedi/stack-exchange-dataset |
58,729 | Evaluate imbalanced classification model on balanced testing sample | <p>Why it would be too optimistic to compute <strong>presicion, recall and f1-score</strong> to evaluate a model trained for imbalanced classification on a <strong>balanced testing sample</strong> ?</p>
 | evaluation class imbalance imbalanced learn | 1 | Evaluate imbalanced classification model on balanced testing sample -- (evaluation class imbalance imbalanced learn)
<p>Why it would be too optimistic to compute <strong>presicion, recall and f1-score</strong> to evaluate a model trained for imbalanced classification on a <strong>balanced testing sample</strong> ?</p>&... | habedi/stack-exchange-dataset |
58,735 | Weighted Binary Cross Entropy Loss -- Keras Implementation | <p>I have a binary segmentation problem with highly imbalanced data such that there are almost 60 class zero samples for every class one sample. To address this issue, I coded a simple weighted binary cross entropy loss function in Keras with Tensorflow as the backend.</p>

<pre><code>def weighted_bce(y_true, y... | keras tensorflow class imbalance | 1 | Weighted Binary Cross Entropy Loss -- Keras Implementation -- (keras tensorflow class imbalance)
<p>I have a binary segmentation problem with highly imbalanced data such that there are almost 60 class zero samples for every class one sample. To address this issue, I coded a simple weighted binary cross entropy loss fun... | habedi/stack-exchange-dataset |
58,762 | Data Visualisation Techniques for Multi Labelled data | <p>I am new to data science and am trying to figure out how to visualize my multi labelled data using graphs. I am using a dataset to classify music by emotion based on their acoustic features (such as: pitch, amplitude etc.).</p>

<p>So some have multi labelled emotion labels.</p>

<p>This is a snapsho... | data visualization | 1 | Data Visualisation Techniques for Multi Labelled data -- (data visualization)
<p>I am new to data science and am trying to figure out how to visualize my multi labelled data using graphs. I am using a dataset to classify music by emotion based on their acoustic features (such as: pitch, amplitude etc.).</p>

<p... | habedi/stack-exchange-dataset |
58,766 | How to use a a trained model | <p>I just trained my first model in Python 3.7/scikitlearn (Linear Regression) (well I copied most of the code but its something ^^).</p>

<p>Now I want to actually Use the model. Specifically its about sons heights incorrelating to their fathers. So I now want to enter a new Father-height and get a predictions... | machine learning python scikit learn linear regression data science model | 1 | How to use a a trained model -- (machine learning python scikit learn linear regression data science model)
<p>I just trained my first model in Python 3.7/scikitlearn (Linear Regression) (well I copied most of the code but its something ^^).</p>

<p>Now I want to actually Use the model. Specifically its about s... | habedi/stack-exchange-dataset |
58,777 | How to creat a plot for the accuracy of a model | <p>Iam pretty new to the whole topic so please dont be harsh. I know these may be simple questions but everybody has to start somewhere ^^</p>

<p>So I created (or more copied) my first little Model which predicts sons heights based on their fathers.</p>

<pre><code>#Father Data
X=data['Father'].val... | machine learning python keras accuracy matplotlib | 1 | How to creat a plot for the accuracy of a model -- (machine learning python keras accuracy matplotlib)
<p>Iam pretty new to the whole topic so please dont be harsh. I know these may be simple questions but everybody has to start somewhere ^^</p>

<p>So I created (or more copied) my first little Model which pred... | habedi/stack-exchange-dataset |
58,784 | Feature Importance | <p>I have a dataset with 10 features. </p>

<ol>
<li><p>I've computed the feature importance using permutation importance with cross-validation from eli5, after fitting an extremely randomized trees (ET) classifier form Scikit learn. </p></li>
<li><p>I fitted 10 different ETs using only one feature at a... | machine learning classification feature selection random forest predictor importance | 1 | Feature Importance -- (machine learning classification feature selection random forest predictor importance)
<p>I have a dataset with 10 features. </p>

<ol>
<li><p>I've computed the feature importance using permutation importance with cross-validation from eli5, after fitting an extremely randomized trees ... | habedi/stack-exchange-dataset |
58,788 | Simplest way to build a semantic analyzer | <p>I want to build a semantic analyzer i.e., to find how similar the meaning of two sentences are. 
For example-
English: Birdie is washing itself in the water basin.
English Paraphrase: The bird is bathing in the sink.
Similarity Score: 5 ( The two sentences are completely equivalent, as they mean the ... | machine learning machine learning model nlp model selection | 1 | Simplest way to build a semantic analyzer -- (machine learning machine learning model nlp model selection)
<p>I want to build a semantic analyzer i.e., to find how similar the meaning of two sentences are. 
For example-
English: Birdie is washing itself in the water basin.
English Paraphrase: The bird is ba... | habedi/stack-exchange-dataset |
58,795 | How to refit a model? | <p>I have built a classification model that I have to refit.</p>

<p>New instances have been added to the former data set on which the model was build.</p>

<p>I was thinking to proceed that way :</p>

<ul>
<li>split my new data set in 3 sub data sets : <strong>( train , test_01 )</strong> d... | classification | 1 | How to refit a model? -- (classification)
<p>I have built a classification model that I have to refit.</p>

<p>New instances have been added to the former data set on which the model was build.</p>

<p>I was thinking to proceed that way :</p>

<ul>
<li>split my new data set in 3 sub data set... | habedi/stack-exchange-dataset |
58,799 | Modelling of an environment that is stochastic in nature | <p>I have started learning reinforcement learning and have few doubts regarding model based and model free methods.</p>

<p>Is it possible to model an environment that is stochastic in nature?</p>

<p>Is it because its difficult to model such environment we use model free methods?</p>
 | reinforcement learning | 1 | Modelling of an environment that is stochastic in nature -- (reinforcement learning)
<p>I have started learning reinforcement learning and have few doubts regarding model based and model free methods.</p>

<p>Is it possible to model an environment that is stochastic in nature?</p>

<p>Is it because its ... | habedi/stack-exchange-dataset |
58,817 | Validity of cross-validation for model performance estimation | <p>When applying cross-validation for estimating the performance of a predictive model, the reported performance is usually the average performance over all the validation folds. As during this procedure, several models are created, one model has to be chosen as the model which is actually used for prediction on real-w... | machine learning cross validation evaluation | 1 | Validity of cross-validation for model performance estimation -- (machine learning cross validation evaluation)
<p>When applying cross-validation for estimating the performance of a predictive model, the reported performance is usually the average performance over all the validation folds. As during this procedure, sev... | habedi/stack-exchange-dataset |
58,825 | Does the length of the text data affects the score of clustering | <p>I'm learning about clustering with Pythons <code>Scikit-Learn</code> lib.
I have a list of sentences (strings) . Im wondering, does the length of the string affects the <code>silhouette_score</code>.</p>

<p>For example, I have sentences from 2 words to 35 words, and i have tried number of clusters from ... | python scikit learn | 1 | Does the length of the text data affects the score of clustering -- (python scikit learn)
<p>I'm learning about clustering with Pythons <code>Scikit-Learn</code> lib.
I have a list of sentences (strings) . Im wondering, does the length of the string affects the <code>silhouette_score</code>.</p>

<p>For exa... | habedi/stack-exchange-dataset |
58,829 | Flattening output before calculating metrics | <p>I use scikit-learn to calculate precision, recall and f1 scores which only accept 1D arrays, but my model's outputs are 2D (binary segmentation maps). My question is, is it ok to simply flatten the outputs, or is there some other function I should use to calculate the metrics in my case?</p>
 | scikit learn | 1 | Flattening output before calculating metrics -- (scikit learn)
<p>I use scikit-learn to calculate precision, recall and f1 scores which only accept 1D arrays, but my model's outputs are 2D (binary segmentation maps). My question is, is it ok to simply flatten the outputs, or is there some other function I should use to... | habedi/stack-exchange-dataset |
58,843 | Decision Tree split error | <p>During the split function of the decision tree, I am getting an assertion error stating:</p>

<pre><code>Error > Assert: type(C) == dict
</code></pre>

<p>I couldn't find any errors in the code up until now. Could you please correct it if there is any problem with it?</p>

<p>My code:<... | machine learning decision trees | 1 | Decision Tree split error -- (machine learning decision trees)
<p>During the split function of the decision tree, I am getting an assertion error stating:</p>

<pre><code>Error > Assert: type(C) == dict
</code></pre>

<p>I couldn't find any errors in the code up until now. Could you please correc... | habedi/stack-exchange-dataset |
58,845 | How to disable GPU with TensorFlow? | <p>Using tensorflow-gpu 2.0.0rc0. I want to choose whether it uses the GPU or the CPU.</p>
 | tensorflow gpu | 1 | How to disable GPU with TensorFlow? -- (tensorflow gpu)
<p>Using tensorflow-gpu 2.0.0rc0. I want to choose whether it uses the GPU or the CPU.</p>
 | habedi/stack-exchange-dataset |
58,847 | Hinge loss question | <p>Hinge loss is usually defined as 
<span class="math-container">$$L(y,\hat{y}) = max(0,1-y\hat{y}) $$</span></p>

<p>What I don't understand is why are we comparing zero with <span class="math-container">$1-y\hat{y}$</span> instead of some other constant. Why not make it <span class="math-container">$2-y\... | hinge loss | 1 | Hinge loss question -- (hinge loss)
<p>Hinge loss is usually defined as 
<span class="math-container">$$L(y,\hat{y}) = max(0,1-y\hat{y}) $$</span></p>

<p>What I don't understand is why are we comparing zero with <span class="math-container">$1-y\hat{y}$</span> instead of some other constant. Why not make i... | habedi/stack-exchange-dataset |
58,861 | How to extract location related terms from raw text in python | <p>I want to extract location related keywords from raw text in python.
I have already tried spacy but the results were not good and I just got names of countries while I want fine-grained location mentions like streets or neighborhoods in a city.
I also have tried stanford NER but the problem is it is too slow... | python nlp named entity recognition | 1 | How to extract location related terms from raw text in python -- (python nlp named entity recognition)
<p>I want to extract location related keywords from raw text in python.
I have already tried spacy but the results were not good and I just got names of countries while I want fine-grained location mentions like s... | habedi/stack-exchange-dataset |
58,876 | CNNs: understanding feature visualization Channel Objectives (SOLVED) | <p>I'm trying to follow a paper on deep NN feature visualization using beautiful examples from the GoogLeNet/Inception CNN. see: <a href="https://distill.pub/2017/feature-visualization/" rel="nofollow noreferrer">https://distill.pub/2017/feature-visualization/</a></p>

<p>The authors use backpropagation to opti... | neural network cnn visualization inception | 1 | CNNs: understanding feature visualization Channel Objectives (SOLVED) -- (neural network cnn visualization inception)
<p>I'm trying to follow a paper on deep NN feature visualization using beautiful examples from the GoogLeNet/Inception CNN. see: <a href="https://distill.pub/2017/feature-visualization/" rel="nofollow n... | habedi/stack-exchange-dataset |
58,890 | Delete/Drop only the rows which has all values as NaN in pandas | <p>I have a Dataframe, i need to drop the rows which has all the values as NaN.</p>

<pre><code>ID Age Gender
601 21 M
501 NaN F
NaN NaN NaN
</code></pre>

<p>The resulting data frame should look like.</p>

<pre><code>Id Age Gender
6... | python pandas dataframe | 1 | Delete/Drop only the rows which has all values as NaN in pandas -- (python pandas dataframe)
<p>I have a Dataframe, i need to drop the rows which has all the values as NaN.</p>

<pre><code>ID Age Gender
601 21 M
501 NaN F
NaN NaN NaN
</code></pre>

<p>... | habedi/stack-exchange-dataset |
58,894 | Identifying if the sentence if it comprise information about education | <p>Given a sentence I am trying to classify if the sentence contain information about education. For example:</p>

<pre><code>sentence1 = "Require minimum four years of professional degree." 
sentence2 = "no degree required for this job."
</code></pre>

<p>For identifying as a first step I have ... | machine learning python machine learning model nlp | 1 | Identifying if the sentence if it comprise information about education -- (machine learning python machine learning model nlp)
<p>Given a sentence I am trying to classify if the sentence contain information about education. For example:</p>

<pre><code>sentence1 = "Require minimum four years of professional deg... | habedi/stack-exchange-dataset |
58,905 | Varying the number of neighbors in nearest-neighbors regression | <p>For nearest-neighbors regression, it is plausible to increase the number of neighbors used to predict <span class="math-container">$f(x)$</span> when there are many data points near <span class="math-container">$x$</span>.</p>

<p>What is a good algorithm for varying the number of neighbors used?</p>
 | k nn | 1 | Varying the number of neighbors in nearest-neighbors regression -- (k nn)
<p>For nearest-neighbors regression, it is plausible to increase the number of neighbors used to predict <span class="math-container">$f(x)$</span> when there are many data points near <span class="math-container">$x$</span>.</p>

<p>What... | habedi/stack-exchange-dataset |
58,907 | Understanding the "Wide" part of Google's wide and deep | <p>Google's <a href="https://arxiv.org/pdf/1606.07792.pdf" rel="nofollow noreferrer">wide and deep</a> recommender model sounds really cool, but I'm struggling to believe I'm grasping the wide section right so wanted to check my understanding.</p>

<p>Their paper says the following:</p>

<blockquote>&#x... | neural network deep learning tensorflow recommender system | 1 | Understanding the "Wide" part of Google's wide and deep -- (neural network deep learning tensorflow recommender system)
<p>Google's <a href="https://arxiv.org/pdf/1606.07792.pdf" rel="nofollow noreferrer">wide and deep</a> recommender model sounds really cool, but I'm struggling to believe I'm grasping the wide section... | habedi/stack-exchange-dataset |
58,938 | How to accomodate different database / schema names when writing M queries in Power BI? | <p>I am working with Power BI and I need to setup a template with some input parameters, one of them being the name of the database to get data from.</p>

<p>To do this, I have setup a parameter (called project_database) so that users can specify the database to be used in an Query via the Parameter Manager in ... | powerbi | 1 | How to accomodate different database / schema names when writing M queries in Power BI? -- (powerbi)
<p>I am working with Power BI and I need to setup a template with some input parameters, one of them being the name of the database to get data from.</p>

<p>To do this, I have setup a parameter (called project_... | habedi/stack-exchange-dataset |
58,948 | Why the Logistic regression model trained with tensorflow performed so poor | <p>I trained a logistic regression model with tensorflow but the accuracy of the model was so poor (accuracy = 0.68). The model was trained using simulated dataset and the result should be very good. is there something wrong with the code ?</p>

<pre><code> #simulated dataSet
sim_data <- function(n=2000)... | machine learning tensorflow r logistic regression | 1 | Why the Logistic regression model trained with tensorflow performed so poor -- (machine learning tensorflow r logistic regression)
<p>I trained a logistic regression model with tensorflow but the accuracy of the model was so poor (accuracy = 0.68). The model was trained using simulated dataset and the result should be ... | habedi/stack-exchange-dataset |
58,961 | sklearn.accuracy_score(y_test, y_predict) vs np.mean(y_predict == y_test) | <p>What is the difference between these two methods for finding model accuracy?</p>

<p>I have used both methods in python3 and i normally get identical results. However in few cases i get completely different results, so I am trying to figure out the possible reason for this.</p>
 | machine learning python scikit learn accuracy | 1 | sklearn.accuracy_score(y_test, y_predict) vs np.mean(y_predict == y_test) -- (machine learning python scikit learn accuracy)
<p>What is the difference between these two methods for finding model accuracy?</p>

<p>I have used both methods in python3 and i normally get identical results. However in few cases i ge... | habedi/stack-exchange-dataset |
58,966 | Binary classfication vs One-class classification | <p>Why do we need samples of both classes for the training of binary classification algorithms, if one-class algorithms can do the job with only samples from one class?</p>

<p>I know that one-class algorithms (like one-class svm) were proposed with the absence of negative data in mind and that they seek to fin... | classification svm binary | 1 | Binary classfication vs One-class classification -- (classification svm binary)
<p>Why do we need samples of both classes for the training of binary classification algorithms, if one-class algorithms can do the job with only samples from one class?</p>

<p>I know that one-class algorithms (like one-class svm) w... | habedi/stack-exchange-dataset |
59,001 | Why does accuracy remain the same | <p>I'm new to machine learning and I try to create a simple model myself. The idea is to train a model that predicts if a value is more or less than some threshold. </p>

<p>I generate some random values before and after threshold and create the model</p>

<pre class="lang-py prettyprint-override"><code... | machine learning keras tensorflow | 1 | Why does accuracy remain the same -- (machine learning keras tensorflow)
<p>I'm new to machine learning and I try to create a simple model myself. The idea is to train a model that predicts if a value is more or less than some threshold. </p>

<p>I generate some random values before and after threshold and crea... | habedi/stack-exchange-dataset |
59,004 | Accuracy noise patterns during model training | <p>I'm training a logistic regression model on a small dataset. I have about 1300 samples that I split into a training and a testing set (70% and 30% respectively).</p>

<p>The training seems ok, however when I plot the accuracy of my model w.r.t. the epoch, some repeating noisy patterns appear at the end well ... | machine learning logistic regression training hyperparameter | 1 | Accuracy noise patterns during model training -- (machine learning logistic regression training hyperparameter)
<p>I'm training a logistic regression model on a small dataset. I have about 1300 samples that I split into a training and a testing set (70% and 30% respectively).</p>

<p>The training seems ok, howe... | habedi/stack-exchange-dataset |
59,007 | Multi-Output Regression with neural network in Keras | <p>I have got an .xlsx Excel file with an input an 2 output columns. And there are some coordinates and outputs in that file such as:
x= 10 y1=15 y2=20
x= 20 y1=14 y2=22 ...
I am trying to do that regression using tensorflow. But somehow i can't manage to do it. I am leaving my code here, I would appraciate... | machine learning neural network keras regression | 1 | Multi-Output Regression with neural network in Keras -- (machine learning neural network keras regression)
<p>I have got an .xlsx Excel file with an input an 2 output columns. And there are some coordinates and outputs in that file such as:
x= 10 y1=15 y2=20
x= 20 y1=14 y2=22 ...
I am trying to do that regr... | habedi/stack-exchange-dataset |
60,017 | LSTM to multivariate sequence classification | <p>How can I train multivariate to multiclass sequence using LSTM in keras?</p>

<p>I have 50000 sequences, each in the length of 100 timepoints.
At every time point, I have 3 features (So the width is 3).</p>

<p>I have 4 classes and I want to bulid a classifier to determine class for sequence.
... | python keras time series lstm sequence | 1 | LSTM to multivariate sequence classification -- (python keras time series lstm sequence)
<p>How can I train multivariate to multiclass sequence using LSTM in keras?</p>

<p>I have 50000 sequences, each in the length of 100 timepoints.
At every time point, I have 3 features (So the width is 3).</p>

... | habedi/stack-exchange-dataset |
60,018 | how to create multiple plot from a panda Dataframe | <p>I want to plot multiple plots.
The data is stored in a pandas dataframe and each row should be a seperate plot.
Each row has an ID (ZRD_ID) which doenst matter and a date (TAG) and 24 values to be plotted.</p>

<pre><code>import pandas as pd
import numpy as np

df = pd.read_csv('./Result_... | pandas dataframe matplotlib reshape | 1 | how to create multiple plot from a panda Dataframe -- (pandas dataframe matplotlib reshape)
<p>I want to plot multiple plots.
The data is stored in a pandas dataframe and each row should be a seperate plot.
Each row has an ID (ZRD_ID) which doenst matter and a date (TAG) and 24 values to be plotted.</p>
&#x... | habedi/stack-exchange-dataset |
60,047 | Returning rows from a list of indexes in Python Pandas | <h1>Context</h1>
<p>I have a CSV containing two types of rows, an <strong>observation record</strong> and on the row below, an <strong>observation value</strong> which is related to the observation record above. The record line contains a four-letter code which denotes the type of observation. My goal is to create ... | python pandas | 1 | Returning rows from a list of indexes in Python Pandas -- (python pandas)
<h1>Context</h1>
<p>I have a CSV containing two types of rows, an <strong>observation record</strong> and on the row below, an <strong>observation value</strong> which is related to the observation record above. The record line contains a fou... | habedi/stack-exchange-dataset |
60,052 | Finding correlation between MNIST digits | <p>What way would be correct to calculate the correlation between say digit '1' and digit '7' images from MNIST? Taking average values of all digit '1' pixels and digit '7' pixels to compute correlation between those would be a correct?</p>
 | pandas correlation mnist | 1 | Finding correlation between MNIST digits -- (pandas correlation mnist)
<p>What way would be correct to calculate the correlation between say digit '1' and digit '7' images from MNIST? Taking average values of all digit '1' pixels and digit '7' pixels to compute correlation between those would be a correct?</p>
 | habedi/stack-exchange-dataset |
60,067 | Python Pandas agregation | <p>I have a data set recording daily values of several metrics say R1, R2, for example:</p>

<pre><code>Date Metric cur_val Mgmt_Lmt
1/1/2019 R1 38.94927536 100
1/2/2019 R1 38.83188406 100
1/3/2019 R1 38.71449275 100
1/4/2019 R1 38.59710145 100
1/5/2019 R1 38.4797... | python pandas | 1 | Python Pandas agregation -- (python pandas)
<p>I have a data set recording daily values of several metrics say R1, R2, for example:</p>

<pre><code>Date Metric cur_val Mgmt_Lmt
1/1/2019 R1 38.94927536 100
1/2/2019 R1 38.83188406 100
1/3/2019 R1 38.71449275 100
1/4/2019 R1 ... | habedi/stack-exchange-dataset |
60,092 | Keras ANN Trained Model's Accuracy change on prediction | <p>I have trained an ANN Binary classifier using Keras. It gives 90% accuracy. 
After testing when I predict same data again but pass only one class then accuracy decreases to 40%. 
I have figured out that if I pass mixed classes while predicting then it will give me around 90% accuracy and if I pass data poin... | machine learning neural network classification keras | 1 | Keras ANN Trained Model's Accuracy change on prediction -- (machine learning neural network classification keras)
<p>I have trained an ANN Binary classifier using Keras. It gives 90% accuracy. 
After testing when I predict same data again but pass only one class then accuracy decreases to 40%. 
I have figured o... | habedi/stack-exchange-dataset |
60,093 | How to reduce dimensionality of 3.2B categorical features? | <p><strong>Background:</strong></p>

<p><em>This means a dataset of 7,000 samples and 3.2B columns, which I would have to read into distributed Spark memory somehow.</em></p>

<p>Obviously I want to reduce the number of columns that gets fed into the final model, although I could start with a smaller am... | neural network bigdata pca dimensionality reduction | 1 | How to reduce dimensionality of 3.2B categorical features? -- (neural network bigdata pca dimensionality reduction)
<p><strong>Background:</strong></p>

<p><em>This means a dataset of 7,000 samples and 3.2B columns, which I would have to read into distributed Spark memory somehow.</em></p>

<p>Obviously... | habedi/stack-exchange-dataset |
60,104 | Fine-tuning a Pre-trained model (Resnet50) do I need to validate it or just train it? | <p>When fine-tuning a Resnet50 model should I do the standard train validation split and train like any normal CNN or should I just do the training and not the validation if I am going to use this model as a base model in another more advanced model? 
I think I will need to do the train/val split but wanted to get ... | machine learning keras tensorflow computer vision | 1 | Fine-tuning a Pre-trained model (Resnet50) do I need to validate it or just train it? -- (machine learning keras tensorflow computer vision)
<p>When fine-tuning a Resnet50 model should I do the standard train validation split and train like any normal CNN or should I just do the training and not the validation if I am ... | habedi/stack-exchange-dataset |
60,107 | how to pass parameters over sklearn pipeline's stages? | <p>I'm working on a deep neural model for text classification using Keras. To fine tune some hyperparameters i'm using Keras Wrappers for the Scikit-Learn API.
So I builded a Sklearn Pipeline for that:</p>

<pre><code>def create_model(optimizer="adam", nbr_features=100):
 model = Sequential()
 ... | python scikit learn hyperparameter tuning grid search pipelines | 1 | how to pass parameters over sklearn pipeline's stages? -- (python scikit learn hyperparameter tuning grid search pipelines)
<p>I'm working on a deep neural model for text classification using Keras. To fine tune some hyperparameters i'm using Keras Wrappers for the Scikit-Learn API.
So I builded a Sklearn Pipeline ... | habedi/stack-exchange-dataset |
60,126 | Data Reshaping for CNN using Keras | <p>I'm a beginner in Keras. I've loaded MNIST dataset in Keras and checked it's dimension.
The code is</p>

<pre><code>from keras.datasets import mnist

# load data into train and test sets
(X_train, y_train), (X_test, y_test) = mnist.load_data()

print(X_train.shape)
print(y_train.s... | python keras reshape | 1 | Data Reshaping for CNN using Keras -- (python keras reshape)
<p>I'm a beginner in Keras. I've loaded MNIST dataset in Keras and checked it's dimension.
The code is</p>

<pre><code>from keras.datasets import mnist

# load data into train and test sets
(X_train, y_train), (X_test, y_test) = mnist.... | habedi/stack-exchange-dataset |
60,146 | Standard deviation as outlier detection | <p>I have a quite basic question: A standard deviation is defined such that around ~66 % of the data lies within it. And around ~99 % within three standard deviations.</p>

<p>When I wanna' use the standard deviation as an outlier detection, I struggle with this definition as there will always be outlier. But I... | outlier | 1 | Standard deviation as outlier detection -- (outlier)
<p>I have a quite basic question: A standard deviation is defined such that around ~66 % of the data lies within it. And around ~99 % within three standard deviations.</p>

<p>When I wanna' use the standard deviation as an outlier detection, I struggle with t... | habedi/stack-exchange-dataset |
60,169 | What I'm doing wrong with my CNN Keras? | <p>In my project I have 700 images for each class (pdr and nonPdr) totalizing 1400 images. To validation I've put 28 samples.</p>

<p>The problem is that my validation loss and accuracy is unstable. This is my code:</p>

<pre class="lang-py prettyprint-override"><code>def ReadImages(Path):
 Label... | machine learning python keras cnn image classification | 1 | What I'm doing wrong with my CNN Keras? -- (machine learning python keras cnn image classification)
<p>In my project I have 700 images for each class (pdr and nonPdr) totalizing 1400 images. To validation I've put 28 samples.</p>

<p>The problem is that my validation loss and accuracy is unstable. This is my co... | habedi/stack-exchange-dataset |
60,170 | why multiplication (squares) doesn't work for neural networks? | <p>Below code creates sum of 2 random numbers and then we train for 1000 examples and then we are able to predict which works fine</p>

<p>consider the below code for creating random data :</p>

<pre><code>def random_sum_pairs(n_examples, n_numbers, largest):
 X, y = list(), list()
 for i ... | machine learning neural network keras regression | 1 | why multiplication (squares) doesn't work for neural networks? -- (machine learning neural network keras regression)
<p>Below code creates sum of 2 random numbers and then we train for 1000 examples and then we are able to predict which works fine</p>

<p>consider the below code for creating random data :</p>&#... | habedi/stack-exchange-dataset |
60,174 | Pandas Merge question | <p>I have a dataset where for each date I have two values say A and B, there are dates when one of the values is missing</p>

<pre><code>Date C1 C2
1/1/2019 A 10
1/1/2019 B 20
1/2/2019 A 25
1/2/2019 B 30
1/3/2019 A 23
1/4/2019 A 32
</code></pre>... | pandas | 1 | Pandas Merge question -- (pandas)
<p>I have a dataset where for each date I have two values say A and B, there are dates when one of the values is missing</p>

<pre><code>Date C1 C2
1/1/2019 A 10
1/1/2019 B 20
1/2/2019 A 25
1/2/2019 B 30
1/3/2019 A 23
1/... | habedi/stack-exchange-dataset |
60,178 | R stem and leaf values | <p>How to make a stem and leaf plot with the following data in "R":</p>

<p>1717 1719 1645 3739 3024 3664 3830 2991 2430 2730 3469 5086 2119 3021 3292 2844 3426 2067 3215 2767 3124 2573 2840 2449 2584 1505 1390 1645 2497 3466 3228 3192</p>

<p>The only way to get a reasonable amount of stems is to make ... | r | 1 | R stem and leaf values -- (r)
<p>How to make a stem and leaf plot with the following data in "R":</p>

<p>1717 1719 1645 3739 3024 3664 3830 2991 2430 2730 3469 5086 2119 3021 3292 2844 3426 2067 3215 2767 3124 2573 2840 2449 2584 1505 1390 1645 2497 3466 3228 3192</p>

<p>The only way to get a reasonab... | habedi/stack-exchange-dataset |
60,194 | Improving classifcation when some are less represented? | <p>I have a multi-class classification problem. It performs quite well but on the least represented classes it doesn't. Indeed, here is the distribution :</p>
<p><a href="https://i.stack.imgur.com/YXUYI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YXUYI.png" alt="enter image description here" ... | classification feature selection multiclass classification multilabel classification | 1 | Improving classifcation when some are less represented? -- (classification feature selection multiclass classification multilabel classification)
<p>I have a multi-class classification problem. It performs quite well but on the least represented classes it doesn't. Indeed, here is the distribution :</p>
<p><a href=... | habedi/stack-exchange-dataset |
60,208 | Understanding python XGBoost model dump output of a very simple tree | <p>I am trying to understand the model dump output from XGBoost. I would like to step through and see exactly how the model arrived at it's prediction. To simplify I trained a model with 1 tree and 1 max depth, and as expected all records get one of two predictions as it has a single split - the values are {0.538639843... | python classification xgboost | 1 | Understanding python XGBoost model dump output of a very simple tree -- (python classification xgboost)
<p>I am trying to understand the model dump output from XGBoost. I would like to step through and see exactly how the model arrived at it's prediction. To simplify I trained a model with 1 tree and 1 max depth, and a... | habedi/stack-exchange-dataset |
60,220 | How to install boruta in conda? | <p>I want to install boruta in my anaconda environment, but if I execute</p>

<pre><code>conda install boruta
</code></pre>

<p>It displays,</p>

<pre><code>PackagesNotFoundError: The following packages are not available from current channels:

 - boruta

Current channels:&#... | python feature selection anaconda | 1 | How to install boruta in conda? -- (python feature selection anaconda)
<p>I want to install boruta in my anaconda environment, but if I execute</p>

<pre><code>conda install boruta
</code></pre>

<p>It displays,</p>

<pre><code>PackagesNotFoundError: The following packages are not available ... | habedi/stack-exchange-dataset |
60,238 | Infer family type, size from reviews | <p>I have a bunch of reviews:</p>

<pre><code>User_id, review
1, "We (a family of 4 adults) chose this and view and loved this place"
1, "My husband and I, with our 2 teen sons, visit this restaurant at least once..."
2,"My partner and I booked table for a short holiday, their wine menu was awesome"... | nlp data mining text mining | 1 | Infer family type, size from reviews -- (nlp data mining text mining)
<p>I have a bunch of reviews:</p>

<pre><code>User_id, review
1, "We (a family of 4 adults) chose this and view and loved this place"
1, "My husband and I, with our 2 teen sons, visit this restaurant at least once..."
2,"My partne... | habedi/stack-exchange-dataset |
60,251 | SVM hyperplane margin | <blockquote>
<p>so that <span class="math-container">$H_0$</span> is equidistant from <span class="math-container">$H_1$</span> and <span class="math-container">$H_2$</span>.</p>
<p>However, here the variable <span class="math-container">$\delta$</span> is not necessary. So we can set <span class="math-containe... | machine learning svm mathematics | 1 | SVM hyperplane margin -- (machine learning svm mathematics)
<blockquote>
<p>so that <span class="math-container">$H_0$</span> is equidistant from <span class="math-container">$H_1$</span> and <span class="math-container">$H_2$</span>.</p>
<p>However, here the variable <span class="math-container">$\delta$</span... | habedi/stack-exchange-dataset |
60,258 | NMT, What if we do not pass input for decoder? | <p>For transformer-based neural machine translation (NMT), take English-Chinese for example, we pass English for encoder and use decoder input(Chinese) attend to encoder output, then final output.</p>

<p>What if we do not pass input for decoder and consider it as a 'memory' model for translation.
Is it pos... | deep learning nlp machine translation transformer | 1 | NMT, What if we do not pass input for decoder? -- (deep learning nlp machine translation transformer)
<p>For transformer-based neural machine translation (NMT), take English-Chinese for example, we pass English for encoder and use decoder input(Chinese) attend to encoder output, then final output.</p>

<p>What ... | habedi/stack-exchange-dataset |
60,262 | Counting the transition in a dataframe overtime | <p>I am stuck at a problem and am thinking how to come out of it. I want to write a code in python with dataframe as below:</p>

<p>data = {'Id':['a', 'a', 'b', 'b', 'c', 'c'],
 'value':['Active', 'Notactive', 'Active', 'Superactive', 'Notactive', 'Superactive'],
 'date':['8-09-2019','15-0... | data science model | 1 | Counting the transition in a dataframe overtime -- (data science model)
<p>I am stuck at a problem and am thinking how to come out of it. I want to write a code in python with dataframe as below:</p>

<p>data = {'Id':['a', 'a', 'b', 'b', 'c', 'c'],
 'value':['Active', 'Notactive', 'Active', 'Superact... | habedi/stack-exchange-dataset |
60,267 | Pyspark Matrix Transformation | <p>Let's assume I have the following dataframe in PySpark:</p>

<pre><code>Customer | product | rating
customer1 | product1 | 0.2343
customer1 | product2 | 0.4440
customer2 | product3 | 0.3123
customer3 | product1 | 0.7430
</code></pre>

<p>There can be sev... | machine learning python data preprocessing pyspark | 1 | Pyspark Matrix Transformation -- (machine learning python data preprocessing pyspark)
<p>Let's assume I have the following dataframe in PySpark:</p>

<pre><code>Customer | product | rating
customer1 | product1 | 0.2343
customer1 | product2 | 0.4440
customer2 | product3 | 0.3123... | habedi/stack-exchange-dataset |
60,279 | Policy gradient vs cost function | <p>I was working with continuous system RL and obviously stumbled across this <strong>Policy Gradient</strong>. </p>

<p>I want to know is this something like <strong>cost function</strong> for RL? It kinda gives that impression considering we are finding out how efficient the system is as a whole (weighted sum... | neural network reinforcement learning cost function policy gradients | 1 | Policy gradient vs cost function -- (neural network reinforcement learning cost function policy gradients)
<p>I was working with continuous system RL and obviously stumbled across this <strong>Policy Gradient</strong>. </p>

<p>I want to know is this something like <strong>cost function</strong> for RL? It kind... | habedi/stack-exchange-dataset |
60,284 | Trying to train Stylegan, stopping with errors after first tick | <p>I'm just getting started with GANs and have prepared a dataset for Stylegan of around 5500 256x256 images to train it on. I've pored through the scant resources outlining the training process and have all of the software set up, using pretty much default settings for the training.py and training_loop.py files aside ... | tensorflow | 1 | Trying to train Stylegan, stopping with errors after first tick -- (tensorflow)
<p>I'm just getting started with GANs and have prepared a dataset for Stylegan of around 5500 256x256 images to train it on. I've pored through the scant resources outlining the training process and have all of the software set up, using pr... | habedi/stack-exchange-dataset |
60,287 | Should scaling be done for mixed data (categorical and numerical)? | <p>My dataset contains 13 attributes consisting of 10 Numerical and 3 Categorical attributes and Target. It has 180 observations</p>

<pre><code>NumFeature1,NumFeature2....NumFeature10,CatFeature1,CatFeature2,CatFeature3, Target
</code></pre>

<p>All Categorical are non-ordinal and each have the fol... | classification preprocessing probability model selection feature scaling | 1 | Should scaling be done for mixed data (categorical and numerical)? -- (classification preprocessing probability model selection feature scaling)
<p>My dataset contains 13 attributes consisting of 10 Numerical and 3 Categorical attributes and Target. It has 180 observations</p>

<pre><code>NumFeature1,NumFeature... | habedi/stack-exchange-dataset |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.