Fat Rat Ai

Hi guys. I’m shrimp, a young neuroscience researcher who works with rats at UBC who will be joining in a couple days. I had an idea for a coding project that I think will be fun, but I may need a little advice from people who are more experienced. Here’s the idea. Research drugs are expensive and it would be useful to know how much drug I will need to order. The amount of drug I need depends on how much my rats weigh because studies always give doses relative to the rat’s weight. But rats grow. At the beginning of an experiment they might be 300 grams but by the end they might be 500. So I made a simple R script that looks at weight data for a cohort of rats and uses that data to make some very crude predictions. It works ok. I call it “Fat Rat”. But I want to do better. I want to train an Ai model to use 4 variables: sex, date, food given in grams, and rat weight, to predict what any rat might weigh before a test even starts. I have oodles of rat data to feed and I just am curious to see if it will work.

I have some limited experience in python and was thinking of using the PyTorch framework but I’m not married to the idea of something better exists. Although this project would actually be useful, it’s more of an attempt to learn. If anyone has suggestions for tutorials or wants to give me a hand themselves I would appreciate it. This is just one of many projects I hope to make in my spare time. If you have worked with Ai in the past I would love to hear your input. Programming isn’t something I learned in school but I love learning about it. This would be a great opportunity to do something both fun and potentially useful. Hope to hear your feedback. Thanks for reading

1 Like

Sounds interesting… I currently work on a software project that uses a TensorFlowLite model, which we train using python code that’s embedded in a Jupyter notebook. Unfortunately I wasn’t involved in setting up the model and while I have a background in AI, I never worked specifically on neural networks. I have been thinking I should spend some time playing with it, though, because right now I’m just blindly following instructions when I re-train our model.

I know that doesn’t actually help you at all… but it seems to me that predicting rat weights should be possible, and I’ll be interested to see how it works out. :slight_smile:

2 Likes

Check out huggingface.co

2 Likes

Cool, are they being reared to join the Fat Rat Race?

You can ask chatGPT 3.5 (the free version) to write code for you, it does pretty good job with boilerplate code and scripts.

UBC should have access to LinkedIn Learning, they have tutorials and code at Linked In Learning.

Good luck with your experiments!

Sorry I’ve been away for ages and got sucked into this experiment I’m doing. I actually managed to get pretty far with the ai coding with your gPT suggestion, although I don’t trust it to code on its own, because it often makes weird mistakes you wouldn’t expect. I had to use it more like an interactive text book. However I ran into a bit of a snag with my data for learning. I just don’t have enough in electronic form cuz everyone but me writes their rat weights on paper sheets. There are filing cabinets full of the it, but I would need an army of undergrads to transcribe it.

I’m thinking of taking my newly acquired ai knowledge and doing something else with a large electronically available data set. At least for the moment my dreams of Fat Rat ai are not likely to materialize.

Hi,

Glad that you are making progress with your Rat Experiments!

To overcome the tedious task of transcribing your existing paper data into spreadsheets (or text file/database), scan the paper sheets and save as image files. Excel can read photos/images and extract the data into columns.

Hope it helps!

Cheers,

RK

I was thinking of doing that but I am concerned about the writing not being legible or being misread. Everyone in my lab has a different handwriting. Some scribbling are more legible than others. I will try this when I have time and I’ll let you know how reliable scanning the sheets ends up being. Not to mention there are plenty of people who make mistakes on the sheets, scribble them out and annotate in the margins, or have 4s and 9s or 7s and 1s that look similar. It’s hard enough for a human. Anyhow, I am probably going to do this once August rolls around, and go from office to office scanning everyone’s old weight sheets. It’s going to be quite a process no matter what shortcuts I manage to take. I’ll let you know how it goes if I commit to the project. The way I see it is that bad data is worse than having only a small sample of data, so I want to make sure it’s accurate.

Thanks I will

So, the AI is not gonna be done for at least until the end of the year but I’m making progress in learning. I’m realizing this is totally possible but labour intensive for one person. I’ve been halted at the moment by being really busy with my actual experiments and not having enough data in electronic form to train my AI. I have learned how to do primary component analysis and was thinking that might help me choose what data would predict the rat weights well, but I don’t have a ton of different metrics to run it with yet. So far I have only my and my friend’s rat sheets and they only contain the date, how much the rats ate and how much they weigh in increments of 5 days for a couple years. I’m expecting I will need to set some serious time aside to collect more and unfortunately I don’t have any other quantitative measures. So we shall see if I pivot the AI project into another direction that’s more likely to bear fruit.