diff --git a/aisenzhecode/沥青/日度价格预测_最佳模型.pkl b/aisenzhecode/沥青/日度价格预测_最佳模型.pkl index c616dca..9e7d0ab 100644 Binary files a/aisenzhecode/沥青/日度价格预测_最佳模型.pkl and b/aisenzhecode/沥青/日度价格预测_最佳模型.pkl differ diff --git a/aisenzhecode/沥青/沥青定量价格预测每日推送-ytj.ipynb b/aisenzhecode/沥青/沥青定量价格预测每日推送-ytj.ipynb index 610b88f..a6e4b52 100644 --- a/aisenzhecode/沥青/沥青定量价格预测每日推送-ytj.ipynb +++ b/aisenzhecode/沥青/沥青定量价格预测每日推送-ytj.ipynb @@ -2,17 +2,9 @@ "cells": [ { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "WARNING:tensorflow:From C:\\Users\\EDY\\AppData\\Roaming\\Python\\Python311\\site-packages\\keras\\src\\losses.py:2976: The name tf.losses.sparse_softmax_cross_entropy is deprecated. Please use tf.compat.v1.losses.sparse_softmax_cross_entropy instead.\n", - "\n" - ] - }, { "data": { "text/html": [ @@ -796,121 +788,1458 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "20250102\n", - "新增数据: ['2025-01-02', 8057.0, 6784.0, 0.05, 0.0, 3650.0, 0.75, 0.0, 0.0, 3520.0, 7.9, 0.2, 0.2, 3540.0, 1.15, '', 3600.0, 73.36, '', '', 3669.0, 25.1642, '', '', '', '', 229522.1, 6197.58, 3551.9952, '', '', 75999.0902808, 6931.295, '']\n", - "20250103\n", - "新增数据: ['2025-01-03', 8121.0, 6829.0, 0.05, 0.0, 3650.0, 0.7, 0.0, 0.0, 3520.0, 7.9, 0.2, 0.2, 3540.0, 1.15, '', 3600.0, 73.36, 76.03, '', 3678.0, 29.9291, '', '', '', '', 229522.1, 8038.22, 897.5595, '', 50180.0, 73015.8650188, 6693.26, 3602.01]\n", - "20250104\n", - "新增数据: ['2025-01-04', 8156.0, 6856.0, 0.05, 0.0, 3650.0, 0.7, 0.0, 0.0, 3520.0, 7.9, 0.2, 0.2, 3540.0, 1.15, '', 3600.0, 73.36, 76.69, '', '', 32.2931, '', '', '', '', 229522.1, 7900.62, 3667.3859, '', '', 72148.9646528, 6804.94, '']\n", - "20250105\n", - "新增数据: ['2025-01-05', 8192.0, 6856.0, 0.05, 0.0, 3650.0, 0.65, 0.0, 0.0, 3520.0, 7.9, 0.15, 0.2, 3540.0, 1.2, '', 3600.0, 76.69, '', '', '', 30.8747, '', '', '', '', 229522.1, 6417.5, 3657.2132, '', '', 75308.7978357, 6814.96, '']\n", - "20250106\n", - "新增数据: ['2025-01-06', 8226.0, 6856.0, 0.05, 0.0, 3650.0, 0.6, 0.0, 0.0, 3500.0, 7.9, 0.12, 0.2, 3510.0, 1.28, '', 3600.0, 76.69, '', '', 3610.0, 31.8203, '', '', '', '', 229522.1, 5489.2, 3679.4214, '', '', 74486.3079283, 6814.99, '']\n", - "20250107\n", - "新增数据: ['2025-01-07', 8226.0, 6904.0, 0.03, 0.0, 3600.0, 0.57, 0.0, 0.0, 3480.0, 7.9, 0.3, 0.2, 3510.0, 1.26, '', 3550.0, 76.69, 76.26, '', 3603.0, 33.0024, '', '', '', 12.82003192, 229522.1, 5358.32, 3634.1004, '', '', 76588.1941448, 6795.11, '']\n", - "20250108\n", - "新增数据: ['2025-01-08', 8318.0, 6939.0, 0.03, 0.25, 3600.0, 0.57, 0.0, 0.0, 3480.0, 7.9, 0.3, 0.2, 3470.0, 1.16, '', 3530.0, 76.69, 77.25, '', 3615.0, 34.5154, '', '', '', '', 229522.1, 6866.76, 3720.2633, '', '', 75902.1162471, 6756.81, '']\n", - "20250109\n", - "新增数据: ['2025-01-09', 8363.0, 6984.0, 0.03, 0.25, 3600.0, 0.79, 0.0, 0.0, 3480.0, 7.9, 0.2, 0.2, 3470.0, 1.06, '', 3530.0, 76.69, 76.2, '', 3649.0, 31.6785, '', '', '', '', 229522.1, 8478.06, 3571.7593, '', '', 73757.9160547, 6772.99, '']\n", - "20250110\n", - "新增数据: ['2025-01-10', 8467.0, 7031.0, 0.03, 0.25, 3600.0, 1.0, 0.0, 0.0, 3500.0, 7.9, 0.2, 0.2, 3490.0, 1.06, '', 3530.0, 76.69, 77.21, '', 3691.0, 34.5154, '', '', '', '', 229522.1, 6857.04, 3750.5711, '', '', 73779.8843598, 6569.2, '']\n", - "20250111\n", - "新增数据: ['2025-01-11', 9050.0, 7567.0, '', '', '', '', '', '', '', '', '', '', '', '', '', 3700.0, 76.69, 79.59, '', '', 34.5154, '', '', '', '', 229522.1, 8679.56, 3907.1448, '', 140.0, 72204.2847252, 6466.43, 3900.0]\n", - "20250112\n", - "新增数据: ['2025-01-12', 9323.0, 7675.0, 0.15, 0.25, 3600.0, 1.22, 0.0, 0.0, 3630.0, 7.9, 0.1, 0.2, 3650.0, 1.26, '', 3700.0, 79.59, '', '', '', 32.6241, '', '', '', '', 229522.1, 2818.9, 3687.137, '', '', 76933.4067215, 6479.1, '']\n", - "20250113\n", - "新增数据: ['2025-01-13', 9323.0, 7675.0, 0.15, 0.25, 3600.0, 1.32, 0.0, 0.0, 3630.0, 7.9, 0.1, 0.2, 3650.0, 1.36, '', 3800.0, 79.59, '', '', 3807.0, 34.9882, '', '', '', '', 229522.1, 2971.16, 3777.5616, '', 210.0, 79773.9416121, 5746.0, 3800.0]\n", - "20250114\n", - "新增数据: ['2025-01-14', 9047.0, 7454.0, 0.15, 0.25, 3600.0, 1.42, 0.0, 0.0, 3620.0, 7.9, 0.15, 0.2, 3620.0, 1.46, '', 3800.0, 79.59, 80.86, '', 3748.0, 34.9882, '', '', '', 12.95294256, 229522.1, 6394.5, 3781.754, '', '', 79492.6684067, 5645.07, '']\n", - "20250115\n", - "新增数据: ['2025-01-15', 8965.0, 7308.0, 0.15, 0.25, 3600.0, 1.52, 0.0, 0.0, 3620.0, 7.9, 0.15, 0.2, 3610.0, 1.51, '', 3700.0, 79.59, 80.01, '', 3795.0, 36.4066, '', '', '', '', 229522.1, 6365.01, 512.6357, '', '', 79167.4859979, 5680.14, '']\n", - "20250116\n", - "新增数据: ['2025-01-16', 8893.0, 7256.0, 0.15, 0.25, 3600.0, 1.62, 0.0, 0.0, 3620.0, 7.9, 0.2, 0.2, 3610.0, 1.51, '', 3700.0, 79.59, 82.43, '', 3847.0, 36.4066, '', '', '', '', 229522.1, 6617.55, 4137.6414, '', '', 78477.747561, 5353.39, '']\n", - "20250117\n", - "新增数据: ['2025-01-17', 8893.0, 7221.0, 0.45, 0.25, 3600.0, 1.32, 0.0, 0.0, 3600.0, 7.9, 0.2, 0.2, 3610.0, 1.51, '', 3700.0, 79.59, 81.36, '', 3795.0, 36.4066, '', '', '', '', 229522.1, 5119.64, 4008.3951, '', '', 79603.2505459, 4637.39, '']\n", - "20250118\n", - "新增数据: ['2025-01-18', 8848.0, 7175.0, 0.2, 0.0, 3600.0, 1.12, 0.0, 0.0, 3600.0, 7.9, 0.1, 0.2, 3610.0, 1.61, '', 3700.0, 79.59, 80.75, '', '', 32.6241, '', '', '', '', 229522.1, 2455.2, 3946.2519, '', '', 81923.5310154, 4563.86, '']\n", - "20250119\n", - "新增数据: ['2025-01-19', 8766.0, 7093.0, 0.2, 0.0, 3600.0, 1.12, 0.0, 0.0, 3600.0, 7.9, 0.1, 0.2, 3610.0, 1.51, '', 3700.0, 80.75, '', '', '', 31.2057, '', '', '', '', 229522.1, 1344.66, 3972.0295, '', '', 85334.9336625, 4614.82, '']\n", - "20250120\n", - "新增数据: ['2025-01-20', 8665.0, 7013.0, 0.2, 0.0, 3600.0, 1.12, 0.0, 0.0, 3600.0, 7.9, 0.1, 0.2, 3610.0, 1.61, '', 3700.0, 80.75, '', '', 3735.0, 31.2057, '', '', '', '', 229522.1, 1914.2, 4009.7693, '', '', 88766.602507, 4651.54, '']\n", - "20250121\n", - "新增数据: ['2025-01-21', 8665.0, 6957.0, 0.2, 0.0, 3600.0, 0.92, 0.0, 0.0, 3600.0, 7.9, 0.1, 0.2, 3610.0, 1.71, '', 3650.0, 80.75, 76.33, '', 3736.0, 30.7329, '', '', '', 13.92264145, 229522.1, 2044.82, 3942.8707, '', '', 91204.3689572, 4639.75, '']\n", - "20250122\n", - "新增数据: ['2025-01-22', 8665.0, 6957.0, 0.2, 0.0, 3600.0, 0.72, 0.0, 0.0, 3600.0, 7.9, 0.1, 0.2, 3610.0, 1.81, '', 3650.0, 80.75, 79.4, '', 3749.0, 30.7329, '', '', '', '', 229522.1, 3259.22, 3871.276, '', '', 93526.1525172, 4624.36, '']\n", - "20250123\n", - "新增数据: ['2025-01-23', 8630.0, 6913.0, 0.35, 0.0, 3600.0, 0.32, 0.0, 0.0, 3600.0, 7.9, 0.1, 0.2, 3610.0, 1.91, '', 3650.0, 80.75, 76.59, '', 3739.0, 29.7872, '', '', '', '', 229522.1, 2853.49, 3846.3643, '', '', 95756.3698162, 4650.31, '']\n", - "20250124\n", - "新增数据: ['2025-01-24', 8630.0, 6913.0, 0.3, 0.0, 3600.0, 0.0, 0.0, 0.0, 3600.0, 7.9, 0.1, 0.2, 3610.0, 2.01, '', 3650.0, 80.75, 77.43, '', 3750.0, 29.7872, '', '', '', '', 229522.1, 437.72, 3816.5609, '', '', 100306.8638258, 4617.64, 3650.0]\n", - "20250125\n", - "新增数据: ['2025-01-25', 8804.0, 6913.0, 0.0, 0.0, 3600.0, 0.0, 0.0, 0.0, 3600.0, 7.9, 0.03, 0.2, 3610.0, 2.18, '', 3650.0, 80.75, 74.88, '', '', 28.3688, '', '', '', '', 229522.1, '', 3705.6961, '', '', 105207.7537524, 4618.44, '']\n", - "20250126\n", - "新增数据: ['2025-01-26', 8857.0, 6939.0, 0.0, 0.0, 3600.0, 0.0, 0.0, 0.0, 3600.0, 7.9, 0.03, 0.2, 3610.0, 2.35, '', 3650.0, 74.88, '', '', '', 28.3688, '', '', '', '', 229522.1, '', 3694.4462, '', '', 110382.4647653, 4565.66, '']\n", - "20250127\n", - "新增数据: ['2025-01-27', 8857.0, 6939.0, 0.0, 0.0, 3600.0, 0.0, 0.0, 0.0, 3600.0, 7.9, 0.0, 0.2, 3610.0, 2.55, '', 3650.0, 74.88, '', '', 3715.0, 28.3688, '', '', '', '', 229522.1, '', 3626.8247, '', '', 115505.5177864, 4535.31, '']\n", - "20250128\n", - "新增数据: ['2025-01-28', 8857.0, 6939.0, 0.0, 0.0, 3600.0, 0.0, 0.0, 0.0, 3600.0, 7.9, 0.0, 0.2, 3610.0, 2.75, '', 3650.0, 74.88, 73.65, '', '', 27.896, '', '', '', 15.05736163, 229522.1, '', 3584.3414, '', '', 120715.6507229, 4561.74, '']\n", - "20250129\n", - "新增数据: ['2025-01-29', 8857.0, 6939.0, 0.0, 0.0, 3600.0, 0.0, 0.0, 0.0, 3600.0, 7.9, 0.0, 0.2, 3610.0, 2.95, '', 3650.0, 74.88, 76.53, '', '', 26.9504, '', '', '', '', 229522.1, '', 3618.8126, '', '', 125785.4515644, 4593.562, '']\n", - "20250130\n", - "新增数据: ['2025-01-30', 8857.0, 6939.0, '', '', '', '', '', '', '', '', '', '', '', '', '', 3650.0, 74.88, 75.89, '', '', 26.0047, '', '', '', '', 229522.1, '', 3585.9993, '', '', 130781.5671614, 4620.688, '']\n", - "20250131\n", - "新增数据: ['2025-01-31', 8857.0, 6939.0, '', '', '', '', '', '', '', '', '', '', '', '', '', 3650.0, 74.88, 76.15, '', '', 25.5319, 68.6, 225.29, '', '', 229522.1, '', 3587.7887, '', '', 134131.216744, 4025.178, '']\n", - "20250201\n", + "20250201\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: \n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "d:\\ProgramData\\anaconda3\\Lib\\site-packages\\IPython\\core\\magics\\pylab.py:162: UserWarning:\n", + "\n", + "pylab import has clobbered these variables: ['datetime', 'random', '__version__', 'plot']\n", + "`%matplotlib` prevents importing * from pylab and numpy\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n", + "日期\n", + "2025-02-01 3649.48877\n", + "Name: 日度预测价格, dtype: float32\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\"confirmFlg\":false,\"status\":true}\n", "新增数据: ['2025-02-01', 8857.0, 6904.0, '', '', '', '', '', '', '', '', '', '', '', '', '', 3650.0, 74.88, 76.48, '', '', 25.5319, '', '', '', '', 229522.1, '', 3619.0713, '', '', 141390.8400342, 5245.69, '']\n", - "20250202\n", + "20250202\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n", + "日期\n", + "2025-02-02 3649.591064\n", + "Name: 日度预测价格, dtype: float32\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\"confirmFlg\":false,\"status\":true}\n", "新增数据: ['2025-02-02', 8857.0, 6883.0, '', '', '', '', '', '', '', '', '', '', '', '', '', 3650.0, 76.48, '', '', '', 25.5319, '', '', '', '', 229522.1, '', 3624.724, '', '', 146444.993536, 4650.255, '']\n", - "20250203\n", + "20250203\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n", + "日期\n", + "2025-02-03 3648.494873\n", + "Name: 日度预测价格, dtype: float32\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\"confirmFlg\":false,\"status\":true}\n", "新增数据: ['2025-02-03', 8857.0, 6883.0, '', '', '', '', '', '', '', '', '', '', '', '', '', 3650.0, 76.48, '', '', '', 25.5319, '', '', '', '', 229522.1, '', 3698.7029, '', '', 151802.9709409, 4656.745, '']\n", - "20250204\n", + "20250204\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 6\n", + "\tn_estimators: 100\n", + "日期\n", + "2025-02-04 3645.0979\n", + "Name: 日度预测价格, dtype: float32\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\"confirmFlg\":false,\"status\":true}\n", "新增数据: ['2025-02-04', 8905.0, 6948.0, 0.0, 0.0, 3600.0, 0.0, 0.0, 0.0, 3600.0, 7.9, 0.0, 0.2, 3610.0, 4.0, '', 3650.0, 76.48, 75.4, '', '', 26.4775, '', '', '', 17.21173912, 229522.1, 32.7, 3671.4625, '', '', 156872.340789, 4608.25, '']\n", - "20250205\n", + "20250205\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-05 3688.996338\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", "新增数据: ['2025-02-05', 8956.0, 7022.0, 0.0, 0.25, 3600.0, 0.5, 0.0, 0.0, 3600.0, 7.9, 0.0, 0.2, 3610.0, 4.0, '', 3700.0, 76.48, 76.06, '', 3797.0, 27.4232, '', '', '', '', 229522.1, 857.76, 3622.508, '', '', 160664.5999171, 4644.21, '']\n", - "20250206\n", + "20250206\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n", + "日期\n", + "2025-02-06 3733.748779\n", + "Name: 日度预测价格, dtype: float32\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\"confirmFlg\":false,\"status\":true}\n", "新增数据: ['2025-02-06', 8956.0, 7066.0, 0.0, 0.25, 3600.0, 0.75, 0.0, 0.0, 3600.0, 7.9, 0.0, 0.2, 3610.0, 4.2, '', 3750.0, 76.48, 74.68, '', 3779.0, 27.7541, '', '', '', '', 229522.1, 1217.12, 3513.5033, '', '', 164388.6227375, 4692.07, '']\n", - "20250207\n", + "20250207\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n", + "日期\n", + "2025-02-07 3745.448975\n", + "Name: 日度预测价格, dtype: float32\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\"confirmFlg\":false,\"status\":true}\n", "新增数据: ['2025-02-07', 8921.0, 7031.0, 0.1, 0.25, 3650.0, 0.8, 0.0, 0.0, 3600.0, 7.9, 0.0, 0.2, 3610.0, 4.4, '', 3750.0, 76.48, 74.23, '', 3812.0, 27.7541, '', '', '', '', 229522.1, 942.0, 3631.0462, '', '', 168393.8166163, 4672.16, '']\n", - "20250208\n", + "20250208\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 10\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-08 3749.983154\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", "新增数据: ['2025-02-08', 8866.0, 7004.0, 0.15, 0.25, 3650.0, 0.8, 0.0, 0.0, 3650.0, 7.9, 0.0, 0.2, 3900.0, 4.6, '', 3750.0, 76.48, 74.64, '', '', 27.7541, '', '', '', '', 229522.1, 1089.08, 3664.8865, '', 1000.0, 172610.1660848, 4653.84, 4300.0]\n", - "20250209\n", + "20250209\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-09 3748.356934\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", "新增数据: ['2025-02-09', 8875.0, 7013.0, '', '', '', '', '', '', '', '', '', '', '', '', '', 3750.0, 74.64, '', '', '', 27.7541, '', '', '', '', 229522.1, 1952.98, 3680.6229, '', '', 175400.4021806, 4608.75, '']\n", - "20250210\n", + "20250210\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-10 3749.152832\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", "新增数据: ['2025-02-10', 8875.0, 7013.0, 0.15, 0.25, 3650.0, 0.9, 0.0, 0.0, 3650.0, 7.9, 0.0, 0.2, 3900.0, 4.8, '', 3750.0, 74.64, '', '', 3778.0, 28.608, '', '', '', '', 229522.1, 2114.7, 3719.1501, '', 2000.0, 177876.7630674, 4607.05, 4350.0]\n", - "20250211\n", + "20250211\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-11 3781.463379\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", "新增数据: ['2025-02-11', 8875.0, 7031.0, 0.15, 0.25, 3650.0, 1.0, 0.0, 0.0, 3650.0, 7.9, 0.0, 0.2, 3900.0, 4.8, '', 3800.0, 74.64, 76.01, '', 3776.0, 26.9001, '', '', '', 18.76416033, 229522.1, 1951.18, 3806.0186, '', '', 180448.1199647, 4613.8, '']\n", "20250212\n" ] }, { - "ename": "KeyboardInterrupt", - "evalue": "", - "output_type": "error", - "traceback": [ - "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[1;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", - "Cell \u001b[1;32mIn[2], line 13\u001b[0m\n\u001b[0;32m 11\u001b[0m start_3(start_date,token,token_push)\n\u001b[0;32m 12\u001b[0m time\u001b[38;5;241m.\u001b[39msleep(\u001b[38;5;241m1\u001b[39m)\n\u001b[1;32m---> 13\u001b[0m start_2(start_date,token)\n\u001b[0;32m 14\u001b[0m start_date \u001b[38;5;241m+\u001b[39m\u001b[38;5;241m=\u001b[39m timedelta(days\u001b[38;5;241m=\u001b[39m\u001b[38;5;241m1\u001b[39m)\n", - "Cell \u001b[1;32mIn[1], line 600\u001b[0m, in \u001b[0;36mstart_2\u001b[1;34m(date, token)\u001b[0m\n\u001b[0;32m 593\u001b[0m read_xls_data()\n\u001b[0;32m 595\u001b[0m \u001b[38;5;66;03m# token = get_head_auth()\u001b[39;00m\n\u001b[0;32m 596\u001b[0m \u001b[38;5;66;03m# if not token:\u001b[39;00m\n\u001b[0;32m 597\u001b[0m \u001b[38;5;66;03m# return\u001b[39;00m\n\u001b[1;32m--> 600\u001b[0m datas \u001b[38;5;241m=\u001b[39m get_data_value(token, one_cols[\u001b[38;5;241m1\u001b[39m:],date)\n\u001b[0;32m 601\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m datas:\n\u001b[0;32m 602\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m\n", - "Cell \u001b[1;32mIn[1], line 126\u001b[0m, in \u001b[0;36mget_data_value\u001b[1;34m(token, dataItemNoList, date)\u001b[0m\n\u001b[0;32m 117\u001b[0m search_data \u001b[38;5;241m=\u001b[39m {\n\u001b[0;32m 118\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdata\u001b[39m\u001b[38;5;124m\"\u001b[39m: {\n\u001b[0;32m 119\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdate\u001b[39m\u001b[38;5;124m\"\u001b[39m: get_cur_time(date)[\u001b[38;5;241m0\u001b[39m],\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 123\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mfuncOperation\u001b[39m\u001b[38;5;124m\"\u001b[39m: \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m查询\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m 124\u001b[0m }\n\u001b[0;32m 125\u001b[0m headers \u001b[38;5;241m=\u001b[39m {\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mAuthorization\u001b[39m\u001b[38;5;124m\"\u001b[39m: token}\n\u001b[1;32m--> 126\u001b[0m search_res \u001b[38;5;241m=\u001b[39m requests\u001b[38;5;241m.\u001b[39mpost(url\u001b[38;5;241m=\u001b[39msearch_url, headers\u001b[38;5;241m=\u001b[39mheaders, json\u001b[38;5;241m=\u001b[39msearch_data, timeout\u001b[38;5;241m=\u001b[39m(\u001b[38;5;241m3\u001b[39m, \u001b[38;5;241m5\u001b[39m))\n\u001b[0;32m 127\u001b[0m search_value \u001b[38;5;241m=\u001b[39m json\u001b[38;5;241m.\u001b[39mloads(search_res\u001b[38;5;241m.\u001b[39mtext)[\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mdata\u001b[39m\u001b[38;5;124m\"\u001b[39m]\n\u001b[0;32m 128\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m search_value:\n", - "File \u001b[1;32md:\\ProgramData\\anaconda3\\Lib\\site-packages\\requests\\api.py:115\u001b[0m, in \u001b[0;36mpost\u001b[1;34m(url, data, json, **kwargs)\u001b[0m\n\u001b[0;32m 103\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mpost\u001b[39m(url, data\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mNone\u001b[39;00m, json\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mNone\u001b[39;00m, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs):\n\u001b[0;32m 104\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124mr\u001b[39m\u001b[38;5;124;03m\"\"\"Sends a POST request.\u001b[39;00m\n\u001b[0;32m 105\u001b[0m \n\u001b[0;32m 106\u001b[0m \u001b[38;5;124;03m :param url: URL for the new :class:`Request` object.\u001b[39;00m\n\u001b[1;32m (...)\u001b[0m\n\u001b[0;32m 112\u001b[0m \u001b[38;5;124;03m :rtype: requests.Response\u001b[39;00m\n\u001b[0;32m 113\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[1;32m--> 115\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m request(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mpost\u001b[39m\u001b[38;5;124m\"\u001b[39m, url, data\u001b[38;5;241m=\u001b[39mdata, json\u001b[38;5;241m=\u001b[39mjson, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n", - "File \u001b[1;32md:\\ProgramData\\anaconda3\\Lib\\site-packages\\requests\\api.py:59\u001b[0m, in \u001b[0;36mrequest\u001b[1;34m(method, url, **kwargs)\u001b[0m\n\u001b[0;32m 55\u001b[0m \u001b[38;5;66;03m# By using the 'with' statement we are sure the session is closed, thus we\u001b[39;00m\n\u001b[0;32m 56\u001b[0m \u001b[38;5;66;03m# avoid leaving sockets open which can trigger a ResourceWarning in some\u001b[39;00m\n\u001b[0;32m 57\u001b[0m \u001b[38;5;66;03m# cases, and look like a memory leak in others.\u001b[39;00m\n\u001b[0;32m 58\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m sessions\u001b[38;5;241m.\u001b[39mSession() \u001b[38;5;28;01mas\u001b[39;00m session:\n\u001b[1;32m---> 59\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m session\u001b[38;5;241m.\u001b[39mrequest(method\u001b[38;5;241m=\u001b[39mmethod, url\u001b[38;5;241m=\u001b[39murl, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n", - "File \u001b[1;32md:\\ProgramData\\anaconda3\\Lib\\site-packages\\requests\\sessions.py:589\u001b[0m, in \u001b[0;36mSession.request\u001b[1;34m(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)\u001b[0m\n\u001b[0;32m 584\u001b[0m send_kwargs \u001b[38;5;241m=\u001b[39m {\n\u001b[0;32m 585\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mtimeout\u001b[39m\u001b[38;5;124m\"\u001b[39m: timeout,\n\u001b[0;32m 586\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mallow_redirects\u001b[39m\u001b[38;5;124m\"\u001b[39m: allow_redirects,\n\u001b[0;32m 587\u001b[0m }\n\u001b[0;32m 588\u001b[0m send_kwargs\u001b[38;5;241m.\u001b[39mupdate(settings)\n\u001b[1;32m--> 589\u001b[0m resp \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39msend(prep, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39msend_kwargs)\n\u001b[0;32m 591\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m resp\n", - "File \u001b[1;32md:\\ProgramData\\anaconda3\\Lib\\site-packages\\requests\\sessions.py:703\u001b[0m, in \u001b[0;36mSession.send\u001b[1;34m(self, request, **kwargs)\u001b[0m\n\u001b[0;32m 700\u001b[0m start \u001b[38;5;241m=\u001b[39m preferred_clock()\n\u001b[0;32m 702\u001b[0m \u001b[38;5;66;03m# Send the request\u001b[39;00m\n\u001b[1;32m--> 703\u001b[0m r \u001b[38;5;241m=\u001b[39m adapter\u001b[38;5;241m.\u001b[39msend(request, \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mkwargs)\n\u001b[0;32m 705\u001b[0m \u001b[38;5;66;03m# Total elapsed time of the request (approximately)\u001b[39;00m\n\u001b[0;32m 706\u001b[0m elapsed \u001b[38;5;241m=\u001b[39m preferred_clock() \u001b[38;5;241m-\u001b[39m start\n", - "File \u001b[1;32md:\\ProgramData\\anaconda3\\Lib\\site-packages\\requests\\adapters.py:486\u001b[0m, in \u001b[0;36mHTTPAdapter.send\u001b[1;34m(self, request, stream, timeout, verify, cert, proxies)\u001b[0m\n\u001b[0;32m 483\u001b[0m timeout \u001b[38;5;241m=\u001b[39m TimeoutSauce(connect\u001b[38;5;241m=\u001b[39mtimeout, read\u001b[38;5;241m=\u001b[39mtimeout)\n\u001b[0;32m 485\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m--> 486\u001b[0m resp \u001b[38;5;241m=\u001b[39m conn\u001b[38;5;241m.\u001b[39murlopen(\n\u001b[0;32m 487\u001b[0m method\u001b[38;5;241m=\u001b[39mrequest\u001b[38;5;241m.\u001b[39mmethod,\n\u001b[0;32m 488\u001b[0m url\u001b[38;5;241m=\u001b[39murl,\n\u001b[0;32m 489\u001b[0m body\u001b[38;5;241m=\u001b[39mrequest\u001b[38;5;241m.\u001b[39mbody,\n\u001b[0;32m 490\u001b[0m headers\u001b[38;5;241m=\u001b[39mrequest\u001b[38;5;241m.\u001b[39mheaders,\n\u001b[0;32m 491\u001b[0m redirect\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m,\n\u001b[0;32m 492\u001b[0m assert_same_host\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m,\n\u001b[0;32m 493\u001b[0m preload_content\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m,\n\u001b[0;32m 494\u001b[0m decode_content\u001b[38;5;241m=\u001b[39m\u001b[38;5;28;01mFalse\u001b[39;00m,\n\u001b[0;32m 495\u001b[0m retries\u001b[38;5;241m=\u001b[39m\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mmax_retries,\n\u001b[0;32m 496\u001b[0m timeout\u001b[38;5;241m=\u001b[39mtimeout,\n\u001b[0;32m 497\u001b[0m chunked\u001b[38;5;241m=\u001b[39mchunked,\n\u001b[0;32m 498\u001b[0m )\n\u001b[0;32m 500\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m (ProtocolError, \u001b[38;5;167;01mOSError\u001b[39;00m) \u001b[38;5;28;01mas\u001b[39;00m err:\n\u001b[0;32m 501\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mConnectionError\u001b[39;00m(err, request\u001b[38;5;241m=\u001b[39mrequest)\n", - "File \u001b[1;32md:\\ProgramData\\anaconda3\\Lib\\site-packages\\urllib3\\connectionpool.py:791\u001b[0m, in \u001b[0;36mHTTPConnectionPool.urlopen\u001b[1;34m(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw)\u001b[0m\n\u001b[0;32m 788\u001b[0m response_conn \u001b[38;5;241m=\u001b[39m conn \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;129;01mnot\u001b[39;00m release_conn \u001b[38;5;28;01melse\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m\n\u001b[0;32m 790\u001b[0m \u001b[38;5;66;03m# Make the request on the HTTPConnection object\u001b[39;00m\n\u001b[1;32m--> 791\u001b[0m response \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_make_request(\n\u001b[0;32m 792\u001b[0m conn,\n\u001b[0;32m 793\u001b[0m method,\n\u001b[0;32m 794\u001b[0m url,\n\u001b[0;32m 795\u001b[0m timeout\u001b[38;5;241m=\u001b[39mtimeout_obj,\n\u001b[0;32m 796\u001b[0m body\u001b[38;5;241m=\u001b[39mbody,\n\u001b[0;32m 797\u001b[0m headers\u001b[38;5;241m=\u001b[39mheaders,\n\u001b[0;32m 798\u001b[0m chunked\u001b[38;5;241m=\u001b[39mchunked,\n\u001b[0;32m 799\u001b[0m retries\u001b[38;5;241m=\u001b[39mretries,\n\u001b[0;32m 800\u001b[0m response_conn\u001b[38;5;241m=\u001b[39mresponse_conn,\n\u001b[0;32m 801\u001b[0m preload_content\u001b[38;5;241m=\u001b[39mpreload_content,\n\u001b[0;32m 802\u001b[0m decode_content\u001b[38;5;241m=\u001b[39mdecode_content,\n\u001b[0;32m 803\u001b[0m \u001b[38;5;241m*\u001b[39m\u001b[38;5;241m*\u001b[39mresponse_kw,\n\u001b[0;32m 804\u001b[0m )\n\u001b[0;32m 806\u001b[0m \u001b[38;5;66;03m# Everything went great!\u001b[39;00m\n\u001b[0;32m 807\u001b[0m clean_exit \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n", - "File \u001b[1;32md:\\ProgramData\\anaconda3\\Lib\\site-packages\\urllib3\\connectionpool.py:537\u001b[0m, in \u001b[0;36mHTTPConnectionPool._make_request\u001b[1;34m(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)\u001b[0m\n\u001b[0;32m 535\u001b[0m \u001b[38;5;66;03m# Receive the response from the server\u001b[39;00m\n\u001b[0;32m 536\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m--> 537\u001b[0m response \u001b[38;5;241m=\u001b[39m conn\u001b[38;5;241m.\u001b[39mgetresponse()\n\u001b[0;32m 538\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m (BaseSSLError, \u001b[38;5;167;01mOSError\u001b[39;00m) \u001b[38;5;28;01mas\u001b[39;00m e:\n\u001b[0;32m 539\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_raise_timeout(err\u001b[38;5;241m=\u001b[39me, url\u001b[38;5;241m=\u001b[39murl, timeout_value\u001b[38;5;241m=\u001b[39mread_timeout)\n", - "File \u001b[1;32md:\\ProgramData\\anaconda3\\Lib\\site-packages\\urllib3\\connection.py:461\u001b[0m, in \u001b[0;36mHTTPConnection.getresponse\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 458\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mresponse\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m HTTPResponse\n\u001b[0;32m 460\u001b[0m \u001b[38;5;66;03m# Get the response from http.client.HTTPConnection\u001b[39;00m\n\u001b[1;32m--> 461\u001b[0m httplib_response \u001b[38;5;241m=\u001b[39m \u001b[38;5;28msuper\u001b[39m()\u001b[38;5;241m.\u001b[39mgetresponse()\n\u001b[0;32m 463\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m 464\u001b[0m assert_header_parsing(httplib_response\u001b[38;5;241m.\u001b[39mmsg)\n", - "File \u001b[1;32md:\\ProgramData\\anaconda3\\Lib\\http\\client.py:1386\u001b[0m, in \u001b[0;36mHTTPConnection.getresponse\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 1384\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[0;32m 1385\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m-> 1386\u001b[0m response\u001b[38;5;241m.\u001b[39mbegin()\n\u001b[0;32m 1387\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m \u001b[38;5;167;01mConnectionError\u001b[39;00m:\n\u001b[0;32m 1388\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mclose()\n", - "File \u001b[1;32md:\\ProgramData\\anaconda3\\Lib\\http\\client.py:325\u001b[0m, in \u001b[0;36mHTTPResponse.begin\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 323\u001b[0m \u001b[38;5;66;03m# read until we get a non-100 response\u001b[39;00m\n\u001b[0;32m 324\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[1;32m--> 325\u001b[0m version, status, reason \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_read_status()\n\u001b[0;32m 326\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m status \u001b[38;5;241m!=\u001b[39m CONTINUE:\n\u001b[0;32m 327\u001b[0m \u001b[38;5;28;01mbreak\u001b[39;00m\n", - "File \u001b[1;32md:\\ProgramData\\anaconda3\\Lib\\http\\client.py:286\u001b[0m, in \u001b[0;36mHTTPResponse._read_status\u001b[1;34m(self)\u001b[0m\n\u001b[0;32m 285\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21m_read_status\u001b[39m(\u001b[38;5;28mself\u001b[39m):\n\u001b[1;32m--> 286\u001b[0m line \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mstr\u001b[39m(\u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39mfp\u001b[38;5;241m.\u001b[39mreadline(_MAXLINE \u001b[38;5;241m+\u001b[39m \u001b[38;5;241m1\u001b[39m), \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124miso-8859-1\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n\u001b[0;32m 287\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mlen\u001b[39m(line) \u001b[38;5;241m>\u001b[39m _MAXLINE:\n\u001b[0;32m 288\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m LineTooLong(\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mstatus line\u001b[39m\u001b[38;5;124m\"\u001b[39m)\n", - "File \u001b[1;32md:\\ProgramData\\anaconda3\\Lib\\socket.py:706\u001b[0m, in \u001b[0;36mSocketIO.readinto\u001b[1;34m(self, b)\u001b[0m\n\u001b[0;32m 704\u001b[0m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[0;32m 705\u001b[0m \u001b[38;5;28;01mtry\u001b[39;00m:\n\u001b[1;32m--> 706\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_sock\u001b[38;5;241m.\u001b[39mrecv_into(b)\n\u001b[0;32m 707\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m timeout:\n\u001b[0;32m 708\u001b[0m \u001b[38;5;28mself\u001b[39m\u001b[38;5;241m.\u001b[39m_timeout_occurred \u001b[38;5;241m=\u001b[39m \u001b[38;5;28;01mTrue\u001b[39;00m\n", - "\u001b[1;31mKeyboardInterrupt\u001b[0m: " + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-12 3796.577637\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-12', 8875.0, 7048.0, 0.15, 0.25, 3650.0, 1.1, 0.0, 0.0, 3650.0, 7.9, 0.0, 0.2, 3900.0, 5.0, '', 3800.0, 74.64, 76.81, '', 3815.0, 26.4731, '', '', '', '', 229522.1, 2152.16, 3870.8876, '', '', 182396.406576, 4647.48, '']\n", + "20250213\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 6\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-13 3750.037598\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-13', 8793.0, 7048.0, 0.25, 0.25, 3650.0, 1.1, 0.0, 0.0, 3650.0, 7.9, 0.0, 0.2, 3900.0, 5.0, '', 3750.0, 74.64, 75.05, '', 3774.0, 26.4731, '', '', '', '', 229522.1, 3355.24, 3669.5691, '', '', 183890.1934195, 4734.48, '']\n", + "20250214\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 6\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-14 3728.556396\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-14', 8722.0, 7013.0, 0.25, 0.0, 3700.0, 1.0, 0.0, 0.0, 3650.0, 7.9, 0.0, 0.2, 3900.0, 5.02, '', 3750.0, 74.64, 74.95, '', 3845.0, 25.4056, '', '', '', '', 229522.1, 3253.8, 3727.5257, '', 69100.0, 185548.7828382, 4739.77, 3762.16]\n", + "20250215\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-15 3746.874268\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-15', 8722.0, 7013.0, '', '', '', '', '', '', '', '', '', '', '', '', '', 3750.0, 74.64, 74.54, '', '', 25.6191, '', '', '', '', 229522.1, 2481.98, 3653.1038, '', '', 187515.8161794, 4804.46, '']\n", + "20250216\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-16 3747.566162\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-16', 8674.0, 7013.0, '', '', '', '', '', '', '', '', '', '', '', '', '', 3750.0, 74.54, '', '', '', 29.035, '', '', '', '', 229522.1, 2292.94, 3690.2938, '', '', 189432.9075113, 4675.12, '']\n", + "20250217\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-17 3732.293945\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-17', 8674.0, 7040.0, 0.25, 0.0, 3700.0, 0.25, 0.0, 0.0, 3650.0, 7.9, 0.0, 0.2, 3900.0, 5.02, '', 3800.0, 74.54, '', '', 3848.0, 29.035, '', '', '', '', 229522.1, 4599.04, 3666.4264, '', '', 189083.3783045, 4586.52, '']\n", + "20250218\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-18 3795.842529\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-18', 8674.0, 7040.0, 0.25, 0.0, 3750.0, 0.0, 0.0, 0.0, 3720.0, 7.9, 0.0, 0.2, 3900.0, 5.02, '', 3800.0, 74.54, 75.27, '', 3841.0, 30.743, '', '', '', 20.61467278, 229522.1, 5928.64, 3710.5143, '', '', 188001.5349243, 4604.98, '']\n", + "20250219\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-19 3822.068604\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-19', 8674.0, 7075.0, 0.0, 0.0, 3750.0, 0.0, 0.0, 0.0, 3740.0, 7.9, 0.0, 0.2, 3900.0, 5.22, '', 3830.0, 74.54, 75.78, '', 3851.0, 30.316, '', '', '', '', 229522.1, 8551.98, 3786.9784, '', '', 184432.5439619, 4519.94, 3930.0]\n", + "20250220\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-20 3842.454102\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-20', 8674.0, 7093.0, 0.0, 0.0, 3750.0, 0.0, 0.0, 0.0, 3740.0, 7.9, 0.0, 0.2, 3900.0, 5.42, '', 3850.0, 74.54, 73.91, '', 3896.0, 31.1699, '', '', '', '', 229522.1, 4115.4, 3766.1403, '', '', 185342.1838277, 4539.08, 3830.0]\n", + "20250221\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n", + "日期\n", + "2025-02-21 3846.23999\n", + "Name: 日度预测价格, dtype: float32\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-21', 8674.0, 7093.0, 0.0, 0.0, 3750.0, 0.0, 0.0, 0.0, 3740.0, 7.9, 0.0, 0.2, 3900.0, 5.42, '', 3850.0, 74.54, 76.2, '', 3858.0, 31.5969, '', '', '', '', 229522.1, 4402.52, 3747.6395, '', '', 184989.3385082, 4538.6, 3950.0]\n", + "20250222\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 6\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-22 3809.211426\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-22', 8593.0, 7093.0, '', '', '', '', '', '', '', '', '', '', '', '', '', 3850.0, 74.54, 73.88, '', '', 32.0239, '', '', '', '', 229522.1, 6220.82, 3564.5329, '', '', 183545.0232586, 4520.43, 4450.0]\n", + "20250223\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-23 3821.075195\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-23', 8513.0, 7057.0, '', '', '', '', '', '', '', '', '', '', '', '', '', 3850.0, 73.88, '', '', '', 32.0239, '', '', '', '', 229522.1, 3392.88, 3585.6018, '', '', 185118.7322799, 4533.5, '']\n", + "20250224\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 8\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-24 3822.739014\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-24', 8513.0, 7057.0, 0.0, 0.0, 3750.0, 0.0, 0.0, 0.0, 3740.0, 7.9, 0.0, 0.2, 3900.0, 6.02, '', 3800.0, 73.88, 74.25, '', 3776.0, 28.608, '', '', '', '', 229522.1, 4361.18, 3668.5404, '', '', 185891.7861848, 4555.8, '']\n", + "20250225\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.3\n", + "\tmax_depth: 6\n", + "\tn_estimators: 90\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-25 3801.672852\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-25', 8513.0, 7075.0, 0.0, 0.0, 3800.0, 0.0, 0.0, 0.0, 3740.0, 7.9, 0.0, 0.2, 3900.0, 6.22, '', 3800.0, 73.88, 74.21, '', 3765.0, 28.608, '', '', '', 22.28599337, 229522.1, 8277.63, 3791.3805, '', '', 185694.2309829, 4606.21, 3800.0]\n", + "20250226\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 6\n", + "\tn_estimators: 100\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "日期\n", + "2025-02-26 3803.440674\n", + "Name: 日度预测价格, dtype: float32\n", + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-26', 8513.0, 7075.0, 0.0, 0.0, 3800.0, 0.0, 0.0, 0.0, 3740.0, 7.9, 0.0, 0.2, 3850.0, 6.42, '', 3800.0, 73.88, 72.29, '', 3709.0, 27.3271, '', '', '', '', 229522.1, 11357.48, 3553.9243, '', '', 181663.5231306, 4669.52, '']\n", + "20250227\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 6\n", + "\tn_estimators: 100\n", + "日期\n", + "2025-02-27 3795.412354\n", + "Name: 日度预测价格, dtype: float32\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-27', 8441.0, 7075.0, 0.0, 0.0, 3800.0, 0.0, 0.0, 0.0, 3740.0, 7.9, 0.0, 0.2, 3850.0, 6.62, '', 3800.0, 73.88, 72.31, '', 3667.0, 27.7541, '', '', '', '', 229522.1, 12640.91, 3576.4854, '', 43000.0, 176741.4527006, 4624.73, 3790.04]\n", + "20250228\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:299: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Using matplotlib backend: QtAgg\n", + "%pylab is deprecated, use %matplotlib inline and import the required libraries.\n", + "Populating the interactive namespace from numpy and matplotlib\n", + "Fitting 3 folds for each of 180 candidates, totalling 540 fits\n", + "Best score: 0.997\n", + "Best parameters set:\n", + "\tlearning_rate: 0.1\n", + "\tmax_depth: 6\n", + "\tn_estimators: 100\n", + "日期\n", + "2025-02-28 3801.021729\n", + "Name: 日度预测价格, dtype: float32\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:239: UserWarning:\n", + "\n", + "The argument 'infer_datetime_format' is deprecated and will be removed in a future version. A strict version of it is now the default, see https://pandas.pydata.org/pdeps/0004-consistent-to-datetime-parsing.html. You can safely remove this argument.\n", + "\n", + "C:\\Users\\EDY\\AppData\\Local\\Temp\\ipykernel_7996\\2158043523.py:273: FutureWarning:\n", + "\n", + "Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`\n", + "\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{\"confirmFlg\":false,\"status\":true}\n", + "新增数据: ['2025-02-28', 8441.0, 7113.0, 0.0, 0.0, 3800.0, 0.0, 0.0, 0.0, 3740.0, 7.9, 0.0, 0.2, 3850.0, 6.82, '', 3800.0, 73.88, 73.35, '', 3689.0, 27.7541, 81.6, '', '', '', 229522.1, 6400.74, 3645.4569, '', '', '', 3959.0, '']\n" ] } ], diff --git a/aisenzhecode/沥青/沥青数据项.xls b/aisenzhecode/沥青/沥青数据项.xls index 4f0dee4..ce5117c 100644 Binary files a/aisenzhecode/沥青/沥青数据项.xls and b/aisenzhecode/沥青/沥青数据项.xls differ diff --git a/config_jingbo_zhoudu.py b/config_jingbo_zhoudu.py index 8a2284f..b5750ec 100644 --- a/config_jingbo_zhoudu.py +++ b/config_jingbo_zhoudu.py @@ -159,9 +159,9 @@ table_name = 'v_tbl_crude_oil_warning' ### 开关 -is_train = True # 是否训练 +is_train = False # 是否训练 is_debug = False # 是否调试 -is_eta = True # 是否使用eta接口 +is_eta = False # 是否使用eta接口 is_market = True # 是否通过市场信息平台获取特征 ,在is_eta 为true 的情况下生效 is_timefurture = True # 是否使用时间特征 is_fivemodels = False # 是否使用之前保存的最佳的5个模型 @@ -182,9 +182,9 @@ print("数据库连接成功",host,dbname,dbusername) # 数据截取日期 -start_year = 2020 # 数据开始年份 +start_year = 2015 # 数据开始年份 end_time = '' # 数据截取日期 -freq = 'W' # 时间频率,"D": 天 "W": 周"M": 月"Q": 季度"A": 年 "H": 小时 "T": 分钟 "S": 秒 "B": 工作日 +freq = 'WW' # 时间频率,"D": 天 "W": 周"M": 月"Q": 季度"A": 年 "H": 小时 "T": 分钟 "S": 秒 "B": 工作日 "WW" 自定义周 delweekenday = True if freq == 'B' else False # 是否删除周末数据 is_corr = False # 特征是否参与滞后领先提升相关系数 add_kdj = False # 是否添加kdj指标 diff --git a/lib/dataread.py b/lib/dataread.py index 1ce2fc9..689c5ae 100644 --- a/lib/dataread.py +++ b/lib/dataread.py @@ -42,8 +42,8 @@ plt.rcParams['axes.unicode_minus'] = False # 用来正常显示负号 # from config_jingbo_pro import * # from config_jingbo import * -# from config_jingbo_zhoudu import * -from config_jingbo_yuedu import * +from config_jingbo_zhoudu import * +# from config_jingbo_yuedu import * # from config_yongan import * # from config_juxiting import * # from config_juxiting_zhoudu import * @@ -720,7 +720,17 @@ def datachuli(df_zhibiaoshuju,df_zhibiaoliebiao,datecol='date',end_time='',y='y' logger.info(f'删除两月不更新特征后数据量:{df.shape}') - if freq == 'W': + # 衍生时间特征 + if is_timefurture: + df = addtimecharacteristics(df=df,dataset=dataset) + + if freq == 'WW': + # 自定义周数据 + # 按weekofmothe分组取均值得到新的数据 + df = df.groupby(df['yearmonthweeks']).mean() + # 时间列转换为日期格式字符串 + df['ds'] = df['ds'].dt.strftime('%Y-%m-%d') + elif freq == 'W': # 按周取样 df = df.resample('W', on='ds').mean().reset_index() elif freq == 'M': @@ -750,9 +760,7 @@ def datachuli(df_zhibiaoshuju,df_zhibiaoliebiao,datecol='date',end_time='',y='y' # kdj指标 if add_kdj: df = calculate_kdj(df) - # 衍生时间特征 - if is_timefurture: - df = addtimecharacteristics(df=df,dataset=dataset) + # 特征分析 featureAnalysis(df,dataset=dataset,y=y) return df @@ -1833,6 +1841,15 @@ def addtimecharacteristics(df,dataset): df['is_year_start'] = df['ds'].dt.is_year_start.astype(int) # 是否年末 df['is_year_end'] = df['ds'].dt.is_year_end.astype(int) + # 添加月度第几周(周一到周日为一周,每月1日所在的周为第一周) + # 计算当前日期所在周的周一 + df['current_monday'] = df['ds'] - pd.to_timedelta(df['ds'].dt.dayofweek, unit='D') + # 计算当月1日所在周的周一 + df['first_monday'] = df['ds'].dt.to_period('M').dt.start_time - pd.to_timedelta(df['ds'].dt.to_period('M').dt.start_time.dt.dayofweek, unit='D') + # 计算周数差并+1得到周数 + df['weekofmonth'] = ((df['current_monday'] - df['first_monday']).dt.days // 7) + 1 + df['yearmonthweeks'] = df['year'].astype(str) + df['month'].astype(str) + df['weekofmonth'].astype(str) + df.drop(columns=['current_monday', 'first_monday'], inplace=True) # 去掉 quarter_start quarter df.drop(columns=['quarter_start','quarter'],inplace=True) df.to_csv(os.path.join(dataset,'指标数据添加时间特征.csv'), index=False) diff --git a/main_yuanyou_yuedu.py b/main_yuanyou_yuedu.py index ad62f74..c41ad85 100644 --- a/main_yuanyou_yuedu.py +++ b/main_yuanyou_yuedu.py @@ -141,6 +141,7 @@ def predict_main(): logger.info('更新accuracy表的y值') # 找到update_y 中ds且df中的y的行 update_y = update_y[update_y['ds']<=end_time] + logger.info(f'要更新y的信息:{update_y}') # try: for row in update_y.itertuples(index=False): diff --git a/main_yuanyou_zhoudu.py b/main_yuanyou_zhoudu.py index b1637b5..f5fc47b 100644 --- a/main_yuanyou_zhoudu.py +++ b/main_yuanyou_zhoudu.py @@ -124,7 +124,8 @@ def predict_main(): else: for row in first_row.itertuples(index=False): row_dict = row._asdict() - row_dict['ds'] = row_dict['ds'].strftime('%Y-%m-%d %H:%M:%S') + # row_dict['ds'] = row_dict['ds'].strftime('%Y-%m-%d') + # row_dict['ds'] = row_dict['ds'].strftime('%Y-%m-%d %H:%M:%S') check_query = sqlitedb.select_data('trueandpredict', where_condition=f"ds = '{row.ds}'") if len(check_query) > 0: set_clause = ", ".join([f"{key} = '{value}'" for key, value in row_dict.items()]) diff --git a/models/nerulforcastmodels.py b/models/nerulforcastmodels.py index 3c4e5e9..90f5c92 100644 --- a/models/nerulforcastmodels.py +++ b/models/nerulforcastmodels.py @@ -166,7 +166,7 @@ def ex_Model(df,horizon,input_size,train_steps,val_check_steps,early_stop_patien models.append(model) # 创建NeuralForecast实例并训练模型 - nf = NeuralForecast(models=models, freq=freq) + nf = NeuralForecast(models=models, freq=freq[0]) from joblib import dump, load if is_train: