Views
No views yet
| Class | Category | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|---|
| 0 | Strictly Necessary | 0.92 | 0.90 | 0.91 | 7987 |
| 1 | Functionality | 0.64 | 0.61 | 0.62 | 1663 |
| 2 | Analytics | 0.89 | 0.93 | 0.91 | 8536 |
| 3 | Advertising/Tracking | 0.92 | 0.91 | 0.92 | 10485 |
1import joblib
2import numpy as np
3
4# Load the model
5model = joblib.load('LR_TFIDF+NAME.joblib')
6
7# The model expects preprocessed TF-IDF features
8# Make predictions
9predictions = model.predict(X_test)
10
11# Get prediction probabilities (if supported)
12# Note: Linear Regression for classification may not have predict_proba
13# You may need to use decision_function instead
14scores = model.decision_function(X_test)1from huggingface_hub import hf_hub_download
2import joblib
3
4# Download the model from Hugging Face Hub
5model_path = hf_hub_download(
6 repo_id="aqibtahir/cookie-classifier-lr-tfidf",
7 filename="LR_TFIDF+NAME.joblib"
8)
9
10# Load the model
11model = joblib.load(model_path)
12
13# Use the model for predictions (with preprocessed features)
14# Note: You'll need the TF-IDF vectorizers and name feature extractor
15predictions = model.predict(your_features)