Skip to content

Cognitive Profile

The primary output of AIME LOC — a complete 13-function cognitive fingerprint.

CognitiveProfile

Bases: BaseModel

Complete cognitive profile for one AI model.

This is the primary output of AIME LOC. It contains the 13-function cognitive fingerprint, overall True Coherence score, gate diagnostics, and methods for visualization and export.

The 13 functions are

Base bands: Thinking, Cognition, Emotion, Attention, Sensation, Feelings, Intuition, Energy Compounds: Reasoning, Understanding, Awareness, Mindfulness, Consciousness

Example

profile = loc.scan("meta-llama/Llama-4-Scout") print(profile.tc_score) 14.2 print(profile.best_function) 'Emotion' profile.radar_chart()

get_function_score(function)

Get the score for a specific cognitive function.

Parameters:

Name Type Description Default
function str | CognitiveFunction

Function name (e.g., "Emotion") or CognitiveFunction enum.

required

Returns:

Type Description
FunctionScore

FunctionScore for the requested function.

Raises:

Type Description
ValueError

If the function name is not recognized.

tc_by_function()

Get TC scores as a {function_name: tc_score} dict, ordered by FUNCTION_ORDER.

radar_chart(show=True, save=None, **kwargs)

Display 13-function radar chart.

Requires the viz extra: pip install aime-loc[viz]

Parameters:

Name Type Description Default
show bool

Whether to display the chart interactively.

True
save str | None

Path to save the figure (e.g., "profile.png").

None
**kwargs Any

Passed to :func:aime_loc.viz.radar.radar_chart.

{}

Returns:

Type Description
Any

matplotlib Figure object.

bar_chart(show=True, save=None, **kwargs)

Display per-function bar chart with gate breakdown.

Requires the viz extra: pip install aime-loc[viz]

export_figure(path, journal='default', dpi=300, fmt='png')

Export publication-ready radar chart figure.

Parameters:

Name Type Description Default
path str

Output file path.

required
journal str

Style preset — "default", "nature", "ieee", "apa".

'default'
dpi int

Resolution for raster formats.

300
fmt str

Output format — "png", "svg", "pdf".

'png'

to_dict()

Export as plain dictionary.

to_json(path=None, indent=2)

Export as JSON string, optionally saving to file.

Parameters:

Name Type Description Default
path str | None

If provided, write JSON to this file.

None
indent int

JSON indentation level.

2

Returns:

Type Description
str

JSON string.

to_csv(path)

Export per-function scores as CSV.

Columns: function, tc_score, stb_pass, ord_pass, bal_pass, n_questions, n_tokens

to_latex()

Export as LaTeX table for academic papers.

Returns:

Type Description
str

LaTeX tabular environment string.

summary()

One-line text summary.

Returns:

Type Description
str

e.g., "Llama-4-Scout: TC=14.20%

str

(best: Emotion 19.97%, worst: Intuition 11.27%)"

FunctionScore

Bases: BaseModel

True Coherence score for a single cognitive function.

Each function is evaluated using dedicated questions that target that specific cognitive dimension.

Attributes:

Name Type Description
function CognitiveFunction

Which of the 13 cognitive functions this score represents.

tc_score float

True Coherence percentage (0-100). Higher = more coherent.

stb_pass float

Gate 1 pass rate for this function's tokens.

ord_pass float

Gate 2 pass rate for this function's tokens.

bal_pass float

Gate 3 pass rate for this function's tokens.

n_questions int

Number of questions used to evaluate this function.

n_tokens int

Total tokens generated across all questions for this function.