Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tim-githaiga
Copy link

No description provided.

@@ -45,7 +45,7 @@ <h3 id="prediction"></h3>
</div>
</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