-
Notifications
You must be signed in to change notification settings - Fork 97
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
Dependancy upgrades-update on pickle model-cython code updates-error-handling #11
base: master
Are you sure you want to change the base?
Conversation
@@ -45,7 +45,7 @@ <h3 id="prediction"></h3> | |||
</div> | |||
</div> | |||
<br> | |||
<p>©2021 VAIBHAV BICHAVE</p> | |||
<p>©2024 TIM</p> |
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.
Vaibhav Bichave
if not hasattr(gbc, 'predict'): | ||
raise ValueError("Loaded object is not a valid model.") | ||
|
||
y_pred = gbc.predict(x)[0] |
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.
Add a comment for safe and unsafe
features = obj.getFeaturesList() | ||
x = np.array(features).reshape(1, -1) # Adjust reshape if needed |
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.
x = np.array(obj.getFeaturesList()).reshape(1, -1)
@@ -0,0 +1,55 @@ | |||
# trin.py |
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.
File Name should be train.py ?
csv_file = 'phishing.csv' | ||
df = load_data(csv_file) |
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.
df = load_data('phishing.csv')
def train_model(X_train, y_train): | ||
"""Train a RandomForestClassifier model.""" | ||
model = RandomForestClassifier(n_estimators=100, random_state=42) | ||
model.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.
Can we use'Gradient Boosting Classifier' instead of 'RandomForestClassifier'
No description provided.