数据分析实战 | 逻辑回归——病例自动诊断分析
目录
一、数据及分析对象
二、目的及分析任务
三、方法及工具
四、数据读入
五、数据理解
六、数据准备
七、模型训练
八、模型评价
九、模型调参
十、模型预测
一、数据及分析对象
CSV文件——“bc_data.csv”
数据集链接:https://download.csdn.net/download/m0_70452407/88524905
该数据集主要记录了569个病例的32个属性,主要属性/字段如下:
(1)ID:病例的ID。
(2)Diagnosis(诊断结果):M为恶性,B为良性。该数据集共包含357个良性病例和212个恶性病例。
(3)细胞核的10个特征值,包括radius(半径)、texture(纹理)、perimeter(周长)、面积(area)、平滑度(smoothness)、紧凑度(compactness)、凹面(concavity)、凹点(concave points)、对称性(symmetry)和分形维数(fractal dimension)等。同时,为上述10个特征值分别提供了3种统计量,分别为均值(mean)、标准差(standard error)和最大值(worst or largest)。
二、目的及分析任务
理解机器学习方法在数据分析中的应用——采用逻辑回归方法进行分类分析。
(1)数据读入。
(2)划分训练集和数据集,利用逻辑回归算法进行模型训练,分类分析。
(3)进行模型评价,调整模型参数。
(4)将调参后的模型进行模型预测,得出的结果与测试集结果进行对比分析,验证逻辑回归算法建模的有效性。
三、方法及工具
Python语言及scikit-learn包。
四、数据读入
导入所需的工具包:
import pandas as pd
import numpy as np
from sklearn.linear_model import LogisticRegression
from sklearn import metrics
导入scikit-learn自带的数据集——威斯康星州乳腺癌数据集,这里采用的实现方式为调用sklearn.datasets中的load_breast_cancer()方法。
#数据读入
from sklearn.datasets import load_breast_cancer
breast_cancer=load_breast_cancer()
导入的威斯康星州乳腺癌数据集是字典数据,显示其字典的键为:
#显示数据集字典的键
print(breast_cancer.keys())
dict_keys(['data', 'target', 'frame', 'target_names', 'DESCR', 'feature_names', 'filename', 'data_module'])
输出结果中,'target'为分类目标,'DESCR'为数据集的完整性描述,'feature_names'为特征名称。
显示数据集的完整描述:
print(breast_cancer.DESCR)
.. _breast_cancer_dataset:Breast cancer wisconsin (diagnostic) dataset --------------------------------------------**Data Set Characteristics:**:Number of Instances: 569:Number of Attributes: 30 numeric, predictive attributes and the class:Attribute Information:- radius (mean of distances from center to points on the perimeter)- texture (standard deviation of gray-scale values)- perimeter- area- smoothness (local variation in radius lengths)- compactness (perimeter^2 / area - 1.0)- concavity (severity of concave portions of the contour)- concave points (number of concave portions of the contour)- symmetry- fractal dimension ("coastline approximation" - 1)The mean, standard error, and "worst" or largest (mean of the threeworst/largest values) of these features were computed for each image,resulting in 30 features. For instance, field 0 is Mean Radius, field10 is Radius SE, field 20 is Worst Radius.- class:- WDBC-Malignant- WDBC-Benign:Summary Statistics:===================================== ====== ======Min Max===================================== ====== ======radius (mean): 6.981 28.11texture (mean): 9.71 39.28perimeter (mean): 43.79 188.5area (mean): 143.5 2501.0smoothness (mean): 0.053 0.163compactness (mean): 0.019 0.345concavity (mean): 0.0 0.427concave points (mean): 0.0 0.201symmetry (mean): 0.106 0.304fractal dimension (mean): 0.05 0.097radius (standard error): 0.112 2.873texture (standard error): 0.36 4.885perimeter (standard error): 0.757 21.98area (standard error): 6.802 542.2smoothness (standard error): 0.002 0.031compactness (standard error): 0.002 0.135concavity (standard error): 0.0 0.396concave points (standard error): 0.0 0.053symmetry (standard error): 0.008 0.079fractal dimension (standard error): 0.001 0.03radius (worst): 7.93 36.04texture (worst): 12.02 49.54perimeter (worst): 50.41 251.2area (worst): 185.2 4254.0smoothness (worst): 0.071 0.223compactness (worst): 0.027 1.058concavity (worst): 0.0 1.252concave points (worst): 0.0 0.291symmetry (worst): 0.156 0.664fractal dimension (worst): 0.055 0.208===================================== ====== ======:Missing Attribute Values: None:Class Distribution: 212 - Malignant, 357 - Benign:Creator: Dr. William H. Wolberg, W. Nick Street, Olvi L. Mangasarian:Donor: Nick Street:Date: November, 1995This is a copy of UCI ML Breast Cancer Wisconsin (Diagnostic) datasets. https://goo.gl/U2Uwz2Features are computed from a digitized image of a fine needle aspirate (FNA) of a breast mass. They describe characteristics of the cell nuclei present in the image.Separating plane described above was obtained using Multisurface Method-Tree (MSM-T) [K. P. Bennett, "Decision Tree Construction Via Linear Programming." Proceedings of the 4th Midwest Artificial Intelligence and Cognitive Science Society, pp. 97-101, 1992], a classification method which uses linear programming to construct a decision tree. Relevant features were selected using an exhaustive search in the space of 1-4 features and 1-3 separating planes.The actual linear program used to obtain the separating plane in the 3-dimensional space is that described in: [K. P. Bennett and O. L. Mangasarian: "Robust Linear Programming Discrimination of Two Linearly Inseparable Sets", Optimization Methods and Software 1, 1992, 23-34].This database is also available through the UW CS ftp server:ftp ftp.cs.wisc.edu cd math-prog/cpo-dataset/machine-learn/WDBC/.. topic:: References- W.N. Street, W.H. Wolberg and O.L. Mangasarian. Nuclear feature extraction for breast tumor diagnosis. IS&T/SPIE 1993 International Symposium on Electronic Imaging: Science and Technology, volume 1905, pages 861-870,San Jose, CA, 1993.- O.L. Mangasarian, W.N. Street and W.H. Wolberg. Breast cancer diagnosis and prognosis via linear programming. Operations Research, 43(4), pages 570-577, July-August 1995.- W.H. Wolberg, W.N. Street, and O.L. Mangasarian. Machine learning techniquesto diagnose breast cancer from fine-needle aspirates. Cancer Letters 77 (1994) 163-171.
显示数据集的特征名称:
#数据集的特征名称
print(breast_cancer.feature_names)
['mean radius' 'mean texture' 'mean perimeter' 'mean area''mean smoothness' 'mean compactness' 'mean concavity''mean concave points' 'mean symmetry' 'mean fractal dimension''radius error' 'texture error' 'perimeter error' 'area error''smoothness error' 'compactness error' 'concavity error''concave points error' 'symmetry error' 'fractal dimension error''worst radius' 'worst texture' 'worst perimeter' 'worst area''worst smoothness' 'worst compactness' 'worst concavity''worst concave points' 'worst symmetry' 'worst fractal dimension']
显示数据形状:
#数据形状
print(breast_cancer.data.shape)
(569, 30)
调用pandas包数据框(DataFrame),将数据(data)与回归目标(target)转化为数据框类型。
#将数据(data)与回归目标(target)转换为数据框类型
X=pd.DataFrame(breast_cancer.data,columns=breast_cancer.feature_names)
y=pd.DataFrame(breast_cancer.target,columns=['class'])
将X,y数据框合并后,生成数据集df
#合并数据框
df=pd.concat([X,y],axis=1)
df
五、数据理解
查看数据基本信息:
#查看数据基本信息
df.info()
<class 'pandas.core.frame.DataFrame'> RangeIndex: 569 entries, 0 to 568 Data columns (total 31 columns):# Column Non-Null Count Dtype --- ------ -------------- ----- 0 mean radius 569 non-null float641 mean texture 569 non-null float642 mean perimeter 569 non-null float643 mean area 569 non-null float644 mean smoothness 569 non-null float645 mean compactness 569 non-null float646 mean concavity 569 non-null float647 mean concave points 569 non-null float648 mean symmetry 569 non-null float649 mean fractal dimension 569 non-null float6410 radius error 569 non-null float6411 texture error 569 non-null float6412 perimeter error 569 non-null float6413 area error 569 non-null float6414 smoothness error 569 non-null float6415 compactness error 569 non-null float6416 concavity error 569 non-null float6417 concave points error 569 non-null float6418 symmetry error 569 non-null float6419 fractal dimension error 569 non-null float6420 worst radius 569 non-null float6421 worst texture 569 non-null float6422 worst perimeter 569 non-null float6423 worst area 569 non-null float6424 worst smoothness 569 non-null float6425 worst compactness 569 non-null float6426 worst concavity 569 non-null float6427 worst concave points 569 non-null float6428 worst symmetry 569 non-null float6429 worst fractal dimension 569 non-null float6430 class 569 non-null int32 dtypes: float64(30), int32(1) memory usage: 135.7 KB
查看描述性统计信息:
#查看描述新统计信息
df.describe()
六、数据准备
利用sklearn.model_selection的train_test_split()方法划分训练集和测试集,固定random_state为42,用30%的数据测试,70%的数据训练。
#划分训练集和测试集
from sklearn.model_selection import train_test_split
X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=0.3,random_state=42)
X_test
七、模型训练
调用默认参数的LogisticRegression在训练集上进行模型训练。
#模型训练
model=LogisticRegression(C=1.0,class_weight=None,dual=False,fit_intercept=True,intercept_scaling=1,max_iter=100,multi_class='ovr',n_jobs=1,penalty='l2',random_state=None,solver='liblinear',tol=0.0001,verbose=0,warm_start=False)
model.fit(X_train,y_train)
LogisticRegression(multi_class='ovr', n_jobs=1, solver='liblinear')
该输出结果显示了模型的训练结果。选择逻辑回归模型参数的默认值进行训练。选择L2正则项,C=1.0控制正则化的强度。"fit_intercept=True,intercept_scaling=1"表示增加截距缩放,减少正则化对综合特征权重的影响。"class_weight=None"表示所有类都有权重。"solver=liblinear"时(在最优化问题时使用"liblinear"算法)。max_iter=100表示求解器收敛所采用的最大迭代次数为100。multi_class="ovr"表示每个标签都适合一个二进制问题。n_jobs表示在类上并行时使用的CPU核心数量。当warm_start设置为True时,重用前一个调用的解决方案以适应初始化,否则,只需删除前一个解决方案。
显示预测结果:
#默认参数模型预测结果y_pred
y_pred=model.predict(X_test)
y_pred
array([1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1,0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1,1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1,0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0,1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1,0, 1, 0, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0,1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1,1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1])
八、模型评价
利用混淆矩阵分类算法的指标进行模型的分类效果评价。
#混淆矩阵(分类算法的重要评估指标)
matrix=metrics.confusion_matrix(y_test,y_pred)
matrix
array([[ 59, 4],[ 2, 106]], dtype=int64)
利用准确度(Accuracy)、精度(Precision)这两项分类指标进行模型的分类效果评价。
#分类评价指标——准确度(Accuracy)
print("Accuracy:",metrics.accuracy_score(y_test,y_pred))#分类评价指标——精度(Precision)
print("Precision:",metrics.precision_score(y_test,y_pred))
Accuracy: 0.9649122807017544 Precision: 0.9636363636363636
九、模型调参
设置GridSearchCV函数的param_grid、cv参数值。为了防止过拟合现象的出现,通过参数C控制正则化程度,C值越大,正则化越弱。一般情况下,C增大(正则化程度弱),模型的准确性在训练集和测试集上都在提升(对损失函数的惩罚减弱),特征维度更多,学习能力更强,过拟合的风险也更高。L1和L2两项正则化项对目标函数的影响不同,选择的求解模型惨啊书的梯度下降法也不同。
#以C、penalty参数和值设置字典列表param_grid。
#设置cv参数值为5
param_grid={'C':[0.001,0.01,0.1,1,10,20,50,100],'penalty':["l1","l2"]}
n_folds=5
调用GridSearchCV函数,进行5折交叉验证,得出模型最优参数:
#调用GridSearchCV函数,进行5折交叉验证,对估计器LogisticRegression()的指定参数值param_grid进行详尽搜索,得到最终的最优模型参数
from sklearn.model_selection import GridSearchCV
estimator=GridSearchCV(LogisticRegression(solver='liblinear'),param_grid,cv=n_folds)
estimator.fit(X_train,y_train)
GridSearchCV(cv=5, estimator=LogisticRegression(solver='liblinear'),param_grid={'C': [0.001, 0.01, 0.1, 1, 10, 20, 50, 100],'penalty': ['l1', 'l2']})
该输出结果显示了调用GridSearchCV()方法对估计器的指定参数值进行详尽搜索。
利用best_estimator_属性,得到通过搜索选择的最高分(或最小损失的估计量):
estimator.best_estimator_
LogisticRegression(C=50, penalty='l1', solver='liblinear')
该输出结果显示了最优的模型参数为C=50,penalty="l1"
十、模型预测
调参后的模型训练:
#调参后的模型训练
model1=LogisticRegression(C=50,class_weight=None,dual=False,fit_intercept=True,intercept_scaling=1,max_iter=100,multi_class='ovr',n_jobs=1,penalty='l1',random_state=None,solver='liblinear',tol=0.0001,verbose=0,warm_start=False)
model1.fit(X_train,y_train)
LogisticRegression(C=50, multi_class='ovr', n_jobs=1, penalty='l1',solver='liblinear')
调参后的模型预测:
#调参后的模型预测
y_pred1=model1.predict(X_test)
y_pred1
array([1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1,0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1,1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1,0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0,1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1,0, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0,1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1,1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1])
调参后的模型混淆矩阵结果:
#调参后的模型混淆矩阵结果
matrix1=metrics.confusion_matrix(y_test,y_pred1)
matrix1
array([[ 62, 1],[ 3, 105]], dtype=int64)
调参后的模型准确度、精度分类指标评价结果:
#调参后的额模型准确度、精度分类指标评价结果
print("Accuracy1:",metrics.accuracy_score(y_test,y_pred1))
print("Precision1:",metrics.precision_score(y_test,y_pred1))
Accuracy1: 0.9766081871345029 Precision1: 0.9905660377358491
该输出结果显示了调参后的模型分类指标准确度(Accuracy)、精度(Precision)分类指标值。通过与之前未调参的模型分类效果进行对比,可以发现准确度(Accuracy)、精度(Precision)值提升,混淆矩阵得出的结果也更好,分类效果显著提升。
相关文章:

数据分析实战 | 逻辑回归——病例自动诊断分析
目录 一、数据及分析对象 二、目的及分析任务 三、方法及工具 四、数据读入 五、数据理解 六、数据准备 七、模型训练 八、模型评价 九、模型调参 十、模型预测 一、数据及分析对象 CSV文件——“bc_data.csv” 数据集链接:https://download.csdn.net/d…...
Eigen::Matrix<double,3,1> F;Eigen::MatrixXd F (3, 2);这两行代码有什么区别?
这两行代码的区别在于定义的矩阵 F 的类型和维度不同。 第一行: Eigen::Matrix<double,3,1> F;这行代码创建了一个3x1的矩阵 F,其中元素类型为 double。这是一个静态大小的矩阵,其维度在编译时确定。 第二行: Eigen::Ma…...
Java Agent - 应用程序代理-笔记
Java Agent - 应用程序代理-笔记 概述说明 Java Agent 又叫做 Java 探针,该功能是 Java 虚拟机提供的一整套后门,通过这套后门可以对虚拟机方方面面进行监控与分析,甚至干预虚拟机的运行。 是在 JDK1.5 引入的一种可以动态修改 Java 字节码…...

gird 卡片布局
场景一:单元格大小相等 这承载了所有 CSS Grid 中最著名的片段,也是有史以来最伟大的 CSS 技巧之一: 等宽网格响应式卡片实现 .section-content {display: grid;grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));gap: 10px; …...

C#医学检验室(LIS)信息管理系统源码
LIS:实验室信息管理系统 (Laboratory Information Management System简称:LIS)。 LIS 是面向医院检验科、检验中心、动物实验所、生物医疗研究所等科研单位研发的集数据采集、传输、存储、分析、处理、发布等功能于一体的信息管理系统。 一、完善的质控: 从样本管理…...

建行广东江门分行:科技赋能,数据助力纠“四风”
为进一步深化落实中央八项规定精神,持续加大“四风”问题查处力度,建行驻江门市分行纪检组根据《广东省分行贯彻落实中央八项规定精神持之以恒纠治“四风”实施方案》(建粤党发〔2023〕1号)安排,对驻在市分行开展“四风…...
3164:练27.1 叮叮当当 《信息学奥赛一本通编程启蒙(C++版)》
3164:练27.1 叮叮当当 《信息学奥赛一本通编程启蒙(C版)》 【题目描述】 松鼠老师和尼克玩报数游戏。松鼠老师数到2的倍数时,尼克就说“叮叮”;松鼠老师数到3的倍数时,尼克就说“当当”;松鼠老…...

立体库堆垛机放货动作控制程序功能
放货动作程序功能块 DB11.DBX0.0 为左出货台有货 DB11.DBX1.0 为右出货台有货 左出货台车就位 DB11.DBX0.2 右出货台车就位 DB11.DBX1.2 左出货台车就位 DB11.DBX0.2 右出货台车就位 DB11.DBX1.2 左出货台车就位 DB11.DBX0.2 右出货台车就位 DB11.DBX1.2...
MySQL数据库干货_22——MySQL的用户管理
MySQL的用户管理 MySQL 是一个多用户的数据库系统,按权限,用户可以分为两种: root 用户,超级管理员,和由 root 用户创建的普通用户。 用户管理 创建用户 CREATE USER username IDENTIFIED BY password;查看用户 S…...

基于ubuntu 22, jdk 8x64搭建图数据库环境 hugegraph--google镜像chatgpt
基于ubuntu 22, jdk 8x64搭建图数据库环境 hugegraph download 环境 uname -a #Linux whiltez 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64 x86_64 x86_64 GNU/Linuxwhich javac #/adoptopen-jdk8u332-b09/bin/javac which java #/adoptopen-jdk8u33…...
4. 深度学习——优化函数
机器学习面试题汇总与解析——优化函数 本章讲解知识点 什么是优化函数?为什么要使用优化函数?详细讲解优化函数优化函数总结梯度下降算法的 batch size 总结本专栏适合于Python已经入门的学生或人士,有一定的编程基础。本专栏适合于算法工程师、机器学习、图像处理求职的学…...

docker通过nginx代理tomcat-域名重定向
通过昨天的调试,今天做这个域名就简单了, 正常我们访问网站一般都是通过域名比如,www.baidu.com对吧,有人也通过ip,那么这个怎么做呢?物理机windows可以通过域名访问虚拟机linux的nginx代理转向tomcat服务…...
CSS BFC是什么,应用实例
CSS BFC(块级格式化上下文)是一个Web页面渲染时生成的一种独立的渲染区域,它定义了一套渲染规则,用于控制块级盒子的布局和浮动元素与其他元素的交互。BFC可以避免出现一些常见的布局问题,提高页面的可靠性和可维护性。…...

一分钟秒懂人工智能对齐
文章目录 1.什么是人工智能对齐2.为什么要研究人工智能对齐3.人工智能对齐的常见方法 1.什么是人工智能对齐 人工智能对齐(AI Alignment)指让人工智能的行为符合人的意图和价值观。 人工智能系统可能会出现“不对齐”(misalign)的…...

Postman常见报错与解决方法,持续更新~
postman中文文档 基本操作:从控制台查看请求报错 如果 Postman 无法发送你的请求,或者如果它没有收到你发送请求的 API 的响应,你将收到一条错误消息。此消息将包含问题概述和指向控制台的链接,你可以在其中访问有关请求的详细信…...

出电子书了!
熟悉小灰的小伙伴们都知道,小灰曾经创作了三本算法有关的图书,分别是《漫画算法》、《漫画算法Python篇》、《漫画算法2》。 如今,这三本书在全网的销量超过10W册,可以说是IT领域最畅销的图书之一。 小灰的这三本算法书࿰…...
LeetCode 260. 只出现一次的数字 III 中等
题目 - 点击直达 1. 260. 只出现一次的数字 III 中等1. 题目详情1. 原题链接2. 题目要求3. 基础框架 2. 解题思路1. 思路分析2. 时间复杂度3. 代码实现 1. 260. 只出现一次的数字 III 中等 1. 题目详情 1. 原题链接 LeetCode 260. 只出现一次的数字 III 中等 2. 题目要求 …...

数据结构之红黑树
红黑树的概念 红黑树(Red-Black Tree)同AVL树一样, 也是一种自平衡的二叉搜索树, 但在每个结点上增加一个存储位表示结点的颜色, 可以是Red或Black, 通过对任何一条从根到叶子的路径上各个结点着色方式的限制, 红黑树确保没有一条路径会比其他路径长出俩…...

【chat】4: ubuntu20.04:数据库创建:mysql8 导入5.7表
【chat】3: ubutnu 安装mysql-8 并支持远程访问 已经支持 8.0的SQLyog 远程访问:大神2021年的文章:sql是5.7的版本,我使用的ubuntu20.04,8.0版本:chat数据库设计 C++搭建集群聊天室(七):MySQL数据库配置 及项目工程目录配置 User表,以id 唯一标识 Friend 表,自己的id…...

合并二叉树(Java)
题目描述 给你两棵二叉树: root1 和 root2 。 想象一下,当你将其中一棵覆盖到另一棵之上时,两棵树上的一些节点将会重叠(而另一些不会)。你需要将这两棵树合并成一棵新二叉树。合并的规则是:如果两个节点重…...

相机Camera日志实例分析之二:相机Camx【专业模式开启直方图拍照】单帧流程日志详解
【关注我,后续持续新增专题博文,谢谢!!!】 上一篇我们讲了: 这一篇我们开始讲: 目录 一、场景操作步骤 二、日志基础关键字分级如下 三、场景日志如下: 一、场景操作步骤 操作步…...
在HarmonyOS ArkTS ArkUI-X 5.0及以上版本中,手势开发全攻略:
在 HarmonyOS 应用开发中,手势交互是连接用户与设备的核心纽带。ArkTS 框架提供了丰富的手势处理能力,既支持点击、长按、拖拽等基础单一手势的精细控制,也能通过多种绑定策略解决父子组件的手势竞争问题。本文将结合官方开发文档,…...

Day131 | 灵神 | 回溯算法 | 子集型 子集
Day131 | 灵神 | 回溯算法 | 子集型 子集 78.子集 78. 子集 - 力扣(LeetCode) 思路: 笔者写过很多次这道题了,不想写题解了,大家看灵神讲解吧 回溯算法套路①子集型回溯【基础算法精讲 14】_哔哩哔哩_bilibili 完…...

[ICLR 2022]How Much Can CLIP Benefit Vision-and-Language Tasks?
论文网址:pdf 英文是纯手打的!论文原文的summarizing and paraphrasing。可能会出现难以避免的拼写错误和语法错误,若有发现欢迎评论指正!文章偏向于笔记,谨慎食用 目录 1. 心得 2. 论文逐段精读 2.1. Abstract 2…...

高危文件识别的常用算法:原理、应用与企业场景
高危文件识别的常用算法:原理、应用与企业场景 高危文件识别旨在检测可能导致安全威胁的文件,如包含恶意代码、敏感数据或欺诈内容的文档,在企业协同办公环境中(如Teams、Google Workspace)尤为重要。结合大模型技术&…...

mysql已经安装,但是通过rpm -q 没有找mysql相关的已安装包
文章目录 现象:mysql已经安装,但是通过rpm -q 没有找mysql相关的已安装包遇到 rpm 命令找不到已经安装的 MySQL 包时,可能是因为以下几个原因:1.MySQL 不是通过 RPM 包安装的2.RPM 数据库损坏3.使用了不同的包名或路径4.使用其他包…...

AI书签管理工具开发全记录(十九):嵌入资源处理
1.前言 📝 在上一篇文章中,我们完成了书签的导入导出功能。本篇文章我们研究如何处理嵌入资源,方便后续将资源打包到一个可执行文件中。 2.embed介绍 🎯 Go 1.16 引入了革命性的 embed 包,彻底改变了静态资源管理的…...
Java 二维码
Java 二维码 **技术:**谷歌 ZXing 实现 首先添加依赖 <!-- 二维码依赖 --><dependency><groupId>com.google.zxing</groupId><artifactId>core</artifactId><version>3.5.1</version></dependency><de…...

2025季度云服务器排行榜
在全球云服务器市场,各厂商的排名和地位并非一成不变,而是由其独特的优势、战略布局和市场适应性共同决定的。以下是根据2025年市场趋势,对主要云服务器厂商在排行榜中占据重要位置的原因和优势进行深度分析: 一、全球“三巨头”…...

JVM虚拟机:内存结构、垃圾回收、性能优化
1、JVM虚拟机的简介 Java 虚拟机(Java Virtual Machine 简称:JVM)是运行所有 Java 程序的抽象计算机,是 Java 语言的运行环境,实现了 Java 程序的跨平台特性。JVM 屏蔽了与具体操作系统平台相关的信息,使得 Java 程序只需生成在 JVM 上运行的目标代码(字节码),就可以…...