Skip to content

Conversation

@tim-githaiga
Copy link

No description provided.

</div>
<br>
<p>©2021 VAIBHAV BICHAVE</p>
<p>©2024 TIM</p>
Copy link
Owner

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]
Copy link
Owner

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

Comment on lines +25 to +26
features = obj.getFeaturesList()
x = np.array(features).reshape(1, -1) # Adjust reshape if needed
Copy link
Owner

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
Copy link
Owner

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 ?

Comment on lines +39 to +40
csv_file = 'phishing.csv'
df = load_data(csv_file)
Copy link
Owner

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)
Copy link
Owner

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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants