机器学习
文章平均质量分 97
XerCis
毕业于985,擅长Python编程,可付费在咨询和定制需求
展开
-
sklearn精度precision_score
官方文档https://scikit-learn.org/stable/modules/generated/sklearn.metrics.precision_score.html函数原型sklearn.metrics.precision_score(y_true, y_pred, labels=None, pos_label=1, average=’binary’, sample_weig...原创 2019-04-14 15:40:43 · 17104 阅读 · 3 评论 -
sklearn分类任务性能度量——以MNIST为例的精度、查准率、查全率、F1、ROC、AUC
精度、查准率、查全率、F1、ROC、AUC原创 2019-04-15 01:32:38 · 3325 阅读 · 2 评论 -
CatBoost快速入门
简介、安装、初试、可视化、绘出决策树、最优模型、调用GPU等原创 2020-02-27 18:05:14 · 3450 阅读 · 1 评论 -
MNIST & CatBoost保存模型并预测
快速构建Catboost模型并进行预测原创 2020-02-20 20:27:30 · 4835 阅读 · 0 评论 -
XGBoost、LightGBM、Catboost对比
结论:比赛选LightGBM,工业选Catboost原创 2020-02-19 23:56:33 · 5319 阅读 · 1 评论 -
xgboost.libpath.XGBoostLibraryNotFound: Cannot find XGBoost Library in the candidate path, did you i
从Unofficial Windows Binaries for Python Extension Packages下载原创 2020-02-17 10:43:06 · 3827 阅读 · 0 评论 -
推荐系统评价指标及代码实现
评价指标有用户满意度、预测准确度、覆盖率、多样性、新颖性、惊喜度、信任度原创 2020-02-11 10:42:44 · 6149 阅读 · 3 评论 -
sklearn.preprocessing数据预处理分析(正则化标准化归一化)
sklearn.preprocessing模块——Standardization、MinMaxScaler、MaxAbsScaler、RobustScaler、QuantileTransformer、PowerTransformer、Normalization、normalize、OrdinalEncoder、OneHotEncoder、Discretization、KBinsDiscretizer、Binarizer、PolynomialFeatures原创 2019-11-04 17:39:16 · 3443 阅读 · 1 评论 -
imgaug数据增强神器:第一章 加载和增强图像
官网:https://imgaug.readthedocs.io/en/latest/教程:https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/A01 - Load and Augment an Image.ipynb文章目录一、加载和增强图像预期的输入数据非uint8数据图像加载功能二、加载和...原创 2019-03-28 11:38:11 · 5444 阅读 · 1 评论 -
imgaug数据增强神器:第二章 随机模式和确定模式
官网:https://imgaug.readthedocs.io/en/latest/教程:https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/A02 - Stochastic and Deterministic Augmentation.ipynb文章目录一、随机模式和确定模式二、可视化随机和...原创 2019-03-28 12:49:51 · 3046 阅读 · 0 评论 -
图像相似度匹配——距离大全
介绍各种距离,包括欧氏距离、曼哈顿距离、余弦距离、皮尔逊相关系数等,最后使用scipy.spatial.distance库或利用Keras预训练模型进行图像相似度匹配原创 2019-04-21 15:02:58 · 20342 阅读 · 7 评论 -
imgaug数据增强神器:第零章 安装
官网:https://imgaug.readthedocs.io/en/latest/教程:https://github.com/aleju/imgaug-doc/tree/master/notebooks备注:本文为译文imgaug是一个用于机器学习实验中图像增强的库。 它支持多种增强技术,允许轻松组合这些并以随机顺序或多个CPU内核执行它们,具有简单而强大的随机接口,不仅可以增强图像,还...原创 2019-03-28 10:24:46 · 488 阅读 · 0 评论 -
imgaug数据增强神器:增强器一览
官网:https://imgaug.readthedocs.io/en/latest/文章目录一、Sequential 顺序增强器二、SomeOf 子项增强器三、OneOf 其一增强器四、Sometimes 部分增强器五、WithColorspace 附带颜色空间增强器六、WithChannels 通道增强器七、Noop 无操作增强器八、Lambda Lambda增强器九、AssertLamb...原创 2019-04-01 12:59:19 · 10761 阅读 · 5 评论 -
YOLOv3只检测人
修改配置文件是最快的方法原创 2019-04-04 15:11:23 · 14968 阅读 · 24 评论 -
imgaug数据增强神器:第十一章 复制随机状态和使用多个增强序列
官网:https://imgaug.readthedocs.io/en/latest/教程:https://github.com/aleju/imgaug-doc/tree/master/notebooks暂时没空写,日后更文章目录暂时没空写,日后更1 复制随机状态和使用多个增强序列1.1 加载基础数据1.2 示例问题1.3 手动修改参数值1.4 使用copy_random_state()...原创 2019-03-29 19:37:18 · 1501 阅读 · 3 评论 -
imgaug数据增强神器:第十章 使用imgaug更多的控制流程
官网:https://imgaug.readthedocs.io/en/latest/教程:https://github.com/aleju/imgaug-doc/tree/master/notebooks暂时没空写,日后更文章目录暂时没空写,日后更1 使用imgaug更多的控制流程1.1 单一功能1.2 时间测量1.3 单一功能,不同输入类型1 使用imgaug更多的控制流程1.1 ...原创 2019-03-29 19:32:15 · 1001 阅读 · 0 评论 -
imgaug数据增强神器:第九章 使用概率分布作为参数
官网:https://imgaug.readthedocs.io/en/latest/教程:https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/08 - Using Probability Distributions as Parameters.ipynb暂时没空写,日后更文章目录暂时没空写,...原创 2019-03-29 19:24:24 · 451 阅读 · 0 评论 -
imgaug数据增强神器:第三章 调用多核CPU
官网:https://imgaug.readthedocs.io/en/latest/教程:https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/A03 - Multicore Augmentation.ipynb文章目录一、在多个CPU核心上进行增强一、在多个CPU核心上进行增强...原创 2019-03-28 16:08:51 · 2410 阅读 · 0 评论 -
imgaug数据增强神器:第四章 增强关键点/界标
官网:https://imgaug.readthedocs.io/en/latest/教程:https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/B01 - Augment Keypoints.ipynb文章目录一、增强关键点/界标二、基本例子三、使用augment_batches()四、将关键点...原创 2019-03-28 17:52:22 · 3733 阅读 · 2 评论 -
深度学习模型最后一层激活和损失函数
参考:《Python深度学习》类型最后一层激活损失函数二分类sigmoidbinary_crossentropy多分类单标签softmaxcategorical_crossentropy多分类多标签sigmoidbinary_crossentropy回归到任意值无mse回归到0-1sigmoidmse 或 binary_cross...原创 2019-04-16 10:39:52 · 3723 阅读 · 0 评论 -
TensorFlow实现MNIST逻辑回归 + TensorBoard可视化
一、代码# coding=utf-8import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_data#数据集mnist = input_data.read_data_sets("MNIST_DATA/", one_hot=True)learning_rate = 0.05batch_s...原创 2019-02-20 12:23:29 · 629 阅读 · 0 评论 -
超分辨率模型性能度量PSNR和SSIM及其计算方法
超分辨率模型性能度量PSNR和SSIM及其计算方法一、PSNR(峰值信噪比)简介公式代码二、SSIM(结构相似度)简介公式代码参考文献一、PSNR(峰值信噪比)简介PSNR(dB):峰值信噪比(Peak Signal-to-Noise Ratio),用于测量有损变换的重建质量 (只关心像素值差异,不能代表感官质量),越大越好。>40,非常接近原始图像30-40,质量好,失真可接受...原创 2019-10-10 01:38:48 · 8292 阅读 · 0 评论 -
Win10+GTX1080+tensorflow-gpu安装
GTX1080,没有TiCUDA 10.0:https://developer.nvidia.com/cuda-10.0-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocalcuDNN:https://developer.nvidia.co...原创 2019-09-24 17:44:34 · 768 阅读 · 0 评论 -
Python进行图片t-SNE降维可视化
使用sklearn中manifold模块中的TSNE原创 2019-05-28 21:45:05 · 7595 阅读 · 9 评论 -
Keras与OpenCV读取图片一一对应
使用from keras.preprocessing import image读取图片载入的是PIL,而cv2载入的图片通道为BGR,需要对其一一对应,进而使用模型对cv2读取的视频/图片进行预测一、读取图片import cv2import PILimport numpy as npimport keras.preprocessingfrom matplotlib import pyp...原创 2019-05-15 16:29:58 · 2268 阅读 · 0 评论 -
Python按比例移动图片到指定文件夹
参考:python随机选取10000张图片并复制到另一个文件夹中 - Suii_v5的博客 - CSDN博客 https://blog.csdn.net/Suii_v5/article/details/72730792IPythonimport osimport randomimport shutilfileDir = './train/boardcast/'tarDir = '...原创 2019-05-15 13:30:42 · 1324 阅读 · 0 评论 -
Keras预训练模型综合对比
一、说明参考文献:应用 Applications - Keras 中文文档 https://keras.io/zh/applications/数据集:https://www.kaggle.com/c/dogs-vs-cats/data 80%用于训练(10000张),20%用于验证(2500张)优化器为SGD,学习率0.0001,动量0.9无数据增强迭代次数30批量大小16输入图...原创 2019-12-17 09:09:41 · 2179 阅读 · 6 评论 -
imgaug数据增强神器:第八章 增强分割图
官网:https://imgaug.readthedocs.io/en/latest/教程:https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/B03 - Polygons.ipynb暂时没空写,日后更文章目录暂时没空写,日后更1 增强分割图1.1 从给定点创建的多边形创建示例分割图1.2 增...原创 2019-03-29 19:16:06 · 1988 阅读 · 4 评论 -
imgaug数据增强神器:第七章 增强热图
官网:https://imgaug.readthedocs.io/en/latest/教程:https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/B03 - Polygons.ipynb暂时没空写,日后更文章目录暂时没空写,日后更1 增强热图1.1 加载示例数据1.2 增强示例热图1.3 增强分...原创 2019-03-29 19:02:24 · 553 阅读 · 0 评论 -
imgaug数据增强神器:第六章 增强多边形
官网:https://imgaug.readthedocs.io/en/latest/教程:https://nbviewer.jupyter.org/github/aleju/imgaug-doc/blob/master/notebooks/B03 - Polygons.ipynb暂时没空写,日后更文章目录暂时没空写,日后更1 增强多边形1.1 在图像上绘制多边形1.2 增强示例图像和多边...原创 2019-03-29 18:44:49 · 863 阅读 · 1 评论 -
Pandas.DataFrame相关系数分析(以波士顿房价数据集为例)
一、代码""" CRIM 城镇人均犯罪率 ZN 占地面积超过2.5万平方英尺的住宅用地比例 INDUS 城镇非零售业务地区的比例 CHAS 查尔斯河虚拟变量 (= 1 如果土地在河边;否则是0) NOX 一氧化氮浓度(每千万) RM 平均每居民房数 AGE 在1940年之前建成的所有者占用单位的比例 DIS ...原创 2019-03-07 02:33:00 · 6356 阅读 · 0 评论 -
TensorFlow实现MNIST多层感知机(MLP)
一、代码# coding=utf-8import tensorflow as tfimport tensorflow.contrib.layers as layersfrom tensorflow.examples.tutorials.mnist import input_data# 数据集mnist = input_data.read_data_sets("/tmp/data/",...原创 2019-03-06 13:20:56 · 1404 阅读 · 0 评论 -
TensorFlow实现MNIST反向传播
一、代码# coding=utf-8import tensorflow as tffrom tensorflow.examples.tutorials.mnist import input_datadef sigmaprime(x): """ 用Sigmoid函数的导数更新权重 :param x: :return: 更新后的权重 """ ...原创 2019-03-06 12:45:27 · 874 阅读 · 1 评论 -
TensorFlow实现波士顿房价多元线性回归
一、代码# coding=utf-8""" CRIM 城镇人均犯罪率 ZN 占地25000平方英尺以上的住宅用地比例 INDUS 每个城镇的非零售商业用地比例 CHAS 查尔斯河(Charles River)变量(若土地位于河流边界,则为 1;否则为 0) NOX 一氧化氮浓度(每千万) RM 每个寓所的平均房间数量 AGE...原创 2019-03-01 22:30:31 · 1856 阅读 · 0 评论 -
TensorFlow实现波士顿房价简单线性回归
一、代码``归一化:把数据变成(0,1)之间的数。程序中用的是Z-Score归一化,符合正态分布原创 2019-03-01 17:57:40 · 2839 阅读 · 0 评论 -
TFLearn实现ConvNet对CIFAR-10分类
一、数据集下载CIFAR-10数据集,解压放在.py同一目录,如\cifar-10-batches-py\cifar-10-batches-py或下载该资源解压即可:二、代码# coding=utf-8from __future__ import division, print_function, absolute_importimport tflearnfrom tflearn....原创 2019-02-20 14:10:00 · 693 阅读 · 3 评论 -
《TensorFlow机器学习项目实战》人工数据集的最近邻聚类(K-nn)
import tensorflow as tfimport numpy as npimport timeimport matplotlibimport matplotlib.pyplot as pltfrom sklearn.datasets.samples_generator import make_circlesN=210K=2# Maximum number of it...原创 2019-02-15 21:00:39 · 415 阅读 · 0 评论 -
《TensorFlow机器学习项目实战》人工数据集的k均值聚类
import tensorflow as tfimport numpy as npimport timeimport matplotlib.pyplot as pltfrom sklearn.datasets.samples_generator import make_blobsfrom sklearn.datasets.samples_generator import make_c...原创 2019-02-15 19:02:58 · 539 阅读 · 0 评论 -
《TensorFlow机器学习项目实战》加载和处理图像
工信出版社的书真是不敢恭维。。。一页一个错blue_jay.jpg完善代码:import tensorflow as tfsess = tf.Session()filename_queue = tf.train.string_input_producer(tf.train.match_filenames_once("blue_jay.jpg"))reader = tf.WholeF...原创 2019-02-15 17:57:14 · 358 阅读 · 0 评论 -
《TensorFlow机器学习项目实战》 OutOfRangeError : FIFOQueue '_0_input_producer'
在阅读《TensorFlow机器学习项目实战》第1章 探索和转换数据,1.5 从磁盘读取信息,1.5.1 列表格式——CSV时,读取CSV文件示例代码运行报错OutOfRangeError (see above for traceback): FIFOQueue '_0_input_producer' is closed and has insufficient elements解决办法:...原创 2019-02-15 17:12:24 · 1101 阅读 · 0 评论