New answers tagged visualization
0
As far as estimating similarity between the time series series there is a variety of methods you may want to investigate. Some of those are:
cross correlation: this will be affected by the amplitude and will not be able to estimate lagged correlations, prone to noise.
coherence: normalised frequency based correlation (cross-spectrum), not prone to amplitude ...
2
For this type of issue, I typically add the reciprocal of the log base. For data that's being log10-scaled, this results in adding 0.1 to all values. For data that's being log2-scaled, this results in adding 0.5 to all values. This has the nice property of mapping all of your 0 values to -1 in the log scale, regardless of what log base you use. If your data ...
2
Your suggestion is a valid one, encoding variables with a known outcome once the scaling is applied. Log(1) will become zero, so just keep that in mind for your next stage. You can use clip or replace for this:
df.clip(1, df.max())
or try replacing with a NaN
df.replace(0, np.nan)
Alternatively you could do one of the following:
Drop the zero value rows e....
1
It completely depends on the type of model. Some models need to represent the features with parameters: for example Naive Bayes with numerical features needs to have a way to calculate the probability based on the value, and the most common case is to assume that the features follow a normal distribution. On the other hand whether a feature is normally ...
1
For better control over the x-axis formatting, you can use the matplotlib.dates methods. In your case, MonthLocator and DateFormatter could be of interest. These can be used to adjust the x-axis as follows:
import matplotlib.dates as mdates
def time_series(start, end):
time_series_df = df.loc[(df['Date'] >= start) & (df['Date'] <= end), ['...
Top 50 recent answers are included
Related Tags
visualization × 555python × 134
machine-learning × 59
r × 59
matplotlib × 51
data × 43
plotting × 38
dataset × 35
data-mining × 33
pandas × 33
statistics × 26
clustering × 24
seaborn × 24
data-analysis × 23
time-series × 21
graphs × 20
ggplot2 × 20
data-cleaning × 19
tableau × 19
neural-network × 17
classification × 17
dimensionality-reduction × 17
deep-learning × 16
bigdata × 16
correlation × 11