resampling Questions

2

Solved

I am using pandas 0.17.0 and have a df similar to this one: df.head() Out[339]: A B C DATE_TIME 2016-10-08 13:57:00 in 5.61 1 2016-10-08 14:02:00 in 8.05 1 2016-10-08 14:07:00 in 7.92 0 2016-10...
Moncada asked 30/8, 2016 at 4:57

13

I have run the same code(with packages I needed) before and it worked, not sure what's happening now. This show the error, AttributeError: module 'PIL.Image' has no attribute 'Resampling'. Probably...
Raimes asked 4/4, 2022 at 13:36

2

I'm trying to use data.table/tidyverse to efficiently sample at two levels: Level 1 is Hospital ID ( hospital_id ) Level 2 is Doctor ID ( doctor_id ) I need to first sample with replacement $N$ hos...
Triglyceride asked 7/7, 2023 at 5:26

1

In this SO Question bootstrapping by several groups and subgroups seemed to be easy using the broom::bootstrap function specifying the by_group argument with TRUE. My desired output is a nested ti...
Middle asked 4/10, 2019 at 10:18

5

Solved

I am working on capturing and streaming audio to RTMP server at a moment. I work under MacOS (in Xcode), so for capturing audio sample-buffer I use AVFoundation-framework. But for encoding and stre...
Shirt asked 3/6, 2013 at 19:58

7

Solved

I have some JS that makes some manipulations with images. I want to have pixelart-like graphics, so I had to enlarge original images in graphics editor. But I think it'd be good idea to make all th...
Tommy asked 18/10, 2011 at 14:57

2

I need to resample time series in node.js. So I would like to know whether there is a tool in javascript which works similar as pandas in Python? Lets say I have data which looks similar to this e...
Mayest asked 30/9, 2018 at 8:59

3

Solved

Sample data: import pandas as pd import numpy as np import datetime data = {'value': [1,2,4,3], 'names': ['joe', 'bob', 'joe', 'bob']} start, end = datetime.datetime(2015, 1, 1), datetime.datetim...
Micrometry asked 27/6, 2017 at 20:56

6

Solved

I'm writing some code that plays back WAV files at different speeds, so that the wave is either slower and lower-pitched, or faster and higher-pitched. I'm currently using simple linear interpolati...

3

Solved

I am resampling a Pandas TimeSeries. The timeseries consist of binary values (it is a categorical variable) with no missing values, but after resampling NaNs appear. How is this possible? I can't ...
Linalool asked 27/10, 2015 at 9:50

3

Solved

import pandas as pd import numpy as np dates = pd.date_range('20141229',periods=14, name='Day') df = pd.DataFrame({'Sum1': [1667, 1229, 1360, 9232, 8866, 4083, 3671, 10085, 10005, 8730, 10056, 101...
Mayce asked 22/6, 2015 at 20:28

3

I am getting "can only concatenate list (not "MultiValue") to list" highlighting map (float portion, while running below resampling, this code is very commonly used throughout i...
Block asked 23/4, 2018 at 2:59

5

Solved

I have a dataset with 1400 obs and 19 columns. The Target variable has values 1 (value that I am most interested in) and 0. The distribution of classes shows imbalance (70:30). Using the code below...

2

Solved

import pandas as pd mydata = [{'ID' : '10', 'Entry Date': '10/10/2016', 'Exit Date': '15/10/2016'}, {'ID' : '20', 'Entry Date': '10/10/2016', 'Exit Date': '18/10/2016'}] mydata2 = [{'ID': '10', ...
Domino asked 12/10, 2016 at 11:6

8

Solved

I am looking for an algorithm that determines percentiles for live data capture. For example, consider the development of a server application. The server might have response times as follows: 17...
Plier asked 8/8, 2009 at 12:56

1

I'm trying to block bootstrap samples for Monte-Carlo simulation and need to generate a large array of index values (integers) containing blocks in Python. I need this to be very fast but cannot fi...
Teeters asked 20/7, 2021 at 23:32

7

Solved

Dataframe.resample() works only with timeseries data. I cannot find a way of getting every nth row from non-timeseries data. What is the best method?
Kylix asked 31/7, 2014 at 9:44

2

I am doing a text classification and I have very imbalanced data like Category | Total Records Cate1 | 950 Cate2 | 40 Cate3 | 10 Now I want to over sample Cate2 and Cate3 so it at least have 40...

2

Solved

I want to perform N=1000 bootstrapping with replacement on gridded data. One computation takes about 0.5s. I have access to a supercomputer exclusive node with 48 cores. Because the resampling are ...
Arrant asked 23/5, 2019 at 18:36

4

Solved

Use xarray to resample to lower spatial resolution I want to resample my xarray object to a lower spatial resolution (LESS PIXELS). import pandas as pd import numpy as np import xarray as xr time ...
Hyperacidity asked 21/12, 2018 at 14:7

4

Solved

Say I have a 10,000 pt vector that I want to take a slice of only 100 logarithmically spaced points. I want a function to give me integer values for the indices. Here's a simple solution that is si...
Consequent asked 14/9, 2012 at 4:40

3

Solved

I have a two time series in separate pandas.dataframe, the first one - series1 has less entries and different start datatime from the second - series2: index1 = pd.date_range(start='2020-06-16 23:1...
Flanders asked 9/8, 2020 at 11:24

1

Solved

Problem I need to reduce the length of a DataFrame to some externally defined integer (could be two rows, 10,000 rows, etc., but will always be a reduction in overall length), but I also want to ke...
Humiliate asked 16/7, 2020 at 15:2

2

Solved

I have this code: from imblearn.over_sampling import ADASYN Y = df.target X = df.drop('target', axis=1) ad = ADASYN() X_adasyn, y_adasyn = ad.fit_sample(X, Y) getting this error: ValueError: N...
Valgus asked 12/5, 2019 at 14:18

4

Solved

I have the following 15 minute data as a dataframe for 3 years. With the first two columns being the index. 2014-01-01 00:15:00 1269.6 2014-01-01 00:30:00 1161.6 2014-01-01 00:45:00 1466.4 2014...
Fusibility asked 8/3, 2013 at 15:6

© 2022 - 2024 — McMap. All rights reserved.