PYTHON4FINANCE Telegram 1117
نمونه‌گیری در داده های سری زمانی- بخش دوم
برای نمونه گیری از سری های زمانی در ماژول scikit-learn از تابع TimeSeriesSplit در کلاس model_selection استفاده می کنیم.
در مثال این پست، نمونه های مختلفی از جامعه برای آموزش و آزمون انتخاب می شود.
#code by @python4finance
import numpy as np
from sklearn.model_selection import TimeSeriesSplit
X = np.array([[1, 2], [3, 4], [1, 2], [3, 4], [1, 2], [3, 4]])
y = np.array([1, 2, 3, 4, 5, 6])
tscv = TimeSeriesSplit()
for i, (train_index, test_index) in enumerate(tscv.split(X)):
print(f"Fold {i}:")
print(f" Train: index={train_index}")
print(f" Test: index={test_index}")


#پایتون_مالی
#انتخاب_داده
#نمونه_گیری

#سری_زمانی
#Time_series
#Sampling


پایتون برای مالی

🆔 www.tgoop.com/python4finance
🆔 ble.ir/python4finance
18



tgoop.com/python4finance/1117
Create:
Last Update:

نمونه‌گیری در داده های سری زمانی- بخش دوم
برای نمونه گیری از سری های زمانی در ماژول scikit-learn از تابع TimeSeriesSplit در کلاس model_selection استفاده می کنیم.
در مثال این پست، نمونه های مختلفی از جامعه برای آموزش و آزمون انتخاب می شود.

#code by @python4finance
import numpy as np
from sklearn.model_selection import TimeSeriesSplit
X = np.array([[1, 2], [3, 4], [1, 2], [3, 4], [1, 2], [3, 4]])
y = np.array([1, 2, 3, 4, 5, 6])
tscv = TimeSeriesSplit()
for i, (train_index, test_index) in enumerate(tscv.split(X)):
print(f"Fold {i}:")
print(f" Train: index={train_index}")
print(f" Test: index={test_index}")


#پایتون_مالی
#انتخاب_داده
#نمونه_گیری

#سری_زمانی
#Time_series
#Sampling


پایتون برای مالی

🆔 www.tgoop.com/python4finance
🆔 ble.ir/python4finance

BY Python4Finance




Share with your friend now:
tgoop.com/python4finance/1117

View MORE
Open in Telegram


Telegram News

Date: |

The SUCK Channel on Telegram, with a message saying some content has been removed by the police. Photo: Telegram screenshot. Done! Now you’re the proud owner of a Telegram channel. The next step is to set up and customize your channel. In handing down the sentence yesterday, deputy judge Peter Hui Shiu-keung of the district court said that even if Ng did not post the messages, he cannot shirk responsibility as the owner and administrator of such a big group for allowing these messages that incite illegal behaviors to exist. The Channel name and bio must be no more than 255 characters long Hui said the messages, which included urging the disruption of airport operations, were attempts to incite followers to make use of poisonous, corrosive or flammable substances to vandalize police vehicles, and also called on others to make weapons to harm police.
from us


Telegram Python4Finance
FROM American