Category Archives: AI

Quantum Cross Validation

So here is why chatGPT is so disruptive.

You can basically ask it advanced scientific questions about concepts you don’t fully grasp but you know how the technology has been used in certain areas. Case in point, quantum cross validation.

I figured I know about IBM’s qiskit, and I know about quantum cross validation, but I’ve never used qiskit and unsure how I would setup the problem.

So… I asked chatGPT my understanding of the problem,

Then I recalled the bright idea to refine the prompt questions based on a feedback loop by volleying back inferences into chatGPT (essentially iterating over the inference system) asking it to rephrase–providing clarity where necessary–and to make any suggested scientific corrections (important: upped the “top p” to ensure it was using more resources to get a quality answer). Then I fed this refined question back into chatGPT until “is the above information accurate, clarify where it’s not” was answered as “True”, and there was nothing left to clarify and then I finally took away what it coded me.

I have yet to test this as I’m still working towards finetuning my own GPT-Neo, but this is what I’ve been hoping people understand about these system’s. They have generalized on the relationships in language to basically query up these results for us. The more data you have exposure to, the more relationships derived the wider the set of questions the system can respond to.

https://gist.github.com/thistleknot/466d6abbb85638de1d1552aab6984bf5

Turing GAN

I was thinking about how GAN’s have been used to create real life looking images and thought… we have chatbot’s that sound realistic enough (chatGPT). Couldn’t GAN’s be used to develop a conversation system (chatbot for lack of better word) that was validated by a GAN in much the same way as GAN’s are used to generate realistic images? The engine would just keep correcting itself until it passed the GAN’s thresholds.

#turing

The concept of Hell

Human: Is the idea of hell a scare tactic? Where did it come from if Jewish people don’t hold a similar belief? How did the idea evolve from a Jewish religion to existing within a Christian one if Christianity inherited their ideas from Judaism before writing their own new testament on top of the Old Testament? What specific books of the bible, authors, even verses were construed to support the idea of hell and highlight whether it was a judaic source or christian (new testament).
AI:
The concept of hell as a place of punishment after death is not believed in by Jews, as they do not take a belief in an afterlife. However, the concept of hell does exist in Christianity and has evolved from its Judaic roots. The idea of Hell as a place of punishment for sin was first present in the religion of Zoroastrianism and was adopted by Judaism and then Christianity, with the earliest references to Hell being found in the Jewish Apocrypha.

The New Testament mentions the concept of Hell several times, including in Matthew 25:46, Revelation 21:8, and 2 Peter 2:4. Many theologians believe that the Christian concept of Hell was influenced heavily by the Jewish concept of Gehenna, which was a place outside of Jerusalem where sacrifices were made. Additionally, several Old Testament passages refer to a place of punishment, including Isaiah 66:24 and Psalm 9:17.

chatGPT – Ice Age, Flood, and Atlantis

How is it that humans for thousands of years survived the Ice Age? Was the whole world covered in ice? If not were there warm/habitable regions that would have allowed for agricultural farming? What is the likelihood that civilizations sprang up in these areas and when the ice melted they were lost under the incoming water? What is more likely. That humans were hunter gatherer’s during this entire time, or that they developed basic agricultural skills. Please defend your case with examples.
AI:

Humans survived the Ice Age primarily through a combination of hunter-gatherer and, to some degree, agricultural practices. Hunter-gatherer activities such as fishing, hunting, gathering, and scavenging provided a steady and reliable source of sustenance across the entirety of the Ice Age. It is also likely that humans developed some basic agricultural skills during this time period, especially in areas with warmer climates that were not covered in ice. For example, evidence suggests that humans living in what is now the United Kingdom during the Ice Age practiced cereal cultivation on a small scale.

In regards to civilizations potentially springing up in areas with warm climates and then being lost when the ice melted, this is unlikely. While it is possible that such civilizations once existed, the archaeological record does not provide any evidence to suggest that this actually happened. Moreover, due to the migratory nature of humans living during the Ice Age, it is more likely that any civilizations that did form would have been widely dispersed rather than concentrated in one particular area.
Human: So… your take is the Atlantis story as described by Plato being handed down by the Egyptians doesn’t describe what exists in multiple world religions (a deluge) when the straights of Gibraltar broke and created the Mediterranean?
AI:

No, I do not believe that the Atlantis story as described by Plato is related to the flood described in multiple world religions. While Plato’s story features a large flood, it is likely an exaggeration of a much smaller event or event series that occurred in the region. Additionally, archaeological evidence does not support the idea that these two floods are related in any way.
Human: What does the archeological evidence say about these two floods then?
AI:
The archaeological evidence indicates that the floods described in multiple world religions likely occurred thousands of years before the events described in Plato’s story. Furthermore, the scale of the floods described in world religions is significantly larger and more destructive than the flood described in Plato’s story. This suggests that the two floods are likely not related.
Human: How do we have any basis to know the timeframes of when the two floods might have occurred?
AI:

We know that the floods described in multiple world religions occurred prior to the events described in Plato’s story thanks to a variety of archaeological evidence. For example, historians and archaeologists have studied ancient artifacts that predate Plato’s story and determined that they would have been destroyed by the flood writers describe in world religions. Additionally, paleontological evidence suggests that some species of animals were rendered extinct prior to the events described in Plato’s story, indicating that a significant flooding event must have occurred earlier. Finally, geological evidence indicates that land forms in particular regions have changed drastically since before Plato’s story, suggesting that large-scale flooding events must have occurred since then.

All possible best models using ensemble comparisons (ANN, KNN, Random Forest, XGBoost, Elastic Net, Best Subsets) (2020-11-22)

This single file does everything you need to do in Machine Learning for non time series data. (Reposted after I did some major code cleanup). The Caret library is awesome!

What does it do?
* Derives interactions, and squared predictor terms. 
* Sets a training and holdout partition.
* Uses cross validation for all models
* Ensemble comparison: Reports RMSE of each model (caret/models handles the factor reduction!) and gives summary information on the best model
* Prints out best forecast compared with holdout
* Shows correlation of forecast/holdout as goodness of fit
* Iterate through every column of original dataset as the independent term

Models applied
* KNN
* ANN (Nueral network)
* Random Forest
* XGBoost
* Elastic Net
* Best subset using leaps

It runs very fast.

You can easily retrofit this for any of your own data and derive your own inferences

#machinelearning
Code: https://github.com/thistleknot/matrixMultiplicationRegression/blob/master/caret%20elastic%20nnet%20xg%20leaps%20models.R

Artificial Neural Network Technical Indicator Trading

Based on the following tutorials

https://rpubs.com/sergiomora123/Bitcoin_nnet

https://medium.com/@salsabilabasalamah/cross-validation-of-an-artificial-neural-network-f72a879ea6d5

Github: https://github.com/thistleknot/ANN_trading

I noticed some glaring mistakes in the tutorials I was following. For example they apply normalization to ALL the data vs extracting normalization parameter’s to the training data and then using THIS to normalize and denormalize the the test predictions. Which are things I went over during my self imposed sabattical.

I’m really really excited to see how this plays out when I do stepforward on my stocks. 

What you see here is a regression line of predicted vs actual (testdata) without using the testdata in my model building. These are RETURNS