dev-QQq
方佳 博 2 years ago
parent 319de1bde6
commit 31945c0680

@ -16,12 +16,12 @@
},
"dependencies": {
"@antv/g2": "^5.2.3",
"echarts-stat": "^1.2.0",
"@element-plus/icons-vue": "2.0.10",
"@vueup/vue-quill": "1.1.0",
"@vueuse/core": "9.5.0",
"axios": "0.27.2",
"echarts": "5.4.0",
"echarts-stat": "^1.2.0",
"element-plus": "2.2.27",
"file-saver": "2.0.5",
"fuse.js": "6.6.2",
@ -34,7 +34,8 @@
"pinia": "2.0.22",
"vue": "^3.2.47",
"vue-cropper": "1.0.3",
"vue-router": "4.1.4"
"vue-router": "4.1.4",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@vitejs/plugin-vue": "3.1.0",

@ -89,3 +89,11 @@ export function downloadClusterAnalysisForm(data) {
data:data,
})
}
//回归分析--逻辑回归
export function logisticRegression(data) {
return request({
url: '/api/model/logistic',
method: 'post',
data:data,
})
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 404 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 912 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 406 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

@ -199,13 +199,13 @@ aside {
text-align: center;
.el-button:nth-child(1) {
background: url("../../assets/images/确定222.png") no-repeat;
background-size: 100% 100%;
background: url("../../assets/images/确定222.png") no-repeat !important;
background-size: 100% 100% !important;
}
.el-button:nth-child(2) {
background: url("../../assets/images/取消.png") no-repeat;
background-size: 100% 100%;
background: url("../../assets/images/取消.png") no-repeat !important;
background-size: 100% 100% !important;
}
.el-button--large.is-round {
@ -222,11 +222,10 @@ aside {
}
.app-container2 {
position: relative;
padding: 20px;
background: #FFFFFF;
box-shadow: 0px 0px 13px 0px #D6E0FE;
border-radius: 10px;
margin: 10px;
box-shadow: 0px 0px 13px 0px #0452C6;
border-radius: 10px;
padding: 25px 25px 10px 25px;
}
.dialogClass{
background:url('@/assets/images/弹框.png') !important;

@ -1,9 +1,9 @@
<template>
<div class="app-container">
<div class="app-container2">
<div class="img-centent">
<div class="left" style=" width: 100%" >
<el-scrollbar height="650px" style="height:96%">
<el-scrollbar height="610px" style="height:94%">
<el-row>
<el-col :span="24">
<div class="title-back">
@ -108,9 +108,9 @@
</div>
</div>
</el-scrollbar>
<div class="dialog-footer">
<el-button type="primary" round plain size="large" @click="submitTask" >提交任务</el-button>
<el-button type="primary" round plain size="large" @click="reset"></el-button>
<div class="dialog-footer" style="margin-top:10px">
<el-button type="primary" class="tj" plain size="large" @click="submitTask" >提交任务</el-button>
<el-button type="primary" class="cxks" plain size="large" @click="reset"></el-button>
</div>
</div>
<div class="Case">
@ -365,8 +365,8 @@ dialogShowbtn()
// }
.Case {
position: absolute;
top: 150px;
right: 15px;
top: 180px;
right: 40px;
width: 216px;
padding-left: 60px;
span{

@ -1,13 +1,13 @@
<template>
<div class="app-container">
<div class="app-container2">
<div class="Naturallanguageprocessing">
<div class="left">
<el-scrollbar height="650px" style="height: 93%;">
<el-scrollbar height="620px" style="height: 93%;">
<el-row>
<el-col :span="24">
<div class="TaskBackground">
<span>任务背景</span>
<span style="color:#000000;">任务背景</span>
</div>
</el-col>
</el-row>
@ -169,8 +169,8 @@
</div>
</el-scrollbar>
<div class="dialog-footer">
<el-button @click="submit"></el-button>
<el-button type="primary" @click="restart"></el-button>
<el-button @click="submit" class="tj">提交任务</el-button>
<el-button type="primary" class="tj" @click="restart"></el-button>
</div>
</div>
<div class="right">
@ -526,8 +526,8 @@ onBeforeUnmount(()=>{
}
.right {
position: absolute;
top: 150px;
right: 15px;
top: 180px;
right: 41px;
width: 216px;
padding-left: 60px;
span {
@ -670,4 +670,7 @@ onBeforeUnmount(()=>{
.dialog-footer{
margin-top: 5px;
}
.tj{
--el-button-hover-text-color:#000000;
}
</style>

@ -1,10 +1,10 @@
<template>
<div class="app-container">
<div class="app-container2">
<div class="Robot-learning">
<div class="left">
<div class="gdialog">
<el-scrollbar height="650px" style="height: 93%;">
<el-scrollbar height="620px" style="height: 93%;">
<el-row>
<el-col :span="24">
<div class="TaskBackground">
@ -163,8 +163,8 @@
</p>
</el-scrollbar>
<div class="dialog-footer" style="margin-top: 7px;">
<el-button @click="submit"></el-button>
<el-button type="primary" @click="restart"></el-button>
<el-button class="tj" @click="submit"></el-button>
<el-button class="tj" type="primary" @click="restart"></el-button>
</div>
</div>
@ -632,8 +632,8 @@ onBeforeUnmount(() => {
}
.right {
position: absolute;
top: 150px;
right: 15px;
top: 180px;
right: 41px;
width: 216px;
padding-left: 60px;
span {
@ -875,4 +875,7 @@ onBeforeUnmount(() => {
}
}
}
.tj{
--el-button-hover-text-color:#000000;
}
</style>

@ -1,9 +1,9 @@
<template>
<div class="app-container">
<div class="app-container2">
<div class="text-centent">
<div class="left">
<el-scrollbar height="650px" style="height:96%">
<el-scrollbar height="625px" style="height:94%">
<el-row>
<el-col :span="24">
<div class="title-back">
@ -57,9 +57,9 @@
</div>
</div>
</el-scrollbar>
<div class="dialog-footer">
<el-button type="primary" round plain size="large" @click="submit"></el-button>
<el-button type="primary" round plain size="large" @click='reStart'>重新开始</el-button>
<div class="dialog-footer" style="margin-top:5px">
<el-button type="primary" class="tj" size="large" @click="submit"></el-button>
<el-button type="primary" size="large" @click='reStart'>重新开始</el-button>
</div>
</div>
<div class="right">
@ -273,8 +273,8 @@ CharacterRecognitionCase()
}
.right {
position: absolute;
right: 15px;
top: 150px;
right: 30px;
top: 180px;
width: 216px;
padding-left: 60px;
span {
@ -344,12 +344,12 @@ div {
background: url("@/assets/images/szjj/提交任务.png") no-repeat !important;
background-size: 100% 100%;
}
.el-button--primary:nth-child(2) {
width: 140px !important;
padding-left: 60px;
background: url("@/assets/images/szjj/重新开始.png") no-repeat !important;
background-size:cover;
}
// .el-button--primary:nth-child(2) {
// width: 140px !important;
// padding-left: 60px;
// background: url("@/assets/images/szjj/.png") no-repeat !important;
// background-size:cover;
// }
.Identify {
margin-top: 20px;
width: calc(100% - 20%);
@ -387,4 +387,7 @@ div {
// // margin-left: 20px;
// }
}
.tj{
--el-button-hover-text-color:#000000;
}
</style>

@ -1,9 +1,9 @@
<template>
<div class="app-container">
<div class="app-container2">
<div class="Face-recognition">
<div class="left">
<el-scrollbar height="650px" style="height:96%">
<el-scrollbar height="620px" style="height:94%">
<el-row>
<el-col :span="24">
<div class="title-back">
@ -81,8 +81,8 @@
</div>
</el-scrollbar>
<div class="dialog-footer">
<el-button type="primary" round plain size="large" @click="submit"></el-button>
<el-button type="primary" round plain size="large" @click="restart"></el-button>
<el-button type="primary" class="tj" plain size="large" @click="submit"></el-button>
<el-button type="primary" class="tj" plain size="large" @click="restart"></el-button>
</div>
</div>
<div class="right">
@ -435,8 +435,8 @@ getList()
}
.right {
position: absolute;
top: 150px;
right: 15px;
top: 180px;
right: 40px;
width: 216px;
padding-left: 60px;
span {
@ -642,5 +642,8 @@ getList()
justify-content: center;
margin-top: 32px;
}
.tj{
--el-button-hover-text-color:#000000;
}
</style>

@ -1,12 +1,12 @@
<template>
<div class="app-container">
<div class="app-container2">
<div class="voice-technology">
<div class="left">
<el-scrollbar height="650px" style="height: 93%;">
<el-scrollbar height="620px" style="height: 93%;">
<el-row>
<el-col :span="24">
<div class="TaskBackground">
<span>任务背景</span>
<span style="color: #000000;">任务背景</span>
</div>
</el-col>
</el-row>
@ -300,9 +300,9 @@
</p>
</div>
</el-scrollbar>
<div class="dialog-footer">
<el-button @click="submit"></el-button>
<el-button type="primary" @click="reStart"></el-button>
<div class="dialog-footer" style="margin-top:10px">
<el-button class="tj" @click="submit"></el-button>
<el-button class="tj" type="primary" @click="reStart"></el-button>
</div>
</div>
<div class="right">
@ -860,8 +860,8 @@ onMounted(()=>{
}
.right {
position: absolute;
right: 15px;
top:150px;
right: 42px;
top: 180px;
width: 216px;
padding-left: 60px;
span {
@ -1065,4 +1065,7 @@ canvas,
color: #FFFFFF;
}
}
.tj{
--el-button-hover-text-color:#000000;
}
</style>

@ -2,7 +2,7 @@
<div class="app-container">
<div class="HadoophDFS">
<div class="left">
<el-scrollbar height="660px" style="height:96%">
<el-scrollbar height="610px" style="height:96%">
<p>
本案例通过搭建服务器集群安装Hadoop组件实训演练Hadoop的核心组件HDFS分布式文件系统的读写流程和原理
</p>
@ -2143,6 +2143,7 @@ p {
}
.cxks{
background: url('@/assets/images/szjj/重新开始.png') no-repeat;
--el-button-hover-text-color:#000000;
}
.el-dialog__body {
padding: 20px 20px;
@ -2162,10 +2163,11 @@ p {
border-color:none;
}
.tj{
color: #FFFFFF;
color: #000000;
}
.cxks{
background: url('@/assets/images/szjj/重新开始.png') no-repeat;
--el-button-hover-text-color:#000000;
}
}
.clientAbs{

@ -1,9 +1,9 @@
<template>
<div class="app-container">
<el-scrollbar height="650px">
<div class="app-container2">
<!-- <el-scrollbar height="650px"> -->
<div style="width:100%">
<div class="digital_main">
<el-scrollbar height="680px">
<el-scrollbar height="610px">
<div class="left_main">
<p style="font-weight: bold; font-size: 15px">
本任务以案例数据形式介绍Apriori算法下的实现步骤假设有四名客户1234购买了编号为ABCDE若干
@ -347,16 +347,16 @@
</div>
</div>
</el-scrollbar>
<div class="dialog-footer">
<div class="dialog-footer" style="margin-top:10px">
<el-button @click="sendTask" class="tj">提交任务</el-button>
<el-button type="primary" @click="dialogVisible = false" class="cxks">
关闭
<el-button @click="startOver" class="cxks">
重新开始
</el-button>
</div>
</div>
<span class="imgSpan" @click="dialogVisible=true"></span>
</div>
</el-scrollbar>
<!-- </el-scrollbar> -->
</div>
@ -1220,8 +1220,8 @@ onBeforeUnmount(() => {
}
.imgSpan {
position: absolute;
top: 28px;
right: 30px;
top: 180px;
right: 90px;
width: 110px;
height: 143px;
background: url("@/assets/images/szjj/案例任务.png") no-repeat;
@ -1518,6 +1518,7 @@ onBeforeUnmount(() => {
}
.cxks{
background: url('@/assets/images/szjj/重新开始.png') no-repeat;
--el-button-hover-text-color:#000000;
}
}
// .el-dialog:not(.is-fullscreen) {

@ -1,8 +1,8 @@
<template>
<div class="app-container">
<div class="app-container2">
<div class="Hadoop">
<div class="left">
<el-scrollbar height="650px" style="height:96%">
<el-scrollbar height="625px" style="height:93%">
<p>以下是Hadoop的技术框架图请选择相应的组件填入其中</p>
<div class="Module">
<div class="title">
@ -952,10 +952,11 @@ echoHaop()
border-color:none;
}
.tj{
color: #FFFFFF;
color: #000000;
}
.cxks{
background: url('@/assets/images/szjj/重新开始.png') no-repeat;
--el-button-hover-text-color:#000000;
}
}
</style>

@ -1,8 +1,8 @@
<template>
<div class="app-container">
<div class="app-container2">
<div class="frame">
<div class="left">
<el-scrollbar height="650px" style="height:96%">
<el-scrollbar height="620px" style="height:92%">
<div style="width: calc(100% - 216px);">
<p class="test">大数据之所以称为大数据因其和小数据比较起来有显著的特征:</p>
<div class="topic" v-for="(item, index) in data" :key="item">
@ -21,7 +21,7 @@
</div>
</div>
</el-scrollbar>
<div class="dialog-footer">
<div class="dialog-footer" style="margin-top: 10px;">
<el-button @click="sendTitle()" class="tj">提交任务</el-button>
<el-button type="primary" @click="startOver" class="cxks">
重新开始
@ -268,8 +268,8 @@ import { getUserInfo } from '@/utils/auth'
}
.right{
position: absolute;
top: 145px;
right: 20px;
top: 180px;
right: 30px;
width: 216px;
padding-left: 60px;
span {
@ -333,13 +333,25 @@ import { getUserInfo } from '@/utils/auth'
border:none;
border-color:none;
}
.tj{
color: #FFFFFF;
}
.cxks{
background: url('@/assets/images/szjj/重新开始.png') no-repeat;
}
}
.tj{
width: 136px;
height: 40px;
color: #000000 !important;
// background: url('@/assets/images/szjj/.png') !important;
--el-button-border-color: #ffffff00;
--el-button-hover-border-color: #ffffff00;
--el-button-active-border-color: #ffffff00;
}
.cxks{
width: 136px;
height: 40px;
// background: url('@/assets/images/szjj/.png') !important;
color: #000000 !important;
--el-button-border-color: #ffffff00;
--el-button-hover-border-color: #ffffff00;
--el-button-active-border-color: #ffffff00;
}
.tsRight{
color: green;
position: absolute;

@ -1,8 +1,8 @@
<template>
<div class="app-container">
<div class="app-container2">
<div class="Whatbigdata">
<div class="left">
<el-scrollbar height="650px">
<el-scrollbar height="620px">
<p class="test">大数据之所以称为大数据因其和小数据比较起来有显著的特征:</p>
<div class="eval_main" v-for="(item, index) in mlist" :key="index" :class="['eval_main' + index]" >
<div class="eval_main_title">
@ -39,7 +39,7 @@
</div>
</div>
</el-scrollbar>
<div class="dialog-footer">
<div class="dialog-footer" style="margin-top:5px">
<el-button @click="taskAnswer" class="tj">提交任务</el-button>
<el-button type="primary" @click="answerAgain" class="cxks">
重新开始
@ -97,7 +97,7 @@ import { getUserInfo } from '@/utils/auth'
try{
const newArray = [];
const sendData={
module:'人工智能',
module:'什么是大数据',
userId:JSON.parse(getUserInfo()).userId
}
const res = await getTopic(sendData);
@ -522,7 +522,7 @@ import { getUserInfo } from '@/utils/auth'
.tj{
width: 136px;
height: 40px;
color: #FFFFFF;
color: #000000 !important;
background: url('@/assets/images/szjj/提交任务.png');
--el-button-border-color: #ffffff00;
--el-button-hover-border-color: #ffffff00;
@ -532,6 +532,7 @@ import { getUserInfo } from '@/utils/auth'
width: 136px;
height: 40px;
background: url('@/assets/images/szjj/重新开始.png') no-repeat;
color: #000000 !important;
--el-button-border-color: #ffffff00;
--el-button-hover-border-color: #ffffff00;
--el-button-active-border-color: #ffffff00;

@ -7,7 +7,7 @@
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
<div class="rgzn_top app-container">
<div class="rgzn_top app-container2">
<div class="top_item">
<el-button :class="{'active':isActive===1}" @click="activeIndex(1)"><img src="@/assets/images/大数据.png">大数据</el-button>
<el-button :class="{'active':isActive===2}" @click="activeIndex(2)"><img src="@/assets/images/人工智能.png">人工智能</el-button>

@ -104,8 +104,8 @@
</div>
<div class="analysisResults" style="margin-top: 20px">
<span style="font-weight: bold;font-size: 18px;color: #3596EB;display: block;">分析结果</span>
<el-button>下载</el-button>
<el-table :data="tableData3" row-key="TSuid" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-button v-if="uplodFlag" @click="upload"></el-button>
<el-table ref="exportTableRef" :data="tableData3" row-key="TSuid" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel2" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/>
</el-table>
<!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> -->
@ -185,6 +185,7 @@
<script setup>
import * as echarts from 'echarts';
import * as XLSX from 'xlsx';
import { MdEditor,MdPreview } from 'md-editor-v3';
import 'md-editor-v3/lib/style.css';
import ecStat from 'echarts-stat';
@ -389,6 +390,8 @@ const optionData2=()=>{
}
//
const exportTableRef = ref(null);
const uplodFlag=ref(false)
const computation=()=>{
if(input5.value&&input6.value&&input4.value){
const sendData={
@ -398,15 +401,28 @@ const computation=()=>{
deduplicatedDataList:resTable2.value
}
API.associationRuleMining(sendData).then((res)=>{
uplodFlag.value=true
tableData3.value=[]
res.data.forEach(element=>{
tableData3.value.push({
date:element
})
})
tableLabel2.length=0
for (const key in res.data[0]) {
tableLabel2.push({
label:key,
prop:key
})
}
tableData3.value=res.data
})
}
}
const upload=()=>{
const tableDom = exportTableRef.value?.$el;
if (!tableDom) {
return;
}
const wb = XLSX.utils.table_to_book(tableDom);
XLSX.writeFile(wb, '关联规则挖掘.xlsx');
}
const startOver=()=>{
input.value=''
tableData.value=[]
@ -419,6 +435,7 @@ const startOver=()=>{
input6.value=''
tableLabel.length=0
tableLabel2.length=0
uplodFlag.value=false
}
</script>

@ -97,7 +97,7 @@
<div class="main-right">
<div>
<span style="font-weight: bold;font-size: 18px;color: #3596EB;">分析数据</span>
<el-table :data="tableData2" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table ref="exportTableRef" :data="tableData2" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/>
</el-table>
<!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> -->
@ -105,7 +105,7 @@
<div class="analysisResults" style="margin-top: 20px">
<span style="font-weight: bold;font-size: 18px;color: #3596EB;display: block;">分析结果</span>
<el-button @click="upLoad" v-if="showChart"></el-button>
<el-table :data="tableData3" row-key="TSuid" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table :data="tableData3" row-key="TSuid" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/>
</el-table>
<!-- <el-pagination style="margin-top:10px" background layout="prev, pager, next" :total="1000" /> -->
@ -195,6 +195,7 @@
<script setup>
import popModel from "@/views/components/popModal.vue";
import * as echarts from 'echarts';
import * as XLSX from 'xlsx'
import ecStat from 'echarts-stat';
import * as API from '@/api/AI.js'
import { getUserInfo } from "@/utils/auth";
@ -478,51 +479,16 @@ const nowData=ref([])
});
}
}
const exportTableRef = ref(null);
const upLoad=()=>{
let formData=[
{
}
]
// nowData.value.forEach(item=>{
// item.forEach((item2,index)=>{
// item2.forEach((item3,index2)=>{
// if (!formData[index]) {
// formData[index] = {}; //
// }
// if(index2===0){
// formData[index].push(item3)
// }else if(index2===1){
// formData[index].push(item3)
// }else if(index2===2){
// formData[index].push(item3)
// }
// })
// })
// })
API.downloadClusterAnalysisForm(nowData.value[0]).then((response)=>{
// Blob
const blob = new Blob([response.data], { type: 'application/octet-stream' });
// URL
const url = window.URL.createObjectURL(blob);
// <a>
const link = document.createElement('a');
link.href = url;
//
link.download = '聚类分析.xlsx';
//
document.body.appendChild(link);
link.click();
//
window.URL.revokeObjectURL(url);
document.body.removeChild(link);
})
const tableDom = exportTableRef.value?.$el;
if (!tableDom) {
return;
}
const wb = XLSX.utils.table_to_book(tableDom);
XLSX.writeFile(wb, '聚类分析.xlsx');
}
const startOver=()=>{
myChart.setOption({
series: [

@ -154,6 +154,39 @@
</div>
</template>
</el-dialog>
<pop-model
:showModel="runResultShow"
title="关联规则挖掘"
@closePop="runResultShow = false"
>
<template v-slot:content>
<div>
<p style="font-weight: 700;font-size:22px">什么是描述性统计分析</p><p>描述性统计分析是数据分析的一种方法旨在对数据进行总结和描述以便更好地理解数据的特征和趋势它主要通过统计指标和图表来呈现数据的基本特征包括中心趋势离散程度分布形态等<br />常用的描述性统计指标包括</p><li>中心趋势用于描述数据集的集中程度常见的指标有均值中位数和众数</li><li>离散程度用于描述数据的分散程度常见的指标有方差标准差和极差</li><li>分布形态用于描述数据的分布形态常见的指标有偏度和峰度</li><p>描述性统计分析还可以通过图表来展示数据的特征常见的图表包括</p>
<li>频数分布表和直方图用于展示数据的分布情况可以观察数据的集中程度和离散程度</li><li>箱线图用于展示数据的分布情况和离群值可以观察数据的中位数四分位数和异常值</li><li>散点图用于展示两个变量之间的关系可以观察数据的相关性和趋势</li><p>描述性统计分析可以帮助我们对数据有一个直观的了解发现数据中的规律和异常情况为后续的数据分析和决策提供基础</p><p style="font-size:19px;font-weight:600">描述性统计分析的优势和局限性</p><p>描述性统计分析的优势和局限性如下<br />优势</p><li>简单易懂描述性统计分析使用简单的统计指标和图表可以直观地呈现数据的特征使人们更容易理解和解释数据</li>
<li>提供概览通过描述性统计分析可以获得数据的整体概览包括数据的中心趋势如均值中位数数据的分布情况如标准差百分位数</li><li>发现异常值描述性统计分析可以帮助我们发现数据中的异常值或离群点从而帮助我们识别数据质量问题或异常情况</li><p>局限性</p><li>缺乏深入分析描述性统计分析主要关注数据的基本特征无法深入挖掘数据背后的关联和因果关系</li><li>无法进行推断描述性统计分析只是对已有数据的总结和描述并不能进行推断或预测</li><li>受数据限制描述性统计分析的结果受到数据本身的限制如果数据质量不好或数据量较小可能会导致结果不准确或不可靠</li><p>综上所述描述性统计分析是数据分析的重要工具可以帮助我们了解数据的基本特征和趋势但在深入分析和推断方面有一定的局限性</p>
<p style="font-size:19px;font-weight:600">描述性统计分析的常用方法</p><p>描述性统计分析是对数据进行总结和描述的过程常用的方法包括</p><li>中心趋势度量包括均值mean中位数median和众数mode用于描述数据的集中程度</li><li>离散程度度量包括方差variance标准差standard deviation和极差range用于描述数据的离散程度</li><li>分布形状度量包括偏度skewness和峰度kurtosis用于描述数据的分布形状</li><li>频数统计通过频数表频率分布表和直方图等方式统计数据的频数和频率</li><li>百分位数用于描述数据中某个特定百分比的位置如中位数四分位数等</li><li>相关性分析通过计算相关系数如Pearson相关系数来衡量两个变量之间的相关性</li>
<p style="font-size:19px;font-weight:600">描述性统计分析的应用场景</p><p>描述性统计分析在许多领域和应用场景中都有重要的作用以下是一些常见的应用场景</p><li>提供概览描述性统计分析可以提供数据的概览帮助我们了解数据的整体特征和规律通过计算中心趋势测量如均值中位数众数离散程度测量如方差标准差极差和分布形态测量如偏度峰度我们可以得到数据的集中趋势离散程度和分布形态等信息</li><li>数据比较描述性统计分析可以帮助我们比较不同组或不同时间点的数据通过比较不同组的中心趋势离散程度和分布形态等我们可以了解不同组之间的差异和相似之处从而得出结论或提出假设</li><li>发现异常值描述性统计分析可以帮助我们发现数据中的异常值通过观察离群点如极端值和异常值如异常观测值我们可以发现数据中的异常情况进而进行进一步的分析和处理</li>
<li>数据可视化描述性统计分析可以通过可视化方法如直方图散点图箱线图等将数据转化为图形使得数据更加直观和易于理解数据可视化可以帮助我们发现数据的分布模式趋势和关联关系从而更好地理解数据</li><li>数据摘要描述性统计分析可以通过频数和频率分布表百分位数等方式对数据进行摘要和概括这些摘要信息可以帮助我们对数据进行快速的了解和比较从而支持后续的决策和分析</li><li>假设检验描述性统计分析可以为假设检验提供依据通过对样本数据的描述性统计分析我们可以判断样本数据是否符合某种假设分布从而进行假设检验</li><li>数据报告和展示描述性统计分析可以提供数据的概括性描述用于撰写数据报告和展示帮助他人更好地理解数据的特征和趋势</li><li>数据清洗描述性统计分析可以帮助我们发现数据中的问题和错误通过观察数据的分布情况和异常值我们可以判断数据的质量并进行必要的数据清洗和修正</li>
<li>数据探索描述性统计分析是探索性数据分析的一部分它可以帮助我们发现数据中的模式关联和趋势通过观察数据的分布散点图相关系数等我们可以发现数据中的隐藏信息和规律</li><li>决策支持描述性统计分析可以为决策提供支持通过对数据的摘要和可视化我们可以获取有关数据的重要信息帮助决策者做出基于数据的决策</li><p style="font-size:19px;font-weight:600">如何进行描述性统计分析</p><p>开展描述性统计分析可以按照以下步骤进行</p><li>收集数据首先需要收集所需的数据可以是通过调查问卷实验观察或从现有数据源获取</li><li>数据清洗对收集到的数据进行清洗包括处理缺失值异常值和错误数据等</li><li>描述性统计使用统计方法计算数据的基本统计量如平均值中位数标准差等以了解数据的集中趋势离散程度和分布情况</li><li>可视化展示将统计结果以图表的形式进行可视化展示如直方图箱线图散点图等以更直观地呈现数据的特征和趋势</li>
<li>解读分析结果根据统计分析的结果解读数据的含义和趋势提取有用的信息和洞察并进行合理的解释和推断</li><p style="font-size:19px;font-weight:600">描述性统计分析的注意事项</p><p>在进行描述性统计分析时有以下几个注意事项</p><li>数据质量确保数据的准确性和完整性进行数据清洗处理缺失值异常值和重复值等以保证分析结果的可靠性</li><li>数据类型根据数据的类型选择合适的统计方法和图表对于定量数据可以使用均值标准差等统计量对于定性数据可以使用频数和百分比等统计量</li><li>样本大小考虑样本大小对统计结果的影响样本较小可能导致统计结果不够准确而样本较大可能会增加计算复杂度</li><li>数据分布了解数据的分布情况选择合适的统计方法和图表例如对于正态分布的数据可以使用均值和标准差进行描述对于偏态分布的数据可以使用中位数和四分位数等进行描述</li><li>上下文和目的考虑数据分析的上下文和目的根据具体的问题和需求选择合适的统计方法和图表以便更好地解读数据和提取有价值的信息</li>
<li>解读和推断描述性统计分析主要是对数据进行概括和描述不能进行推断和因果分析在解读结果时要注意避免过度解读和误导</li><li>可视化呈现使用合适的图表和图形将数据可视化以便更好地传达数据的特征和趋势选择简洁明了的图表避免图表过于复杂和混乱</li>
</div>
<!-- 情感分析 -->
<!-- <div>
<p style="font-weight: 700;font-size:22px">总览</p><p>文本分析指对文本数据进行表示 (representation)处理(processing)和建模(modeling)来获得有用的见解(insight)<br />文本分析的一个挑战是高维度(high dimensionality)<br /><br />语料库: 指在自然语言处理中用于各种目的的大量文本(文档)集合<br /><br />另一个挑战是: 大多数情况下文本是非结构化数据(not structured)</p><img src="@/assets/images/f4001.png" alt=""><p style="font-weight: 700;font-size:22px">文本分析步骤</p><p>&nbsp;&nbsp;&nbsp;&nbsp;1.句法分析(Parsing): 是指处理非结构化文本使其具有一定的结构供将来分析的过程句法分析将文本进行解构然后以一种更为结构化的方式来呈现(unsturctured -> sturctured)<br />&nbsp;&nbsp;&nbsp;&nbsp;2.搜索和检索 (Search and retrieval): 在一个语料库中识别包含例如特殊单词短语主题或者实体(如人或组织)等搜索项(search items)的文档这些搜索项通常称为关键术语 (key term)<br />&nbsp;&nbsp;&nbsp;&nbsp;3.文本挖掘 (text mining): 指使用前两步产生的术语和索引来发现与感兴趣领域或问题相关的有意义的见解(discover meaningful insights)<br />聚类(clustering) 分类 (classification) 都可以应用于文本挖掘比如将文档聚化成簇 或者 分类文本以进行情感分析(sentiment analysis)<br />文本挖掘可以利用来自各个研究领域的方法和技术如统计分析(statistical analysis)信息检索(information retrieval)数据挖掘(data mining)和自然语言处理(natural language processing)</p>
<p style="font-weight: 700;font-size:22px">挑战</p><li>语法(syntax): 涉及句子结构和语法规则</li><li>语义(semantics): 是对句子含义的研究</li><li>语用(pragmatic): 关注特定上下文中句子的含义</li><li>同义词(homonyms): 具有相同拼写但含义不同的单词</li><li>缩写词(acronyms): 是单词的缩写形式</li><p>对于计算机来说文本只是编码和数字的字符序列(sequence of characters)它不了解语法语义(semantic meanings)和其实用含义(pragmatic meaning)<br />同时在原始形式中单词或者文本之间没有自然相似性度量(nature similarity metric)(因此难以执行聚类或分类)<br />因此我们需要以适合用于聚类和分类的形式来表示和处理文本</p><p style="font-weight: 700;font-size:22px">第一步收集原始文本数据(Collecting Raw Text)</p><p>对于文本分析来说进行任何事情之前必须先收集数据</p>
<li>可以在许多网站上对用户生成的内容(user-generated contents)开始积极的监控可以使用公开的API, 网页爬虫 web scraper/crawler</li><li>准备处理非结构化或者半结构化数据</li><p style="font-weight: 700;font-size:22px">第二步表示文本 (Representing Text)</p><p>使用文本规范化的技术(text normalization techniques)对原始文本进行转化</p><li>分词 (tokenization): 指从文本正文中分离(也叫做标记)单词 (seperating words)</li><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.按空格(spaces)来分词(可能会把标点符号也给分出来比如 day. )<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.基于标点符号和空格来分词 (可能会把 well, cant, state-of-the-art 等直接分开)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;分词比想象中更困难 (résumé resume)<br />没有一个分词器适用于每一种情形(no one-size-fits-all)</p><li>大小写转换 (case folding): 将所有的字母都变成小写(或者都变成大写)</li>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.但是在一些情况下可能会出错: 如专有名词缩写公司名等(General Motors; WHO; US;)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.减少错误的方法是对不进行大小写转换的单词建立一个查找表(lookup table)</p><li>停止词(stop word): 在给定语言中并非所有的单词都需要被考虑(比如the, a, of, and, to等这些不太可能有助于语义的理解)</li><li>词根法(Lemmatization)和词干法(Stemming): 词根法看单词的意义(: Goose, geese, goose, gander, ganders)词干法看单词的组成(walk, walking, Walk, walks, walked)最受欢迎的是"Porter stemmer", WordNet</li><li>词袋法(Bag-of-words representation): 将文档转化成高维向量(high-dimensional vector)向量指示了文档中各个单词的 存在/不存在/出现频率(presence/absence/frequency)</li><img src="@/assets/images/f4002.png" alt=""><p>词袋法足够简单(朴素且过分简化问题 naive and over-simplified) 并被广泛应用于文本分析问题中 (是入门的好方法)其将文档表示为一组词语(单词)而忽略了其他信息(如顺序 order上下文 context推论 inferences和语义 semantics)比如a dog bites a man "a man bites a dog"意思完全不同但是他们在词袋法里是同一种表示</p>
<li>语料库的表示(Representation of a corpus): 语料库可以大到包括一种或者多种语言的所有文档也可以小到仅限于特定领域(focused on a specific domains)</li><p>大多数语料库都具有元数据比如语料库的大小以及文本提取的领域某些语料库包含了文本中出现的每个词的信息内容(Information content, IC)信息内容是用来表示语料库中词语重要性(importance of a term)的度量IC值较高的词语的重要性要比IC值较低的词语高<br />然而信息内容无法满足分析动态改变的非结构化数据的需求问题传统语料库和IC元数据都无法随着时间改变因此任何语料库中不存在的词汇和任何新发明的词汇都会自动得到0的IC值其次传统语料库限制了用于文本分析算法 (text analysis algorithm) 的全部知识(语料库代表了整个知识库)</p><p style="font-weight: 700;font-size:22px">第三步词频-逆文档频率(TFIDF - Term Frequency - Inverse Document Frequency)</p><p style="font-weight: 600;font-size:18px">词频 (Term Frequency)</p><p>我们需要一个适应文本上下文(context)和性质(nature)的度量标准 metric (不像IC一样)<br />TFIDF直接作用于所有获取的文档(fetched documents)一旦获取的文档发生更改TFIDF可以被轻松更新TFIDF是一种广泛用于文本分析的措施TFIDF对动态内容的处理也是相当强大且有效的因为文档的变化只需要更新频率计数<br />
给定一个单词 t 以及一个包含 n 个词的文档 d = {t1, t2, , tn} d t 最简单的词频形式可以定义为 t d 中出现的次数</p><img src="@/assets/images/f4003.png" alt=""><p>可以对词频函数取对数以获得更多数据细节</p><img src="@/assets/images/f4005.png" alt=""><p>对于长文档因为其包含的词语数量和种类多因此往往有更高的词频值这些因素导致了长文档的词频值的提升以至于人们对长文档产生了偏见为了解决这个问题可以对词频进行规范化</p><img src="@/assets/images/f4006.png" alt=""><p>Zipfs Law i 个最常见的单词出现在最常见词的 1/i </p><p style="font-weight: 600;font-size:18px">Term Frequency 问题</p><p>词语的重要性仅取决于其在特定文档中的存在如果该词语频繁出现在每个文档中怎么办这个词还重要吗我们需要拓宽我们的视野不仅要在单个文档中而是要在整个语料库中考虑一个词语的重要性</p><p style="font-weight: 600;font-size:18px">词语的文档频率 (Document Frequency of a term)</p><p>文档频率被定义为语料库中包含一个词语的文档的数目假设语料库D包含N个文档语料库D={d1, d2, , dn}中词语 t 的文档频率的定义为</p><img src="@/assets/images/f4007.png" alt=""><p style="font-weight: 600;font-size:18px">逆文档频率 (Inverse Document Frequency)</p><p>逆文档频率的定义N代表了语料库的总文档数DF(t) 代表单词 t 的文档频率逆文档频率就是他们的商取对数得到</p>
<img src="@/assets/images/f4008.png" alt=""><p>如果词语不在语料库内会导致分母为零快速解决的方法是在分母上加个1</p><img src="@/assets/images/f4009.png" alt=""><p>拥有较高IDF的词往往在整个语料库中更重要罕见单词的IDF会很高高频单词的IDF会很低<br />警告因为语料库中所有文档数目(N)是保持恒定的因此IDF仅取决于DF那些DF值最低的词获得相同的最高IDF因此有必要引入更多权重词来对文档中出现次数相同的词进行区分</p><p style="font-weight: 600;font-size:18px">TFIDF</p><p>是一种既考虑词在单个文档中的普及率 prevalence (TF)也考虑他在整个语料库中的稀缺程度 scarcity (IDF)的评估方法词语 t 在文档 d 中的TFIDF 定义为 d t 的词频 乘以语料库中 t 的文档频率如下公式</p><img src="@/assets/images/f4010.png" alt=""><p>一个词的TFIDF值越高它在一个文档中出现的就越频繁但在语料库的所有文档中出现得就越少<br />TFIDF在简单和直接的计算中是很有效的因为它不需要文本含义的相关知识文档 d 被表示为 TFIDF(t, d) 的高维向量 (high-dimensional vector)<br /><br />TFIDF方法减少描述长度的数量相对较少同时其很难揭示文档内或文档之间(intra-document or inter-document)的统计结构<br />主题建模(Topic Modelling)能够解决这个问题主题(topic): 经常在一起出现的具有相关含义的单词簇(a cluster of words)每个词在主题中都有权重</p>
<p style="font-weight: 700;font-size:22px">第四步主题建模(Topic Modelling)</p><p>主题建模提供了文档的简短描述同时它也提供了自动组织搜索理解并汇总大量信息的工具主题建模是统计模型它研究一组文档中的单词确定文档主题并发现主题是如何相关(associated)或者如何随时间变化的(change over time)</p><p style="font-weight: 600;font-size:18px">流程</p><p>&nbsp;&nbsp;&nbsp;&nbsp;1.揭开(uncover)语料库中隐藏的主题模式(hidden topical patterns)<br />&nbsp;&nbsp;&nbsp;&nbsp;2.根据这些主题来注释文档(annotate document)<br />&nbsp;&nbsp;&nbsp;&nbsp;3.使用注释来组织搜索汇总文档(organize, search, summarise)</p><p style="font-weight: 600;font-size:18px">主题(topic)</p><p>一个主题被正式定义为固定单词词汇分布(a distribution over a fixed vocabulary of words)不同的主题在相同的词汇上会有不同的分布词汇中的某个词可以在多个主题中有不同的权重<br />一个文档通常由多个主题以不同的比例贯穿文本</p><p style="font-weight: 600;font-size:18px">LDA</p><p>最简单的主题模型是Latent Dirichlet Allocation(LDA)这是一个语料库的生成概率模型(generative probabilistic model of a corpus)在生成概率模型中从概率密度函数 (probability density function) 得出模型观测值 (model observation)在LDA中文档被视为生成过程 (generative process) 的结果(带有隐藏变量 hidden variables)<br />LDA假设了<br /></p><li>有一个固定的词汇表 (fixed vocabulary of words)</li>
<li>潜在主题 (latent topics) 的数目是预定义的</li><li>每个潜在主题的特征都是词汇表中单词的分布(Dirichlet distribution)</li><li>每个文档表示潜在主题的一个随机混合(random mixture)</li><p style="font-weight: 600;font-size:18px">LDA流程</p><p>&nbsp;&nbsp;&nbsp;&nbsp;1.选择文档的长度N<br />&nbsp;&nbsp;&nbsp;&nbsp;2.每个文档有一个在主题上的分布<br />&nbsp;&nbsp;&nbsp;&nbsp;3.为文档中的每个词分配一个主题并选择相应的主题中的单词<br /><br />在现实中只有文档是可用(available)LDA的目标是为每一个文档推断潜在的主题(underlying topic)主题比例 (topic proportion) 以及主题分配 (topic assignment)</p><p style="font-weight: 600;font-size:18px">算法</p><p>&nbsp;&nbsp;&nbsp;&nbsp;1.选择一个值 k<br />&nbsp;&nbsp;&nbsp;&nbsp;2.对于每个文档将文档中的每个单词随机分配给k个主题之一<br />&nbsp;&nbsp;&nbsp;&nbsp;对于每个文档 d遍历每个单词 w然后计算 d 中分配给主题 t 的单词所占的比例通常会应用平滑(smoothing)处理</p><img src="@/assets/images/f4011.png" alt=""><p>&nbsp;&nbsp;&nbsp;&nbsp;4.计算从单词w来的所有文档中对主题 t 的分配比例 P(w | t)<br />&nbsp;&nbsp;&nbsp;&nbsp;5.计算属于主题 t 的单词 w 的概率</p><img src="@/assets/images/f4012.png" alt=""> <p style="font-weight: 600;font-size:18px">注意事项</p> <p>LDA将文档视为主题的混合体<br />LDA将主题视为单词的混合体<br />如果单词 w 很有可能出现在主题 t 则所有带有 w 的文档将与主题 t 的关联更为紧密<br />
如果单词 w 不太可能出现在主题 t 则包含 w 的文档出现在 t 中的可能性将会很小因为文档 d 中剩余的单词将出现在其他主题中因此 d 有更高的可能性属于那些主题因此就算我们将 w 添加到 t 也不会将很多该类文档带到 t </p><p style="font-weight: 600;font-size:18px">应用</p><p>主题模型可以被用于文档建模(document modelling)文档分类(document classification)与协同过滤(collaborative filtering)<br />主题模型不仅可以应用于文本数据它还可以用于注释图像</p><p style="font-weight: 700;font-size:22px">情感分析 (Sentiment Analysis)</p><p>情感分析使用统计和自然语言处理来从文本中挖掘观点来识别并抽取主观信息<br />应用 检测产品或者电影的评论的极性(polarity of reviews)<br /><br />分析层面包括了文档层面(document)语句层面(sentence)短语层面(phrase)和短文层面(short-text)<br /><br />分类方法(朴素贝叶斯最大熵或者支持向量机SVM) 经常被用来提取语料库统计以用于情感分析</p><img src="@/assets/images/f4013.png" alt=""><p>分类器仅基于对其进行训练的数据集来确定情感</p><li>词义随着领域不同而改变</li><li>因此模型无法直接应用于其他领域</li><p>绝对的情感水平无法提供信息应该建立一条基线然后将其与观察值比较比如一个产品拥有40%正面推文60%负面推文貌似是不成功的但是如果其他类似的成功产品也有类似的正负面百分比那么不应该认为该产品是不成功的<br /><br />如何对大量评论添加标签(积极消极中立):<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;1.使用表情符号 (小心阴阳怪气)<br />
&nbsp;&nbsp;&nbsp;&nbsp;2.使用 Amazon Mechanical Turk 互联网众包市场将上标签工作外包出去</p><p style="font-weight: 700;font-size:22px">获得结果(gaining insights)</p><p style="font-weight: 600;font-size:18px">词云(word cloud)</p><p>五星好评的词云</p><img src="@/assets/images/f4015.png" alt=""><p>一星差评的词云</p><img src="@/assets/images/f4016.png" alt=""><p>TFIDF能够用来凸显评论中有信息量的单词</p> <img src="@/assets/images/f4017.png" alt=""><p>LDA可以把评论归类为主题圆盘的大小代表了词的权重</p><img src="@/assets/images/f4018.png" alt=""><p>另一种可视化方式</p><img src="@/assets/images/f4019.png" alt="">
</div> -->
</template>
</pop-model>
</template>
<script setup>
import * as portraitModel from "@/api/portraitModel";
@ -163,6 +196,7 @@ import * as marketingAlgorithmApi from "@/api/marketing-algorithm.js";
import useAlgorithmStore from "@/store/modules/algorithm.js";
import useUserStore from "@/store/modules/user";
import { getUserInfo } from "@/utils/auth";
import popModel from "@/views/components/popModal.vue";
const userInfo = JSON.parse(getUserInfo());
const loading = ref(false);
const { proxy } = getCurrentInstance();
@ -170,6 +204,7 @@ const userStore = useUserStore();
const algorithmStore = useAlgorithmStore();
const multipleTableRef = ref(null);
const b_introductionOfAlgorithmKnowledge = ref(false);
const runResultShow=ref(false)
const n_dataTableQuery = ref({
index: 1,
size: 5,
@ -358,7 +393,7 @@ const getIndicator = () => {
};
//
const knowledgeImport = () => {
b_introductionOfAlgorithmKnowledge.value = true;
runResultShow.value=true
};
//
const submitTask = () => {

@ -5,20 +5,7 @@
<p style="font-weight: 400;font-size: 12px;color: #E6E6E6;">给出任务清单参考做哪些数据的统计分析Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean euismod bibendum laoreet. Proin gravida dolor sit amet lacus accumsan et viverra justo commodo. Proin sodales pulvinar sic tempor. Sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nam fermentum, nulla luctus pharetra vulputate, felis tellus mollis orci, sed rhoncus pronin sapien nunc accuan eget.</p>
</div>
<div class="main-but">
<el-upload
ref="uploadRef"
class="upload-demo"
:file-list="fileList"
:auto-upload="false"
:on-change="handleChange"
:show-file-list="false"
multiple="multiple"
>
<template #trigger>
<el-button><img src="../../../assets/images/导入.png" alt="">算法知识导入</el-button>
</template>
<!-- <div class="reportPromptFile" v-html="item[`${index}`].path"></div> -->
</el-upload>
<el-button @click="runResultShow=true"><img src="../../../assets/images/导入.png" alt="">算法知识导入</el-button>
<el-button @click="taskSubmit"><img src="../../../assets/images/提交.png" alt="">实训任务提交</el-button>
</div>
<div class="app-main">
@ -133,8 +120,8 @@
</div>
<div class="analysisResults" style="margin-top: 20px">
<span style="font-weight: bold;font-size: 18px;color: #3596EB;display: block;">分析结果</span>
<el-button class="imgBtn">下载</el-button>
<el-table :data="tableData3" row-key="TSuid" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-button class="imgBtn" v-if="flagUP" @click="upLoad"></el-button>
<el-table :data="tableData3" ref="exportTableRef" row-key="TSuid" style="width: 94%;margin-top:10px" :header-cell-style="headerCellStyle" height="350">
<el-table-column v-for="column in tableLabel2" :key="column.prop" :prop="column.prop" :label="column.label" align="center"/>
<el-table-column v-if="flagColumn" label="预测" align="center">
<template #default="scope">
@ -224,18 +211,41 @@
</div>
</template>
</el-dialog>
<pop-model
:showModel="runResultShow"
title="关联规则挖掘"
@closePop="runResultShow = false"
>
<template v-slot:content>
<div>
<p style="font-weight: 700;font-size:22px">变量间的关系的度量</p><p style="font-size:19px;font-weight:600">变量间的关系</p><li>函数关系设有两个x和yy随x一起变化并完全依赖于xy是x的函数y = f ( x ) y = f(x)y=f(x)x为自变量y为因变量</li><li>相关关系变量之前存在的不确定的关系称为相关关系</li><p>&nbsp;&nbsp;&nbsp;1.一个变量的取值不能由另一个变量唯一确定<br />&nbsp;&nbsp;&nbsp;2.当变量x 取某个值时变量y 的取值对应着一个分布<br />&nbsp;&nbsp;&nbsp;3.各观测点分布在直线周围</p><p style="font-size:19px;font-weight:600">相关关系的描述与测量</p><li>散点图可以通过散点图判断两个变量之间有无相关关系并对变量间的关系形态做出大致的描述</li><img src="@/assets/images/f3001.png" alt="">
<li>相关系数是度量变量之间线性关系强度的一个统计量</li><p>若相关系数是根据总体全部数据计算的称为总体相关系数记为ρ<br />若是根据样本数据计算的则称为样本相关系数简称为相关系数记为 r rr也称为Pearson \textbf{Pearson}Pearson相关系数或者线性相关系数</p><img src="@/assets/images/f3002.png" alt=""><br /><p>相关系数r rr 的性质<br />&nbsp;&nbsp;&nbsp;r 的取值范围为 [ 0 , 1 ] [0,1][0,1];</p><img src="@/assets/images/f3003.png" alt=""><p>&nbsp;&nbsp;&nbsp;r 具有对称性即x与y之间的相关系数和y与x之间的相关系数相等即r x y = r y x r_{xy}= r_{yx}r <br />&nbsp;&nbsp;&nbsp;r 数值大小与x和y原点及尺度无关即改变x和y的数据原点及计量尺度并不改变r数值大小<br />&nbsp;&nbsp;&nbsp;r 仅仅是x与y之间线性关系的一个度量它不能用于描述非线性关系这意味着 r=0只表示两个变量之间不存在线性相关关系并不说明变量之间没有任何关系
&nbsp;&nbsp;&nbsp;r 虽然是两个变量之间线性关系的一个度量却不一定意味着x与y一定有因果关系</p><img src="@/assets/images/f3005.png" alt="" /><p style="font-size:19px;font-weight:600">相关关系的显著性检验</p><p>检验两个变量之间是否存在线性相关关系通常将 r rr 作为 ρ ρρ 的估计值<br />&nbsp;&nbsp;&nbsp;r 的抽样分布不写<br />&nbsp;&nbsp;&nbsp;r 的显著性检验</p><img src="@/assets/images/f3006.png" alt=""><p style="font-size:19px;font-weight:600">一元线性回归的估计和检验</p><li>相关分析目的在于用相关系数测度变量之间的关系强度</li><li>而回归分析侧重于考察变量之间的数量关系并通过一定的数学表达式将这种关系描述出来从而确定一个或几个变量自变量的变化对另一个特定变量因变量的影响程度具体来说回归分析具体解决以下几个方面的问题</li><p>&nbsp;&nbsp;&nbsp;1.从一组样本数据出发确定变量之间的数学关系式<br />&nbsp;&nbsp;&nbsp;2.对这些关系式的可信程度进行各种统计检验并从影响因变量的诸多变量中找出哪些变量的影响是显著的哪些是不显著的<br />&nbsp;&nbsp;&nbsp;3.利用所求的关系式根据一个或几个自变量的取值来估计或预测因变量的取值并给出这种估计或预测的可靠程度</p><li>在回归分析中</li><p>被预测或被解释的变量称为因变量用y表示<br />用来预测或被解释的一个或多个变量称为自变量用x表示</p>
<p style="font-size:16px;font-weight:600">相关关系的显著性检验</p><p>检验两个变量之间是否存在线性相关关系通常将 r rr 作为 ρ ρρ 的估计值</p><img src="@/assets/images/f3007.png" alt="" /><p style="font-size:19px;font-weight:600">一元线性回归的估计和检验</p><li>相关分析目的在于用相关系数测度变量之间的关系强度</li><li>而回归分析侧重于考察变量之间的数量关系并通过一定的数学表达式将这种关系描述出来从而确定一个或几个变量自变量的变化对另一个特定变量因变量的影响程度具体来说回归分析具体解决以下几个方面的问题</li><p>&nbsp;&nbsp;&nbsp;1.从一组样本数据出发确定变量之间的数学关系式<br />&nbsp;&nbsp;&nbsp;2.对这些关系式的可信程度进行各种统计检验并从影响因变量的诸多变量中找出哪些变量的影响是显著的哪些是不显著的<br />&nbsp;&nbsp;&nbsp;3.利用所求的关系式根据一个或几个自变量的取值来估计或预测因变量的取值并给出这种估计或预测的可靠程度</p><li>在回归分析中</li>
<p>&nbsp;&nbsp;&nbsp;被预测或被解释的变量称为因变量用y表示<br />&nbsp;&nbsp;&nbsp;用来预测或被解释的一个或多个变量称为自变量用x表示</p><p style="font-size:19px;font-weight:600"> 一元线性回归模型</p><p>涉及一个自变量的回归</p><li>回归模型描述因变量y 如何依赖于自变量x 和误差项 ε εε 的方程称为回归模型一元线性回归模型可表示为</li><img src="@/assets/images/f3008.png" alt=""><li>上述模型称为理论回归模型对于这一模型有以下几个假定</li><p>&nbsp;&nbsp;&nbsp;1.因变量y与自变量x之间具有线性关系<br />&nbsp;&nbsp;&nbsp;2.在重复抽样中自变量x的取值是固定的即假定x是非随机的<br />&nbsp;&nbsp;&nbsp;3.对于满足</p><img src="@/assets/images/f3009.png" alt=""><li>回归方程 描述因变量y的期望值如何依赖于自变量x的方程称为回归方程一元线性回归方程的形式为</li>
<img src="@/assets/images/f3010.png" alt="" /><img src="@/assets/images/f3011.png" alt="" /><p style="font-size:19px;font-weight:600">参数的最小二乘估计</p><img src="@/assets/images/f3012.png" alt="" /><br /><img src="@/assets/images/f3013.png" alt="" /><br /><img src="@/assets/images/f3014.png" alt="" /><p style="font-size:19px;font-weight:600">回归直线的拟合优度</p><p>估计或预测的精度如何将取决于回归直线对观测数据的拟合程度各观测点越是紧密围绕直线说明对观测数据的拟合程度越好反之越差</p><img src="@/assets/images/f3015.png" alt=""><li>总平方和S S T SSTSST反映因变量的n 个观察值与其均值的总误差</li><img src="@/assets/images/f3016.png" alt=""><li>残差平方和又称误差平方和反映除x 以外的其他因素对y 取值的影响也称为不可解释的平方和或剩余平方和</li>
<img src="@/assets/images/f3017.png" alt="" /><li>回归平方和SSR反映自变量x 的变化对因变量y 取值变化的影响或者说是由于x 与y 之间的线性关系引起的y 的取值变化也称为可解释的平方和</li><img src="@/assets/images/f3018.png" alt="" /><li>三者的关系为</li><img src="@/assets/images/f3019.png" alt="" /><li>估计标准误差s<sub>e</sub>反映实际观察值在回归直线周围的分散状况是均方残差MSE的平方根</li><img src="@/assets/images/f3020.png" alt=""><p style="font-size:19px;font-weight:600">显著性检验</p><img src="@/assets/images/f3021.png" alt=""><img src="@/assets/images/f3022.png" alt=""><p style="font-size:19px;font-weight:600">利用回归方程进行预测</p><p style="font-size:16px;font-weight:600">平均值的置信区间</p><li>置信区间(confidence interval)利用估计的回归方程对于自变量x 的一个给定值x<sub>0</sub>求出因变量y yy的平均值的估计区间这一估计区间称为置信区间</li>
<p>比平均值的公式根号内多了个1而已</p><img src="@/assets/images/f3023.png" alt="" /><p style="font-size:19px;font-weight:600">残差分析</p><p style="font-size:16px;font-weight:600">残差与残差图检验方差齐性</p><li>残差因变量的观测值与根据估计的回归方程求出的预测值之差用e表示反映了用估计的回归方程去预测而引起的误差</li><img src="@/assets/images/f3024.png" alt=""><img src="@/assets/images/f3025.png" alt=""><p style="font-size:19px;font-weight:600">标准化残差检验正态性</p><li>标准化残差也称为Pearson 残差或半学生化残差(semistudentized residuals)</li><img src="@/assets/images/f3026.png" alt="">
</div>
</template>
</pop-model>
</template>
<script setup>
import popModel from "@/views/components/popModal.vue";
import * as echarts from 'echarts';
import ecStat from 'echarts-stat';
import * as API from '@/api/AI.js'
import { getUserInfo } from "@/utils/auth";
import * as XLSX from 'xlsx'
import { onMounted, reactive } from 'vue';
const { proxy } = getCurrentInstance()
const dialogVisible=ref(false)
const dialogVisible2=ref(false)
const flagColumn=ref(false)
const runResultShow=ref(false)
const exportTableRef = ref(null);
const tableLabel=reactive([
{prop:'date',label:''},
])
@ -245,6 +255,7 @@
const formInline2=reactive({
user:''
})
const flagUP=ref(false)
const option5=ref([])
const option6=ref([])
const getList=()=>{
@ -418,17 +429,34 @@
proxy.$modal.msgError("x变量数量有误");
return
}
flagColumn.value=true
if(input6.value.length===1){
tableData2.value.forEach(item=>{
sendData.y.push(item[input5.value[0]])
sendData.x.push([item[input6.value[0]]])
})
}else{
tableData2.value.forEach(item=>{
sendData.y.push(item[input5.value[0]])
sendData.x.push([item[input6.value[0]],item[input6.value[1]]])
})
}
API.logisticRegression(sendData).then((res)=>{
tableLabel2.length=0
for (const key in res.data) {
tableLabel2.push({
label:key,
prop:key
})
}
let data=res.data
data.slope=data.slope
tableData3.value=[data]
})
}
flagColumn.value=true
// API.associationRuleMining(sendData).then((res)=>{
// tableData3.value=[]
// res.data.forEach(element=>{
// tableData3.value.push({
// date:element
// })
// })
// })
}
flagUP.value=true
}
const nowData=ref([])
const handleClick=(item)=>{
@ -449,6 +477,27 @@
predictionResults.value=res.data
})
}
if(nowData.value.type==='逻辑回归'){
const sendData={
intercept:nowData.value.intercept,
type:nowData.value.type,
slope:nowData.value.slope,
slope:formInline2.user
}
API.logisticRegressionPrediction(sendData).then((res)=>{
dialogVisible2.value=false
predictionResults.value=res.data
})
}
}
const upLoad=()=>{
const tableDom = exportTableRef.value?.$el;
if (!tableDom) {
return;
}
const wb = XLSX.utils.table_to_book(tableDom);
XLSX.writeFile(wb, '回归分析.xlsx');
}
const startOver=()=>{
input.value=''
@ -466,6 +515,7 @@
nowData.value=[]
formInline2.user=''
predictionResults.value=''
flagUP.value=false
}
</script>

@ -91,7 +91,7 @@ const activeIndex = (index) => {
background: url("../../assets/images/66.png");
color: #ffffff;
border-color: #ffffff00;
padding: 8px 5px 8px 30px;
padding: 8px 20px 8px 30px;
background-size: 100% 100%;
}
.el-button:nth-child(7) {

Loading…
Cancel
Save