Skip to content

Instantly share code, notes, and snippets.

@wfwei
wfwei / eva.py
Created January 6, 2014 09:42 — forked from anonymous/eva.py
# !/usr/bin/python
# -*- coding: utf-8 -*-
import math
def prf(tlist, plist, n):
'''
cal the (precision, recall, f-score)
rlist:real values list
import java.util.Scanner;
public class Main {
static int sumTime(int[] arr, int upcost, int downcost, int stopcost){
int up=arr[0], down=0, stop=arr.length;
for(int i=1; i<arr.length; i++){
int diff = arr[i] -arr[i-1];
if(diff>0)