Skip to content

Commit

Permalink
move ml track to simpler system
Browse files Browse the repository at this point in the history
  • Loading branch information
theSage21 committed Jul 19, 2020
1 parent 9082674 commit b7d43a9
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 50 deletions.
2 changes: 1 addition & 1 deletion soa/tracks/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .core import load_tracks, trackmap, taskmap

# Import tracks here please
from . import python
from . import python, ml
5 changes: 0 additions & 5 deletions soa/tracks/dsa/1.md

This file was deleted.

11 changes: 0 additions & 11 deletions soa/tracks/dsa/__init__.py

This file was deleted.

4 changes: 0 additions & 4 deletions soa/tracks/ml/1.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,4 @@ Please write the full command. ( answer is case sensitive )
<form method='POST'>
<input name='answer'>
<input type='submit' value='Submit'>
<code class='code_checker'>
def answer(s):
return s == 'df.mean()'
</code>
</form>
4 changes: 0 additions & 4 deletions soa/tracks/ml/2.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,4 @@ Write the command to One Hot Encode Column named 'company' using pandas function
<form method='POST'>
<input name='answer'>
<input type='submit' value='Submit'>
<code class='code_checker'>
def answer(s):
return s == "df['company'].get_dummies()"
</code>
</form>
4 changes: 0 additions & 4 deletions soa/tracks/ml/3.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,4 @@ We hope you've gone through the code and other resources provided along. Let's w
<form method='POST'>
<input name='answer'>
<input type='submit' value='Submit'>
<code class='code_checker'>
def answer(s):
return s.lower() == 'metrics'
</code>
</form>
5 changes: 0 additions & 5 deletions soa/tracks/ml/4.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,4 @@ What is the number of estimators used for Random Forest Classifier?
<form method='POST'>
<input name='answer'>
<input type='submit' value='Submit'>
<code class='code_checker'>

def answer(s):
return s=='200'
</code>
</form>
4 changes: 0 additions & 4 deletions soa/tracks/ml/5.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,4 @@ In terms of the bias-variance trade-off, which of the following is/are substanti
<form method='POST'>
<input name='answer'>
<input type='submit' value='Submit'>
<code class='code_checker'>
def answer(s):
return s == '3'
</code>
</form>
4 changes: 0 additions & 4 deletions soa/tracks/ml/6.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,4 @@ What is the name of the linkage that we have used in Agglomerative Clustering?
<form method='POST'>
<input name='answer'>
<input type='submit' value='Submit'>
<code class='code_checker'>
def answer(s):
return s.lower() == 'ward'
</code>
</form>
4 changes: 0 additions & 4 deletions soa/tracks/ml/7.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,4 @@ Kernel PCA cannot be used for non linear data. (True / False)
<form method='POST'>
<input name='answer'>
<input type='submit' value='Submit'>
<code class='code_checker'>
def answer(s):
return s.lower() == 'False'
</code>
</form>
4 changes: 0 additions & 4 deletions soa/tracks/ml/8.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,4 @@ Which of the following algorithm are not an example of ensemble learning algorit
<form method='POST'>
<input name='answer'>
<input type='submit' value='Submit'>
<code class='code_checker'>
def answer(s):
return s =='5'
</code>
</form>
43 changes: 43 additions & 0 deletions soa/tracks/ml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,38 @@
from bottle import request


def a1(s):
return s == "df.mean()"


def a2(s):
return s == "df['company'].get_dummies()"


def a3(s):
return s.lower() == "metrics"


def a4(s):
return s == "200"


def a5(s):
return s == "3"


def a6(s):
return s.lower() == "ward"


def a7(s):
return s.lower() == "False"


def a8(s):
return s == "5"


class ML(Track):
slug = "ml"
title = "Machine Learning"
Expand All @@ -13,3 +45,14 @@ def is_locked(self):
if request.user.is_.track_owner:
return False
return False if settings.is_dev else True

tasks_meta = {
"ml.1": {"order": 1, "md": "1.md", "check": {"answer": a1}},
"ml.2": {"order": 2, "md": "2.md", "check": {"answer": a2}},
"ml.3": {"order": 3, "md": "3.md", "check": {"answer": a3}},
"ml.4": {"order": 4, "md": "4.md", "check": {"answer": a4}},
"ml.5": {"order": 5, "md": "5.md", "check": {"answer": a5}},
"ml.6": {"order": 6, "md": "6.md", "check": {"answer": a6}},
"ml.7": {"order": 7, "md": "7.md", "check": {"answer": a7}},
"ml.8": {"order": 8, "md": "8.md", "check": {"answer": a8}},
}

0 comments on commit b7d43a9

Please sign in to comment.