Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Group data according to the positionally corresponding values of other data
ResourceFunction["ValuesReduceOperator"][] creates a pure function that will group the data in its first argument according to the value in the same position of the second argument. | |
ResourceFunction["ValuesReduceOperator"][h] reduces the groups of data by applying the function h to each of the groups. |
Group a four-membered list of pairs according to the values of a four-membered list:
| In[1]:= |
| Out[1]= |
Group a four member list of pairs according to the values of a four member list and produce a MatrixPlot of each grouping:
| In[2]:= |
| Out[2]= | ![]() |
The data to be grouped can be anything:
| In[3]:= |
| Out[3]= |
The values can be anything:
| In[4]:= | ![]() |
| Out[4]= | ![]() |
A feature matrix and a target vector:
| In[5]:= | ![]() |
Plot the features color-coded by the targets:
| In[6]:= |
| Out[6]= | ![]() |
Show the mean value of features grouped by the value of the target:
| In[7]:= |
| Out[7]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License