mirror of
https://github.com/newnius/YAO-optimizer.git
synced 2025-06-06 22:51:55 +00:00
update
This commit is contained in:
parent
580c4716b9
commit
e7437e5a98
@ -2,6 +2,7 @@
|
||||
<project version="4">
|
||||
<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/" />
|
||||
@ -47,7 +48,7 @@
|
||||
<counts>
|
||||
<entry key="Dockerfile" value="81" />
|
||||
<entry key="md" value="104" />
|
||||
<entry key="py" value="2722" />
|
||||
<entry key="py" value="2730" />
|
||||
<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="2722" />
|
||||
<entry key="Python" value="2730" />
|
||||
</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="232">
|
||||
<caret line="112" column="50" selection-start-line="112" selection-start-column="50" selection-end-line="112" selection-end-column="50" />
|
||||
<state relative-caret-position="155">
|
||||
<caret line="111" column="18" lean-forward="true" selection-start-line="111" selection-start-column="18" selection-end-line="111" selection-end-column="18" />
|
||||
<folding>
|
||||
<element signature="e#0#28#0" expanded="true" />
|
||||
</folding>
|
||||
@ -225,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="1588388199075" />
|
||||
<property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1588388855465" />
|
||||
<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" />
|
||||
@ -266,15 +267,16 @@
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1588152877746</updated>
|
||||
<workItem from="1588152880522" duration="16973000" />
|
||||
<workItem from="1588319878551" duration="22667000" />
|
||||
<workItem from="1588319878551" duration="22923000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="39640000" />
|
||||
<option name="totallyTimeSpent" value="39896000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="0" y="0" width="1280" height="800" extended-state="0" />
|
||||
<editor active="true" />
|
||||
<layout>
|
||||
<window_info id="Designer" order="0" />
|
||||
<window_info id="UI Designer" order="1" />
|
||||
@ -396,8 +398,8 @@
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/train.py">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="232">
|
||||
<caret line="112" column="50" selection-start-line="112" selection-start-column="50" selection-end-line="112" selection-end-column="50" />
|
||||
<state relative-caret-position="155">
|
||||
<caret line="111" column="18" lean-forward="true" selection-start-line="111" selection-start-column="18" selection-end-line="111" selection-end-column="18" />
|
||||
<folding>
|
||||
<element signature="e#0#28#0" expanded="true" />
|
||||
</folding>
|
||||
|
10
train.py
10
train.py
@ -104,14 +104,14 @@ def experiment(repeats, series, seed):
|
||||
t2 = test.shape[0] % batch_size
|
||||
|
||||
train_trimmed = train_scaled[train_scaled.shape[0] - t1 * batch_size:, :]
|
||||
lstm_model = fit_lstm(train_trimmed, batch_size, 30, 4)
|
||||
lstm_model = fit_lstm(train_trimmed, batch_size, 300, 4)
|
||||
# forecast the entire training dataset to build up state for forecasting
|
||||
print(train_trimmed)
|
||||
print(train_trimmed[:, 0])
|
||||
print(train_trimmed[:, :-1])
|
||||
if seed:
|
||||
train_reshaped = train_trimmed[:, :-1].reshape(len(train_trimmed), 1, lag2)
|
||||
lstm_model.predict(train_reshaped, batch_size=batch_size)
|
||||
# if seed:
|
||||
# train_reshaped = train_trimmed[:, :-1].reshape(len(train_trimmed), 1, lag2)
|
||||
# lstm_model.predict(train_reshaped, batch_size=batch_size)
|
||||
# forecast test dataset
|
||||
test_reshaped = test_scaled[:, 0:-1]
|
||||
test_reshaped = test_reshaped.reshape(len(test_reshaped), 1, lag2)
|
||||
@ -137,7 +137,7 @@ def experiment(repeats, series, seed):
|
||||
# load dataset
|
||||
series = read_csv('data.csv', header=0, index_col=0, squeeze=True)
|
||||
# experiment
|
||||
repeats = 30
|
||||
repeats = 1
|
||||
results = DataFrame()
|
||||
# with seeding
|
||||
with_seed = experiment(repeats, series, True)
|
||||
|
Loading…
Reference in New Issue
Block a user