Usage of a TV show transcript in my Thesis is under fair use exception?
The description of your activities that you have provided, using a 'script' from a popular TV show for research purposes in a machine learning algorithm is allowed within the 'fair use' description of copyright. It is my understanding that the following descriptions place the usage described within 'fair use':


  Amount and substantiality of the portion used in relation to the copyrighted work as a whole.


Since you are using the script to train a machine algorithm, and not the video, audio, nor are you reproducing it for your audience, it seems to be well within fair use.


  Effect of the use upon the potential market for or value of the copyrighted work.


Using a script to train a machine algorithm, it seems, would have virtually no effect on the 'potential market or value of copyrighted work'.

Highlighted portions from "More Information on Fair Use by Copyright.gov"  

Another possible solution you could consider is to train your machine learning algorithm on a different humorous show whose copyright has expired and is therefore in the Public Domain. Here is a list of humorous televeision shows whose copyright has expired, including "The Beverly Hillbillies".