SVM working well on test subset fails on whole dataset

I trained a SVM iterativly on large chunks of data using sklearn. Each csv file is a part of an image. I made those with a sliding window aproach. I used partial_fit() for fitting the SVM as well as …

Training on multiple data sets with scikit.mlpregressor

I’m currently training my first neural network on a larger dataset. I have splitted my training data to several .npy binary files, that each contain batches of 20k training samples. I’m loading the …

multi-threading, what is wrong with my code

I was trying to make faster my frames in opencv, it was so slow using it normal, so I decided to ask it here Make faster videocapture opencv the answer was to use multi threading to make it faster, so …

How to add two separate layers on the top of one layer using pytorch?

I want to add two separate layers on the top of one layer (or a pre-trained model) Is that possible for me to do using Pytorch?

How to find the regression line for multiple independent variables?

I’m trying to understand how the Multiple Line Regression works in code for machine learning. The issue I’m having is that I don’t get how to set up my regression line properly or if my coefficients …

Optuna lightgbm integration giving categorical features error

Im creating a model using optuna lightgbm integration, My training set has some categorical features and i pass those features to the model using the lgb.Dataset class, here is the code im using ( …

Does converting a seq2seq NLP model to the ONNX format negatively affect its performance?

I was looking at potentially converting an ml NLP model to the ONNX format in order to take advantage of its speed increase (ONNX Runtime). However, I don’t really understand what is fundamentally …

Non-zero binary accuracy but 0 accuracy in Keras classifer

I’m trying to train an LSTM classifier in TensorFlow. Here is a reproducible example targets = np.array([1, 0, 1, 1, 0, 0]) features = np.arange(6, 2, 1) model = tf.keras.Sequential([ tf.keras….

Python function returns nan

I have written function for gradient descent and used pandas to read csv file. But when I use data read by pandas, the function returns “nan”. I can’t understand why. Thanks in advance. def …

How does this iterative loop fit the model? ( Machine Learning)

I’m confused as to what for m in range(1, len(X_train)): is doing in the line model.fit(X_train[:m], y_train[:m]) y_train_predict = model.predict(X_train[:m]) . So I think that m is going to loop …