Memuat
Memuat
Random Forest Classification for Chemistry and Materials
0 views
Classify composite grade from fibre fraction and molding temperature with Random Forest and assess feature importance and 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 composite grade from fibre fraction and molding temperature with Random Forest and assess feature importance and accuracy.
| Role | Variable | Unit |
|---|---|---|
| Main | composite grade | - |
| Supporting 1 | fibre fraction | % |
| Supporting 2 | molding temperature | °C |
The random forest model classifies composite grade (low/high) from fibre fraction and molding temperature with test accuracy 0.844, F1 0.835 and AUC 0.910.
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
fibre_fraction = rng.normal(0, 1, n)
molding_temperature = rng.normal(0, 1, n)
x3 = rng.normal(0, 1, n)
composite_grade = ((fibre_fraction ** 2 + molding_temperature + 0.3 * rng.normal(size=n)) > 0.8).astype(int)
X = np.column_stack([fibre_fraction, molding_temperature, x3])
X_tr, X_te, y_tr, y_te = train_test_split(X, composite_grade, test_size=0.25, stratify=composite_grade, 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$31
excl. 11% VAT
Duration: 7 working days
Output: Python files + result figures
Deliverables
Package 2 · most chosen
US$91
excl. 11% VAT
Duration: 13 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$197
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 Chemistry and Materials. 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$31, Package 2 (your data analysis and interpretation) US$91 and Package 3 (full guidance) US$197, 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