This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
namespace Kaggle.Metrics.Utilities | |
{ | |
public static class OpenImagesUtil | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Linq; | |
using System.Collections.Generic; | |
using Kaggle.DataFrames; | |
using Kaggle.Metrics.Utilities; | |
using System.Collections.Concurrent; | |
namespace Kaggle.Metrics.Custom | |
{ | |
[PublishedEvaluationAlgorithm("OpenImagesObjectDetectionAP", Name = "OpenImagesObjectDetectionAP", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BASE62 = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" | |
def encode(num, alphabet=BASE62): | |
"""Encode a positive number in Base X | |
Arguments: | |
- `num`: The number to encode | |
- `alphabet`: The alphabet to use for encoding | |
""" | |
if num == 0: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using GeoAPI.Geometries; | |
using Kaggle.DataFrames; | |
using NetTopologySuite.IO; | |
namespace Kaggle.Metrics.Custom { | |
[PublishedEvaluationAlgorithm("JaccardDSTLParallel", Name = "JaccardDSTLParallel", | |
Description = "JaccardDSTLParallel", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(irr) | |
library(Metrics) | |
k=0 | |
r=0 | |
for (x in 1:10000) { | |
pred = as.integer(runif(10, min = 0, max = 4)) | |
truth = as.integer(runif(10, min = 0, max = 4)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dat<- data.frame(t=seq(0, 2*pi, by=0.1) ) | |
xhrt <- function(t) 16*sin(t)^3 | |
yhrt <- function(t) 13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t) | |
dat$y=yhrt(dat$t) | |
dat$x=xhrt(dat$t) | |
with(dat, plot(x,y, type="l")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rworldmap) | |
data=read.csv("/Users/wendy/Downloads/QueryResults (5).csv") | |
sPDF <- joinCountryData2Map( data ,joinCode = "ISO2" ,nameJoinColumn = "Country") | |
mapBubbles(sPDF,nameZSize="numSubmissions",oceanCol="lightblue",landCol="wheat") |