从数据帧Z复制的列成为虚拟变量,试图预测0/1变量Click。训练和测试的大小平衡。我哪里出错了?
// Main thread code
const log = document.getElementById( "log" );
const url = generateWorkerURL();
const worker = new Worker( url );
worker.onmessage = ({data}) => {
const [ PI, iterations ] = data;
log.textContent = `π = ${ PI }
after ${ iterations } iterations.`
};
function generateWorkerURL() {
const script = document.querySelector( "[type='worker-script']" );
const blob = new Blob( [ script.textContent ], { type: "text/javascript" } );
return URL.createObjectURL( blob );
}
答案 0 :(得分:0)
以下是我的建议:
train_test_split
函数中缺少stratify
自变量。这样可以确保目标分布在火车/ VAL /测试数据中相似。RandomForestClassifier
。