Some Programs I've Written

This is by no means a comprehensive collection of my work, but here is a sample of some of the kinds of programs I've designed and written.

Decision Tree: Predicting Credit Card Default 
This is a Python program that uses decision trees, the ID3 algorithm, and pruning to make classification decisions. More specifically, this program was written to predict whether a credit card user was likely to default on their payments using a 22-feature description of the the user. After pruning with a validation data set, this program predicts with ~90% accuracy whether a given user is likely to default on their credit card payment.


Prediction
This is a C program that can generate quantitative predictions based on a set of data. Users supply a set of x and y pairs, where x is a suspected independent variable and y is a suspected dependent variable. After naming the variables and providing a data set, users can provide a value, and the program will predict the corresponding dependent value. The algorithm employed uses the supplied data set to determine a linear equation that describes the relationship between the two variables. The program uses the given pairs of values to generate a least squares equation by solving the normal equation for the vector containing the regression coefficients that define this model. Given this approach, Prediction is limited to making predictions that are linear by nature. As a result, this program will not produce optimal predictions for all data sets.

Learn more on my Github

Uniq
This is an implementation of the "uniq" Unix command written in a combination of SPARC assembly language and C that consists of 1000+ lines of code. This program implements much of the same functionality as the Unix command. The program takes input from users and provides output based on the flags provided by the user when they run the program. There are various modes that the program can be run in. For example, users can use the program to identify unique lines of text or duplicate lines of text. A line is considered a duplicate if it is the same as another line and comes directly after that line. A line is considered unique if it is not a duplicate line.

Users control the mode of the program by providing defined flags as arguments. There are three mutually exclusive flags. The -d flag will result in outputting only duplicate lines. The -D flag will result in all duplicate lines being printed. The -u flag will result in only unique lines being printed.

In addition to the mutually exclusive flags, there are flags that can be used together. For example, the -c flag results in the count of duplicates being output. The -i flag will result in the program ignoring case during comparisons. The -s flag sorts the output. When -s is provided with -c, it is sorted by count. Otherwise, sorting is alphabetical. The -S flag can be used to sort the input before processing. Finally, users can provide the -x flag, which causes the output to include a summary. This summary describes information about the entries and lines comprising the input.

This program performs substantial error checking during execution. If there is a program failure or an error caused by user behavior, contextual error messages will be printed to stdout to aid the user in successfully running the program.

Anagrams

"Anagrams" is a interactive program written in C and SPARC assembly language. The program allows users to enter a word and find out if it is an anagram. An anagram is a word whose letters can be used to form another word. For example, the word "ape" is an anagram because its letters can be used to spell another word: "pea."

If users enter a word that is an anagram, then the program will print a list of anagrams that consist of the same letters as the word the user provided. The program uses a dictionary of words to generate a database of anagrams and hash keys, which play a role in the algorithm used to determine if a word has any anagrams.

Users are able to provide their own custom dictionary of words. The program will generate a database with the appropriate hash keys based on the dictionary provided. Users are also able to run the program with their choice of database.

This program provides comprehensive error checking and contextual information to aid users in successfully running the program. For example, users can type -h to learn what argument flags are required. When a user runs the program with invalid arguments, the program will provide the necessary information for users to correctly run the program. Should a run-time error occur during program execution that is independent of user behavior, contextual error messages are provided to the user to explain the program's unexpected behavior.

More programs coming soon...