2
votes

I am running the following code and getting this issue -

"/usr/local/lib/python2.7/dist-packages/seaborn/timeseries.py:183: UserWarning: The tsplot function is deprecated and will be removed or replaced (in a substantially altered version) in a future release. warnings.warn(msg, UserWarning) ".

Does anybody know how to fix this issue?

Code-

import numpy as np
import tensorflow as tf
import seaborn as sns
import pandas as pd

SEQ_LEN = 10
def create_time_series():
  freq = (np.random.random()*0.5) + 0.1  # 0.1 to 0.6
  ampl = np.random.random() + 0.5  # 0.5 to 1.5
  x = np.sin(np.arange(0,SEQ_LEN) * freq) * ampl
  return x

for i in xrange(0, 5):
  sns.tsplot( create_time_series() );  # 5 series
1
It is a warning, not an error. You are being warned that a function that you use will be removed from Seaborn in the future. Either ignore the warning or use some other function instead. - DYZ
Look at some answers to this question: stackoverflow.com/questions/45327767/… - DYZ
The seaborn documentation states about tsplot: "This function is intended to be used with data where observations are nested within sampling units that were measured at multiple timepoints." So I guess it is pretty overkill here anyways. Why not use a normal line plot, i.e. plt.plot() (where plt is matplotlib.pyplot)? - ImportanceOfBeingErnest

1 Answers

1
votes

As per the comments: This is a warning, not an error. You are being warned that a function that you use will be removed from Seaborn in the future. Either ignore the warning or use some other function instead, such as plt.plot() from matplotlib.pyplot.