get_transformed_values {syuzhet}R Documentation

Fourier Transform and Reverse Transform Values

Description

Please Note: This function is maintained for legacy purposes. Users should consider using get_dct_transform() instead. Converts input values into a standardized set of filtered and reverse transformed values for easy plotting and/or comparison.

Usage

get_transformed_values(
  raw_values,
  low_pass_size = 2,
  x_reverse_len = 100,
  padding_factor = 2,
  scale_vals = FALSE,
  scale_range = FALSE
)

Arguments

raw_values

the raw sentiment values calculated for each sentence

low_pass_size

The number of components to retain in the low pass filtering. Default = 3

x_reverse_len

the number of values to return. Default = 100

padding_factor

the amount of zero values to pad raw_values with, as a factor of the size of raw_values. Default = 2.

scale_vals

Logical determines whether or not to normalize the values using the scale function Default = FALSE. If TRUE, values will be scaled by subtracting the means and scaled by dividing by their standard deviations. See ?scale

scale_range

Logical determines whether or not to scale the values from -1 to +1. Default = FALSE. If set to TRUE, the lowest value in the vector will be set to -1 and the highest values set to +1 and all the values scaled accordingly in between.

Value

The transformed values

Examples

s_v <- get_sentences("I begin this story with a neutral statement. 
Now I add a statement about how much I despise cats. 
I am allergic to them. 
Basically this is a very silly test.")
raw_values <- get_sentiment(s_v, method = "bing")
get_transformed_values(raw_values)

[Package syuzhet version 1.0.7 Index]