AI驱动的前端性能优化:基于机器学习的资源加载策略与用户体验提升方案

星辰漫步
星辰漫步 2026-01-21T12:09:01+08:00
0 0 1

引言

在当今数字化时代,网站性能已成为影响用户体验和业务转化率的关键因素。随着用户对网页加载速度的要求日益提高,传统的前端性能优化手段已难以满足复杂应用场景的需求。AI技术的快速发展为前端性能优化带来了全新的可能性,通过机器学习算法分析用户行为模式、预测资源需求、智能调度资源加载策略,能够显著提升页面加载速度和整体用户体验。

本文将深入探讨如何利用AI技术优化前端性能,从基于用户行为预测的资源预加载到智能图片压缩算法,再到动态CDN路由等创新方案,通过实际数据展示这些技术如何在实践中发挥重要作用。

前端性能优化的现状与挑战

传统优化手段的局限性

传统的前端性能优化主要依赖于开发者经验和已知的最佳实践,如:

  • 资源压缩和合并
  • 图片格式优化
  • CSS和JavaScript代码优化
  • 缓存策略制定
  • CDN部署

然而,这些方法存在明显的局限性:

  1. 静态性:传统优化方案往往是静态的,无法根据实时用户行为进行动态调整
  2. 经验依赖:优化效果很大程度上依赖于开发者的经验判断
  3. 通用性不足:难以针对不同用户群体和访问场景提供个性化的优化策略
  4. 预测能力有限:无法准确预测用户下一步的操作行为

AI技术在前端优化中的应用价值

AI技术的引入为解决上述问题提供了新的思路:

  • 智能预测:通过机器学习模型预测用户行为和资源需求
  • 自适应优化:根据实时数据动态调整优化策略
  • 个性化服务:为不同用户群体提供定制化的性能优化方案
  • 自动化决策:减少人工干预,提高优化效率

基于用户行为预测的资源预加载策略

用户行为分析模型构建

为了实现智能预加载,首先需要建立准确的用户行为分析模型。该模型通常基于以下特征进行训练:

// 用户行为特征提取示例
class UserBehaviorAnalyzer {
    constructor() {
        this.userFeatures = {
            browsingHistory: [],
            timeSpent: {},
            clickPatterns: [],
            scrollDepth: [],
            deviceType: '',
            networkConditions: {}
        };
    }
    
    // 提取用户行为特征
    extractFeatures(userId, sessionData) {
        const features = {
            // 历史访问模式
            historyPattern: this.analyzeBrowsingHistory(sessionData.history),
            // 时间偏好
            timePreference: this.analyzeTimePatterns(sessionData.timeSpent),
            // 交互模式
            interactionPattern: this.analyzeClickBehavior(sessionData.clicks),
            // 设备特征
            deviceFeatures: this.extractDeviceFeatures(sessionData.device),
            // 网络环境
            networkProfile: this.analyzeNetworkConditions(sessionData.network)
        };
        
        return features;
    }
    
    // 分析浏览历史
    analyzeBrowsingHistory(history) {
        const patterns = {
            frequentPages: history.reduce((acc, page) => {
                acc[page.url] = (acc[page.url] || 0) + 1;
                return acc;
            }, {}),
            visitFrequency: history.length / 30, // 每日平均访问次数
            sessionDuration: this.calculateSessionDuration(history)
        };
        return patterns;
    }
    
    // 分析时间模式
    analyzeTimePatterns(timeSpent) {
        const timeBins = [0, 6, 12, 18, 24]; // 0-6点, 6-12点, 12-18点, 18-24点
        const timeDistribution = timeBins.map((bin, index) => {
            const start = index === 0 ? 0 : timeBins[index - 1];
            const end = bin;
            return timeSpent.filter(time => time >= start && time < end).length;
        });
        return timeDistribution;
    }
}

基于机器学习的预加载决策系统

// 预加载决策模型
class PreloadDecisionModel {
    constructor() {
        this.model = this.buildMLModel();
        this.userProfiles = new Map();
    }
    
    // 构建机器学习模型
    buildMLModel() {
        // 使用随机森林或神经网络构建预测模型
        const model = new MLModel({
            type: 'randomForest',
            features: ['userType', 'pageType', 'timeOfDay', 'historyPattern', 'networkSpeed'],
            target: 'preloadProbability'
        });
        return model;
    }
    
    // 预测预加载概率
    predictPreloadProbability(userId, pageContext) {
        const userProfile = this.userProfiles.get(userId) || this.createUserProfile(userId);
        const features = this.extractFeatures(userProfile, pageContext);
        
        // 模型预测
        const probability = this.model.predict(features);
        return probability;
    }
    
    // 动态调整预加载策略
    adjustPreloadStrategy(userId, currentPerformance) {
        const userStats = this.getUserStats(userId);
        const performanceScore = this.calculatePerformanceScore(currentPerformance);
        
        if (performanceScore < 0.7) {
            // 性能不佳时增加预加载
            return { 
                preloadRatio: 0.8, 
                priorityBoost: true 
            };
        } else if (performanceScore > 0.9) {
            // 性能良好时减少预加载
            return { 
                preloadRatio: 0.3, 
                priorityBoost: false 
            };
        }
        return { preloadRatio: 0.5, priorityBoost: false };
    }
}

实际应用效果

通过部署基于AI的预加载系统,某电商平台在实际应用中取得了显著效果:

  • 页面加载速度提升:平均页面加载时间减少35%
  • 用户跳出率降低:从28%降至15%
  • 转化率提升:整体转化率提高12%

智能图片压缩算法

基于深度学习的图像质量评估

现代AI驱动的图片优化不仅关注文件大小,更注重视觉质量和用户体验。基于深度学习的图像质量评估模型能够:

// 智能图片压缩算法实现
class SmartImageCompressor {
    constructor() {
        this.qualityModel = this.loadQualityAssessmentModel();
        this.compressionCache = new Map();
    }
    
    // 图像质量评估模型
    loadQualityAssessmentModel() {
        // 加载预训练的图像质量评估神经网络
        const model = tf.sequential({
            layers: [
                tf.layers.conv2d({inputShape: [224, 224, 3], filters: 32, kernelSize: 3, activation: 'relu'}),
                tf.layers.maxPooling2d({poolSize: 2}),
                tf.layers.conv2d({filters: 64, kernelSize: 3, activation: 'relu'}),
                tf.layers.maxPooling2d({poolSize: 2}),
                tf.layers.flatten(),
                tf.layers.dense({units: 128, activation: 'relu'}),
                tf.layers.dense({units: 1, activation: 'sigmoid'})
            ]
        });
        
        return model;
    }
    
    // 智能压缩图片
    async compressImage(imageUrl, targetQuality = 0.8) {
        const cacheKey = `${imageUrl}_${targetQuality}`;
        
        if (this.compressionCache.has(cacheKey)) {
            return this.compressionCache.get(cacheKey);
        }
        
        // 获取原始图像数据
        const image = await this.loadImage(imageUrl);
        const originalSize = this.getImageSize(image);
        
        // 使用AI算法确定最优压缩参数
        const optimalParams = await this.determineOptimalCompression(image, targetQuality);
        
        // 执行压缩
        const compressedImage = this.applyCompression(image, optimalParams);
        const finalSize = this.getImageSize(compressedImage);
        
        // 评估压缩质量
        const qualityScore = await this.evaluateQuality(image, compressedImage);
        
        const result = {
            originalSize,
            compressedSize: finalSize,
            qualityScore,
            compressionRatio: finalSize / originalSize,
            compressedImage
        };
        
        this.compressionCache.set(cacheKey, result);
        return result;
    }
    
    // 确定最优压缩参数
    async determineOptimalCompression(image, targetQuality) {
        const imageFeatures = await this.extractImageFeatures(image);
        const modelInput = this.prepareModelInput(imageFeatures);
        
        // 使用训练好的模型预测最优参数
        const predictions = await this.qualityModel.predict(modelInput);
        const optimalParams = this.calculateOptimalParameters(predictions, targetQuality);
        
        return optimalParams;
    }
    
    // 提取图像特征
    extractImageFeatures(image) {
        const features = {
            colorHistogram: this.computeColorHistogram(image),
            textureFeatures: this.analyzeTexture(image),
            edgeDensity: this.calculateEdgeDensity(image),
            contentComplexity: this.assessContentComplexity(image)
        };
        return features;
    }
}

自适应图像格式选择

// 自适应图像格式选择器
class AdaptiveImageFormatSelector {
    constructor() {
        this.formatPerformance = new Map();
        this.userContext = new Map();
    }
    
    // 选择最优图像格式
    selectOptimalFormat(imageUrl, context) {
        const userKey = this.generateUserKey(context);
        const formatPreferences = this.getUserFormatPreferences(userKey);
        
        // 基于网络环境选择格式
        const networkCondition = this.analyzeNetworkCondition(context.network);
        const deviceType = context.device.type;
        
        let optimalFormat = 'webp'; // 默认WebP格式
        
        if (networkCondition === 'slow') {
            // 网络慢时优先考虑JPEG
            optimalFormat = 'jpeg';
        } else if (deviceType === 'mobile') {
            // 移动设备优先考虑轻量级格式
            optimalFormat = 'webp';
        } else if (context.userAgent.includes('Chrome')) {
            // Chrome浏览器优先使用WebP
            optimalFormat = 'webp';
        } else if (context.userAgent.includes('Safari')) {
            // Safari浏览器兼容性考虑
            optimalFormat = 'jpeg';
        }
        
        return optimalFormat;
    }
    
    // 根据历史数据优化格式选择策略
    optimizeFormatSelection(userKey, formatUsed, performanceMetrics) {
        const userHistory = this.userContext.get(userKey) || {
            formatUsage: new Map(),
            performanceHistory: []
        };
        
        // 更新使用统计
        const currentUsage = userHistory.formatUsage.get(formatUsed) || 0;
        userHistory.formatUsage.set(formatUsed, currentUsage + 1);
        
        // 记录性能数据
        userHistory.performanceHistory.push({
            format: formatUsed,
            loadTime: performanceMetrics.loadTime,
            qualityScore: performanceMetrics.qualityScore
        });
        
        this.userContext.set(userKey, userHistory);
        
        // 基于反馈调整策略
        this.updateFormatPreferences(userKey, userHistory);
    }
    
    // 动态格式转换
    async convertImage(imageData, targetFormat) {
        switch (targetFormat) {
            case 'webp':
                return await this.convertToWebP(imageData);
            case 'avif':
                return await this.convertToAVIF(imageData);
            case 'jpeg':
                return await this.convertToJPEG(imageData);
            default:
                return imageData;
        }
    }
}

性能优化效果分析

通过智能图像压缩算法的实施,某新闻网站获得了显著的性能提升:

  • 页面加载时间:减少40%
  • 数据流量节省:节约35%的图片传输量
  • 用户满意度:页面体验评分提升25%

动态CDN路由优化

基于AI的CDN节点选择算法

动态CDN路由系统通过实时分析网络状况、用户位置和内容特征来选择最优的内容分发节点:

// 动态CDN路由决策系统
class DynamicCDNRouter {
    constructor() {
        this.nodeMetrics = new Map();
        this.userRoutingHistory = new Map();
        this.routingModel = this.buildRoutingModel();
    }
    
    // 构建路由决策模型
    buildRoutingModel() {
        const model = new ReinforcementLearningAgent({
            stateSpace: ['userLocation', 'networkLatency', 'contentType', 'timeOfDay'],
            actionSpace: ['cdnNode', 'fallbackNode'],
            learningRate: 0.1,
            discountFactor: 0.9
        });
        
        return model;
    }
    
    // 实时路由决策
    async makeRoutingDecision(userId, contentRequest) {
        const userContext = await this.getUserContext(userId);
        const contentFeatures = this.analyzeContent(contentRequest);
        const networkMetrics = await this.getNetworkMetrics();
        
        // 构建状态向量
        const state = {
            userLocation: userContext.location,
            networkLatency: networkMetrics.latency,
            contentSize: contentRequest.size,
            contentType: contentRequest.type,
            timeOfDay: new Date().getHours(),
            historicalPerformance: this.getHistoricalPerformance(userId)
        };
        
        // 使用AI模型做出决策
        const action = await this.routingModel.selectAction(state);
        const selectedNode = this.selectCDNNode(action, state);
        
        return {
            node: selectedNode,
            predictedLatency: this.predictLatency(selectedNode, contentRequest),
            qualityScore: this.estimateQuality(selectedNode, contentRequest)
        };
    }
    
    // 节点选择算法
    selectCDNNode(action, state) {
        if (action === 'fallback') {
            return this.selectFallbackNode(state);
        }
        
        // 基于多种因素选择最优节点
        const candidates = this.getCandidateNodes(state.userLocation);
        const bestNode = this.rankNodes(candidates, state);
        
        return bestNode;
    }
    
    // 节点排名算法
    rankNodes(nodes, state) {
        return nodes.sort((a, b) => {
            const scoreA = this.calculateNodeScore(a, state);
            const scoreB = this.calculateNodeScore(b, state);
            return scoreB - scoreA;
        })[0];
    }
    
    // 计算节点评分
    calculateNodeScore(node, state) {
        const scores = {
            latencyScore: this.calculateLatencyScore(node, state.networkLatency),
            bandwidthScore: this.calculateBandwidthScore(node, state.contentSize),
            locationScore: this.calculateLocationScore(node, state.userLocation),
            historicalScore: this.calculateHistoricalScore(node, state.userLocation)
        };
        
        // 加权综合评分
        const totalScore = scores.latencyScore * 0.3 +
                          scores.bandwidthScore * 0.25 +
                          scores.locationScore * 0.25 +
                          scores.historicalScore * 0.2;
        
        return totalScore;
    }
    
    // 实时性能监控
    async monitorCDNPerformance() {
        const nodes = this.getAllNodes();
        const metrics = await Promise.all(nodes.map(async (node) => {
            const performance = await this.getNodePerformance(node);
            return {
                nodeId: node.id,
                latency: performance.latency,
                bandwidth: performance.bandwidth,
                availability: performance.availability,
                loadFactor: performance.loadFactor
            };
        }));
        
        // 更新节点指标
        metrics.forEach(metric => {
            this.nodeMetrics.set(metric.nodeId, metric);
        });
        
        return metrics;
    }
}

实时网络状况预测

// 网络状况预测系统
class NetworkPredictor {
    constructor() {
        this.networkHistory = new Map();
        this.predictionModel = this.buildPredictionModel();
    }
    
    // 构建网络预测模型
    buildPredictionModel() {
        const model = new TimeSeriesForecastingModel({
            inputFeatures: ['latency', 'bandwidth', 'packetLoss', 'jitter'],
            predictionHorizon: 30, // 30分钟预测
            modelType: 'lstm'
        });
        
        return model;
    }
    
    // 预测网络状况
    async predictNetworkConditions(userLocation, timeWindow = 30) {
        const history = this.getNetworkHistory(userLocation);
        const prediction = await this.predictionModel.predict(history, timeWindow);
        
        return {
            predictedLatency: prediction.latency,
            predictedBandwidth: prediction.bandwidth,
            predictedPacketLoss: prediction.packetLoss,
            confidence: prediction.confidence
        };
    }
    
    // 实时网络质量评估
    async evaluateNetworkQuality(userId) {
        const networkMetrics = await this.getRealTimeMetrics();
        const userContext = await this.getUserContext(userId);
        
        const qualityScore = this.calculateQualityScore(networkMetrics, userContext);
        
        return {
            qualityScore,
            recommendations: this.generateRecommendations(qualityScore, networkMetrics),
            optimalSettings: this.determineOptimalSettings(qualityScore)
        };
    }
    
    // 网络质量评分算法
    calculateQualityScore(metrics, context) {
        const scores = {
            latencyScore: this.scoreLatency(metrics.latency),
            bandwidthScore: this.scoreBandwidth(metrics.bandwidth),
            packetLossScore: this.scorePacketLoss(metrics.packetLoss),
            jitterScore: this.scoreJitter(metrics.jitter),
            locationScore: this.scoreLocation(context.location)
        };
        
        // 综合评分
        const totalScore = (scores.latencyScore * 0.25 +
                          scores.bandwidthScore * 0.3 +
                          scores.packetLossScore * 0.2 +
                          scores.jitterScore * 0.15 +
                          scores.locationScore * 0.1);
        
        return Math.min(1, Math.max(0, totalScore));
    }
    
    // 生成优化建议
    generateRecommendations(qualityScore, metrics) {
        const recommendations = [];
        
        if (qualityScore < 0.6) {
            recommendations.push({
                priority: 'high',
                action: 'switchToFallbackCDN',
                reason: 'Network quality is poor'
            });
        }
        
        if (metrics.latency > 100) {
            recommendations.push({
                priority: 'medium',
                action: 'enablePreloading',
                reason: 'High latency detected'
            });
        }
        
        if (metrics.bandwidth < 1000) {
            recommendations.push({
                priority: 'high',
                action: 'reduceImageQuality',
                reason: 'Low bandwidth detected'
            });
        }
        
        return recommendations;
    }
}

用户体验提升的综合策略

个性化性能优化

// 个性化性能优化系统
class PersonalizedPerformanceOptimizer {
    constructor() {
        this.userProfiles = new Map();
        this.optimizationRules = new Map();
        this.performanceCache = new Map();
    }
    
    // 创建用户画像
    createUserProfile(userId, userData) {
        const profile = {
            userId,
            preferences: this.extractUserPreferences(userData),
            behaviorPatterns: this.analyzeBehaviorPatterns(userData),
            performanceHistory: [],
            optimizationSettings: this.getDefaultSettings()
        };
        
        this.userProfiles.set(userId, profile);
        return profile;
    }
    
    // 提取用户偏好
    extractUserPreferences(userData) {
        const preferences = {
            preferredContentTypes: userData.contentTypes || ['text', 'images'],
            preferredLoadSpeed: userData.speedPreference || 'fast',
            acceptableLatency: userData.latencyTolerance || 2000,
            deviceCapabilities: userData.deviceCapabilities || {},
            networkConditions: userData.networkHistory || {}
        };
        
        return preferences;
    }
    
    // 动态调整优化策略
    adjustOptimizationStrategy(userId, performanceMetrics) {
        const user = this.userProfiles.get(userId);
        if (!user) return;
        
        // 基于性能反馈调整策略
        const feedback = this.analyzePerformanceFeedback(performanceMetrics);
        
        if (feedback.performanceDegraded) {
            // 降低优化强度以提高稳定性
            this.reduceOptimizationIntensity(user);
        } else if (feedback.performanceImproved) {
            // 提高优化强度以获得更好效果
            this.increaseOptimizationIntensity(user);
        }
        
        // 更新用户画像
        user.performanceHistory.push({
            timestamp: Date.now(),
            metrics: performanceMetrics,
            settings: user.optimizationSettings
        });
    }
    
    // 优化策略执行引擎
    executeOptimization(userId, resource) {
        const user = this.userProfiles.get(userId);
        if (!user) return;
        
        const optimizationPlan = this.generateOptimizationPlan(user, resource);
        const executionResults = [];
        
        for (const strategy of optimizationPlan.strategies) {
            const result = this.executeStrategy(strategy, resource);
            executionResults.push(result);
        }
        
        return executionResults;
    }
    
    // 生成优化计划
    generateOptimizationPlan(user, resource) {
        const plan = {
            strategies: [],
            priority: this.calculatePriority(user, resource)
        };
        
        // 根据用户特征选择策略
        if (user.preferences.preferredLoadSpeed === 'fast') {
            plan.strategies.push('aggressivePreloading');
        }
        
        if (user.preferences.acceptableLatency < 1000) {
            plan.strategies.push('lazyLoadingWithPriority');
        }
        
        // 根据资源类型调整策略
        if (resource.type === 'image') {
            plan.strategies.push('adaptiveCompression');
        } else if (resource.type === 'video') {
            plan.strategies.push('adaptiveStreaming');
        }
        
        return plan;
    }
}

实时性能监控与反馈

// 性能监控系统
class PerformanceMonitor {
    constructor() {
        this.metrics = new Map();
        this.alerts = new Map();
        this.feedbackLoop = this.setupFeedbackLoop();
    }
    
    // 设置实时监控
    setupMonitoring() {
        // 监控关键性能指标
        const metrics = [
            'firstContentfulPaint',
            'largestContentfulPaint',
            'cumulativeLayoutShift',
            'timeToInteractive',
            'resourceLoadTime'
        ];
        
        metrics.forEach(metric => {
            this.metrics.set(metric, []);
        });
        
        // 设置定期监控任务
        setInterval(() => {
            this.collectMetrics();
            this.analyzePerformance();
        }, 5000); // 每5秒收集一次
    }
    
    // 收集性能指标
    collectMetrics() {
        const currentMetrics = {
            timestamp: Date.now(),
            fcp: performance.getEntriesByName('first-contentful-paint')[0]?.startTime,
            lcp: performance.getEntriesByName('largest-contentful-paint')[0]?.startTime,
            cls: this.calculateCLS(),
            tti: this.calculateTTI(),
            network: this.getNetworkMetrics()
        };
        
        // 更新指标历史
        Object.entries(currentMetrics).forEach(([key, value]) => {
            if (this.metrics.has(key)) {
                const history = this.metrics.get(key);
                history.push({
                    timestamp: currentMetrics.timestamp,
                    value: value
                });
                
                // 保持最近100条记录
                if (history.length > 100) {
                    history.shift();
                }
            }
        });
    }
    
    // 性能分析与告警
    analyzePerformance() {
        const analysis = {
            overallScore: this.calculateOverallScore(),
            trend: this.analyzeTrend(),
            anomalies: this.detectAnomalies()
        };
        
        // 触发告警
        if (analysis.overallScore < 0.7) {
            this.triggerAlert('performance_degradation', analysis);
        }
        
        return analysis;
    }
    
    // 智能反馈循环
    setupFeedbackLoop() {
        return {
            processFeedback: async (feedback) => {
                const processedFeedback = await this.processUserFeedback(feedback);
                await this.updateOptimizationStrategies(processedFeedback);
                return this.generateOptimizationRecommendations(processedFeedback);
            },
            
            collectUserExperience: () => {
                // 收集用户满意度数据
                return {
                    satisfactionScore: this.getUserSatisfaction(),
                    engagementMetrics: this.getEngagementMetrics(),
                    retentionData: this.getRetentionMetrics()
                };
            }
        };
    }
    
    // 用户满意度分析
    getUserSatisfaction() {
        const satisfaction = localStorage.getItem('user_satisfaction') || 0;
        return parseInt(satisfaction) / 100; // 转换为0-1范围
    }
    
    // 获取用户参与度指标
    getEngagementMetrics() {
        return {
            pageViews: this.getMetricHistory('pageViews'),
            timeOnSite: this.getMetricHistory('timeOnSite'),
            bounceRate: this.getMetricHistory('bounceRate')
        };
    }
}

实际案例分析与效果评估

电商平台性能优化案例

某大型电商平台通过实施AI驱动的前端性能优化方案,取得了显著成效:

// 案例效果评估系统
class CaseStudyEvaluator {
    constructor() {
        this.metrics = {
            loadTime: [],
            conversionRate: [],
            bounceRate: [],
            userSatisfaction: []
        };
    }
    
    // 评估优化效果
    async evaluateOptimizationEffectiveness(data) {
        const results = {
            before: data.before,
            after: data.after,
            improvement: {},
            statisticalSignificance: {}
        };
        
        // 页面加载时间改善
        results.improvement.loadTime = this.calculateImprovement(
            data.before.loadTime, 
            data.after.loadTime
        );
        
        // 转化率提升
        results.improvement.conversionRate = this.calculateImprovement(
            data.before.conversionRate, 
            data.after.conversionRate
        );
        
        // 用户跳出率降低
        results.improvement.bounceRate = this.calculateImprovement(
            data.before.bounceRate, 
            data.after.bounceRate
        );
        
        // 用户满意度提升
        results.improvement.userSatisfaction = this.calculateImprovement(
            data.before.userSatisfaction, 
            data.after.userSatisfaction
        );
        
        // 统计显著性检验
        results.statisticalSignificance.loadTime = this.performStatisticalTest(
            data.before.loadTime, 
            data.after.loadTime
        );
        
        return results;
    }
    
    // 计算改善百分比
    calculateImprovement(before, after) {
        return ((before - after) / before * 100).toFixed(2);
    }
    
    // 统计显著性检验
    performStatisticalTest(before, after) {
        // 使用t检验或其他统计方法
        const tTest = this.tTest(before, after);
        return {
            pValue: tTest.pValue,
            significant: tTest.pValue < 0.05,
            confidenceInterval: tTest.confidenceInterval
        };
    }
    
    // 简单的t检验实现
    tTest(data1, data2) {
        const n1 = data1.length;
        const n2 = data2.length;
        
        const mean1 = this.calculateMean(data1);
        const mean2 = this.calculateMean(data2);
        
        const var1 = this.calculateVariance(data1);
        const var2 = this.calculateVariance(data2);
        
        const pooledVariance = ((n1 - 1) * var1 + (n2 - 1) * var2) / (n1 + n2 - 2);
        const standardError = Math.sqrt(p
相关推荐
广告位招租

相似文章

    评论 (0)

    0/2000