Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate random pet names
ResourceFunction["RandomPetName"][] gives a random pet name. | |
ResourceFunction["RandomPetName"][n] gives a list of n random pet names. | |
ResourceFunction["RandomPetName"][species] gives a random pet name of the specified species. | |
ResourceFunction["RandomPetName"][species,n] gives n random pet names of the specified species. | |
ResourceFunction["RandomPetName"][All] gives an association of associations of species and names with frequencies. |
"Cat" | cat pet names |
"Dog" | dog pet names |
"Goat" | goat pet names |
"Pig" | pig pet names |
Random pet name:
In[1]:= |
|
Out[2]= |
|
A list of four random pet names:
In[3]:= |
|
Out[3]= |
|
A random dog name:
In[4]:= |
|
Out[4]= |
|
A list of five cat names:
In[5]:= |
|
Out[5]= |
|
All pet names with their weights per species can be obtained with the argument All:
In[6]:= |
|
Out[6]= |
|
The weights are integers that correspond to number of occurrences in pet license registration data. Here are the most popular names per species:
In[7]:= |
|
Out[7]= |
|
The option "Weighted" can be used to specify random pet name choice based on known real-life number of occurrences:
In[8]:= |
|
Out[8]= |
|
Here are the number of occurrences of the twelve most frequent pet dog names in a large generated sample:
In[9]:= |
|
Out[10]= |
|
Classify pet names into species. Make the training data:
In[11]:= |
|
Create (train) the classifier:
In[12]:= |
|
Out[12]= |
|
Here we create a ClassifierMeasurements object:
In[13]:= |
|
Out[13]= |
|
Here are the Receiver Operating Characteristic (ROC) curves:
In[14]:= |
|
Out[14]= |
|
We can conclude that there are some patterns in the pet names that can be used to distinguish cat names from dog names.
Typical Pareto principle adherence is observed when applying weighted generation of pet names:
In[15]:= |
|
Out[15]= |
|
Here are plots for the Pareto principle adherence for the data on which RandomPetName is based:
In[16]:= |
|
Out[16]= |
|
We can see the similarity of those Pareto principle plots with ones for generated pet names.
There are too few goat and pig names:
In[17]:= |
|
Out[17]= |
|
Make a dataset of typical pet names for cats and dogs:
In[18]:= |
|
Out[19]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License