摘要: # 计算先验概率 P(Y) def prior_prob(list_Y): probs = {} for c in set(list_Y): probs[c] = Y.count(c)/len(list_Y) return probs # 计算条件概率 P(X_i = v | Y=c) 使用拉普拉斯 阅读全文
posted @ 2025-09-17 22:16 徐徐丶 阅读(18) 评论(0) 推荐(0)
摘要: 1、下面代码中,random_state作为随机种子作用是什么? train_x, valid_x, train_y, valid_y = model_selection.train_test_split(trainDF['text'], trainDF['label'], test_size=0. 阅读全文
posted @ 2025-09-17 18:15 徐徐丶 阅读(12) 评论(0) 推荐(0)
摘要: from sklearn import model_selection, preprocessing, naive_bayes, metrics from sklearn.feature_extraction.text import TfidfVectorizer from scipy.sparse 阅读全文
posted @ 2025-09-14 21:14 徐徐丶 阅读(17) 评论(0) 推荐(0)
摘要: Terminal npm create vue@latest npm install tailwindcss@latest @tailwindcss/vite@latest daisyui@latest vite.config.js import { defineConfig } from 'vit 阅读全文
posted @ 2025-09-11 16:02 徐徐丶 阅读(14) 评论(0) 推荐(0)
摘要: 1、拉取镜像 docker pull rabbitmq:4.0 # 或者有本地镜像:docker load -i rabbitmq.tar 2、创建docker容器 docker run -d \ --name rabbitmq \ --hostname rabbitmq \ -v mq-plugi 阅读全文
posted @ 2025-02-25 13:39 徐徐丶 阅读(83) 评论(0) 推荐(0)
摘要: 问题描述: fatal: unable to access 'https://github.com/xxxxx/xxxx.git/': Failed to connect to github.com port 443 after 21117 ms: Cou ld not connect to ser 阅读全文
posted @ 2025-02-21 22:19 徐徐丶 阅读(36) 评论(0) 推荐(0)
摘要: 1、docker docker pull redis:latest 2、编辑配置文件 文件~/redis/conf/redis.conf # 监听的地址 bind 0.0.0.0 protected-mode yes port 6379 # 守护进程,docker中不需要 # daemonize y 阅读全文
posted @ 2025-02-19 21:16 徐徐丶 阅读(24) 评论(0) 推荐(0)
摘要: package com.tkshop.tkuserservice; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; import java.io.IOExc 阅读全文
posted @ 2025-02-11 17:59 徐徐丶 阅读(122) 评论(0) 推荐(0)
摘要: 1、导入依赖 <!--knife4j--> <dependency> <groupId>com.github.xiaoymin</groupId> <artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId> <versi 阅读全文
posted @ 2025-02-06 16:57 徐徐丶 阅读(75) 评论(0) 推荐(0)
摘要: maven作用域问题 https://baijiahao.baidu.com/s?id=1779538500449503029&wfr=spider&for=pc common模块 1、hutool工具包:hutool-all 2、mybatis-plus api模块 1、common 2、open 阅读全文
posted @ 2025-01-26 17:24 徐徐丶 阅读(9) 评论(0) 推荐(0)