Xgboost参数scale_pos_weight用于成本敏感型学习

时间:2020-07-09 10:16:29

标签: python machine-learning classification xgboost

在非常不平衡的情况下,我正在使用XGboost在Python中进行分类。我知道,根据文档,我可以设置.word { font-size: 0; /* to remove the uneeded white spaces between the letters */ overflow: hidden; } span { display: inline-block; font-size: 3rem; transform: translateX(-400px); transition: all; } span:nth-child(1) { transition-duration: .5s } span:nth-child(2) { transition-duration: .7s } span:nth-child(3) { transition-duration: .9s } span:nth-child(4) { transition-duration: 1.1s } span:nth-child(5) { transition-duration: 1.3s } .word.start span { transform: translateX(0); }来处理不平衡,使用以下公式作为经验法则:<div class="word"> <span>H</span> <span>E</span> <span>L</span> <span>L</span> <span>O</span> </div> <button onClick="toggleAnimation()">Toggle animation</button>

我想知道是否存在处理成本敏感型学习的规则。例如,我知道积极案例的错误分类会产生很大的影响(比如说100美元),而对否定阶级却有错误(例如10美元)。

在这种情况下如何正确设置highchartsLeaderBoard = Highcharts; chartOptionsLeaderBoard={ chart: { reflow:false, type: 'bar', marginLeft: 80, width: 500, borderWidth:0, backgroundColor:'transparent', }, plotOptions: { bar: { borderWidth:0, }, }, title: { text: 'LeaderBoard', }, credits:{ enabled:false }, yAxis: { visible:false, title: { text: '' } }, xAxis: { type: 'category', min: 0, labels: { animate: true, duration:5000 } }, legend: { enabled: false }, series: [{ zoneAxis: 'x', zones: [{ value: 1, color: '#ff4d40' }], dataLabels: { enabled: true, format: '{y:,.0f}', borderWidth:0, color:'white', style:{ textOutline:0 } }, dataSorting: { enabled: true, sortKey: 'y', animate: true, duration:5000 }, data:[], }] } this.chartOptionsLeaderBoard.series[0].data.push(array)

0 个答案:

没有答案