Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,29 @@
|
|
1 |
-
---
|
2 |
-
license: mit
|
3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
---
|
4 |
+
# Commit Classification Model
|
5 |
+
|
6 |
+
This is a Logistic Regression model for multi-label classification of commit messages.
|
7 |
+
|
8 |
+
## Files
|
9 |
+
- `logistic_model.joblib`: Trained Logistic Regression model.
|
10 |
+
- `tfidf_vectorizer.joblib`: TF-IDF vectorizer for text preprocessing.
|
11 |
+
- `label_binarizer.joblib`: MultiLabelBinarizer for encoding/decoding labels.
|
12 |
+
|
13 |
+
## How to Use
|
14 |
+
To use this model, load the files and preprocess your data as follows:
|
15 |
+
|
16 |
+
```python
|
17 |
+
from joblib import load
|
18 |
+
|
19 |
+
# Load the model and preprocessing artifacts
|
20 |
+
model = load("logistic_model.joblib")
|
21 |
+
tfidf_vectorizer = load("tfidf_vectorizer.joblib")
|
22 |
+
mlb = load("label_binarizer.joblib")
|
23 |
+
|
24 |
+
# Example usage
|
25 |
+
new_messages = ["Fix bug in login system"]
|
26 |
+
X_new_tfidf = tfidf_vectorizer.transform(new_messages)
|
27 |
+
predictions = model.predict(X_new_tfidf)
|
28 |
+
predicted_labels = mlb.inverse_transform(predictions)
|
29 |
+
print(predicted_labels)
|