Questions tagged [machine-learning]

Methods and principles of building "computer systems that automatically improve with experience."

Filter by
Sorted by
Tagged with
2
votes
0answers
6 views

Seaborn Pairplot not showin colors of the labels

My dataframe looks similar to this I am using the following line to graph the pairplot sns.pairplot(iris, hue = 'States', height=7, aspect=0.8 ) The graph is ...
0
votes
1answer
15 views

The exact meaning of cost function ? (Machine Learning)

I'm reading the "Python Machine Learning" book by Sebastian Raschka, and we use different cost functions. For Adaline model (with a linear activation function) we use the MSE error : (Phi is the ...
1
vote
3answers
22 views

Why would it be bad to fit a linear regression to a binary classification problem?

Let's say that we have a binary classification problem. Why would it be bad to fit a linear regression and then classify given a threshold? The output would be continuos and it could be out of range,...
2
votes
1answer
13 views

static and dynamic data in clinical trials

Hi everybody and thanks in advance for those who will help me for this problem. I have multiple data regarding patients involved in a clinical trial and my goal is to predict their death/non death. ...
0
votes
0answers
4 views

Better understanding of Integrated Gradients

I've been trying to use Integrated Gradients to get a better understanding of the attribution of different features in my NN. I've read the original publication(https://arxiv.org/pdf/1703.01365.pdf) ...
1
vote
2answers
12 views

Is GNU Octave a perfect place to code neural networks

GNU Octave is used for its simplicity and compiling speed to write numerical algorithms (such as eg machine learning problems), but I wanted to know if I can also use it for faster coding of neural ...
1
vote
1answer
9 views

Neural network regression problem, integer output neuron constraint

The problem I'm solving is a regression problem using neural networks, and the "y" value covers a very large range (let's say y represents the number of people, ranging from 0 people to 10000 people), ...
3
votes
2answers
149 views

Is it acceptable not to transform() test data after train data is being fit_transform()-ed

We know that the best practice in data preprocessing (such as standardization, Normalization, ... etc) is that while we perform fit_trasform() on the training data, ...
0
votes
0answers
18 views

Using RNN to predict future power usage

So for each user in a file I have their average power usage value every hour for 40 consecutive days. I need to predict their power usage during next 10 consecutive days. I am new to RNNs (I have ...
2
votes
1answer
27 views

Prediction for not completely well classified data

I have a DataFrame of users, some of them are "bots" and they are identified with a bit equal to 1 in the "is_bot" column, if the bit is 0, the user is considered as "human". The problem is that some ...
1
vote
0answers
23 views

Iterative Reweighted Least Squares in python

I am trying to manually implement the irls logistic regression (Chapter 4.3.3 in Bishop - Pattern Recognition And Machine Learning) in python. For updating the weights, I am using $w' = w-(\Phi^TR\...
0
votes
0answers
8 views

Why does the BERT NSP head linear layer have two outputs?

Here's the code in question. https://github.com/huggingface/transformers/blob/master/src/transformers/modeling_bert.py#L491 ...
0
votes
2answers
19 views

Custom loss function

Is it possible to apply a custom loss function in a regression model (or any other algorithm for predicting continuous variable) ? I'm working on a stock market prediction model and I need to maximize ...
0
votes
0answers
5 views

Need for doing grad.zero_() after setting torch.no_grad() in pytorch

In the following lines of code, ...
2
votes
1answer
49 views

How does scaling affect Logistic Regression?

I have searched a lot on the web for this question, but I never seem to find a consistent yet straight forward answer. Simply put, the question is: How exactly does scaling affect logistic regression? ...
0
votes
3answers
30 views

What is the 1 Unit in the contraint of SVM: $y_i(wx_i+b) \geq1$

I am following this note on SVM. The constraint, $y_i(wx_i+b) \geq 1$, basically said all inputs, $x_i$, lie at least 1 unit away from the hyperplane on the correct side. What does it mean by 1 unit?...
0
votes
0answers
3 views

Schedule Sagemaker with boto3 comprehend

I have a jupyter notebook running on SageMaker which I have to run daily to output CSV files. I am using boto3 'comprehend' to analyze the text in my workflow. I want to be able to schedule this daily ...
0
votes
1answer
28 views

How to train a machine learning algorithm with multiple labels

I have the following challenge and I very much hope that there is a solution to it. I also suspect that there is a simple approach to it. I just don't see it at the moment. Any help or advice is ...
0
votes
0answers
4 views

Data points are highly overlapped and do not follow smoothness rule assumption

I am working on a very high dimensional categorical features based data set. There are two output classes and 2-dimensional PCA plot suggests that the data points belonging to both +ve and -ve classes ...
0
votes
0answers
10 views

Choosing a non-linear regression model and predicting

I'm new to data science and machine learning. I was working on a project and I happened to get this graph. I want to build a predictive model using this, for each of the boroughs. I do understand ...
0
votes
0answers
10 views

loss increases but accuracy and macroF1 are still stable and don't change dramatically

I have a classification task with 2 classes. The dataset is imbalanced. When I train the model, at some point, the loss of test dataset starts to increase but the values of accuracy and macro-f1 don't ...
0
votes
0answers
15 views

Variational Autoencoders(VAE)-zero variance problem

So, i'm having a problem with training my VAE. I'm not sure if i'm dealing with a bug in code or a bug in logic/understanding of the topic. Here is an image showing latent variable variances on test ...
1
vote
1answer
19 views

What is the difference between ensemble methods and hybrid methods, or is there none?

I have the feeling that these terms often are used as synonyms for one another, however they have the same goal, namely increasing prediction accuracy by combining different algorithms. My question ...
1
vote
0answers
12 views

How to evaluate the performance of a model in production when labeling data is costly?

I have come to a problem for which I can't find a solution. Let's talk about a hypothetical binary classification problem in which you have some years of (human) labeled data. The final objective is ...
0
votes
1answer
13 views

Why is my LSTM is working best with batch size of 2 and no hidden layers?

I am building an LSTM for price prediction using Keras. I am using Bayesian optimization to find the right hyperparameters. With ...
0
votes
0answers
16 views

Consecutive Feature Selection-CV and Model Selection-CV

I want to ask a question about general workflow of algorithm development. I want to include a "feature selection with Random Forest" step into my workflow but I have doubts about data leakage. It is ...
0
votes
0answers
9 views

What is the best possible method/methods to determine best possible branch(rule) in a decision tree plot for the positive cases only?

I have a dataset, which I am using for loan prediction. Thus, it is pretty much clear that my dataset is imbalanced. I have used Decision Tree to plot the tree structure. Now, I want to find the ...
0
votes
1answer
7 views

Determine how each feature contribute to XGBoost Classification

so for a summary of what I have done: My dataset has 5 classes and 10 parameters. I used XGBclassifer from sklearn to investigate if I could use those 10 parameters to predict the class of each data ...
0
votes
2answers
13 views

Regression error increase after shuffing data

I'm trying to do multivariate regression using a 3-dimension data set. I noticed a strange problem that my fitting error increase dramatically after I pre-shuffled the data matrix comparing using ...
0
votes
0answers
11 views

Using Keras fit_generator for functional keras models and custom dataset

I have to fit a model that takes three discrete inputs and produces two discrete outputs using a generator made as follows: ...
0
votes
0answers
6 views

Gamma objective function XGBoost

I am using XGBoost to predict a variable that is highly skewed and always is greater than zero. I did a significant search to see some materials for gamma objective function in XGBoost but I could not ...
0
votes
0answers
21 views

Relationship between two continuous variables in time series data

I have a dataset that collects daily data based on transactions between two entities. I wish to find the strength, direction, and kind of relationship between two continuous variables i.e. Number of ...
0
votes
0answers
16 views

Splitting a 10 year long time-series into multiple year time-series on Deep Learning Models

I'm using recent Deep Learning models for time series analysis such as DeepAR[1] and DeepFactors[2] for my masters. My target time series was given to me by a cement factory, 10 years of compositions ...
0
votes
0answers
8 views

Batch Normalization as input layer to learn an optimal scaling?

We all know that Batch Normalization reduces "Internal Covariance Shift" and therefore helps Neural Networks to train faster (Batch Normalization: Accelerating Deep Network Training by Reducing ...
5
votes
3answers
61 views
+100

Disparity between training and testing errors with deep learning: the bias-variance tradeoff and model selection

I am developing a convolutional neural network and have a dataset with 13,000 datapoints that is split 80%/10%/10% train/validation/test. In tuning the model architecture, I found the following, after ...
0
votes
1answer
9 views

Will one hot encoding / unbalanced columns cause bias to Clustering Analysis?

I'm wondering if having too many columns about one certain feature is gonna cause bias to the clustering analysis. For example, if my dataset has columns = ['incoming calls', 'outgoing calls', '...
0
votes
0answers
10 views

Using sklearn's make_pipeline output doesn't match between test dataframe and output dataframe

I have a simple sklearn pipeline defined as below and I create a train_test split to fit and test my model. The R2-score looks ...
0
votes
1answer
20 views

Should dimensionality reduction be done before k-means clustering if there are many features?

My data contains over 200 features and over 500 observations. I want to place the observations into a number of clusters based on the features that make them different. There are numerous ideas I ...
0
votes
0answers
11 views

How to deal with images with textual noise?

I have a dataset of images collected from google and bing images (scraped). basically I want to classify these images into binary classes (positive, negative). Images that contain a text originally ...
2
votes
0answers
42 views

VAE generates bad images. due to unbalanced loss functions?

I'm training a variational autoencoder on CelebA dataset using TensorFlow.keras The problem I'm facing is that the generated images are not diverse enough and look kinda bad. Example: What I think:...
2
votes
1answer
37 views
+50

Can a classifier be trained with reinforcement learning without access to single classification results?

Question: Can a classifier be trained with reinforcement learning without access to single classification results? I want to train a classifier using reinforcement learning. However, there is one big ...
0
votes
1answer
24 views

Neural Net Backprop Weight updating Pseudo code help please

Here is my code for Backpropagation weight updating. It's a simple network with 1 hidden layer and 1 output neuron. The activation function of both hidden and output layer uses tanh. I propagate the ...
0
votes
0answers
14 views

Why i am getting this error? [closed]

I am trying to apply NaiveBayes algorithm on covid19 data sample but this give me a error, if you have any solution kindly share with me
0
votes
1answer
24 views

How to impute using simple imputer (custom function)

I am imputing my data using simple imputer from sklearn. i want to test many different ways of applying transformations to the data. i.e for logisitcic regression i would like to remove nans and ...
1
vote
1answer
21 views

WHY or WHEN to convert numeric data to a categorical data?

This is an open ended WHY TO or WHEN TO question rather than a question on HOW TO encode numeric to categorical data. I am currently working on Telco Customer Churn dataset from kaggle. This is ...
2
votes
0answers
12 views

Xavier initialisation vs He initialisation

After reading the famous paper, Delving Deep into Rectifiers: Surpassing Human-Level Performance on ImageNet Classification, I understand two things:- He initilization borrows on the benefits of ...
0
votes
0answers
18 views

How to estimate the OCR accuracy

I am building a system which uses ocr to extract text but i have no way to flag that information on how correct it can be and if the information needs to be discarded by just looking at the image and ...
0
votes
0answers
20 views

Normalizing dependent feature by one of the independent ones

I have a data set with three different features (x1, x2, x3) and I am going to use a regression model to predict y based on the features. x3 is the total amount of money that a customer invest and y ...
0
votes
2answers
25 views

How to identify and extract patterns from emails

I would like to know if it would be possible to identify some patterns in a text. For example, looking at emails, there is some common words used at the beginning and at the end. ...
-1
votes
0answers
12 views

how to predict next randomly picked element of a list

The Problem Let's say that we have a machine that spits out a number (between 1 to 15) alongside a color (either green or blue) every 10 seconds. OK so every 10 seconds we get a number (between 0 to ...

1
2 3 4 5
156