Views
No views yet
| Model | Hamming Loss | Micro-F1 | Macro-F1 |
|---|---|---|---|
| SVM | 0.15 | 0.78 | 0.72 |
| Logistic Regression | 0.17 | 0.75 | 0.69 |
| Perceptron | 0.20 | 0.70 | 0.64 |
| DNN | 0.13 | 0.82 | 0.76 |
1import pickle
2import numpy as np
3
4# Load model and scaler
5with open('defect_svm_model.pkl', 'rb') as f:
6 model = pickle.load(f)
7with open('defect_scaler.pkl', 'rb') as f:
8 scaler = pickle.load(f)
9
10# Prepare features
11features = np.array([...]) # Your feature vector
12features_scaled = scaler.transform(features.reshape(1, -1))
13
14# Predict
15predictions = model.predict(features_scaled)
16probabilities = model.predict_proba(features_scaled)