Session Relationship Types¶
The different relationship types of camera trap sessions are documented in this table.
Table Set Up¶
| Column Name | Content | Type | Unique | Nullable | Custom Constraints | Linked Table |
|---|---|---|---|---|---|---|
| ID | ID for entry | Integer | True | False | ||
| Relationship | name of the relationship type | String(50) | True | False | ||
| IndependantEcol | if the images of the CT are independant for downstream ecological analysis. | Boolean | False | False | ||
| IndependantAI | if the images of the CT are independant for AI classifcation | Boolean | False | False | ||
| Info | short explanation what the relationship type means | String(255) | False | True |
Common Documented Relationship Types¶
pair¶
Two or more camera traps have been set up at the same time at the same location. Often the other camera trap is seen in the camera trap pictures.
Independance
- ecologically : False , because they will document the same individuals at the same time. This can cause overestimation of abundance.
- AI : True , because the view of the 2 cameras is different.
battery change¶
A camera has been set up at the same location in the same position, but there are time gaps between monitoring periods. This is generally due to running out of battery before it could be replaced.
Independance
- ecologically : True , because there is no overlap in time.
- AI : False , because the view stays identical.
continued session¶
A camera has been set up continuously at the same location but the data is stored in more than one folder. The sessions could effectively merged into one session.
Independance
- ecologically : True , because there is no overlap in time.
- AI : False , because the view stays identical.
remonitoring¶
A camera has been set up at a location, it was then taken away and a new camerea has been put at the same location a while (more than a month) later.
Independance
- ecologically : True , because there is no overlap in time.
- AI : True, the view can be very similar (or not) but a lot of time has elapsed. The AI may perform better if the cameras were set up very similarly, but it is a real world case that you may train your AI model with data from year one and apply it to data of year two, even if the view is very similar.
Functions¶
Test code for each function of the Relationship Types table is shown in Functions_RelationshipType.ipynb
In order to use the class functions, an instance of the class needs to be created
import T_Tables as tableClasses
#create class instance
RelationshipTypes = tableClasses.T_SRelationshipTypes()
add¶
This function adds a singular relationship type to the database.
RelationshipTypes.add(relationship: str, independantEcol: bool, independantAI: bool, info: str = None)
Parameters
- relationship: name of the relationship type
- independantEcol: if the images of the CT are independant for downstream ecological analysis
- independantAI: if the images of the CT are independant for AI classifcation
- info: short explanation what the relationship type means
Returns
This function returns nothing.
delete¶
This function deletes a relationship type from the database. Note, that a relationship type cannot be deleted, if it has been referenced in Session Relationships.
RelationshipTypes.delete(relationship: str)
Parameters
- relationship: name of the relationship type you wish to delete
Returns
The function returns nothing.
update¶
This function allows you to update information of a given column for one entry
RelationshipTypes.update(name, colName: str, value)
Parameters
- relationship: name of the relationship type you wish to update
- colName: name of the column where you wish to update the value
- value: new value of given column. Make sure that the value matched the data type of the column
Returns
The function returns nothing.
get¶
This function gets all information for one relationship type.
RelationshipTypes.get(relationship: str)
Parameters
- relationship: name of the image you wish to get information for
Returns
This function returns a pd.dataframe with one row.
getAll¶
This function gets all information for a all relationship types.
RelationshipTypes.getAll()
Parameters
This Function has no parameters.
Returns
This function returns a pd.dataframe with one row for each documented relationship type.