Posts

SARS-CoV-2 JN.1

Image
COVID-19 is still with us and it's underlying virus, SARS-CoV-2, is still evolving. The latest variant of concern is JN.1. As of February 2, 2024, the CDC estimates that JN.1 is the viral source of about 93% of all US COVID cases. JN.1 evolved from BA.2.86. BA.2.86 has a large number changes in the spike protein when compared to the original Wuhan sequence. The mutations gave BA.2.86 improved ability to evade the human immune system. In order to compare JN.1 changes to to BA.2.86, on January 22 I downloaded metadata for 16,460,375  sequences from GISAID . I also downloaded the full collection of FASTA SARS-CoV-2 sequences.  The analysis that follows is similar to this post . GISAID FASTA headers changed so I had to update some of code. I also wanted to add argument types to the Python code.  I used R to extract the BA.2.86 and JN.1 sequences from the metadata file. filter_chunk <- function (pango_lineage) { function (df, pos) { df <- suppressMess...

Thanks wsltty folks!

I use this blog to post small programming projects that implement some aspect of a subject that I'm interested in. This post is different. The computer that I use for development uses Windows 11. For most of my programming work, I use WSL2 . Last week, Windows update  KB5032190 caused havoc with several apps that I use regularly: VSCode, wsltty, Task Scheduler, and Windows itself. I use VSCode as my IDE. It operates with WSL via an exposed port. VSCode is actually running in Windows, but connects to WSL so it can run Linux compilers, apps, etc. After the update, it refused to connect to WSL. I fixed this problem the way many Windows app problems are solved; I deleted VSCode and reinstalled. After that it worked. I have no idea why it failed initially. I run a backup program every night at 1:00 am. It is launched by the Windows Task Scheduler. The actual program is ancient. It was written in perl about ten years ago. It has been operating flawlessly on different systems for that t...

Global Temperature Anomaly November 2023

Image
 Given the current OpenAI turmoil , it's hard to say how ChatGPT will develop in the near term. I, for one, welcome our new Microsoft  OpenAI overlords, for today at least. I have no hopes for a transparent ChatGPT. Predicting how temperature will rise over the next few years is difficult. Its seems that the world keeps being surprised that things are worse than we suspected. There may be reasons other than anthropogenic climate effects , but humanity is the main culprit. We're well on our way for 2023 being the hottest year on record. On 2023-11-14, I downloaded the global monthly temperature anomaly data from the Met Office Hadley Centre observations datasets . The CSV data file contains monthly estimates of the global temperature anomaly from January 1850 to September 2023. The temperature anomalies (deg C) are relative to 1961-1990. > library(tidyverse) > df_temp_hadcrut <- read_csv( 'ChatGPT/data/HadCRUT.5.0.1.0.analysis.summary_series.global.monthly.csv...

Programming With ChatGPT Part 2

Image
  Image generated by OpenAI In a previous post , I described my experiments using Bing/ChatGPT for programming. This time, I want to try some simpler tasks to see how ChatGPT handles them. In the previous post, ChatGPT generated the following Python code. I wrapped the generated code in a function. import numpy as np import pandas as pd import matplotlib.pyplot as plt def main (): out_file = '/mnt/d/Documents/analytic_garden/cp_pytorch/data/ts_chatgpt.csv' # Define the number of data points n = 1000 # Define the means and variances for each region means = [ 1 , 5 , 2 ] variances = [ 1 , 1 , 1 ] # Generate the time series ts = np . zeros(n) for i in range (n): if i < n // 3 : ts[i] = np . random . normal(means[ 0 ], variances[ 0 ]) elif i < 2 * n // 3 : ts[i] = np . random . normal(means[ 1 ], variances[ 1 ]) else : ts[i] = np . random . normal(means[ 2...

Programming With ChatGPT

Image
You may have read stories like this on Reddit or other sites: "Two weeks ago I couldn't program at all, now, thanks to ChatGPT , I'm a senior software engineer at Google." That is a bit of an exaggeration, but sites like r/ChatGPT  often contain quite a bit of AI hype. I was recently working on using PyTorch to detect change points in time series sequences.  I have written about change point detection before: here , here , here , and here . There are numerous methods for detecting regions of change in series data depending on the characteristics of the data. I was interested to see what ChatGPT could contribute. Change point detection algorithms are traditionally classified as online or offline. Offline methods have the entire data sequence available. Online algorithms process each data point as it arrives. I'm interested in offline change point detection. This paper gives a good overview of some of the common detection methods. Generating Data My first step wa...