<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Scikit-Learn | Aaron3963</title><link>https://aaron3963.github.io/tags/scikit-learn/</link><atom:link href="https://aaron3963.github.io/tags/scikit-learn/index.xml" rel="self" type="application/rss+xml"/><description>Scikit-Learn</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Tue, 30 Dec 2025 00:00:00 +0000</lastBuildDate><image><url>https://aaron3963.github.io/media/icon_hu3009652487647302230.png</url><title>Scikit-Learn</title><link>https://aaron3963.github.io/tags/scikit-learn/</link></image><item><title>Machine Learning Factor Backtest Pipeline</title><link>https://aaron3963.github.io/project/simp-back-test/</link><pubDate>Tue, 30 Dec 2025 00:00:00 +0000</pubDate><guid>https://aaron3963.github.io/project/simp-back-test/</guid><description>&lt;p>This project is a backtesting pipeline that allows users to test simple algorithmic trading strategies with ease. It contains all necessary steps for backtesting, including data fetching, feature generation, model selection, signal creation, and report generation. The project is highly modularized and compatible with sklearn and pandas, so users can modify or import strategies without overhead.&lt;/p>
&lt;p>Trading signals are saved and loaded to Backtrader for backtesting, and quantStats is responsible for generating an HTML report that contains all testing metrics and graphs like the one below. There is also an automated Action workflow that generates a &lt;a href="https://aaron3963.github.io/SimpBackTest/" target="_blank" rel="noopener">static webpage&lt;/a> which contains all the reports generated.&lt;/p></description></item><item><title>Library Occupancy Analysis with Weather</title><link>https://aaron3963.github.io/project/library-occupancy/</link><pubDate>Fri, 01 Dec 2023 00:00:00 +0000</pubDate><guid>https://aaron3963.github.io/project/library-occupancy/</guid><description>&lt;div class="flex px-4 py-3 mb-6 rounded-md bg-primary-100 dark:bg-primary-900">
&lt;span class="pr-3 pt-1 text-primary-600 dark:text-primary-300">
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m11.25 11.25l.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0m-9-3.75h.008v.008H12z"/>&lt;/svg>
&lt;/span>
&lt;span class="dark:text-neutral-300">This project is fully rendered online that can be found &lt;a href="https://aaron3963.github.io/COGS-108-Project/" target="_blank" rel="noopener">here&lt;/a>.&lt;/span>
&lt;/div>
&lt;p>In this project, we investigated whether weather conditions influence student occupancy patterns at UCSD libraries, specifically Geisel and WongAvery. We combined hourly gate count data from the libraries with weather data from NOAA&amp;rsquo;s La Jolla station, covering the 2022-2023 academic year. After extensive data cleaning to remove outliers, weekends, and nighttime hours, we merged both datasets for analysis.&lt;/p>
&lt;p>Our exploratory analysis revealed interesting patterns: Geisel occupancy remained relatively stable throughout quarters, with no dramatic spike during finals week—contrary to common belief. We also found that Fridays and weekends consistently had lower foot traffic. When examining the relationship between temperature and library visits, we observed a weak but positive linear correlation during Fall and Spring quarters, suggesting that milder weather encourages more students to visit. However, Winter quarter showed no clear relationship, as students appeared to visit regardless of temperature.&lt;/p>
&lt;p>Overall, while we found some evidence supporting our hypothesis that weather affects library occupancy, the relationship is modest. Many other factors—such as academic schedules, midterms, and personal study habits—likely play more significant roles. We also identified data quality issues with WongAvery and excluded it from final analysis, highlighting the importance of robust data collection for future work.&lt;/p></description></item><item><title>News Headline Based S&amp;P500 Trading Strategy</title><link>https://aaron3963.github.io/project/news-sp500/</link><pubDate>Fri, 06 Dec 2024 00:00:00 +0000</pubDate><guid>https://aaron3963.github.io/project/news-sp500/</guid><description>&lt;div class="flex px-4 py-3 mb-6 rounded-md bg-primary-100 dark:bg-primary-900">
&lt;span class="pr-3 pt-1 text-primary-600 dark:text-primary-300">
&lt;svg height="24" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">&lt;path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m11.25 11.25l.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0a9 9 0 0 1 18 0m-9-3.75h.008v.008H12z"/>&lt;/svg>
&lt;/span>
&lt;span class="dark:text-neutral-300">This project is fully rendered online that can be found &lt;a href="https://aaron3963.github.io/CSE_151A_Project/" target="_blank" rel="noopener">here&lt;/a>.&lt;/span>
&lt;/div>
&lt;p>In this project, we aimed to build a model capable of predicting whether the S&amp;amp;P 500 index would rise or fall based on daily news headlines. We collected and analyzed over three years of headlines from CNBC, The Guardian, and Reuters, spanning from late 2017 to mid-2020, and combined them with corresponding daily S&amp;amp;P 500 trading data. Our exploratory data analysis revealed varying dataset sizes, common stop words dominating headlines, and a significant COVID-19 dip in early 2020 that we anticipated might impact our model&amp;rsquo;s performance.&lt;/p>
&lt;p>We began with a logistic regression baseline using TF-IDF features, which achieved only around 51-55% accuracy. We then implemented Transformer-based classifiers and experimented extensively with hyperparameter tuning, including adjusting attention heads, applying learning rate decay, and testing various text preprocessing strategies. Our best-performing model, which removed stop words, achieved a 61.5% test accuracy—modest but above random guessing.&lt;/p>
&lt;p>We translated this model into a quantitative trading strategy that used bearish predictions to short the market, generating over 10% gross profit in six months, significantly outperforming a simple buy-and-hold approach. While our results are encouraging, we acknowledge that financial markets are influenced by numerous factors beyond news sentiment, and we believe future work with LSTMs or BERT could further improve performance.&lt;/p></description></item></channel></rss>