I will utilize machine learning to quickly predict the breed of a dog given some of its attributes, improving breed-specific veterinary care.
The model will be trained on the AKC dataset, containing information about 277 dog breeds extracted from the American Kennel Club website.
Correctly identifying a dog breed is very important in veterinary practice. Illnesses can be breed specific and treatment can be quicker and safer if the vet can correctly identify the breed. As stated by the AAHA, "Proper breed identification is essential for determining individualized care at all life stages. It is important at the first visit for practice teams to engage in breed-specific education with the pet owner. This dialog should include specific, directed evaluations and diagnostic tests at each life stage for the individual patient in order to detect occult disorders earlier." DNA testing for dogs has at least a six week turnaround, so this machine learning model will help dogs recieve the care they need earlier.
https://www.aaha.org/aaha-guidelines/life-stage-canine-2019/breed-specific-considerations/
description: description of the dogs features/history (1-3 paragraphs)
temperament: keywords to describe dogs temperament
popularity: popularity ranking (1-195)
min_height: minimum height in cm
max_height: maximum height in cm
min_weight: minimum weight in kg
max_weight: maximum weight in kg
min_expectancy: minimum life expectancy in years
max_expectancy: maximum life expectancy in years
group: one of 9 breed groups assigned by the akc (7 main groups, 2 extra)
grooming_frequency_value: number representing the level of required grooming (0-1)
grooming_frequency_category: categorization of grooming requirements
shedding_value: number representing the level of shedding (0-1)
shedding_category: categorization of shedding frequency
energy_level_value: number representing breed's energy level (0-1)
energy_level_category: categorization of energy level
trainability_value: number representing breed's trainability (0-1)
trainability_category: categorization of trainability
demeanor_value: number representing breeds reaction to other animals and strangers (0-1)
demeanor_category: categorization of breeds reactions to other animals and strangers
We will train the model on the AKC dataset to analyze and detect patterns so that when given dog attributes, it will be able to predict the dog breed.
import pandas as pd
# read in the dataset
df_akc = pd.read_csv('akc-data-latest.csv')
# show first 10 rows
df_akc.head(10)
Unnamed: 0 | description | temperament | popularity | min_height | max_height | min_weight | max_weight | min_expectancy | max_expectancy | ... | grooming_frequency_value | grooming_frequency_category | shedding_value | shedding_category | energy_level_value | energy_level_category | trainability_value | trainability_category | demeanor_value | demeanor_category | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | Affenpinscher | The Affen’s apish look has been described many... | Confident, Famously Funny, Fearless | 148 | 22.86 | 29.21 | 3.175147 | 4.535924 | 12.0 | 15.0 | ... | 0.6 | 2-3 Times a Week Brushing | 0.6 | Seasonal | 0.6 | Regular Exercise | 0.8 | Easy Training | 1.0 | Outgoing |
1 | Afghan Hound | The Afghan Hound is an ancient breed, his whol... | Dignified, Profoundly Loyal, Aristocratic | 113 | 63.50 | 68.58 | 22.679619 | 27.215542 | 12.0 | 15.0 | ... | 0.8 | Daily Brushing | 0.2 | Infrequent | 0.8 | Energetic | 0.2 | May be Stubborn | 0.2 | Aloof/Wary |
2 | Airedale Terrier | The Airedale Terrier is the largest of all ter... | Friendly, Clever, Courageous | 60 | 58.42 | 58.42 | 22.679619 | 31.751466 | 11.0 | 14.0 | ... | 0.6 | 2-3 Times a Week Brushing | 0.4 | Occasional | 0.6 | Regular Exercise | 1.0 | Eager to Please | 0.8 | Friendly |
3 | Akita | Akitas are burly, heavy-boned spitz-type dogs ... | Courageous, Dignified, Profoundly Loyal | 47 | 60.96 | 71.12 | 31.751466 | 58.967008 | 10.0 | 13.0 | ... | 0.8 | Daily Brushing | 0.6 | Seasonal | 0.8 | Energetic | 1.0 | Eager to Please | 0.6 | Alert/Responsive |
4 | Alaskan Malamute | The Alaskan Malamute stands 23 to 25 inches at... | Affectionate, Loyal, Playful | 58 | 58.42 | 63.50 | 34.019428 | 38.555351 | 10.0 | 14.0 | ... | 0.6 | 2-3 Times a Week Brushing | 0.6 | Seasonal | 0.8 | Energetic | 0.4 | Independent | 0.8 | Friendly |
5 | American Bulldog | The American Bulldog is a descendant of the En... | Loyal, Self-Confident | NaN | 50.80 | 63.50 | 27.215542 | 45.359237 | 10.0 | 12.0 | ... | 0.2 | Occasional Bath/Brush | 0.6 | Seasonal | 0.8 | Energetic | 0.6 | Agreeable | 0.6 | Alert/Responsive |
6 | American English Coonhound | Standing as high as 26 inches at the shoulder,... | Sweet, Mellow, Sociable | 175 | 58.42 | 66.04 | 20.411657 | 29.483504 | 11.0 | 12.0 | ... | 0.2 | Occasional Bath/Brush | 0.4 | Occasional | 0.8 | Energetic | 0.6 | Agreeable | 0.6 | Alert/Responsive |
7 | American Eskimo Dog | The American Eskimo Dog comes in three sizes—s... | Playful, Perky, Smart | 122 | 22.86 | 48.26 | 2.721554 | 15.875733 | 13.0 | 15.0 | ... | 0.4 | Weekly Brushing | 0.6 | Seasonal | 0.8 | Energetic | 1.0 | Eager to Please | 1.0 | Outgoing |
8 | American Foxhound | American Foxhounds are sleek, rangy hunters kn... | Independent, Easy-Going, Sweet-Tempered | 186 | 53.34 | 63.50 | 27.215542 | 31.751466 | 11.0 | 13.0 | ... | 0.2 | Occasional Bath/Brush | 0.6 | Seasonal | 0.8 | Energetic | 0.4 | Independent | 0.8 | Friendly |
9 | American Hairless Terrier | The American Hairless Terrier stands between 1... | Energetic, Alert, Curious | 136 | 30.48 | 40.64 | 5.443108 | 7.257478 | 14.0 | 16.0 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
10 rows × 21 columns