Skip to content
Advertisement

Tag: machine-learning

ValueError: Classification metrics unable to handle multiclass

I am trying to build a object classification model, but when trying to print out the classification report it returned a value error. ValueError: Classification metrics can’t handle a mix of multiclass and continuous-multioutput targets This is my current code: However, when I attempt to print out the classification report, it ran into this error: Answer Your problem is caused

How can I print the training and validation graphs, and training and validation loss graphs?

I need to plot the training and validation graphs, and trarining and validation loss for my model. Answer history object contains both accuracy and loss for both the training as well as the validation set. We can use matplotlib to plot from that. In these plots x-axis is no_of_epochs and the y-axis is accuracy and loss value. Below is one

Transfer Learning with Quantization Aware Training using Functional API

I have a model that I am using transfer learning for MobileNetV2 and I’d like to quantize it and compare the accuracy difference against a non-quantized model with transfer learning. However, they do not entirely support recursive quantization, but according to this, this method should quantize my model: https://github.com/tensorflow/model-optimization/issues/377#issuecomment-820948555 What I tried doing was: It is still giving me the

How do I make sure GridSearchCV first does the cross split and then the imputing?

I have a GridSearchCV, with a pipeline that looks something like this: my GridSearchCV looks like this: with Cross Validation = 5 So, how do I ensure that I split the data first, and then impute in the most frequent? Answer GridSearchCV will run roughly like this: You can be sure that SimpleImputer and StandardScaler will do .fit() and .transform()

SHAP Linear model waterfall with KernelExplainer and LinearExplainer

I am working on binary classification and trying to explain my model using SHAP framework. I am using logistic regression algorithm. I would like to explain this model using both KernelExplainer and LinearExplainer. So, I tried the below code from SO here This threw an error as shown below AssertionError: Unknown type passed as data object: <class ‘shap.maskers._tabular.Independent’> How can

Advertisement