Integrating Scikit-Learn and Statsmodels for Regression

Statistics and Machine Learning both aim to extract insights from data, though their approaches differ significantly. Traditional statistics primarily concerns itself with inference, using the entire dataset to test hypotheses and estimate probabilities about a larger population. In contrast, machine learning emphasizes prediction and decision-making, typically employing a train-test split methodology where models learn from a portion of the data (the training set) and validate their predictions on unseen data (the testing set). In this post, we will demonstrate how […]

Read more

Tips for Tuning Hyperparameters in Machine Learning Models

Image by Author | Created on Canva If you’re familiar with machine learning, you know that the training process allows the model to learn the optimal values for the parameters—or model coefficients—that characterize it. But machine learning models also have a set of hyperparameters whose values you should specify when training the model. So how do you find the optimal values for these hyperparameters? You can use hyperparameter tuning to find the best values for the hyperparameters. By systematically adjusting […]

Read more

Quiz: Functional Programming in Python: When and How to Use It

Interactive Quiz ⋅ 10 QuestionsBy Martin Breuss Share Or copy the link: Copied! Happy Pythoning! In this quiz, you’ll test your understanding of Functional Programming in Python. By working through this quiz, you’ll revisit the functional programming paradigm, the concept of functions as first-class citizens in Python, the use of the lambda keyword, and how to implement functional code using map(), filter(), and reduce(). The quiz contains 10 questions and    

Read more

Interacting With REST APIs and Python

There’s an amazing amount of data available on the Web. Many web services, like YouTube and GitHub, make their data accessible to third-party applications through an application programming interface (API). One of the most popular ways to build APIs is the REST architecture style. Python provides some great tools not only to get data from REST APIs but also to build your own Python REST APIs. In this video course, you’ll learn: What REST architecture is How REST APIs provide […]

Read more

Players, creators, and AI collaborate to build and expand rich game narratives

This paper was presented at the IEEE 2024 Conference on Games (opens in new tab) (IEEE CoG 2024), the leading forum on innovation in and through games. In the fast-evolving landscape of video game development, crafting dialogues and narratives is a labor-intensive endeavor. Traditionally, creating these elements involved meticulous hand-coding, resulting in static interactions that limit player agency. However, the rise of large language models (LLMs) is introducing possibilities for richer, more dynamic narrative  

Read more

GENEVA uses large language models for interactive game narrative design

This paper was presented at the IEEE 2024 Conference on Games (opens in new tab) (IEEE CoG 2024), the leading forum on innovation in and through games. Mastering the art of storytelling, a highly valued skill across films, novels, games, and more, requires creating rich narratives with compelling plots and characters. In recent years, the rise of AI has prompted inquiries into whether large language models (LLMs) can effectively generate and sustain detailed, coherent storylines that engage audiences.  

Read more

Strings and Character Data in Python

Python’s strings are ordered sequences of characters. Because of this, you can access individual characters from a string using the characters’ associated index. What’s a character’s index? Each character in a string has an index that specifies its position. Indices are integer numbers that start at 0 and go up to the number of characters in the string minus one. In the following sections, you’ll learn how to run these two operations on your Python strings. Indexing Strings You can […]

Read more

5 DIY Python Functions for Data Cleaning

Image by Author | Midjourney Data cleaning: whether you love it or hate it, you likely spend a lot of time doing it. It’s what we signed up for. There’s no understanding, analyzing, or modeling data without first cleaning it. Making sure we have reusable tools handy for data cleaning is essential. To that end, here are 5 DIY functions to give you a some examples and starting points for building up your own data cleaning tool chest. The functions […]

Read more

Simulate a Text File in Python

Testing applications that read files from a disk can be challenging. Issues such as machine dependencies, special access requirements, and slow performance often arise when you need to read text from a file. In this Code Conversation with instructor Martin Breuss, you’ll discover how to simplify this process by simulating text files with StringIO from the io module in Python’s standard library. In this video course, you’ll learn how to: Use io.StringIO to simulate a text file on disk Perform […]

Read more

7 Key Terms Every Machine Learning Beginner Should Know

Image by Editor | Midjourney & Canva If you’re new to machine learning, understanding basic terms is crucial. Knowing key terms can help you understand the basics better. Here are 7 essential terms every beginner should know. These terms will give you a solid foundation to build your machine learning knowledge. 1. Algorithm An algorithm is a set of rules a computer uses to solve a problem. It finds patterns in data and makes predictions. There are several types of […]

Read more
1 23 24 25 26 27 913