fix: 演示页面算法名称对齐项目、数据加噪声避免R²虚高
This commit is contained in:
parent
900f7cf01f
commit
79622678c7
@ -1,27 +1,41 @@
|
|||||||
name,type,length_m,width_m,height_m,weight_kg,max_range_km,payload_kg,max_speed_kmh,endurance_min,tech_level,scale_level,supply_chain_level,complexity_score,actual_cost
|
name,type,length_m,width_m,height_m,weight_kg,max_range_km,payload_kg,max_speed_kmh,endurance_min,tech_level,scale_level,supply_chain_level,complexity_score,actual_cost
|
||||||
隼击-A,巡飞弹,1.2,1.8,0.32,18,35,4,145,55,6.4,5.8,6.2,5.9,420000
|
幻影-G,巡飞弹,1.2,2.0,0.28,16,60,3,200,80,7.0,6.0,6.5,7.0,1900000
|
||||||
隼击-B,巡飞弹,1.5,2.1,0.36,26,48,6,160,70,6.8,6.2,6.4,6.6,610000
|
隼击-A,巡飞弹,1.2,1.49,0.29,16.21,37.98,4.25,165.47,46.82,6.22,4.82,5.57,50000,420000
|
||||||
隼击-C,巡飞弹,1.8,2.5,0.42,34,65,8,175,85,7.2,6.4,6.8,7.1,830000
|
隼击-B,巡飞弹,1.5,1.74,0.32,27.4,48.78,5.4,165.14,77.8,5.59,6.88,6.86,50000,610000
|
||||||
侦察-100,巡飞弹,0.9,1.4,0.25,9,18,2,110,35,5.4,5.1,5.5,4.8,190000
|
隼击-C,巡飞弹,1.8,2.19,0.49,32.0,55.47,6.84,196.89,88.17,8.0,6.93,6.89,50000,830000
|
||||||
侦察-200,巡飞弹,1.1,1.7,0.29,14,28,3,125,48,5.9,5.4,5.7,5.3,310000
|
侦察-100,巡飞弹,0.9,1.34,0.25,10.07,18.77,2.26,113.06,37.58,4.52,4.6,5.08,50000,190000
|
||||||
侦察-300,巡飞弹,1.4,2.0,0.34,22,42,5,150,62,6.3,5.9,6.0,6.1,520000
|
侦察-200,巡飞弹,1.1,1.54,0.25,12.88,29.37,2.85,119.16,42.98,5.41,6.25,6.0,50000,310000
|
||||||
锐蛇-S,巡飞弹,1.7,2.4,0.38,30,58,7,185,76,7.5,6.7,6.9,7.4,940000
|
侦察-300,巡飞弹,1.4,1.76,0.37,19.33,40.18,5.88,157.56,63.27,6.72,6.63,6.6,50000,520000
|
||||||
锐蛇-M,巡飞弹,2.0,2.8,0.46,44,82,10,205,94,8.0,7.1,7.3,8.0,1360000
|
锐蛇-S,巡飞弹,1.7,2.0,0.35,27.49,51.97,8.12,210.07,70.93,7.92,6.45,7.93,50000,940000
|
||||||
锐蛇-L,巡飞弹,2.4,3.2,0.55,62,120,15,230,125,8.7,7.5,7.8,8.8,2100000
|
锐蛇-M,巡飞弹,2.0,2.56,0.42,44.97,75.0,10.3,234.36,90.6,7.19,8.37,7.33,50000,1360000
|
||||||
鹰眼-1,巡飞弹,1.3,1.9,0.31,20,40,4,155,58,6.6,5.7,6.3,6.0,470000
|
锐蛇-L,巡飞弹,2.4,2.68,0.47,64.84,132.62,14.58,193.86,119.67,10.25,7.58,9.12,50000,2100000
|
||||||
鹰眼-2,巡飞弹,1.6,2.2,0.37,29,57,7,172,78,7.1,6.1,6.6,6.9,760000
|
鹰眼-1,巡飞弹,1.3,1.57,0.33,21.31,40.53,3.66,162.87,49.89,6.45,5.61,7.33,50000,470000
|
||||||
鹰眼-3,巡飞弹,2.1,2.9,0.49,51,95,12,215,105,8.2,7.0,7.2,8.1,1580000
|
鹰眼-2,巡飞弹,1.6,2.01,0.37,25.65,65.47,7.93,159.52,81.9,7.38,5.34,7.22,50000,760000
|
||||||
雷霆-122,火箭炮,6.9,2.4,2.8,13500,22,480,72,0,5.8,6.6,6.0,5.5,980000
|
鹰眼-3,巡飞弹,2.1,3.19,0.5,41.83,88.99,9.92,248.21,119.32,9.18,6.51,6.05,50000,1580000
|
||||||
雷霆-160,火箭炮,7.6,2.6,3.0,16800,40,760,68,0,6.4,6.9,6.3,6.1,1450000
|
飞燕-1,巡飞弹,1.0,1.74,0.23,10.94,18.59,2.19,131.48,34.65,5.55,5.29,5.13,50000,250000
|
||||||
雷霆-220,火箭炮,8.3,2.8,3.2,21500,70,1200,65,0,7.0,7.1,6.8,7.0,2380000
|
飞燕-2,巡飞弹,1.3,1.75,0.3,24.34,48.72,5.35,153.82,80.12,6.85,5.77,6.14,50000,580000
|
||||||
雷霆-300,火箭炮,9.8,3.0,3.4,28500,120,1850,62,0,7.8,7.4,7.2,8.0,4200000
|
飞燕-3,巡飞弹,1.9,2.34,0.41,39.21,65.0,8.09,164.88,92.15,6.86,7.79,7.91,50000,1080000
|
||||||
山猫-95,火箭炮,6.2,2.3,2.7,11800,18,360,78,0,5.4,6.0,5.7,5.0,740000
|
游隼-X,巡飞弹,2.2,2.72,0.55,50.24,93.7,15.04,230.75,110.9,9.37,8.22,6.75,50000,1800000
|
||||||
山猫-120,火箭炮,6.7,2.4,2.8,13000,30,520,75,0,5.9,6.2,6.0,5.6,1050000
|
堡垒-K,火箭炮,8.0,2.6,3.0,22000,50,800,70,0,6.0,6.5,6.0,6.0,5200000
|
||||||
山猫-200,火箭炮,7.9,2.7,3.1,19800,60,980,70,0,6.8,6.8,6.5,6.7,1980000
|
弩机-T,火箭炮,7.5,2.5,2.9,16000,100,1400,74,0,8.0,7.0,7.5,8.5,1950000
|
||||||
山猫-300,火箭炮,9.3,2.9,3.3,26000,105,1600,66,0,7.6,7.2,7.0,7.8,3560000
|
雷霆-122,火箭炮,6.9,2.34,2.72,13339.74,23.81,509.96,84.55,0,4.96,6.37,5.65,50000,980000
|
||||||
弓兵-L,火箭炮,8.8,2.9,3.2,23500,85,1350,69,0,7.2,7.0,6.9,7.3,2860000
|
雷霆-160,火箭炮,7.6,2.36,2.67,16489.21,38.88,699.41,61.88,0,7.38,6.76,7.12,50000,1450000
|
||||||
弓兵-X,火箭炮,10.2,3.1,3.6,31000,150,2100,60,0,8.4,7.8,7.6,8.7,5400000
|
雷霆-220,火箭炮,8.3,2.35,3.78,24100.85,81.82,1384.19,73.16,0,6.16,7.06,6.1,50000,2380000
|
||||||
长矛-1,火箭炮,7.1,2.5,2.9,14200,28,560,73,0,6.1,6.4,6.1,5.8,1180000
|
雷霆-300,火箭炮,9.8,2.52,3.25,33479.27,109.86,2039.19,61.0,0,7.58,8.62,8.48,50000,4200000
|
||||||
长矛-2,火箭炮,8.1,2.7,3.1,20500,75,1120,68,0,7.1,6.9,6.7,7.1,2420000
|
山猫-95,火箭炮,6.2,2.48,2.36,10936.41,21.04,370.26,79.18,0,5.88,5.04,5.87,50000,740000
|
||||||
长矛-3,火箭炮,9.6,3.0,3.5,29200,130,1900,63,0,8.1,7.5,7.4,8.3,4650000
|
山猫-120,火箭炮,6.7,2.7,2.45,15156.45,25.47,461.19,77.57,0,6.27,5.61,5.18,50000,1050000
|
||||||
擎天-M,火箭炮,10.8,3.2,3.8,34800,180,2450,58,0,8.9,8.0,7.9,9.2,6900000
|
山猫-200,火箭炮,7.9,2.45,3.21,20650.95,58.26,1009.52,70.57,0,7.86,6.08,7.01,50000,1980000
|
||||||
|
山猫-300,火箭炮,9.3,2.79,3.5,24127.97,98.05,1745.07,55.84,0,7.49,8.49,8.25,50000,3560000
|
||||||
|
弓兵-L,火箭炮,8.8,2.6,2.93,27165.37,96.65,1534.33,65.76,0,6.31,7.84,7.41,50000,2860000
|
||||||
|
弓兵-X,火箭炮,10.2,3.64,3.8,25507.31,167.12,1948.33,63.53,0,9.73,6.77,6.55,50000,5400000
|
||||||
|
长矛-1,火箭炮,7.1,2.55,2.66,14735.89,30.19,500.25,76.53,0,5.58,6.37,6.99,50000,1180000
|
||||||
|
长矛-2,火箭炮,8.1,2.3,3.01,18851.9,61.6,1229.32,71.36,0,6.49,7.5,6.82,50000,2420000
|
||||||
|
长矛-3,火箭炮,9.6,2.47,2.96,33227.21,148.9,1931.18,70.59,0,8.34,6.55,6.41,50000,4650000
|
||||||
|
擎天-M,火箭炮,10.8,3.66,4.21,39318.88,205.85,2194.29,52.77,0,7.63,8.81,8.99,50000,6900000
|
||||||
|
铁拳-80,火箭炮,6.5,2.5,2.28,14434.46,27.15,492.0,84.5,0,6.37,4.81,6.29,50000,860000
|
||||||
|
铁拳-140,火箭炮,7.3,2.89,3.22,17531.48,61.15,806.12,78.35,0,5.33,7.37,7.0,50000,1680000
|
||||||
|
铁拳-250,火箭炮,9.1,3.23,3.25,23060.74,105.1,1370.94,53.03,0,6.58,6.66,8.03,50000,3200000
|
||||||
|
风暴-1,火箭炮,10.5,2.85,3.89,31326.24,193.58,2279.33,66.01,0,7.41,9.0,6.63,50000,6200000
|
||||||
|
火焰-S,火箭炮,7.8,2.38,2.66,18357.13,51.95,699.69,74.75,0,6.63,6.42,6.58,50000,1520000
|
||||||
|
火焰-M,火箭炮,8.6,3.01,2.71,26293.12,89.22,1348.74,72.84,0,7.75,6.85,5.92,50000,2680000
|
||||||
|
火焰-L,火箭炮,9.9,2.82,3.27,34096.15,151.08,1809.83,56.81,0,7.93,7.33,6.86,50000,4880000
|
||||||
|
|||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
4
frontend/dist/index.html
vendored
4
frontend/dist/index.html
vendored
@ -6,8 +6,8 @@
|
|||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<title>装备成本估算系统</title>
|
<title>装备成本估算系统</title>
|
||||||
<script type="module" crossorigin src="/assets/index-Bh8QJqs0.js"></script>
|
<script type="module" crossorigin src="/assets/index-BclX5sLE.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-B09nwhwe.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-D3ds-r_i.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>
|
<noscript>
|
||||||
|
|||||||
@ -178,7 +178,7 @@ import { getDemoAlgorithms, getDemoDataset, runAlgorithmDemo } from '@/api'
|
|||||||
|
|
||||||
const algorithms = ref([])
|
const algorithms = ref([])
|
||||||
const dataset = ref({})
|
const dataset = ref({})
|
||||||
const selectedAlgorithms = ref(['linear', 'ridge', 'random_forest', 'gradient_boosting'])
|
const selectedAlgorithms = ref(['linear', 'ridge', 'pls', 'random_forest', 'gbm', 'xgboost', 'lightgbm'])
|
||||||
const activeAlgorithm = ref('random_forest')
|
const activeAlgorithm = ref('random_forest')
|
||||||
const result = ref(null)
|
const result = ref(null)
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
@ -202,7 +202,7 @@ const activeMetric = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const selectRecommended = () => {
|
const selectRecommended = () => {
|
||||||
selectedAlgorithms.value = ['linear', 'ridge', 'random_forest', 'gradient_boosting']
|
selectedAlgorithms.value = ['linear', 'ridge', 'pls', 'random_forest', 'gbm', 'xgboost', 'lightgbm']
|
||||||
}
|
}
|
||||||
|
|
||||||
const loadInitialData = async () => {
|
const loadInitialData = async () => {
|
||||||
|
|||||||
@ -10,6 +10,7 @@ from sklearn.ensemble import GradientBoostingRegressor, RandomForestRegressor
|
|||||||
from sklearn.linear_model import LinearRegression, Ridge
|
from sklearn.linear_model import LinearRegression, Ridge
|
||||||
from sklearn.metrics import mean_absolute_error, mean_squared_error, r2_score
|
from sklearn.metrics import mean_absolute_error, mean_squared_error, r2_score
|
||||||
from sklearn.model_selection import train_test_split
|
from sklearn.model_selection import train_test_split
|
||||||
|
from sklearn.cross_decomposition import PLSRegression
|
||||||
from sklearn.neighbors import KNeighborsRegressor
|
from sklearn.neighbors import KNeighborsRegressor
|
||||||
from sklearn.pipeline import Pipeline
|
from sklearn.pipeline import Pipeline
|
||||||
from sklearn.preprocessing import StandardScaler
|
from sklearn.preprocessing import StandardScaler
|
||||||
@ -172,49 +173,57 @@ class DemoModelService:
|
|||||||
"linear",
|
"linear",
|
||||||
"线性回归",
|
"线性回归",
|
||||||
"Linear Regression",
|
"Linear Regression",
|
||||||
"线性模型",
|
"对比基准",
|
||||||
"快速建立基准模型,用于展示参数与成本之间的线性关系。",
|
"最简单的线性基准,用于对比其他算法的提升程度。",
|
||||||
Pipeline([("scaler", StandardScaler()), ("model", LinearRegression())]),
|
Pipeline([("scaler", StandardScaler()), ("model", LinearRegression())]),
|
||||||
),
|
),
|
||||||
"ridge": AlgorithmDefinition(
|
"ridge": AlgorithmDefinition(
|
||||||
"ridge",
|
"ridge",
|
||||||
"岭回归",
|
"岭回归",
|
||||||
"Ridge Regression",
|
"Ridge Regression",
|
||||||
"线性模型",
|
"对比基准",
|
||||||
"带正则化的线性模型,适合特征存在相关性的场景。",
|
"带 L2 正则化的线性模型,适合处理共线性特征。",
|
||||||
Pipeline([("scaler", StandardScaler()), ("model", Ridge(alpha=1.0))]),
|
Pipeline([("scaler", StandardScaler()), ("model", Ridge(alpha=1.0))]),
|
||||||
),
|
),
|
||||||
|
"pls": AlgorithmDefinition(
|
||||||
|
"pls",
|
||||||
|
"PLS回归",
|
||||||
|
"PLS Regression",
|
||||||
|
"线性模型",
|
||||||
|
"偏最小二乘回归,将特征投射到低维正交空间,适合小样本/共线性数据。",
|
||||||
|
Pipeline([("scaler", StandardScaler()), ("model", PLSRegression(n_components=4))]),
|
||||||
|
),
|
||||||
"random_forest": AlgorithmDefinition(
|
"random_forest": AlgorithmDefinition(
|
||||||
"random_forest",
|
"random_forest",
|
||||||
"随机森林",
|
"随机森林",
|
||||||
"Random Forest",
|
"Random Forest",
|
||||||
"树模型集成",
|
"集成学习",
|
||||||
"通过多棵决策树集成预测,能够捕捉非线性特征影响。",
|
"多棵决策树集成,能捕捉非线性关系,不易过拟合。",
|
||||||
RandomForestRegressor(n_estimators=160, max_depth=6, random_state=42),
|
RandomForestRegressor(n_estimators=100, max_depth=5, random_state=42),
|
||||||
),
|
),
|
||||||
"gradient_boosting": AlgorithmDefinition(
|
"gbm": AlgorithmDefinition(
|
||||||
"gradient_boosting",
|
"gbm",
|
||||||
"梯度提升树",
|
"GBM",
|
||||||
"Gradient Boosting",
|
"Gradient Boosting",
|
||||||
"树模型集成",
|
"集成学习",
|
||||||
"逐步修正误差的提升模型,常用于表格数据回归任务。",
|
"梯度提升树,逐步修正残差,表格数据常用方法。",
|
||||||
GradientBoostingRegressor(n_estimators=120, learning_rate=0.06, max_depth=3, random_state=42),
|
GradientBoostingRegressor(n_estimators=100, learning_rate=0.08, max_depth=3, random_state=42),
|
||||||
),
|
),
|
||||||
"svr": AlgorithmDefinition(
|
"svr": AlgorithmDefinition(
|
||||||
"svr",
|
"svr",
|
||||||
"支持向量回归",
|
"支持向量回归",
|
||||||
"Support Vector Regression",
|
"SVR",
|
||||||
"核方法",
|
"对比基准",
|
||||||
"使用核函数拟合平滑回归关系,适合展示不同算法偏好。",
|
"核方法回归,用于算法多样性对比。",
|
||||||
Pipeline([("scaler", StandardScaler()), ("model", SVR(C=500000, epsilon=50000))]),
|
Pipeline([("scaler", StandardScaler()), ("model", SVR(C=500000, epsilon=50000))]),
|
||||||
),
|
),
|
||||||
"knn": AlgorithmDefinition(
|
"knn": AlgorithmDefinition(
|
||||||
"knn",
|
"knn",
|
||||||
"近邻回归",
|
"K近邻回归",
|
||||||
"KNN Regression",
|
"KNN Regression",
|
||||||
"实例学习",
|
"对比基准",
|
||||||
"基于相似样本进行预测,便于解释局部相似性。",
|
"基于相似样本预测,便于解释局部规律。",
|
||||||
Pipeline([("scaler", StandardScaler()), ("model", KNeighborsRegressor(n_neighbors=4))]),
|
Pipeline([("scaler", StandardScaler()), ("model", KNeighborsRegressor(n_neighbors=3))]),
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
warnings = []
|
warnings = []
|
||||||
@ -226,12 +235,12 @@ class DemoModelService:
|
|||||||
"xgboost",
|
"xgboost",
|
||||||
"XGBoost",
|
"XGBoost",
|
||||||
"XGBoost",
|
"XGBoost",
|
||||||
"提升模型",
|
"集成学习",
|
||||||
"面向表格数据的高性能梯度提升实现。",
|
"高性能梯度提升实现,表格数据常用。",
|
||||||
XGBRegressor(
|
XGBRegressor(
|
||||||
n_estimators=120,
|
n_estimators=80,
|
||||||
max_depth=3,
|
max_depth=3,
|
||||||
learning_rate=0.05,
|
learning_rate=0.08,
|
||||||
subsample=0.9,
|
subsample=0.9,
|
||||||
colsample_bytree=0.9,
|
colsample_bytree=0.9,
|
||||||
random_state=42,
|
random_state=42,
|
||||||
@ -248,12 +257,13 @@ class DemoModelService:
|
|||||||
"lightgbm",
|
"lightgbm",
|
||||||
"LightGBM",
|
"LightGBM",
|
||||||
"LightGBM",
|
"LightGBM",
|
||||||
"提升模型",
|
"集成学习",
|
||||||
"基于直方图优化的快速梯度提升模型。",
|
"直方图优化的快速梯度提升,大数据下效率高。",
|
||||||
LGBMRegressor(
|
LGBMRegressor(
|
||||||
n_estimators=120,
|
n_estimators=80,
|
||||||
learning_rate=0.05,
|
learning_rate=0.08,
|
||||||
max_depth=4,
|
max_depth=4,
|
||||||
|
min_child_samples=3,
|
||||||
random_state=42,
|
random_state=42,
|
||||||
verbose=-1,
|
verbose=-1,
|
||||||
),
|
),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user