mirror of
https://github.com/newnius/YAO-optimizer.git
synced 2025-06-07 15:11:56 +00:00
update
This commit is contained in:
parent
39973aac72
commit
c4ecfc9250
@ -3,6 +3,7 @@
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="0aedafd8-e57e-462a-beda-65af0b91f3df" name="Default Changelist" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/train.py" beforeDir="false" afterPath="$PROJECT_DIR$/train.py" afterDir="false" />
|
||||
</list>
|
||||
<ignored path="$PROJECT_DIR$/out/" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
@ -47,7 +48,7 @@
|
||||
<counts>
|
||||
<entry key="Dockerfile" value="81" />
|
||||
<entry key="md" value="104" />
|
||||
<entry key="py" value="2657" />
|
||||
<entry key="py" value="2658" />
|
||||
<entry key="sh" value="5" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
@ -56,7 +57,7 @@
|
||||
<entry key="Bash" value="5" />
|
||||
<entry key="Dockerfile" value="81" />
|
||||
<entry key="Markdown" value="104" />
|
||||
<entry key="Python" value="2657" />
|
||||
<entry key="Python" value="2658" />
|
||||
</counts>
|
||||
</usages-collector>
|
||||
</session>
|
||||
@ -91,8 +92,8 @@
|
||||
<file pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/train.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="333">
|
||||
<caret line="124" column="43" selection-start-line="124" selection-start-column="43" selection-end-line="124" selection-end-column="43" />
|
||||
<state relative-caret-position="157">
|
||||
<caret line="88" column="56" selection-start-line="88" selection-start-column="56" selection-end-line="88" selection-end-column="56" />
|
||||
<folding>
|
||||
<element signature="e#0#28#0" expanded="true" />
|
||||
</folding>
|
||||
@ -164,6 +165,7 @@
|
||||
<find>train_num</find>
|
||||
<find>label_in_feature_columns</find>
|
||||
<find>epoch</find>
|
||||
<find>timeseries_to_supervised</find>
|
||||
</findStrings>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
@ -224,7 +226,7 @@
|
||||
<component name="PropertiesComponent">
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="aspect.path.notification.shown" value="true" />
|
||||
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1588387322622" />
|
||||
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1588387659262" />
|
||||
<property name="go.gopath.indexing.explicitly.defined" value="true" />
|
||||
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
|
||||
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
|
||||
@ -265,12 +267,12 @@
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1588152877746</updated>
|
||||
<workItem from="1588152880522" duration="16973000" />
|
||||
<workItem from="1588319878551" duration="22078000" />
|
||||
<workItem from="1588319878551" duration="22166000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="39051000" />
|
||||
<option name="totallyTimeSpent" value="39139000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="0" y="0" width="1280" height="800" extended-state="0" />
|
||||
@ -395,8 +397,8 @@
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/train.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="333">
|
||||
<caret line="124" column="43" selection-start-line="124" selection-start-column="43" selection-end-line="124" selection-end-column="43" />
|
||||
<state relative-caret-position="157">
|
||||
<caret line="88" column="56" selection-start-line="88" selection-start-column="56" selection-end-line="88" selection-end-column="56" />
|
||||
<folding>
|
||||
<element signature="e#0#28#0" expanded="true" />
|
||||
</folding>
|
||||
|
5
train.py
5
train.py
@ -86,7 +86,8 @@ def experiment(repeats, series, seed):
|
||||
raw_values = series.values
|
||||
diff_values = difference(raw_values, 1)
|
||||
# transform data to be supervised learning
|
||||
supervised = timeseries_to_supervised(diff_values, 4)
|
||||
lag2 = 4
|
||||
supervised = timeseries_to_supervised(diff_values, lag2)
|
||||
supervised_values = supervised.values
|
||||
# split data into train and test-sets
|
||||
train, test = supervised_values[0:-12], supervised_values[-12:]
|
||||
@ -104,7 +105,7 @@ def experiment(repeats, series, seed):
|
||||
lstm_model = fit_lstm(train_trimmed, batch_size, 30, 4)
|
||||
# forecast the entire training dataset to build up state for forecasting
|
||||
if seed:
|
||||
train_reshaped = train_trimmed[:, 0].reshape(len(train_trimmed), 1, 1)
|
||||
train_reshaped = train_trimmed[:, 0].reshape(len(train_trimmed), 1, lag2)
|
||||
lstm_model.predict(train_reshaped, batch_size=batch_size)
|
||||
# forecast test dataset
|
||||
test_reshaped = test_scaled[:, 0:-1]
|
||||
|
Loading…
Reference in New Issue
Block a user