# Class: LossFunction 


_A loss function for optimization with optional aggregation. Extends Function with aggregation specification for per-element losses._



<div data-search-exclude markdown="1">



URI: [tvbo:LossFunction](https://w3id.org/tvbo/LossFunction)





```{mermaid}
 classDiagram
    class LossFunction
    click LossFunction href "./LossFunction.html"
      Function <|-- LossFunction
        click Function href "./Function.html"
      
      LossFunction : acronym
        
          
    
        
        
        LossFunction --> "0..1" String : acronym
        click String href "../http://www.w3.org/2001/XMLSchema#string.html"
    

        
      LossFunction : aggregate
        
          
    
        
        
        LossFunction --> "0..1" Aggregation : aggregate
        click Aggregation href "./Aggregation.html"
    

        
      LossFunction : apply_on_dimension
        
          
    
        
        
        LossFunction --> "0..1" DimensionType : apply_on_dimension
        click DimensionType href "../../enums/DimensionType.html"
    

        
      LossFunction : arguments
        
          
    
        
        
        LossFunction --> "*" Argument : arguments
        click Argument href "./Argument.html"
    

        
      LossFunction : callable
        
          
    
        
        
        LossFunction --> "0..1" Callable : callable
        click Callable href "./Callable.html"
    

        
      LossFunction : definition
        
          
    
        
        
        LossFunction --> "0..1" String : definition
        click String href "../http://www.w3.org/2001/XMLSchema#string.html"
    

        
      LossFunction : description
        
          
    
        
        
        LossFunction --> "0..1" String : description
        click String href "../http://www.w3.org/2001/XMLSchema#string.html"
    

        
      LossFunction : equation
        
          
    
        
        
        LossFunction --> "0..1" Equation : equation
        click Equation href "./Equation.html"
    

        
      LossFunction : input
        
          
    
        
        
        LossFunction --> "0..1" Function : input
        click Function href "./Function.html"
    

        
      LossFunction : iri
        
          
    
        
        
        LossFunction --> "0..1" Uriorcurie : iri
        click Uriorcurie href "../http://www.w3.org/2001/XMLSchema#anyURI.html"
    

        
      LossFunction : label
        
          
    
        
        
        LossFunction --> "0..1" String : label
        click String href "../http://www.w3.org/2001/XMLSchema#string.html"
    

        
      LossFunction : name
        
          
    
        
        
        LossFunction --> "1" String : name
        click String href "../http://www.w3.org/2001/XMLSchema#string.html"
    

        
      LossFunction : output
        
          
    
        
        
        LossFunction --> "0..1" String : output
        click String href "../http://www.w3.org/2001/XMLSchema#string.html"
    

        
      LossFunction : output_equation
        
          
    
        
        
        LossFunction --> "0..1" Equation : output_equation
        click Equation href "./Equation.html"
    

        
      LossFunction : requirements
        
          
    
        
        
        LossFunction --> "*" SoftwareRequirement : requirements
        click SoftwareRequirement href "./SoftwareRequirement.html"
    

        
      LossFunction : source_code
        
          
    
        
        
        LossFunction --> "0..1" String : source_code
        click String href "../http://www.w3.org/2001/XMLSchema#string.html"
    

        
      LossFunction : time_range
        
          
    
        
        
        LossFunction --> "0..1" Range : time_range
        click Range href "./Range.html"
    

        
      
```





## Inheritance
* [Function](../classes/Function.qmd)
    * **LossFunction**


## Class Properties

| Property | Value |
| --- | --- |
| Class URI | [tvbo:LossFunction](https://w3id.org/tvbo/LossFunction) |


## Slots

| Name | Cardinality and Range | Description | Inheritance |
| ---  | --- | --- | --- |
| [aggregate](../slots/aggregate.qmd) | 0..1 <br/> [Aggregation](../classes/Aggregation.qmd) | How to aggregate the loss across dimensions | direct |
| [name](../slots/name.qmd) | 1 <br/> [xsd:string](http://www.w3.org/2001/XMLSchema#string) | Globally unique identifier for the entity | [Function](../classes/Function.qmd) |
| [acronym](../slots/acronym.qmd) | 0..1 <br/> [xsd:string](http://www.w3.org/2001/XMLSchema#string) |  | [Function](../classes/Function.qmd) |
| [label](../slots/label.qmd) | 0..1 <br/> [xsd:string](http://www.w3.org/2001/XMLSchema#string) |  | [Function](../classes/Function.qmd) |
| [iri](../slots/iri.qmd) | 0..1 <br/> [xsd:anyURI](http://www.w3.org/2001/XMLSchema#anyURI) | Optional stable IRI (or compact URI) for this entity in an external ontology ... | [Function](../classes/Function.qmd) |
| [equation](../slots/equation.qmd) | 0..1 <br/> [Equation](../classes/Equation.qmd) |  | [Function](../classes/Function.qmd) |
| [definition](../slots/definition.qmd) | 0..1 <br/> [xsd:string](http://www.w3.org/2001/XMLSchema#string) |  | [Function](../classes/Function.qmd) |
| [description](../slots/description.qmd) | 0..1 <br/> [xsd:string](http://www.w3.org/2001/XMLSchema#string) |  | [Function](../classes/Function.qmd) |
| [requirements](../slots/requirements.qmd) | * <br/> [SoftwareRequirement](../classes/SoftwareRequirement.qmd) |  | [Function](../classes/Function.qmd) |
| [input](../slots/input.qmd) | 0..1 <br/> [Function](../classes/Function.qmd) | Simple input reference: name of previous function's output in pipeline | [Function](../classes/Function.qmd) |
| [output](../slots/output.qmd) | 0..1 <br/> [xsd:string](http://www.w3.org/2001/XMLSchema#string) | Name for this function's output (referenced by subsequent functions) | [Function](../classes/Function.qmd) |
| [arguments](../slots/arguments.qmd) | * <br/> [Argument](../classes/Argument.qmd) | Variables consumed by the function (referenced in the equation), keyed by arg... | [Function](../classes/Function.qmd) |
| [output_equation](../slots/output_equation.qmd) | 0..1 <br/> [Equation](../classes/Equation.qmd) | Output transformation equation (if equation-based) | [Function](../classes/Function.qmd) |
| [source_code](../slots/source_code.qmd) | 0..1 <br/> [xsd:string](http://www.w3.org/2001/XMLSchema#string) |  | [Function](../classes/Function.qmd) |
| [callable](../slots/callable.qmd) | 0..1 <br/> [Callable](../classes/Callable.qmd) | Software implementation reference (if software-based) | [Function](../classes/Function.qmd) |
| [apply_on_dimension](../slots/apply_on_dimension.qmd) | 0..1 <br/> [DimensionType](../enums/DimensionType.qmd) | Which dimension to apply the transformation on | [Function](../classes/Function.qmd) |
| [time_range](../slots/time_range.qmd) | 0..1 <br/> [Range](../classes/Range.qmd) | Time range for generated TimeSeries (for kernel generators) | [Function](../classes/Function.qmd) |















## Identifier and Mapping Information





### Schema Source


* from schema: https://w3id.org/tvbo




## Mappings

| Mapping Type | Mapped Value |
| ---  | ---  |
| self | tvbo:LossFunction |
| native | tvbo:LossFunction |






## LinkML Source

<!-- TODO: investigate https://stackoverflow.com/questions/37606292/how-to-create-tabbed-code-blocks-in-mkdocs-or-sphinx -->

### Direct

<details>
```yaml
name: LossFunction
description: A loss function for optimization with optional aggregation. Extends Function
  with aggregation specification for per-element losses.
from_schema: https://w3id.org/tvbo
is_a: Function
attributes:
  aggregate:
    name: aggregate
    description: 'How to aggregate the loss across dimensions. Example: aggregate.over=node,
      aggregate.type=mean computes loss per node, then averages.'
    from_schema: https://w3id.org/tvbo
    domain_of:
    - Function
    - LossFunction
    - FunctionCall
    range: Aggregation
    inlined: true
class_uri: tvbo:LossFunction

```
</details>

### Induced

<details>
```yaml
name: LossFunction
description: A loss function for optimization with optional aggregation. Extends Function
  with aggregation specification for per-element losses.
from_schema: https://w3id.org/tvbo
is_a: Function
attributes:
  aggregate:
    name: aggregate
    description: 'How to aggregate the loss across dimensions. Example: aggregate.over=node,
      aggregate.type=mean computes loss per node, then averages.'
    from_schema: https://w3id.org/tvbo
    owner: LossFunction
    domain_of:
    - Function
    - LossFunction
    - FunctionCall
    range: Aggregation
    inlined: true
  name:
    name: name
    description: Globally unique identifier for the entity.
    from_schema: https://w3id.org/tvbo/common
    slot_uri: schema:name
    identifier: true
    owner: LossFunction
    domain_of:
    - BrainAtlas
    - CommonCoordinateSpace
    - ParcellationEntity
    - StudyLayout
    - StudyTemplate
    - StudyDirectory
    - StudyFile
    - DBSProtocol
    - ClinicalScale
    - ClinicalScore
    - SoftwarePackage
    - SoftwareRequirement
    - SoftwareEnvironment
    - Figure
    - Event
    - Tractogram
    - ResultEntity
    - Activity
    - CachedArray
    - MeasureSpec
    - NamedArray
    - GraphGenerator
    - Binding
    - ProcedureStep
    - File
    - StateValue
    - Observation
    - Dynamics
    - StateVariable
    - Distribution
    - Parameter
    - CouplingInput
    - Argument
    - Function
    - FunctionCall
    - Callable
    - DerivedParameter
    - DerivedVariable
    - DataSource
    - OptimizationStage
    - Exploration
    - Inference
    - Prior
    - Likelihood
    - UpdateRule
    - Algorithm
    - Option
    - BranchSwitch
    - Continuation
    - Coupling
    - EnvironmentVariable
    - SchedulerDirective
    - Reducer
    range: string
    required: true
  acronym:
    name: acronym
    from_schema: https://w3id.org/tvbo
    rank: 1000
    slot_uri: skos:notation
    owner: LossFunction
    domain_of:
    - ClinicalScale
    - ClinicalScore
    - Observation
    - Function
    - FunctionCall
    range: string
  label:
    name: label
    from_schema: https://w3id.org/tvbo
    rank: 1000
    slot_uri: rdfs:label
    owner: LossFunction
    domain_of:
    - ParcellationTerminology
    - Subject
    - Session
    - Dataset
    - Contact
    - SoftwareEnvironment
    - Figure
    - Panel
    - Inset
    - Layer
    - Colorbar
    - Rule
    - Equation
    - Stimulus
    - Event
    - Parcellation
    - Tractogram
    - Matrix
    - Phenotype
    - Network
    - Node
    - Edge
    - Observation
    - Dynamics
    - StateVariable
    - Parameter
    - Function
    - FunctionCall
    - DerivedVariable
    - RandomStream
    - DataSource
    - OptimizationStage
    - Exploration
    - ExplorationAxis
    - FreeParameter
    - Inference
    - AlgorithmStage
    - TuningObjective
    - Continuation
    - Coupling
    - RegionMapping
    - SimulationExperiment
    - SimulationStudy
    - TimeSeries
    - NDArray
    - SpatialDomain
    - Mesh
    - SpatialField
    - FieldStateVariable
    - DifferentialOperator
    - BoundaryCondition
    - PDESolver
    - PDE
    range: string
  iri:
    name: iri
    description: Optional stable IRI (or compact URI) for this entity in an external
      ontology or knowledge base. Used to load metadata from an external source; not
      required when the entity is fully self-contained (equations, parameters, etc.
      defined in the file itself).
    from_schema: https://w3id.org/tvbo
    rank: 1000
    slot_uri: dcterms:identifier
    owner: LossFunction
    domain_of:
    - DataRef
    - Theme
    - Parcellation
    - Tractogram
    - ResultEntity
    - Activity
    - ReferenceFingerprint
    - GraphGenerator
    - Reference
    - Observation
    - Dynamics
    - Function
    - FunctionCall
    - Coupling
    range: uriorcurie
  equation:
    name: equation
    from_schema: https://w3id.org/tvbo
    rank: 1000
    slot_uri: tvbo:Equation
    owner: LossFunction
    domain_of:
    - Stimulus
    - Event
    - ProcedureStep
    - Observation
    - StateVariable
    - Parameter
    - Function
    - FunctionCall
    - DerivedParameter
    - DerivedVariable
    - Noise
    - UpdateRule
    - DifferentialOperator
    - BoundaryCondition
    range: Equation
    inlined: true
  definition:
    name: definition
    from_schema: https://w3id.org/tvbo
    rank: 1000
    slot_uri: skos:definition
    owner: LossFunction
    domain_of:
    - Equation
    - StateVariable
    - Parameter
    - Function
    - DifferentialOperator
    range: string
  description:
    name: description
    from_schema: https://w3id.org/tvbo
    rank: 1000
    slot_uri: dcterms:description
    owner: LossFunction
    domain_of:
    - CommonCoordinateSpace
    - Dataset
    - StudyLayout
    - StudyTemplate
    - StudyDirectory
    - StudyFile
    - ClinicalScore
    - SoftwarePackage
    - SoftwareRequirement
    - SoftwareEnvironment
    - Figure
    - Panel
    - Equation
    - Stimulus
    - Event
    - Tractogram
    - Matrix
    - ResultEntity
    - Activity
    - Phenotype
    - MeasureSpec
    - NamedArray
    - Network
    - GraphGenerator
    - ProcedureStep
    - File
    - Node
    - Edge
    - Observation
    - Dynamics
    - StateVariable
    - Parameter
    - CouplingInput
    - Argument
    - Function
    - FunctionCall
    - Callable
    - DerivedParameter
    - DerivedVariable
    - RandomStream
    - DataSource
    - OptimizationStage
    - Exploration
    - ExplorationAxis
    - FreeParameter
    - Inference
    - Prior
    - Likelihood
    - UpdateRule
    - AlgorithmStage
    - TuningObjective
    - Algorithm
    - BranchSwitch
    - Continuation
    - Integrator
    - Coupling
    - RegionMapping
    - SimulationExperiment
    - Study
    - ResultBinding
    - TimeSeries
    - NDArray
    - SpatialDomain
    - Mesh
    - SpatialField
    - FieldStateVariable
    - BoundaryCondition
    - PDESolver
    - PDE
    - Reducer
    range: string
  requirements:
    name: requirements
    from_schema: https://w3id.org/tvbo
    rank: 1000
    owner: LossFunction
    domain_of:
    - SoftwareEnvironment
    - Function
    - WorkflowConfig
    - PDESolver
    range: SoftwareRequirement
    multivalued: true
  input:
    name: input
    description: 'Simple input reference: name of previous function''s output in pipeline.
      For multi-argument functions, use arguments with value references instead.'
    from_schema: https://w3id.org/tvbo
    rank: 1000
    owner: LossFunction
    domain_of:
    - Function
    - FunctionCall
    range: Function
    inlined: false
  output:
    name: output
    description: Name for this function's output (referenced by subsequent functions)
    from_schema: https://w3id.org/tvbo
    owner: LossFunction
    domain_of:
    - DataRef
    - Procedure
    - Dynamics
    - Function
    - FunctionCall
    range: string
  arguments:
    name: arguments
    description: Variables consumed by the function (referenced in the equation),
      keyed by argument name. Each value carries the optional metadata (value, description,
      unit); the key is the name (no redundant `name:` inside).
    from_schema: https://w3id.org/tvbo
    rank: 1000
    owner: LossFunction
    domain_of:
    - Function
    - FunctionCall
    - AlgorithmInclude
    - AlgorithmStage
    range: Argument
    multivalued: true
    inlined: true
  output_equation:
    name: output_equation
    description: Output transformation equation (if equation-based)
    from_schema: https://w3id.org/tvbo
    rank: 1000
    owner: LossFunction
    domain_of:
    - Function
    range: Equation
    inlined: true
  source_code:
    name: source_code
    from_schema: https://w3id.org/tvbo
    rank: 1000
    owner: LossFunction
    domain_of:
    - Function
    - FunctionCall
    range: string
  callable:
    name: callable
    description: Software implementation reference (if software-based)
    from_schema: https://w3id.org/tvbo
    owner: LossFunction
    domain_of:
    - Binding
    - Function
    - FunctionCall
    range: Callable
    inlined: true
  apply_on_dimension:
    name: apply_on_dimension
    description: Which dimension to apply the transformation on
    from_schema: https://w3id.org/tvbo
    rank: 1000
    owner: LossFunction
    domain_of:
    - Function
    - FunctionCall
    range: DimensionType
  time_range:
    name: time_range
    description: Time range for generated TimeSeries (for kernel generators). Equation
      is evaluated at each time point.
    from_schema: https://w3id.org/tvbo
    rank: 1000
    owner: LossFunction
    domain_of:
    - Function
    - FunctionCall
    range: Range
    inlined: true
class_uri: tvbo:LossFunction

```
</details></div>