I have some ecological data on the confirmed presence of a certain animal. I have data on the:

Relevant metadata about the site 
Simple metrics on the animal
A complete weather record for the site. 

I'm assuming the presence of this animal is driven by weather events, and that the metadata about the site may be an important factor for patterns in the data. What my data ends up looking like is this.

#Date of observation

#Data about animal 
Color<-c("B","B","R","R","R","R","B","B","B","Y" )

#Weather Data

#Metadata about site

DF<-data.frame(Date,Size,Color,Length,AirTempDayOf, WindSpeedDayOf,AirTempDayBefore,WindSpeedDayBefore,AirTemp2DayBefore,WindSpeed2DayBefore)

What I don't have is absence data, so I can't make any assumptions about when an organism was not at the site. I'd like to look for patterns in weather that my be driving the arrival of this organism, but all I have is data on when the organism was spotted.

Is it possible to apply some sort of machine learning to look for patterns that may be driving the arrival of this animal? If I don't have absence data, I'm assuming I cant. I've looked into pseudo-absence models, but I don't know how they might apply here.

If I can't use machine learning to look at drivers for the presence of these animals, is it possible to use ML to look at possible weather patterns that may be associated with some of the metadata about the site? For example, weather patterns that may be associated with Forrest vs Beach habitats?

I usually use R for my stats, so any answers including R packages would be helpful.

Also, note that this is just an example dataset above. I don't expect to find any patterns in the above data, and my actual dataset is much larger. But any code developed for the above data should be applicable

  • $\begingroup$ Have you made regular observations? If so, the dates that are not recorded could be assumed to be Absences. $\endgroup$
    – Rory Alsop
    Apr 12, 2019 at 13:00
  • $\begingroup$ The observations are not regular, so I can't assume anything about dates not in the dataset $\endgroup$
    – Vint
    Apr 12, 2019 at 13:02

1 Answer 1



Since you have only one type of data, cluster analysis may be a good choice.

You can also try '1-class learning' approaches, although I have found these to be unreliable in the past.

An example of a cluster analysis algorithm in R is kmeans. There are many others. These approaches will reveal points that typify large portions of the dataset. By examining 'typical' cases, and how they differ, you can spot potential causal factors to test experimentally.

An example of a 1-class learning algorithm is a one-class svm. Most svm libraries will accept data of a single class and do the right thing with it. Here's an example with R's e1071 package.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .