machine-learning

Error during Recursive feature elimination using Histogram based GBM

Error during Recursive feature elimination using Histogram based GBM Question: I am implementing Recursive Feature Elimination using the HistGradientBoostingClassifier, but for some reason keeps on getting the following error: ValueError: when importance_getter==’auto’, the underlying estimator HistGradientBoostingClassifier should have coef_ or feature_importances_ attribute. Either pass a fitted estimator to feature selector or call fit before calling …

Total answers: 1

Label conflict in classification machine learning problem

how can I remove Label conflict in classification problem? Question: I have identical samples with different labels and this has occurred due to either mislabeled data, If the data is mislabeled, it can confuse the model and can result in lower performance of the model. It’s a binary classification problem. if my input table is …

Total answers: 1

Validation accuracy doesn't change at all while training a CNN network

Validation accuracy doesn't change at all while training a CNN network Question: So, I was trying to implement AlexNet on the Intel image dataset for classification. However, although during training I get high accuracy scores (0.84), validation accuracy does not change and it is very low (0.16). I have tried different optimizers and learning rates …

Total answers: 1

How to make formula differentiable for a binary classifier in PyTorch

How to make formula differentiable for a binary classifier in PyTorch Question: I am trying to create a custom loss function for a binary classifier case. I need the binary predictions as an input to the function. However, I am getting to a point where I am unable to create a the process differentiable. I …

Total answers: 1

Python Membership Initialisation

Python Membership Initialisation Question: I fail to define an array in my InitializeMembershipWeight function. I am currently working on a C-Means clustering algorithm. #Membership Initialisation def initializeMembershipWeights(): weight = np.random.dirichlet(np.ones(k),n) weight_array = np.array(weight) return weight_array print(weight_array) NameError Traceback (most recent call last) <ipython-input-114-70f058bffa58> in <module> —-> 1 print(weight_array) NameError: name ‘weight_array’ is not defined Asked …

Total answers: 1

How do I print the wandb sweep url in python?

How do I print the wandb sweep url in python? Question: For runs I do: wandb.run.get_url() how do I do the same but for sweeps given the sweep_id? fulls sample run: """ Main Idea: – create sweep with a sweep config & get sweep_id for the agents (note, this creates a sweep in wandb’s website) …

Total answers: 1

After dropping columns with missing values, sklearn still throwing ValueError

After dropping columns with missing values, sklearn still throwing ValueError Question: I am currently taking the intermediate machine learning course on kaggle, and am quite new to machine learning. I’m currently trying to create a Random Forest model and implementing OH Encoding on my data, but as it is my first time have been struggling …

Total answers: 2

Class imported from a local module cannot find the definition of a variable declared in the same module, Python

Class imported from a local module cannot find the definition of a variable declared in the same module, Python Question: I have this piece of code defined in the model_utils.py local module. import os os.environ[‘TF_CPP_MIN_LOG_LEVEL’] = ‘3’ os.environ["SM_FRAMEWORK"] = "tf.keras" import segmentation_models as sm import matplotlib.pyplot as plt import tensorflow_io as tfio import tensorflow as …

Total answers: 1

Deploy a custom pipeline using Sagemaker SDK

Deploy a custom pipeline using Sagemaker SDK Question: I have been having a hard time to deploy my locally trained SKlearn model (pipeline with custom code + logistic model) to Sagemaker Endpoint. My Pipeline is as follows: All this custom code (RecodeCategorias) does is normalize and recode some categories columns into a "other" value, for …

Total answers: 2

How to train XGBoost with probabilities instead of class?

How to train XGBoost with probabilities instead of class? Question: I am trying to train an XGBoost classifier by inputting the training dataset and the training labels. The labels are one hot encodings and instead of sending in the classes such as [0,1,0,0], I wanted to send an inputs of the probabilities like [0,0.6,0.4,0] for …

Total answers: 1