Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mlassign2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sushant Mahajan
mlassign2
Commits
4e8b12ca
Commit
4e8b12ca
authored
Apr 13, 2016
by
Sushant Mahajan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final touches
parent
c7fd8558
Pipeline
#320
skipped
Changes
2
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1603 additions
and
2 deletions
+1603
-2
model2.py
model2.py
+2
-2
output.txt
output.txt
+1601
-0
No files found.
model2.py
View file @
4e8b12ca
...
...
@@ -142,7 +142,7 @@ if __name__ == "__main__":
tX
,
ty
=
getData
(
"TestX.csv"
,
isTrain
=
False
)
model
=
{}
model
=
{
'li'
:
X
.
shape
[
1
]
-
1
,
'lh'
:
int
(
33
*
(
X
.
shape
[
1
]
-
1
)
/
20
),
'lo'
:
2
,
'lambda'
:
0.1
,
'eta'
:[
0.01
,
0.03
,
0.06
,
0.1
,
0.2
]}
model
=
{
'li'
:
X
.
shape
[
1
]
-
1
,
'lh'
:
int
(
1.65
*
(
X
.
shape
[
1
]
-
1
)
),
'lo'
:
2
,
'lambda'
:
0.1
,
'eta'
:[
0.01
,
0.03
,
0.06
,
0.1
,
0.2
]}
# model['w1'] = np.random.randn(model['li']+1, model['lh'])/np.sqrt(model['li']+1) #58x28
# model['w2'] = np.random.randn(model['lh']+1, model['lo'])/np.sqrt(model['lh']+1) #29x2
model
[
'w1'
]
=
np
.
random
.
rand
(
model
[
'li'
]
+
1
,
model
[
'lh'
])
*
0.24
-
0.12
...
...
@@ -167,7 +167,7 @@ if __name__ == "__main__":
# acc = m-np.sum(abs(np.array(py)-np.array(y2)))
# print(h, acc*100/m)
with
open
(
"
answer
.txt"
,
"w"
)
as
wfile
:
with
open
(
"
output
.txt"
,
"w"
)
as
wfile
:
writer
=
csv
.
writer
(
wfile
)
writer
.
writerow
([
'Id'
,
'Label'
])
for
i
,
ans
in
enumerate
(
py
):
...
...
output.txt
0 → 100644
View file @
4e8b12ca
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment