Memuat
Memuat
Random Forest Classification for Fisheries and Marine Science
0 views
Classify stock status using the features catch per unit effort and mean fish length with Random Forest Classification and assess its accuracy. Random forest classification combines the votes of many trees trained on bootstrap samples and random feature subsets. It suits tabular classification needing stable accuracy with little tuning.

Classify stock status using the features catch per unit effort and mean fish length with Random Forest Classification and assess its accuracy.
| Role | Variable | Unit |
|---|---|---|
| Main | Stock status | - |
| Supporting 1 | Catch per unit effort | kg/jam |
| Supporting 2 | Mean fish length | cm |
The random forest model classifies Stock status (low/high) from Catch per unit effort and Mean fish length with test accuracy 0.881, F1 0.879 and AUC 0.906.
Computed from illustrative synthetic data, not from a real study.
Random forest classification combines the votes of many trees trained on bootstrap samples and random feature subsets. It suits tabular classification needing stable accuracy with little tuning.
Report test metrics, the confusion matrix, and the most influential features. Include the OOB score or cross-validation to make accuracy claims more convincing.
A short starting script with this project's variable names. The delivered version is adapted to your data and fully commented.
import numpy as np
import matplotlib.pyplot as plt
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score, f1_score, roc_auc_score, confusion_matrix, ConfusionMatrixDisplay
rng = np.random.default_rng(31)
n = 500
catch_per_unit_effort = rng.normal(0, 1, n)
mean_fish_length = rng.normal(0, 1, n)
x3 = rng.normal(0, 1, n)
stock_status = ((catch_per_unit_effort ** 2 + mean_fish_length + 0.3 * rng.normal(size=n)) > 0.8).astype(int)
X = np.column_stack([catch_per_unit_effort, mean_fish_length, x3])
X_tr, X_te, y_tr, y_te = train_test_split(X, stock_status, test_size=0.25, stratify=stock_status, random_state=31)
rf = RandomForestClassifier(n_estimators=300, oob_score=True, random_state=31)
rf.fit(X_tr, y_tr)
pred = rf.predict(X_te)
prob = rf.predict_proba(X_te)[:, 1]
print("OOB accuracy:", round(rf.oob_score_, 3))
print("Test accuracy:", round(accuracy_score(y_te, pred), 3))
print("F1:", round(f1_score(y_te, pred), 3), "AUC:", round(roc_auc_score(y_te, prob), 3))
print("Importance:", rf.feature_importances_.round(3))
cm = confusion_matrix(y_te, pred)
ConfusionMatrixDisplay(cm).plot()
plt.show()Choose how much help you need. Each higher package includes everything in the lower ones. Prices exclude 11% VAT.
Package 1
US$34
excl. 11% VAT
Duration: 7 working days
Output: Python files + result figures
Deliverables
Package 2 · most chosen
US$97
excl. 11% VAT
Duration: 13 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$213
excl. 11% VAT
Duration: 18-21 working days
Output: Code + analysis + guidance until ready to present
Includes all of Packages 1 & 2, plus
Yes. Random Forest Classification is commonly used at this level in Fisheries and Marine Science. We adapt the analysis to your research question, your own data and your supervisor's requirements.
No. The sheet is computed from illustrative synthetic data so you can see the kind of output Python gives. For your order we run the same method on your own data.
That is the point of the packages. Every script is commented, and Package 3 includes two coaching sessions plus practice questions so you can explain the method and the results at your seminar and defence.
Each project has three packages: Package 1 (code and explanation) US$34, Package 2 (your data analysis and interpretation) US$97 and Package 3 (full guidance) US$213, excluding 11% VAT. Larger datasets, extra methods or tight deadlines adjust the quote after a short consultation.
The result sheet uses illustrative synthetic data. Python is a trademark of the Python Software Foundation.
Back to Python portfolio