Answers.Body: <p>Yes.</p>
  
  <p>Since you have only one type of data, cluster analysis may be a good choice. </p>
  
  <p>You can also try '<a href="https://en.wikipedia.org/wiki/One-class_classification" rel="nofollow noreferrer">1-class learning</a>' approaches, although I have found these to be unreliable in the past. </p>
  
  <p>An example of a cluster analysis algorithm in R is <a href="https://uc-r.github.io/kmeans_clustering" rel="nofollow noreferrer">kmeans</a>. 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.</p>
  
  <p>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. <a href="https://stackoverflow.com/questions/27375517/one-class-classification-with-svm-in-r">Here's</a> an example with R's e1071 package.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-04-12T13:14:53.637Z
Answers.LastActivityDate: 2019-04-12T13:14:53.637Z
Answers.UserDisplayName: John Doucette
Body: <p>I have some ecological data on the confirmed presence of a certain animal. I have data on the:</p>
  
  <pre><code>Date
  Relevant metadata about the site 
  Simple metrics on the animal
  A complete weather record for the site. 
  </code></pre>
  
  <p>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.</p>
  
  <pre><code>#Date of observation
  Date&lt;-as.POSIXct(c("2015-01-01","2015-01-11","2015-01-19","2015-02-04","2015-02-12","2015-02-23","2015-04-01","2015-04-10","2015-04-16","2015-04-20"))
  
  #Data about animal 
  Size&lt;-c(1,1,1,2,2,3,4,1,2,5)
  Color&lt;-c("B","B","R","R","R","R","B","B","B","Y" )
  Length&lt;-c(1,10,12,4,5,2,1,2,7,12)
  
  #Weather Data
  AirTempDayOf&lt;-c(20,40,20,23,24,25,24,25,25,22)
  WindSpeedDayOf&lt;-c(2,3,2,3,4,3,2,3,4,5)
  AirTempDayBefore&lt;-c(21,40,22,23,24,24,24,27,25,22)
  WindSpeedDayBefore&lt;-c(2,5,2,6,4,3,6,3,2,5)
  AirTemp2DayBefore&lt;-c(21,45,22,23,34,24,24,23,25,23)
  WindSpeed2DayBefore&lt;-c(8,5,3,6,4,7,6,3,2,6)
  
  #Metadata about site
  Type&lt;-c("Forest","Forest","Forest","Forest","Forest","Beach""Beach""Beach","Swamp","Swamp")
  Population&lt;-c(20,30,31,23,32,43,23,43,23,33)
  Use&lt;-c("Industrial","Commercial","Industrial","Commercial","Industrial","Commercial","Industrial","Commercial","Industrial","Commercial",)
  
  
  DF&lt;-data.frame(Date,Size,Color,Length,AirTempDayOf, WindSpeedDayOf,AirTempDayBefore,WindSpeedDayBefore,AirTemp2DayBefore,WindSpeed2DayBefore)
  </code></pre>
  
  <p>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. </p>
  
  <p>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. </p>
  
  <p>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? </p>
  
  <p>I usually use R for my stats, so any answers including R packages would be helpful. </p>
  
  <p>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</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-12T13:00:10.413Z
Comments.Text: Have you made regular observations? If so, the dates that are not recorded could be assumed to be Absences.
Comments.UserDisplayName: Rory Alsop
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-04-12T13:02:09.137Z
Comments.Text: The observations are not regular, so I can't assume anything about dates not in the dataset
Comments.UserDisplayName: Vint
Tags: <neural-networks><machine-learning><r>
Title: Machine learning to find drivers of an event with presence-only data (no absence)
UserDisplayName: Vint
ThreadText: # Machine learning to find drivers of an event with presence-only data (no absence)
  
  (Asked by: username_0 on 2019-04-12)
  
  I have some ecological data on the confirmed presence of a certain animal. I have data on the:
  
  ```
  Date
  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
  Date<-as.POSIXct(c("2015-01-01","2015-01-11","2015-01-19","2015-02-04","2015-02-12","2015-02-23","2015-04-01","2015-04-10","2015-04-16","2015-04-20"))
  
  #Data about animal 
  Size<-c(1,1,1,2,2,3,4,1,2,5)
  Color<-c("B","B","R","R","R","R","B","B","B","Y" )
  Length<-c(1,10,12,4,5,2,1,2,7,12)
  
  #Weather Data
  AirTempDayOf<-c(20,40,20,23,24,25,24,25,25,22)
  WindSpeedDayOf<-c(2,3,2,3,4,3,2,3,4,5)
  AirTempDayBefore<-c(21,40,22,23,24,24,24,27,25,22)
  WindSpeedDayBefore<-c(2,5,2,6,4,3,6,3,2,5)
  AirTemp2DayBefore<-c(21,45,22,23,34,24,24,23,25,23)
  WindSpeed2DayBefore<-c(8,5,3,6,4,7,6,3,2,6)
  
  #Metadata about site
  Type<-c("Forest","Forest","Forest","Forest","Forest","Beach""Beach""Beach","Swamp","Swamp")
  Population<-c(20,30,31,23,32,43,23,43,23,33)
  Use<-c("Industrial","Commercial","Industrial","Commercial","Industrial","Commercial","Industrial","Commercial","Industrial","Commercial",)
  
  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
  
  **Tags:** neural-networks, machine-learning, r
  
  > **Comments:**
  > **username_1**: Have you made regular observations? If so, the dates that are not recorded could be assumed to be Absences.  
  > **username_0**: The observations are not regular, so I can't assume anything about dates not in the dataset  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2019-04-12. Score: 1
  
  Yes.
  
  Since you have only one type of data, cluster analysis may be a good choice.
  
  You can also try '[1-class learning](https://en.wikipedia.org/wiki/One-class_classification)' approaches, although I have found these to be unreliable in the past.
  
  An example of a cluster analysis algorithm in R is [kmeans](https://uc-r.github.io/kmeans_clustering). 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](https://stackoverflow.com/questions/27375517/one-class-classification-with-svm-in-r) an example with R's e1071 package.
  
  
  ---
  
  