neighbormodels.interactions moduleΒΆ

Primary method

build_model Builds and returns a data frame describing a pairwise interaction model.

Functions

aggregate_interaction_coefficients Aggregates interaction coefficients by summing them within groups defined by the magnetic patterns and interaction parameters.
build_magnetic_patterns_data_frame Converts dictionary of magnetic patterns into the pandas DataFrame format.
compute_interaction_signs Computes the signs of the pairwise interactions for the magnetic model.
compute_model_coefficients Computes the model coefficients by aggregating over the dot product of the neighbor counts and interaction signs.
group_subspecie_pairs_and_rank_by_distance Adds rank column to data frame that sorts subspecie pairs by neighbor distance.
label_interaction_parameters Adds parameter_names column to data frame that labels the unique parameters of the interaction model.
multiply_interaction_signs_and_neighbor_count Adds coefficient column to data frame.
spread_parameter_name_column Spreads interaction parameter names into their own columns with the interaction coefficient as rows.