-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(package): Add model packages #5
base: main
Are you sure you want to change the base?
Conversation
logreg = Pipeline( | ||
[ | ||
("vect", CountVectorizer()), | ||
("tfidf", TfidfTransformer()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an idea came to my mind. Can we try using BM25 in place of TF-IDF and see if there are any improvements? This will also help us compare the two for the license domain.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya sure, I will try using BM25.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now I have modified the code as suggested and also added the package for linear support vector machine model.
Thanks:)
e4cb92c
to
718370f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, I have found few uniformity issues, You can fix them up in no time :)
Cheers!!
("clf", LinearSVC(n_jobs=1, C=1e5)), | ||
] | ||
) | ||
print("Model training is started!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print("Model training is started!") | |
print("Model training has started!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done @Kaushl2208 bhaiya
train_data = data() | ||
|
||
X_train = train_data.text | ||
y_train = train_data.short_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
y_train = train_data.short_name | |
Y_train = train_data.short_name |
or lower caps the X_train as well :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
] | ||
) | ||
print("Model training is started!") | ||
logreg_model = logreg.fit(X_train, y_train) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, The X_train and Y_train uniformity
def train(): | ||
train_data = data() | ||
|
||
X_train = train_data.text |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issue @its-sushant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
] | ||
) | ||
print("Model training is started!") | ||
logreg_model = logreg.fit(X_train, y_train) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here too :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
("clf", LogisticRegression(n_jobs=1, C=1e5)), | ||
] | ||
) | ||
print("Model training is started!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print("Model training is started!") | |
print("Model training has started!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
718370f
to
00f460f
Compare
Description
This pr is to add model training code and the python package code for logistic regression linear support vector machine model that has been created.
File Structure
How to train
For training the model run
python path/to/model_train.py
Notes
Test for the implemented model is done locally by creating the agents for logisticRegression and linearsvc on atarashi and the accuracy score that has been tested using evaluator.py is 63% for both models.
CC: @GMishx @Kaushl2208 @hastagAB @ag4ums @vasudevmaduri