Posts

Showing posts from August, 2019

Statistics, Python, Making a Stem Plot

Image
I'm doing homework, and the book is covering Stem plots. Well when I looked up stem plots, there were tons of options. Look at MatPlotLib's stem plots: https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.stem.html I mean.  Wait wait wait.... My book has something like this: STEM                   LEAF 1                            2, 3, 4 2                            5, 6, 8 3                            1, 3, 5 So,  what do I do when I can't visualize the data?  I code.  And I glue it inside my teflon brain with that code. This is how I learn, but it isn't necessarily how any one else does. Pictures:  top= picture of excel file with stem plot. bottom= picture of stem plot printed i...

Creating an Excel sheet with random data table and Python

Image
Today in my Statistics class we were using Excel to create tables of random numbers. I don't know a ton about excel yet, so there may be a WAY easier way to set this up in Excel. The problem in class was:  Every time you changed a cell in the excel file, the random numbers would refresh, and change.   If this was a real table we wanted to use to get actual statistics, we would want this table to stay,  and we would want to be able to save it for future reference. So in class, I started tinkering. After I got home, cut my dad's wonky hair, and fed myself some yummy broccoli salad, I sat down to make this code up. It uses Python to create a random list of numbers. Then it takes that random list of numbers, a size for columns and rows, and uses a formula I found on stackOverflow to write that array to an excel file. It will also check to make sure all data is compatible. If you want a 5 rows of 10 items each, the total length of the initial random numb...

Part 2: some working code for python, nltk, sql chatbox experiment

Update: 9-10-19 Life has been hectic, but I am constantly stirring this project in my brain pan.  I hope to do the part 3 soon, but it's a ton to learn.  I will come back to it when life gives me time. I started to tackle this today, and if you haven't looked at part 1 of this experiment, and you want to it's mostly just me figuring out what I need to setup and psuedocode.  Here's the link: https://camelcasenoodles.blogspot.com/2019/08/psuedo-for-nltk-sql-python-chatbot-part1.html I decided since my SQL skillz are very light and soft, The SQL part will need to be a part 3 while I take the time to learn more as I go.    For part 2 I have for you some working code.   I had some issues with the python enchant import, and it may have to be excluded from the experiment for the time being.  If all else faills I can run it on my Linux machine, but that may not be an option for you. None of these windows issues happen on my chatbot at the website...

Psuedo for the NLTK, SQL, Python chatbot part1

Experiment: Part One, figuring out the Psuedo code. "How much do we want to tackle at a time?" updated: 8-21-19  the table set-up section was all messed up.  Apologies. A while back I read an article, or a bit of an email from the IBM newsletter, that talked about having your chatbot tell people about yourself.  I really like that idea, so finally I'm about to set that as my task. But first, I need to see how to implement something like that. I decided I'd like to integrate some manual training for the chatbot, so some database is in order.  My pythonanywhere site uses SQL, so we're gonna use that for the experiment.  I also need to refresh on how NLTK tags words ( https://www.nltk.org/ ), and then start breaking some code.  I can start by coming up with some psuedo code.  It'll be a guideline for what I want the actual code to do. -------------------------------------------------------- The table set-up: Just setting up an idea for now....