摘要: 使用cmake编译c++源代码 构建项目的背景: 现在的主流都是编写一个cmakelist.txt,通过cmake去构建一个makefile,再make这个makefile生成可执行文件或者动态库静态库。 法1: 1. 新建一个CMakeLists.txt文件,文件中需要包含项目名project(n 阅读全文
posted @ 2022-11-21 16:33 养生boy 阅读(424) 评论(0) 推荐(0) 编辑
摘要: TF-ITF TF-ITF = TF(x) * IDF(x) 或者 文档与文章就是一回事。 举例子: corpus = [ 'this is the first document', 'this is the second second document', 'and the third one', 阅读全文
posted @ 2022-10-27 09:48 养生boy 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 中文文本分类【参考https://github.com/lijqhs/text-classification-cn】 文本分类(Text Classification)是自然语言处理中的一个重要应用技术,根据文档的内容或主题,自动识别文档所属的预先定义的类别标签。文本分类是很多应用场景的基础,比如垃 阅读全文
posted @ 2022-10-18 15:04 养生boy 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 机器学习中聚类模型 1 K-means 参考链接:建模算法系列二十六:K-means聚类(附源码) - 知乎 (zhihu.com) 1.1 K-means聚类方法的步骤代码【整体】 clc;clear;close all; data(:,1)=[90,35,52,83,64,24,49,92,99 阅读全文
posted @ 2022-09-12 16:33 养生boy 阅读(222) 评论(0) 推荐(0) 编辑
摘要: 对于一个dataframe,需要求每个数据样条中,彼此之间的距离差为多少。即计算两两之差,形成距离矩阵随机生成一个4*4的dataframe import numpy as np import pandas as pd a = np.random.randint(10, 100, size=16). 阅读全文
posted @ 2022-07-03 17:35 养生boy 阅读(631) 评论(0) 推荐(0) 编辑
摘要: 1.辛普森悖论的数学内核 $\left\{ba>fedc>hg \nRightarrow \frac{b+d}{a+c}>\frac{f+h}{e+g}\right. 阅读全文
posted @ 2022-07-02 17:15 养生boy 阅读(427) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示