Study
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 alarm
,
Type I error
false negative (FN)
eqv. with miss,
Type II error
sensitivity
,
recall
,
hit rate
, or
true positive rate (TPR)
{\displaystyle \mathrm {TPR} ={\frac {\mathrm {TP} }{P}}={\frac {\mathrm {TP} }{\mathrm {TP} +\mathrm {FN} }}}
specificity
or
true negative rate (TNR)
{\displaystyle \mathrm {TNR} ={\frac {\mathrm {TN} }{N}}={\frac {\mathrm {TN} }{\mathrm {FP} +\mathrm {TN} }}}
precision
or
positive predictive value
(PPV)
{\displaystyle \mathrm {PPV} ={\frac {\mathrm {TP} }{\mathrm {TP} +\mathrm {FP} }}}
negative predictive value
(NPV)
{\displaystyle \mathrm {NPV} ={\frac {\mathrm {TN} }{\mathrm {TN} +\mathrm {FN} }}}
accuracy
(ACC)
{\displaystyle \mathrm {ACC} ={\frac {\mathrm {TP} +\mathrm {TN} }{P+N}}}
장비의 분류 성능은 이정도만 제공해줘도 충분하다.
[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();
최근 게시물
이전 게시물
홈
피드 구독하기:
글 (Atom)