In the example below, pipe = Pipeline([ ('scale', StandardScaler()), ('reduce_dims', PCA(n_components=4)), ('clf', SVC(kernel = 'linear
I am trying to train a decision tree model, save it, and then reload it when I need it later. However, I keep getting the following error: This DecisionTre
Is there any way to use multiple time-series to train one model and use this model for predictions given a new time-series as an input? It is rather a theoretic
I am currently performing multi class SVM with linear kernel using python's scikit library. The sample training data and testing data are as given below: Mode
I am using some text for some NLP analyses. I have cleaned the text taking steps to remove non-alphanumeric characters, blanks, duplicate words and stopwords, a
My Data set contains categorical variables so I am using label encoding and one hot encoder and my code is as follows can I use a loop to ensure that my cod
I do not understand why do I get the error KeyError: '[ 1351 1352 1353 ... 13500 13501 13502] not in index' when I run this code: cv = KFold(n_splits=10) fo
CODE import numpy as np import cv2 from google.colab.patches import cv2_imshow img=cv2.imread('/gdrive/My Drive/Colab Notebooks/merlin_190860876_3e2e2660-237f-4
I am trying to save the the weights of a pytorch model into a .txt or .json. When writing it to a .txt, #import torch model = torch.load("model_path") string =
How do you compute the true- and false- positive rates of a multi-class classification problem? Say, y_true = [1, -1, 0, 0, 1, -1, 1, 0,
How do you compute the true- and false- positive rates of a multi-class classification problem? Say, y_true = [1, -1, 0, 0, 1, -1, 1, 0,
Currently I have a dataset below and I try to accumulate the value if ColA is 0 while reset the value to 0 (restart counting again) if the ColA is 1 again. Col
In my CNN model I want to extract X_train and y_train from train_generator. I want to use ensemble learning, bagging and boosting to evaluate the model. the mai
I am developing a mini autonomous car using 3 CNNs and a camera sensor using this approach. One of the CNNs detects lanes on the images and outputs images wit
I'm trying to build a model which can be trained on both audio and video samples but I get this error ValueError: Please initialize `TimeDistributed` layer with
I am working on an image classification task to classify among cars and buses. The problem is that in most car images, there is buses in the background and vice
I am trying to use Tensorflow to create a recommendation system. What I want to do is to read data from two csv files, one containing 'item_id' and the other co
I've loaded in my train and validation sets from CIFAR10 like so: train = tfds.load('cifar10', split='train[:90%]', shuffle_files=True) validation = tfds.load('
For a very simple classification problem where I have a target vector [0,0,0,....0] and a prediction vector [0,0.1,0.2,....1] would cross-entropy loss converge
I am currently using a dataset of over 2.5 million images, of which I use the image itself as a comparison to eachother, for use in a content-based recommendati