This commit is contained in:
ksanu 2019-12-04 00:14:58 +01:00
parent 76d1ec7f77
commit 08fe617c0f
8 changed files with 33546 additions and 33364 deletions

View File

@ -2,7 +2,7 @@
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="jdk" jdkName="Python 3.7" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.6" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.6" project-jdk-type="Python SDK" />
</project>

View File

@ -2,6 +2,9 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="d25a65da-2ba0-4272-a0a5-c59cbecb6088" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/TAU_21_sane_words.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/TAU_21_sane_words.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dev-0/out.tsv" beforeDir="false" afterPath="$PROJECT_DIR$/dev-0/out.tsv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/dev-0/out_float.tsv" beforeDir="false" afterPath="$PROJECT_DIR$/dev-0/out_float.tsv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/s.py" beforeDir="false" afterPath="$PROJECT_DIR$/s.py" afterDir="false" />
@ -14,6 +17,53 @@
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="CoverageDataManager">
<SUITE FILE_PATH="coverage/TAU_22_sane_words_torch_nn$s.coverage" NAME="s Coverage Results" MODIFIED="1575414386650" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
</component>
<component name="FileEditorManager">
<leaf>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/s.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="980">
<caret line="225" column="18" selection-start-line="225" selection-start-column="18" selection-end-line="225" selection-end-column="18" />
<folding>
<element signature="e#0#12#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dev-0/expected.tsv">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-196952" />
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/dev-0/out.tsv">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342">
<caret line="19" selection-start-line="19" selection-end-line="20" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/test-A/out.tsv">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/dev-0/out_float.tsv">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-198268" />
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
@ -24,9 +74,52 @@
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/s.py" />
</list>
</option>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="147" />
<option name="y" value="16" />
<option name="width" value="1320" />
<option name="height" value="724" />
</component>
<component name="ProjectId" id="1UAXhosCPbReL7U2TCbyyTVGpqs" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="TAU_22_sane_words_torch_nn" type="b2602c69:ProjectViewProjectNode" />
<item name="TAU_22_sane_words_torch_nn" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="TAU_22_sane_words_torch_nn" type="b2602c69:ProjectViewProjectNode" />
<item name="TAU_22_sane_words_torch_nn" type="462c0819:PsiDirectoryNode" />
<item name="dev-0" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="TAU_22_sane_words_torch_nn" type="b2602c69:ProjectViewProjectNode" />
<item name="TAU_22_sane_words_torch_nn" type="462c0819:PsiDirectoryNode" />
<item name="test-A" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
<select />
</subPane>
</pane>
</panes>
</component>
<component name="PropertiesComponent">
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
</component>
@ -55,6 +148,7 @@
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/s.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
@ -76,6 +170,7 @@
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/solution.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
@ -97,6 +192,7 @@
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<EXTENSION ID="PythonCoverageRunConfigurationExtension" runner="coverage.py" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/solution2.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
@ -124,21 +220,75 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1574800494334</updated>
<workItem from="1575412092709" duration="2059000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="2059000" />
</component>
<component name="ToolWindowManager">
<frame x="147" y="16" width="1320" height="724" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Favorites" side_tool="true" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.24405706" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="bottom" id="Docker" show_stripe_button="false" />
<window_info anchor="bottom" id="Database Changes" />
<window_info anchor="bottom" id="Version Control" />
<window_info anchor="bottom" id="Python Console" />
<window_info anchor="bottom" id="Terminal" />
<window_info anchor="bottom" id="Event Log" side_tool="true" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.33625218" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="right" id="SciView" />
<window_info anchor="right" id="Database" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State>
<option name="RECENTLY_FILTERED_USER_GROUPS">
<collection />
</option>
<option name="RECENTLY_FILTERED_BRANCH_GROUPS">
<collection />
</option>
<option name="COLUMN_ORDER" />
</State>
</value>
</entry>
</map>
</option>
<option name="RECENT_FILTERS">
<map>
<entry key="Branch">
<value>
<list />
</value>
</entry>
<entry key="User">
<value>
<list />
</value>
</entry>
</map>
</option>
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
@ -162,4 +312,36 @@
</configuration>
</watches-manager>
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/test-A/out.tsv">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/dev-0/expected.tsv">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-196952" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dev-0/out_float.tsv">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-198268" />
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/s.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="980">
<caret line="225" column="18" selection-start-line="225" selection-start-column="18" selection-end-line="225" selection-end-column="18" />
<folding>
<element signature="e#0#12#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dev-0/out.tsv">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342">
<caret line="19" selection-start-line="19" selection-end-line="20" />
</state>
</provider>
</entry>
</component>
</project>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

18
s.py
View File

@ -177,7 +177,7 @@ testA_x = torch.cat([testA_x_temp2, testA_x_words_onehot], 1)
dataset_train = TrainDataset(x, y)
trainloader=DataLoader(dataset=dataset_train, batch_size=minibatch_size, shuffle=True)
def train_loop(i = 50):
def train_loop(i = 20):
for i in range(i):
for xb, yb_expected in trainloader:
optimizer.zero_grad()
@ -197,13 +197,13 @@ def train_loop(i = 50):
dev_y_pred_float_df = pandas.DataFrame(dev_y_pred_float_tensor.detach().numpy())
auc_score = roc_auc_score(dev_y_test, dev_y_pred_float_df)
print("auc:\t", auc_score, "\tloss:\t", loss.item())
if ((auc_score > 0.70)):
if ((auc_score > 0.90)):
break
loss.backward()
optimizer.step()
if ((auc_score > 0.70)):
if ((auc_score > 0.90)):
break
#print(loss)
@ -223,10 +223,10 @@ for i in range(0,11026):
file2.write(str(dev_y[i].data.item()) + "\n")
dev_y_pred_float.append(dev_y[i].data.item())
var = dev_y[i].data.item()
if var < 0.5:
file.write("0" + "\n")
if var > 0.999:
file.write(f'{1}\n')
else:
file.write("1" + "\n")
file.write(f'{0}\n')
file.close()
file2.close()
@ -246,9 +246,9 @@ file2=open("test-A/out_float.tsv","w")
for i in range(0,11061):
file2.write(str(testA_y[i].data.item()) + "\n")
if testA_y[i].data.item() < 0.5:
file.write("0" + "\n")
if testA_y[i].data.item() > 0.999:
file.write(f'{1}\n')
else:
file.write("1" + "\n")
file.write(f'{0}\n')
file.close()
file2.close()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff