書名: Machine Learning with Swift作者名: Alexander Sosnovshchenko本章字數: 55字更新時間: 2021-06-24 18:55:00
Training the random forest
Training the random forest model is not very different from training the decision tree:
In []: from sklearn.ensemble import RandomForestClassifier rf_model = RandomForestClassifier(criterion = 'entropy', random_state=42) rf_model = rf_model.fit(X_train, y_train) print(rf_model) Out[]: RandomForestClassifier(bootstrap=True, class_weight=None, criterion='entropy', max_depth=None, max_features='auto', max_leaf_nodes=None, min_impurity_split=1e-07, min_samples_leaf=1, min_samples_split=2, min_weight_fraction_leaf=0.0, n_estimators=10, n_jobs=1, oob_score=False, random_state=42, verbose=0, warm_start=False)
推薦閱讀
- 24小時學會電腦組裝與維護
- 網絡服務器配置與管理(第3版)
- SDL Game Development
- 嵌入式系統設計教程
- AMD FPGA設計優化寶典:面向Vivado/SystemVerilog
- 筆記本電腦維修不是事兒(第2版)
- Intel Edison智能硬件開發指南:基于Yocto Project
- Neural Network Programming with Java(Second Edition)
- Mastering Machine Learning on AWS
- Arduino項目開發:智能生活
- 單片機項目設計教程
- 電腦主板維修技術
- Unreal Engine 4 AI Programming Essentials
- 電腦組裝與硬件維修入門與提高
- 多媒體技術教程