Created
March 21, 2024 14:54
-
-
Save adam2392/97087a0a1650786dc26ed683d610c523 to your computer and use it in GitHub Desktop.
Memory benchmark
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from sklearn.ensemble import RandomForestClassifier | |
| from sklearn.datasets import make_classification | |
| n_samples = 10_000 | |
| n_features = 200 | |
| n_estimators = 200 | |
| # Generate synthetic classification dataset | |
| X, y = make_classification(n_samples=n_samples, n_features=n_features, n_classes=2, random_state=42) | |
| # Initialize RandomForestClassifier | |
| clf = RandomForestClassifier(n_estimators=n_estimators, random_state=42) | |
| # Fit the classifier on the training data | |
| clf.fit(X, y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment