Skip to content
Advertisement

Tag: machine-learning

Error with precision_score of XGBoost classifier with RandomizedSearchCV

I’m trying to make a classifier with XGBoost, I fit it with RandomizedSearchCV. Here is the code of my function: When I run the code, I get an error, reported below: When I do the same thing but with GridSearchCV instead of RandomizedSearchCV, the code runs without any problems! Answer It’s not precision_score it’s ‘precision_score’ (with ‘ ‘), like this-

How to continue training with checkpoints using object_detector.EfficientDetLite4Spec tensorflow lite

Preciously I have set my EfficientDetLite4 model “grad_checkpoint=true” in config.yaml. And it had successfully generated some checkpoints. However, I can’t figure out how to use these checkpoints when I want to continue training based on them. Every time I train the model it just start from the beginning, not from my checkpoints. The following picture shows my colab file system

Mismatch of manual computation of a evaluation metrics with Sklearn functions

I wanted to compare the manual computations of the precision and recall with scikit-learn functions. However, recall_score() and precision_score() of scikit-learn functions gave me different results. Not sure why! Could you please give me some advice why I am getting different results? Thanks! My confusion matrix: Answer It should be (check return value’s ordering): Please refer: here

a bug for tf.keras.layers.TextVectorization when built from saved configs and weights

I have tried writing a python program to save tf.keras.layers.TextVectorization to disk and load it with the answer of How to save TextVectorization to disk in tensorflow?. The TextVectorization layer built from saved configs outputs a vector with wrong length when the arg output_sequence_length is not None and output_mode=’int’. For example, if I set output_sequence_length= 10, and output_mode=’int’, it is

Advertisement