Georgia State University
Abstract
The functional programming paradigm has a long and storied history, with its beginnings in the Lambda Calculus. In recent decades, pure functional languages such as Haskell have been shown to be highly effective in producing robust software due to immutable data structures, among other functional features. The advantages of programming with immutable data structures can also be had in non-functional languages such as Python. Over the years, non-functional languages have introduced immutable data structures as well as comprehension and lambda expressions, and it is possible to program in a purely functional style in them. In this paper, we present a ``best practice'' idea in introductory programming classes that forces students to learn and complete programming assignments in a purely functional subset of Python. By doing so, the student can learn functional ideas such as immutability, pure functions with no side effects, and stateless programming. We define a functional subset of Python and illustrate the best practice using small examples. We strongly feel that students in computing need familiarity with pure functional programming and argue that this can be taught in introductory programming courses that use Python.
AI Summary - By teaching functional programming early on, students can develop good coding habits and produce more expressive and high-level code. [3]
- The paper argues that incorporating functional programming in CS1 and CS2 courses can help students become better programmers and improve their problem-solving skills. [3]
- Functional programming paradigm: a programming style that emphasizes the use of pure functions, immutability, and declarative constructs to produce robust software systems. [3]
- Higher-order functions: functions that take other functions as arguments or return functions as output, enabling more expressive and high-level code. [3]
- Pure functions: functions with no side effects, producing the same output for a given input every time, making them easier to test and debug. [3]
- The best practice introduced in this paper has been successfully implemented in a CS2 course, generating positive outcomes and student engagement. [3]
- The approach emphasizes the use of higher-order functions, lambda expressions, and immutable data structures to promote robust and reliable software systems. [2]
- The paper introduces a 'best practice' idea for teaching functional programming in introductory computer science courses using Python. [1]
Dartmouth
Abstract
The adequate use of information measured in a continuous manner along a period of time represents a methodological challenge. In the last decades, most of traditional statistical procedures have been extended for accommodating these functional data. The binary classification problem, which aims to correctly identify units as positive or negative based on marker values, is not aside of this scenario. The crucial point for making binary classifications based on a marker is to establish an order in the marker values, which is not immediate when these values are presented as functions. Here, we argue that if the marker is related to the characteristic under study, a trajectory from a positive participant should be more similar to trajectories from the positive population than to those drawn from the negative. With this criterion, a classification procedure based on the distance between the involved functions is proposed. Besides, we propose a fully non-parametric estimator for this so-called probability-based criterion, PBC. We explore its asymptotic properties, and its finite-sample behavior from an extensive Monte Carlo study. The observed results suggest that the proposed methodology works adequately, and frequently better than its competitors, for a wide variety of situations when the sample size in both the training and the testing cohorts is adequate. The practical use of the proposal is illustrated from real-world dataset. As online supplementary material, the manuscript includes a document with further simulations and additional comments. An R function which wraps up the implemented routines is also provided.
AI Summary - Functional data analysis is a statistical approach that deals with data that can be represented as functions. [3]
- The receiver operating characteristic (ROC) curve is a graphical representation of the performance of a binary classifier. [3]
- The area under the ROC curve (AUC) is a widely used metric for evaluating the performance of a binary classifier. [3]
- A new method called the generalized ROC (gROC) curve has been proposed to handle non-monotone relationships between the true positive rate and false positive rate. [3]
- The gROC curve can be estimated using a two-stage approach, where the first stage involves estimating the eCDFs and the second stage involves estimating the ROC curve. [3]
- The results showed that the gROC curve estimator performed well in terms of accuracy and precision compared to other existing methods. [3]
- The gROC curve can be used as a tool for evaluating the performance of binary classifiers, especially when there are non-monotone relationships between the true positive rate and false positive rate. [3]
- A new R package called logitFD has been developed to implement functional principal component logit regression. [3]
- The logitFD package provides functions for estimating the eCDFs and the ROC curve using a two-stage approach. [3]
- A simulation study was conducted to evaluate the performance of the gROC curve estimator compared to other existing methods. [1]