2017년 3월 15일 수요일

[kivy] object connection

1. kivy 파일 load로 연결

2. 한 kv 파일에서

으로 오브젝트를 만듬 -> 다른 kv 파일에서 이 오브젝트를 바로 사용 가능


    NAME:
        Line: ~~~



이걸 파이썬 코드에서 사용하고 싶으면, ID 부여, 그리고 접근을 어디서 할수 있게 할건지
정해야 한다.

이것은


    id: _NAME


    name_in_code : _NAME

이렇게 할시 , 파이썬 코드에서 NAME2 의 프로퍼티(어트리뷰트)중 name_in_code라는 프로퍼티가 생긴다. 이걸로 컨트롤을 할 수 있다.

[python] list slice index

data = [
    [1.0 , 1.0 , 4 , 10],
    [2.0 , 10.0, 4 , 10],
    [3.0 , 23.0, 4 , 10]
    ]

tempdata = [ item[2:] for item in data]

item[ 2 : ] mean from 2 to last

if want last - 1 element, just item [ 2 : -1 ]

2017년 3월 13일 월요일

[python] class member add

class tempclass():
    def __init__(self):
        self.member1 = 0


if __name__ == '__main__':
    te = tempclass()
    te.aa = 0
    te.yy = 'tt'

    print te.yy
    print te.aa


2017년 3월 7일 화요일

[kivy] Naming Rule

Kivy looks for a .kv file with the same name as your App class in lowercase
(minus “App” if it ends with ‘App’. eg. TutorialApp to tutorial.kv)

+ or tutorialApp.kv is also ok
Compared to Python syntax, Kivy syntax really sucks.

2017년 3월 6일 월요일

[python] tkinter - openfile dialog start with initial path

import Tkinter as tk
from tkFileDialog import askopenfilename

root = tk.Tk()
root.withdraw()
temp = askopenfilename(initialdir="c:\\")

2017년 3월 5일 일요일

[statistic] Confusion matrix


condition positive (P)
the number of real positive cases in the data
condition negatives (N)
the number of real negative cases in the data

true positive (TP)
eqv. with hit
true negative (TN)
eqv. with correct rejection
false positive (FP)
eqv. with false alarmType I error
false negative (FN)
eqv. with miss, Type II error




sensitivityrecallhit rate, or true positive rate (TPR)
specificity or true negative rate (TNR)


precision or positive predictive value (PPV)


negative predictive value (NPV)



accuracy (ACC)

장비의 분류 성능은 이정도만 제공해줘도 충분하다.






















[C#] Action and Func Chain

Action act1 = new Action( (x)=> Console.WriteLine("act1") );
            Action act2 = new Action( (x)=> Console.WriteLine("act2") );

            Action act3 = new Action((x) => { } );
            act3 += act1;
            act3 += act2;

            act3(1);
            Console.ReadLine();