diff --git a/src/views/digitalMarketingAlgorithms/components/clusterAnalysis.vue b/src/views/digitalMarketingAlgorithms/components/clusterAnalysis.vue
index 7193881..60f1bfb 100644
--- a/src/views/digitalMarketingAlgorithms/components/clusterAnalysis.vue
+++ b/src/views/digitalMarketingAlgorithms/components/clusterAnalysis.vue
@@ -316,7 +316,7 @@ const task = () => {
if (formInline2.value2 !== input6.value) {
errorNumber = 1;
}
- portraitModel
+ portraitModel
.submit({
userId: JSON.parse(getUserInfo()).userId,
taskName: "聚类分析",
diff --git a/src/views/digitalMarketingAlgorithms/components/regressionAnalysis.vue b/src/views/digitalMarketingAlgorithms/components/regressionAnalysis.vue
index 0f357a8..d3e65f9 100644
--- a/src/views/digitalMarketingAlgorithms/components/regressionAnalysis.vue
+++ b/src/views/digitalMarketingAlgorithms/components/regressionAnalysis.vue
@@ -50,7 +50,7 @@
三、模型参数设置
-
聚类方法:
+
回归模型:
@@ -343,12 +343,12 @@ const task = () => {
if (parseFloat(formInline3.value3) !== parseFloat(predictionResults.value)) {
errorNumber = 1;
}
- } else if (input4.value === "Logistic逻辑回归") {
- if (formInline3.value1 !== tableData3.value[0].intercept.toString()) {
- errorNumber = 1;
+ }else if(input4.value==="Logistic逻辑回归"){
+ if(parseFloat(formInline3.value1)!==parseFloat(tableData3.value[0].intercept)){
+ errorNumber=1
}
- if (formInline3.value2 !== tableData3.value[0].slope) {
- errorNumber = 1;
+ if(parseFloat(formInline3.value2)!==parseFloat(tableData3.value[0].slope)){
+ errorNumber=1
}
if (parseFloat(formInline3.value3) !== parseFloat(predictionResults.value)) {
errorNumber = 1;
@@ -475,13 +475,9 @@ const options3 = ref([
]);
const input4 = ref();
const options4 = ref([
- {
- value: "线性回归",
- label: "线性回归",
- },
{
value: "Logistic逻辑回归",
- label: "Logistic逻辑回归",
+ label: "线性回归",
},
]);
const input5 = ref();
@@ -563,7 +559,7 @@ const computation = () => {
proxy.$modal.msgError("y变量数量有误!");
return;
}
- if (input6.value.length > 2) {
+ if (input6.value.length > 1) {
proxy.$modal.msgError("x变量数量有误!");
return;
}
@@ -619,19 +615,19 @@ const handleClick = (item) => {
};
const predictionResults = ref("");
const Forecasting = () => {
- if (nowData.value.type === "线性回归") {
- const sendData = {
- intercept: nowData.value.intercept,
- type: nowData.value.type,
- slopes: nowData.value.slopes.split(",").map(Number),
- raX: formInline2.user.split(",").map(Number),
- };
- API.logisticRegressionPrediction(sendData).then((res) => {
- dialogVisible2.value = false;
- predictionResults.value = res.data;
- });
- }
- if (nowData.value.type === "逻辑回归") {
+ // if (nowData.value.type === "线性回归") {
+ // const sendData = {
+ // intercept: nowData.value.intercept,
+ // type: nowData.value.type,
+ // slopes: nowData.value.slopes.split(",").map(Number),
+ // raX: formInline2.user.split(",").map(Number),
+ // };
+ // API.logisticRegressionPrediction(sendData).then((res) => {
+ // dialogVisible2.value = false;
+ // predictionResults.value = res.data;
+ // });
+ // }
+ // if (nowData.value.type === "逻辑回归") {
const sendData = {
intercept: nowData.value.intercept,
type: nowData.value.type,
@@ -642,7 +638,7 @@ const Forecasting = () => {
dialogVisible2.value = false;
predictionResults.value = res.data;
});
- }
+ // }
};
const upLoad = () => {
const tableDom = exportTableRef.value?.$el;