A navigation prediction and asset preloading system that forecasts user navigation paths and preloads web assets using a Decision Tree model.
PredictPulse enhances web performance by predicting user navigation paths and preloading assets (images, CSS, JS) for the next page, based on interaction patterns, device context, and session data. It uses a client-side Decision Tree model trained on user logs via train_model.py, dynamically adapting to userAgent and screenWidth. The system achieves 54.55% accuracy with a 100-log dataset and introduces the Web Operational Intelligence Score (WOIS) to evaluate adaptive intelligence.
- Navigation Prediction & Preloading: Forecasts next pages and preloads assets using a Decision Tree model.
- Dynamic Adaptation: Adjusts predictions based on
userAgentandscreenWidth. - User Context Awareness: Incorporates device type, OS, browser, and screen size.
- Open-Source: Deployed at gitgetgotgotten.github.io/predictpulse.
- Clone:
git clone https://github.com/gitgetgotgotten/predictpulse - Go:
cd predictpulse - Install:
npm install - Generate mock data:
node scripts/generate_mockdata.js(outputs topredictpulse_mockdata.json) - Train model:
pip install pandas scikit-learn numpy ua-parser && python train_model.py(outputs tosrc/utils/predictNextPage.js,public/encoders.json,public/asset_map.json)
- Build:
npm run build - Deploy:
npm run deploy - Visit: Your https://gitgetgotgotten.github.io/predictpulse equivalent
git checkout mainRemove-Item -Recurse -Force dist(Windows PowerShell)- macOS/Linux:
rm -rf dist
- macOS/Linux:
git push origin :gh-pagespython train_model.pypython generate_asset_map.pynpm run buildnode scripts/build.jscp public/asset_map.json dist/asset_map.jsonnpm run deploy
- Run:
python evaluate.py - Check:
evaluation_results.json
- Run:
python evaluate_real.py - Check:
evaluation_results_real.json
Logs are stored in IndexedDB and uploaded to a private GitHub repo (predictpulse-data, data branch) after each page visit. To set up:
- Create a private repo:
predictpulse-data. - Create a
databranch. - Generate a GitHub Personal Access Token with repo scope.
- Set token:
localStorage.setItem('github_token', 'your_token')in browser console (for downloads only, manually removed after use). - Test uploads: Navigate pages and check
predictpulse_realdata.jsoninpredictpulse-data. - Aggregate logs:
GITHUB_TOKEN=your_token node scripts/upload_logs.js(server-side, after collecting logs). - Use Vercel to securely store the GitHub token and request data from there, ensuring safe management and access to the private repo.
User data is anonymized (page visits, device stats) and collected only with consent via a popup. Logs are stored in a private GitHub repo, accessible to collaborators.
MIT