在学习回归算法的时候,使用sklearn.linear_model下的RandomizedLogisticRegression(下列简称为RLR)来做预测但是总是会遇到下面这个错误:

IndexError: boolean index did not match indexed array along dimension 0; dimension is 9 but corresponding boolean dimension is 8
之后就想看下这个get_support()函数原型,找到官方文档,截个图:

可以看到returns部分,大概意思就是Indices是False,就返回一个类型是boolean的数组,如果indices是True,就返回一个整型数组,所以解决办法就是把参数改变。默认的是False,改成r1.get_support(indices=True)就好了。

参考:https://blog.csdn.net/pcy1127918/article/details/79975152

[942]IndexError: boolean index did not match indexed array along dimension 0相关推荐

  1. IndexError:boolean index did not match indexed array along dimension 0

    转自:https://blog.csdn.net/pcy1127918/article/details/79975152 IndexError: boolean index did not match ...

  2. IndexError: boolean index did not match indexed array along dimension 0; dimension is 82 but corresp

    在训练maskrcnn时出现以上报错,通过一天的琢磨.debug.掉头发.才发现是标签数据的问题. 解决办法: 1.运行trian文件,程序一般会训练一个epoch才会停止,记录下出现问题的标签的id ...

  3. IndexError: boolean index did not match indexed array along dimension 0; dimension is 1 but correspo

    IndexError: boolean index did not match indexed array along dimension 0; dimension is 1 but correspo ...

  4. mask-rcnn报错: IndexError: boolean index did not match indexed array along dimension 0; ......

    mask-rcnn在执行train.py训练模型时,报错如下: image_id 769 ERROR:root:Error processing image {'id': 769, 'source': ...

  5. mask-rcnn报错: IndexError: boolean index did not match indexed array along dimension 0;...

    网上找了一下大部分都是说mask标注的图片问题,24位要改成8位 但是现在labelme转换出来的label.png就是8位了 还有说什么格式问题,大家都可以试试 我记录一下自己的解决方法(因为按照网 ...

  6. mask-rcnn在训练过程中,突然中断报错,提示:boolean index did not match indexed array along dimension 0;dimension is..

    一.环境: win10 + gpu 3090 + maskrcnn + tensorflow2.6.0; 二.报错信息如下: IndexError: boolean index did not mat ...

  7. IndexError: The shape of the mask [32, 8732] at index 0does not match the shape of the indexed tenso

    参考The shape of the mask [32, 8732] at index 0 - 云+社区 - 腾讯云 IndexError: The shape of the mask [32, 87 ...

  8. SSD报错:The shape of the mask [32, 8732] at index 0does not match the shape of the indexed tenso

    IndexError: The shape of the mask [32, 8732] at index 0does not match the shape of the indexed tenso ...

  9. IndexError: list index out of range的解决办法

    IndexError: list index out of range的解决办法 列表的索引也就是他的元素的个数是没有你所想要找的元素位置,比如这个列表只有十个元素你要找第11个元素这个肯定找不到 解 ...

最新文章

  1. springmvc json 406
  2. vs2010 rdlc 报表及报表控件
  3. 升腾威讯怎么恢复集群_Redis系列(四):天天用着Redis集群,主从同步该知道吧?集群工作原理是否需要了解下?...
  4. ffmpeg解析h264文件,提取图片信息
  5. 安装 Tableau Desktop 时出现“0x80070109”错误以及Tableau Desktop破解
  6. 1024为大家带来个猜数字游戏
  7. 团队任务:第二次冲刺-第三组梦之队
  8. Elasticsearch分布式引擎7.x,2021黑马详细课程笔记
  9. 计算机课搞事情检讨,考试作弊被抓写的检讨书(精选10篇)
  10. 声学感知刻度(mel scale、Bark scale、ERB)与声学特征提取(MFCC、BFCC、GFCC)
  11. 倒计时,距离活动还有0天0时0分0秒
  12. hexo+github/gitee
  13. 万丈高楼平地起,基础很重要
  14. Java10进制转16进制,16进制转10进制
  15. Shell中判断字符串是否为数字的6种方法
  16. 图像传感器c语言,『评测』DxOMark公布索尼A7C相机图像传感器评测结果
  17. 一个诡异的iOS bug
  18. 22家含有三聚氰胺婴幼儿配方奶粉名单
  19. linux命令显示进度,【命令】Linux下查看dd命令写入进度
  20. 全国计算机等级考试-数据库四级备考资料

热门文章

  1. 机器学习在抗乳腺癌候选药物预测模型中的应用
  2. matlab选修结课作业,MATLAB结课大作业.doc
  3. 机器学习 探索性数据分析
  4. 机器学习中精准度、召回率、准确率、F1 Score、G分数计算学习笔记
  5. SVM——详细讲解SMO算法优化两个变量以及变量的选择
  6. Xftp传输文件失败解决方案
  7. 计算机被限制无法打开C盘,Win7设置C盘提示“本次操作由于这台计算机限制而被取消”怎么办...
  8. java通过web3j获取ETH交易明细
  9. 【区块链】以太坊 web3j for java 配置和使用 1
  10. 矩阵的运算----(一)