Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
# Back-Propagation Neural Networks | |
# another way: solve it as a Regression Problem | |
# Written in Python. See http://www.python.org/ | |
# Modified by JSun to solve the problem here: http://www.weibo.com/1497035431/ynPEvC78V | |
# Neil Schemenauer <[email protected]> | |
import math | |
import random | |
import string |
package main | |
import ( | |
"net/http" | |
"net/url" | |
"log" | |
"io/ioutil" | |
"regexp" | |
"fmt" | |
//"net/http/httputil" |
import numpy as np | |
import pylab as pl | |
import pandas as pd | |
from sklearn import svm | |
from sklearn import linear_model | |
from sklearn import tree | |
from sklearn.metrics import confusion_matrix |
if (!require(quantmod)) { | |
stop("This app requires the quantmod package. To install it, run 'install.packages(\"quantmod\")'.\n") | |
} | |
# Download data for a stock if needed, and return the data | |
require_symbol <- function(symbol, envir = parent.frame()) { | |
if (is.null(envir[[symbol]])) { | |
envir[[symbol]] <- getSymbols(symbol, auto.assign = FALSE) | |
} |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
# | |
# Get appraised value of car from Edmunds.com using the developer API with R | |
# Reference: http://developer.edmunds.com/docs/read/The_Vehicle_API | |
# | |
# set working dir | |
setwd('~/R/carvalue') | |
#load libraries | |
library(RJSONIO) |
library(shiny) | |
library(ggplot2) | |
library(RCurl) | |
library(reshape2) |
#!/usr/bin/env ruby | |
# Please read http://otobrglez.opalab.com for more information about this code. | |
class Book < Struct.new(:title) | |
def words | |
@words ||= self.title.gsub(/[a-zA-Z]{3,}/).map(&:downcase).uniq.sort | |
end |
# This method finds related articles using Jaccard index (optimized for PostgreSQL). | |
# More info: http://en.wikipedia.org/wiki/Jaccard_index | |
class Article < ActiveRecord::Base | |
def related(limit=10) | |
Article.find_by_sql(%Q{ | |
SELECT | |
a.*, | |
( SELECT array_agg(t.name) FROM taggings tg, tags t |
The k-nearest neighbors (k-NN) algorithm is among the simplest algorithms in the data mining field. Distances / similarities are calculated between each element in the data set using some distance / similarity metric ^[1]^ that the researcher chooses (there are many distance / similarity metrics), where the distance / similarity between any two elements is calculated based on the two elements' attributes. A data element’s k-NN are the k closest data elements according to this distance / similarity.