- Ensemble Machine Learning Cookbook
- Dipayan Sarkar Vijayalakshmi Natarajan
- 193字
- 2021-07-02 13:21:57
How it works...
In Step 1, we imported the libraries that are required to build our models. In Step 2, we created the response and feature sets. We retrieved our feature set using the iloc() function of the pandas DataFrame. In Step 3, we split our dataset into training and testing sets. In Step 4, we built our base classifiers. Kindly note that we passed probability=True to our SVC function to allow SVC() to return class probabilities. In the SVC class, the default is probability=False.
In Step 5, we fitted our model to the training data. We used the predict_proba() function in Step 6 to predict the class probabilities for our test observations.
Finally, in Step 7, we assigned different weights to each of our models to estimate the weighted average predictions. The question that comes up is how to choose the weights. One way is to sample the weights uniformly and to make sure they normalize to one and validate on the test set and repeat keeping track of weights that provide the highest accuracy. This is an example of a random search.
- Oracle SOA Governance 11g Implementation
- 協(xié)作機(jī)器人技術(shù)及應(yīng)用
- 大數(shù)據(jù)時(shí)代的數(shù)據(jù)挖掘
- Learning Apache Cassandra(Second Edition)
- 空間傳感器網(wǎng)絡(luò)復(fù)雜區(qū)域智能監(jiān)測(cè)技術(shù)
- Hands-On Linux for Architects
- 讓每張照片都成為佳作的Photoshop后期技法
- Photoshop CS3圖層、通道、蒙版深度剖析寶典
- 計(jì)算機(jī)網(wǎng)絡(luò)安全
- Storm應(yīng)用實(shí)踐:實(shí)時(shí)事務(wù)處理之策略
- Blender 3D Printing by Example
- Photoshop行業(yè)應(yīng)用基礎(chǔ)
- 網(wǎng)絡(luò)管理工具實(shí)用詳解
- 基于ARM9的小型機(jī)器人制作
- 基于人工免疫原理的檢測(cè)系統(tǒng)模型及其應(yīng)用