Skip to content

Commit

Permalink
Added straight down line.
Browse files Browse the repository at this point in the history
  • Loading branch information
antononcube committed Nov 8, 2017
1 parent 81fc41f commit 0a83b3f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/TimeSeriesRecommender.R
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ MakeTimeSeriesSearchVectors <- function( tsMat ) {
searchVector <- ( 1:ncol(tsMat) ) / ncol(tsMat)
tsSearchVectors <- c( tsSearchVectors, list(StraightUp = searchVector) )

## Straight descending line
searchVector <- seq( ncol(tsMat), 1, -1 ) / ncol(tsMat)
tsSearchVectors <- c( tsSearchVectors, list(StraightDown = searchVector) )

## Increasing in the last half
searchVector <- ( 1:ncol(tsMat) ) - ( ncol(tsMat) / 2 ); searchVector[ searchVector < 0 ] <- 0
searchVector <- searchVector / ncol(tsMat)
Expand Down

0 comments on commit 0a83b3f

Please sign in to comment.