Non-solid cords tend to have lower cord values than solid cords.
Seriated clusters tend to have higher cord values than banded clusters.
Ascher sum clusters tend to have higher cord values than seriated clusters.
Let’s just take a look at those distributions to verify….
Code
import numpy as npimport pandas as pdimport khipu_kamayuq as kamayuq # A Khipu Maker is known (in Quechua) as a Khipu Kamayuqimport khipu_qollqa as kqfrom pandas import Series, DataFrame# Plotlyimport plotlyfrom plotly.offline import iplot, init_notebook_modeimport plotly.graph_objs as goimport plotly.express as pximport plotly.figure_factory as ffplotly.offline.init_notebook_mode(connected =False)(khipu_dict, all_khipus) = kamayuq.fetch_khipus()
1. Belief 1. Non-solid cords tend to have lower cord values than solid cords.
We performed this study in Appendix 04. Here’s a copy of the code:
Code
khipu_colors = []for aKhipu in all_khipus: khipu_colors += [(cord.longest_ascher_color(), cord.knotted_value()) for cord in aKhipu.cc_cords()]def is_solid(aColor):returnlen({':','%','-','*'} &set(aColor)) ==0def is_mottled(aColor):return aColor.count(":") >0def is_barberpole(aColor):return aColor.count("-") >0def is_double_mottled(aColor):return aColor.count(":") >1def is_double_barberpoled(aColor):return aColor.count("-") >1def is_mottled_barberpoled(aColor):return is_barberpole(aColor) and is_mottled(aColor)solid_colors = [aColor for aColor in khipu_colors if is_solid(aColor[0])]mottled_colors = [aColor for aColor in khipu_colors if is_mottled(aColor[0])]barberpole_colors = [aColor for aColor in khipu_colors if is_barberpole(aColor[0])]double_mottled_colors = [aColor for aColor in khipu_colors if is_double_mottled(aColor[0])]mottled_barberpoled_colors = [aColor for aColor in khipu_colors if is_mottled_barberpoled(aColor[0])]double_barberpoled_colors = [aColor for aColor in khipu_colors if is_double_barberpoled(aColor[0])]solid_cord_values = [aColor[1] for aColor in solid_colors]mottled_cord_values = [aColor[1] for aColor in mottled_colors]barberpole_cord_values = [aColor[1] for aColor in barberpole_colors]double_mottled_cord_values = [aColor[1] for aColor in double_mottled_colors]mottled_barberpoled_cord_values = [aColor[1] for aColor in mottled_barberpoled_colors]double_barberpoled_cord_values = [aColor[1] for aColor in double_barberpoled_colors]num_solids =len(solid_colors)num_mottled =len(mottled_colors)num_barberpoles =len(barberpole_colors)num_double_mottled =len(double_mottled_colors)num_mottled_barberpoled =len(mottled_barberpoled_colors)num_double_barberpoled =len(double_barberpoled_colors)from statistics import mean, stdevprint(f" {num_solids=: 6.0f} - Average cord value={mean(solid_cord_values): 4.0f} with Std_dev={stdev(solid_cord_values): 5.0f}")print(f" {num_mottled=: 6.0f} - Average cord value={mean(mottled_cord_values): 4.0f} with Std_dev={stdev(mottled_cord_values): 5.0f}")print(f" {num_barberpoles=: 6.0f} - Average cord value={mean(barberpole_cord_values): 4.0f} with Std_dev={stdev(barberpole_cord_values): 5.0f}")print(f" {num_double_mottled=: 6.0f} - Average cord value={mean(double_mottled_cord_values): 4.0f} with Std_dev={stdev(double_mottled_cord_values): 5.0f}")print(f"{num_mottled_barberpoled=: 6.0f} - Average cord value={mean(mottled_barberpoled_cord_values): 4.0f} with Std_dev={stdev(mottled_barberpoled_cord_values): 5.0f}")print(f" {num_double_barberpoled=: 6.0f} - Average cord value={mean(double_barberpoled_cord_values): 4.0f} with Std_dev={stdev(double_barberpoled_cord_values): 5.0f}")
num_solids= 42316 - Average cord value= 169 with Std_dev= 2540
num_mottled= 10951 - Average cord value= 103 with Std_dev= 892
num_barberpoles= 2267 - Average cord value= 120 with Std_dev= 758
num_double_mottled= 390 - Average cord value= 100 with Std_dev= 393
num_mottled_barberpoled= 52 - Average cord value= 41 with Std_dev= 139
num_double_barberpoled= 27 - Average cord value= 27 with Std_dev= 74
2. Belief 2. Seriated clusters tend to have higher cord values than banded clusters.
Code
seriated_khipu_cluster_vals = []banded_khipu_cluster_vals = []for aKhipu in all_khipus: seriated_clusters = [aCluster for aCluster in aKhipu[:] if aCluster.is_seriated_cluster() and aCluster.num_pendant_cords()>1] seriated_cluster_means = [aCluster.mean_cord_value() for aCluster in seriated_clusters] banded_clusters = [aCluster for aCluster in aKhipu[:] if aCluster.is_banded_cluster() and aCluster.num_pendant_cords()>1] banded_cluster_means = [aCluster.mean_cord_value() for aCluster in banded_clusters if aCluster] seriated_khipu_cluster_vals.append(mean(seriated_cluster_means) if seriated_cluster_means else0) banded_khipu_cluster_vals.append(mean(banded_cluster_means) if banded_cluster_means else0)def source_color(index): return0.0if seriated_khipu_cluster_vals[index] <= banded_khipu_cluster_vals[index] else1.0seriated_exceeds_banded = [source_color(i) for i inrange(len(all_khipus))]khipu_names = [aKhipu.name() for aKhipu in all_khipus]banded_vs_seriated_df = pd.DataFrame(zip(khipu_names, banded_khipu_cluster_vals, seriated_khipu_cluster_vals, seriated_exceeds_banded), columns=["name", "mean_banded_cluster_value", "mean_seriated_cluster_value", "seriated_exceeds_banded"])banded_vs_seriated_df
3. Belief 3. Ascher Sum Relationships > …. what exactly?
Code
#=======================================================# INITIALIZE# Read in the Fieldmark and its associated dataframes#=======================================================from fieldmark_ascher_pendant_pendant_sum import Fieldmark_Pendant_Pendant_SumaFieldmark = Fieldmark_Pendant_Pendant_Sum()khipu_df = aFieldmark.dataframes[0].dataframesum_cord_df = aFieldmark.dataframes[1].dataframesum_cord_df
khipu_names = sum_cord_df.name.to_list()cord_names = sum_cord_df.cord_name.to_list()sum_cords = [khipu_dict[khipu_name][level_name] for khipu_name, level_name inzip(khipu_names, cord_names)]sum_clusters = [aCord.parent_cluster for aCord in sum_cords]sum_clusters_by_khipu = {name:[aCluster for aCluster in sum_clusters if aCluster.khipu_name == name] for name in khipu_names}def calc_mean_sum_cluster(name): clusters = sum_clusters_by_khipu[name]return mean([cluster.mean_cord_value() for cluster in clusters]) if clusters else0.0mean_sum_clusters_by_khipu = {name: calc_mean_sum_cluster(name) for name in khipu_names}
Code
def source_color(index): name = all_khipus[index].name() ascher_sum_mean = mean_sum_clusters_by_khipu[all_khipus[index].name()] if name in mean_sum_clusters_by_khipu else0.0 seriated_cluster_mean = seriated_khipu_cluster_vals[index]return0.0if ascher_sum_mean <= seriated_cluster_mean else1.0sum_exceeds_seriated = [source_color(i) for i inrange(len(all_khipus))]khipu_names = [aKhipu.name() for aKhipu in all_khipus]sum_cluster_means = [(mean_sum_clusters_by_khipu[name] if name in mean_sum_clusters_by_khipu else0.0) for name in khipu_names]ascher_vs_seriated_df = pd.DataFrame(zip(khipu_names, sum_cluster_means, seriated_khipu_cluster_vals, sum_exceeds_seriated), columns=["name", "sum_cluster_mean", "seriated_cluster_mean", "sum_exceeds_seriated"])ascher_vs_seriated_df
def source_color(index): name = all_khipus[index].name() ascher_sum_mean = mean_sum_clusters_by_khipu[all_khipus[index].name()] if name in mean_sum_clusters_by_khipu else0.0 banded_cluster_mean = banded_khipu_cluster_vals[index]return0.0if ascher_sum_mean <= banded_cluster_mean else1.0sum_exceeds_banded = [source_color(i) for i inrange(len(all_khipus))]khipu_names = [aKhipu.name() for aKhipu in all_khipus]def calc_sum_cluster_mean(name):return mean_sum_clusters_by_khipu[name] if name in mean_sum_clusters_by_khipu.keys() else0.0sum_cluster_means = [calc_sum_cluster_mean(name) for name in khipu_names]ascher_vs_banded_df = pd.DataFrame(zip(khipu_names, sum_cluster_means, banded_khipu_cluster_vals, sum_exceeds_banded), columns=["name", "sum_cluster_mean", "banded_cluster_mean", "sum_exceeds_banded"])ascher_vs_banded_df
def band_seriated(index): num = banded_khipu_cluster_vals[index] den = (banded_khipu_cluster_vals[index] + seriated_khipu_cluster_vals[index])return num/den if den >0else0.0band_seriated_color = [band_seriated(i) for i inrange(len(all_khipus))]khipu_names = [aKhipu.name() for aKhipu in all_khipus]def calc_sum_cluster_mean(name):return mean_sum_clusters_by_khipu[name] if name in mean_sum_clusters_by_khipu.keys() else0.0cluster_means = [max(banded_khipu_cluster_vals[i], seriated_khipu_cluster_vals[i]) for i inrange(len(all_khipus))] sum_cluster_means = [calc_sum_cluster_mean(name) for name in khipu_names]ascher_vs_band_seriated_df = pd.DataFrame(zip(khipu_names, sum_cluster_means, cluster_means, band_seriated_color), columns=["name", "sum_cluster_mean", "cluster_mean", "band_seriated_color"])ascher_vs_band_seriated_df
See Full Dataframe in Mito
name
sum_cluster_mean
cluster_mean
band_seriated_color
0
AS010
9.200000
11.500000
0.696970
1
AS011
0.000000
104.500000
1.000000
2
AS012
3.285714
1.750000
0.636364
3
AS013
10.000000
6.333333
0.716981
4
AS014
53.000000
53.000000
0.000000
...
...
...
...
...
646
UR193
31.777778
31.000000
0.318681
647
UR221
0.000000
66.500000
0.000000
648
UR253
16.807692
9.555556
0.094737
649
UR280
129.500000
70.000000
0.421488
650
UR292A
20.000000
1.625000
0.000000
Code
legend_text ="<b>Ascher Sum vs Mean Cluster Cord Values:</b><i style=\"font-size:10pt;\"> Blue-Banded >=, Red-Ascher_Sum >=</i>"fig = (px.scatter(ascher_vs_band_seriated_df, x="cluster_mean", y="sum_cluster_mean", #log_y=True,log_x=True,#size="mean_num_summands", opacity=.4, color='band_seriated_color', labels={"name": f"Khipu Name"}, hover_data=['name'], title=legend_text, width=944, height=944) .update_layout(showlegend=False).update(layout_coloraxis_showscale=False).show() )