Skip to content

Instantly share code, notes, and snippets.

View ijharulislam's full-sized avatar

ijhar ijharulislam

  • Full-stack Web Developer
  • Dhaka, Bangladesh.
View GitHub Profile

A Few Useful Things to Know about Machine Learning

The paper presents some key lessons and "folk wisdom" that machine learning researchers and practitioners have learnt from experience and which are hard to find in textbooks.

1. Learning = Representation + Evaluation + Optimization

All machine learning algorithms have three components:

  • Representation for a learner is the set if classifiers/functions that can be possibly learnt. This set is called hypothesis space. If a function is not in hypothesis space, it can not be learnt.
  • Evaluation function tells how good the machine learning model is.
  • Optimisation is the method to search for the most optimal learning model.
from __future__ import unicode_literals
from django.db import models
from django.db.models import Q
from financial.models import Tax
from django.contrib.auth.models import User
class BaseClass(models.Model):
created_on = models.DateTimeField(auto_now_add=True, null=True,blank=True)
class AgencyList(APIView):
def get(self, request, format=None):
search = request.GET.get("search", None)
address = request.GET.get("address", None)
search_label = request.GET.get("label", None)
print "Search label", search_label, search, address
"""
ServiceType
name=models.CharField(max_length=200, blank=True, null=True)
agencies = models.ManyToManyField(Agency)
from django.db import models
from location.models import Location
from django.contrib.auth.models import User
# Create your models here.
class SaveAgencyList(APIView):
def get(self, request, format=None):
saved_agencies = SaveAgency.objects.filter(created_by=request.user).prefetch_related("saved_agency")
o = []
for agency in saved_agencies:
agency_id = agency.saved_agency.id
try:
agency_query = Agency.objects.get(id=agency_id)
o = o + [agency_query]
except:
27.0.0.1 - - [09/Jan/2016 10:46:58] "POST /1971/employer/save_agency/ HTTP/1.1" 500 -
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/django/contrib/staticfiles/handlers.py", line 63, in __call__
return self.application(environ, start_response)
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 189, in __call__
response = self.get_response(request)
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 218, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "/usr/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 261, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
<div class="row">
<div class="col-md-4" ng-repeat="event in events.events">
<div class="well">
<div class="fb-profile">
<img align="left" class="fb-image-lg" src="http://lorempixel.com/850/280/nightlife/5/" alt="Profile image example"/>
<div class="fb-profile-text" >
<h3> <a ng-click='redirect("/1971/events/event-details/" + event.id)'><strong>{[{event.event}]} </strong></a></h3>
<p class="help-block">
from django.db import models
from django.contrib.auth.models import User
from clubs.models import Club
# Create your models here.
BOOKING_PERIOD = (
("1", "Choose Booking Period"),
from django.db import models
from phonenumber_field.modelfields import PhoneNumberField
from django.contrib.auth.models import (
BaseUserManager, AbstractBaseUser
)
import hashlib, datetime, random
from datetime import date
from django import forms
from django.utils import timezone