SlideShare a Scribd company logo
NUMPY
-                       -

        gerumanium3_2
.....
https://gist.github.com/
gerumanium
twitter

ID gerumanium3_2
numpy
(Pattern Recognition)
:


    :
Discriminant Analysis




z


                            Fisher             (FDA)
    (discrimination)
    (classification)
                                           (LDA)
                                          (QDA)
1.        -
     2.
fisher(1890   1962)
1.                            W
        B
            −1
2. X   =W        B
3. X        λ


4.          L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4
x1:
           x2:
          x3:
           x4:

      L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4
L ”              L             ”       l1 , l2 , l3 , l4
K
                                  W =         Sk
              L                         k=1

          W   T B   Sk =          (xn − mk )(xn − mk )T
                           n∈Ck

                                 1
W:                          mk =                   xn
                                 Nk
                                         n∈Ck
     T:                     N

B:                   T =         (xn − mn )(xn − m)T
                           m=1

                                  T =W +B
L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4



                         l Bl
                     Q≡       → max
                        l Wl
            L




l’Bl l’Wl
Q                   L


            −1
    X=W          B

X       λ


            l1 , l2 , l3 , l4
1.                             W
            B
             −1
2. X   =W           B              linalg.inv()
3. X            λ
       linalg.eig()
4.           L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4
numpy
numpy

python
numpy

“iris.txt”
>>from numpy import *
>>data=loadtxt("iris.txt")
>>
>>>#
 >>>Vi=array([data[i] for i in range(0,50)])
 >>>#Vi               Vi.T transpose(Vi)
 >>>Vi=Vi.T
 >>>Vi=array([Vi[i] for i in range(1,5)])
 >>>
                                                 
                                          x   1
                                x2 
x = x1 , x2 , x3 , x4 , x5   →x= 
                                x3 
                                 x4
>>#
>>Ve=array([data[i] for i in range(50,100)])
>>Ve=Ve.T
>>Ve=array([Ve[i] for i in range(1,5)])
>>
>>#
>>Se=array([data[i] for i in range(100,150)])
>>Se=Se.T
>>Se=array([Se[i] for i in range(1,5)])
>>
>>> #
>>> data=data.T
>>> #(4,150)
>>> data=array([data[i] for i in range(1,5)])
>>>
1.                           W
            B
             −1
2. X   =W           B            linalg.inv()
3. X            λ
       linalg.eig()
4.          L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4
1.       W
     B
3
              W =         Sk
                    k=1

=           (V in − V¯i)(V in − V i)T
                                 ¯
    n∈V i

+       (V en − V¯e)(V en − V¯e)T
    n∈V e

+                  ¯         ¯ T
            (Sen − Se)(Sen − Se)
    n∈Se
>W=zeros((4,4))
>#Vi
>m1=array([[mean(i) for i in Vi]])
>m1=m1.T
>W+=dot(Vi-m1,transpose(Vi-m1))


     (V in − V¯i)(V in − V i)T
                          ¯
n∈V i
#Ve
>m2=array([[mean(i) for i in Ve]])
>m2=m2.T
>W+=dot(Ve-m2,transpose(Ve-m2))
>


      (V en − V¯e)(V en − V¯e)T
 n∈V e
#Se
>m3=array([[mean(i) for i in Se]])
>m3=m3.T
>W+=dot(Se-m3,transpose(Se-m3))

             ¯         ¯ T
      (Sen − Se)(Sen − Se)
n∈Se
T
      N
                               T
T =         (xn − x)(xn − x)
                  ¯       ¯
      n=1



      B=T−W
>>#
>>M=array([[mean(i) for i in
data]]).T
>>T=dot(data-M,transpose(data-M))

#
>>B=T-W
>>
1.                             W
            B
2.            −1                   linalg.inv()
     X=W            B
3. X            λ
       linalg.eig()
4.           L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4
>># linalg.inv()


>>X=dot(linalg.inv(W),B)
>>
1.                             W
            B
             −1
2. X   =W           B              linalg.inv()
3. X            λ
       linalg.eig()
4.           L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4
>>>#
>>>#la
>>>#v    la
>>>la,v = linalg.eig(X)
>>> la
array([3.21919292e
+01,2.85391043e-01,
3.25093377e-15,
    3.08736744e-14])
>>>
(1)
L         = −0.20874182x1


      −0.38620369x2


      +0.55401172x3


          +0.7073504x4
L     (    L(1)           L(x)      )
    (2)                       (1)
L         = −0.20874182x1 L         = −0.20874182x1


      −0.38620369x2             −0.38620369x2


      +0.55401172x3             +0.55401172x3


          +0.7073504x4              +0.7073504x4
<http://d.hatena.ne.jp/
 gerumanium/>        ...
R
5        (2009)



(2007)

              (2008)

More Related Content

What's hot

Chain rule
Chain ruleChain rule
Chain rule
Sabin Tiger
 
Lesson 11: The Chain Rule
Lesson 11: The Chain RuleLesson 11: The Chain Rule
Lesson 11: The Chain Rule
Matthew Leingang
 
Parabola
ParabolaParabola
Chain Rule
Chain RuleChain Rule
Chain Rule
Nishant Patel
 
Vertex
VertexVertex
Iit jee question_paper
Iit jee question_paperIit jee question_paper
Iit jee question_paper
RahulMishra774
 
Comp decomp worked
Comp decomp workedComp decomp worked
Comp decomp worked
Jonna Ramsey
 
Hw5sols
Hw5solsHw5sols
Hw5sols
Dulaj Rox
 
3.3 the fundamental theorem of algebra t
3.3 the fundamental theorem of algebra t3.3 the fundamental theorem of algebra t
3.3 the fundamental theorem of algebra t
math260
 
Solving exponential equations
Solving exponential equationsSolving exponential equations
Solving exponential equations
Shaun Wilson
 
Algebra 2 Unit 5 Lesson 2
Algebra 2 Unit 5 Lesson 2Algebra 2 Unit 5 Lesson 2
Algebra 2 Unit 5 Lesson 2
Kate Nowak
 
2.1 the basic language of functions t
2.1 the basic language of functions  t2.1 the basic language of functions  t
2.1 the basic language of functions t
math260
 
Tugasmatematikakelompok
TugasmatematikakelompokTugasmatematikakelompok
Tugasmatematikakelompok
gundul28
 
2.1 Revision Game
2.1 Revision Game2.1 Revision Game
2.1 Revision Game
alihamp
 
Specific Finite Groups(General)
Specific Finite Groups(General)Specific Finite Groups(General)
Specific Finite Groups(General)
Shane Nicklas
 
Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892
drayertaurus
 
The Chain Rule Powerpoint Lesson
The Chain Rule Powerpoint LessonThe Chain Rule Powerpoint Lesson
The Chain Rule Powerpoint Lesson
Paul Hawks
 
Mate tarea - 2º
Mate   tarea - 2ºMate   tarea - 2º
Mate tarea - 2º
brisagaela29
 
Specific Finite Groups(General)
Specific Finite Groups(General)Specific Finite Groups(General)
Specific Finite Groups(General)
Shane Nicklas
 
Combined Functions
Combined FunctionsCombined Functions
Combined Functions
JoviBerbz
 

What's hot (20)

Chain rule
Chain ruleChain rule
Chain rule
 
Lesson 11: The Chain Rule
Lesson 11: The Chain RuleLesson 11: The Chain Rule
Lesson 11: The Chain Rule
 
Parabola
ParabolaParabola
Parabola
 
Chain Rule
Chain RuleChain Rule
Chain Rule
 
Vertex
VertexVertex
Vertex
 
Iit jee question_paper
Iit jee question_paperIit jee question_paper
Iit jee question_paper
 
Comp decomp worked
Comp decomp workedComp decomp worked
Comp decomp worked
 
Hw5sols
Hw5solsHw5sols
Hw5sols
 
3.3 the fundamental theorem of algebra t
3.3 the fundamental theorem of algebra t3.3 the fundamental theorem of algebra t
3.3 the fundamental theorem of algebra t
 
Solving exponential equations
Solving exponential equationsSolving exponential equations
Solving exponential equations
 
Algebra 2 Unit 5 Lesson 2
Algebra 2 Unit 5 Lesson 2Algebra 2 Unit 5 Lesson 2
Algebra 2 Unit 5 Lesson 2
 
2.1 the basic language of functions t
2.1 the basic language of functions  t2.1 the basic language of functions  t
2.1 the basic language of functions t
 
Tugasmatematikakelompok
TugasmatematikakelompokTugasmatematikakelompok
Tugasmatematikakelompok
 
2.1 Revision Game
2.1 Revision Game2.1 Revision Game
2.1 Revision Game
 
Specific Finite Groups(General)
Specific Finite Groups(General)Specific Finite Groups(General)
Specific Finite Groups(General)
 
Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892
 
The Chain Rule Powerpoint Lesson
The Chain Rule Powerpoint LessonThe Chain Rule Powerpoint Lesson
The Chain Rule Powerpoint Lesson
 
Mate tarea - 2º
Mate   tarea - 2ºMate   tarea - 2º
Mate tarea - 2º
 
Specific Finite Groups(General)
Specific Finite Groups(General)Specific Finite Groups(General)
Specific Finite Groups(General)
 
Combined Functions
Combined FunctionsCombined Functions
Combined Functions
 

Viewers also liked

Fisher線形判別分析とFisher Weight Maps
Fisher線形判別分析とFisher Weight MapsFisher線形判別分析とFisher Weight Maps
Fisher線形判別分析とFisher Weight Maps
Takao Yamanaka
 
Hpcビジネスコンテンスト発表資料
Hpcビジネスコンテンスト発表資料Hpcビジネスコンテンスト発表資料
Hpcビジネスコンテンスト発表資料Hironori Nakajo
 
主成分分析 (pca)
主成分分析 (pca)主成分分析 (pca)
主成分分析 (pca)
Ji Wang
 
数式をnumpyに落としこむコツ
数式をnumpyに落としこむコツ数式をnumpyに落としこむコツ
数式をnumpyに落としこむコツ
Shuyo Nakatani
 
10分でわかる主成分分析(PCA)
10分でわかる主成分分析(PCA)10分でわかる主成分分析(PCA)
10分でわかる主成分分析(PCA)
Takanori Ogata
 
はじめよう多変量解析~主成分分析編~
はじめよう多変量解析~主成分分析編~はじめよう多変量解析~主成分分析編~
はじめよう多変量解析~主成分分析編~
宏喜 佐野
 
0528 kanntigai ui_ux
0528 kanntigai ui_ux0528 kanntigai ui_ux
0528 kanntigai ui_ux
Saori Matsui
 
女子の心をつかむUIデザインポイント - MERY編 -
女子の心をつかむUIデザインポイント - MERY編 -女子の心をつかむUIデザインポイント - MERY編 -
女子の心をつかむUIデザインポイント - MERY編 -
Shoko Tanaka
 
20140628_jaws-ug_クラウド女子会_HPC科あゆみ先生 #jawsug
20140628_jaws-ug_クラウド女子会_HPC科あゆみ先生  #jawsug20140628_jaws-ug_クラウド女子会_HPC科あゆみ先生  #jawsug
20140628_jaws-ug_クラウド女子会_HPC科あゆみ先生 #jawsug
Ayumi Tada
 
はじめてのパターン認識 第6章 後半
はじめてのパターン認識 第6章 後半はじめてのパターン認識 第6章 後半
はじめてのパターン認識 第6章 後半
Prunus 1350
 
Ruby で高速なプログラムを書く
Ruby で高速なプログラムを書くRuby で高速なプログラムを書く
Ruby で高速なプログラムを書く
mametter
 

Viewers also liked (14)

Fisher線形判別分析とFisher Weight Maps
Fisher線形判別分析とFisher Weight MapsFisher線形判別分析とFisher Weight Maps
Fisher線形判別分析とFisher Weight Maps
 
FortranからPythonへ
FortranからPythonへFortranからPythonへ
FortranからPythonへ
 
Hpcビジネスコンテンスト発表資料
Hpcビジネスコンテンスト発表資料Hpcビジネスコンテンスト発表資料
Hpcビジネスコンテンスト発表資料
 
Pythonについて
PythonについてPythonについて
Pythonについて
 
Gpu vs fpga
Gpu vs fpgaGpu vs fpga
Gpu vs fpga
 
主成分分析 (pca)
主成分分析 (pca)主成分分析 (pca)
主成分分析 (pca)
 
数式をnumpyに落としこむコツ
数式をnumpyに落としこむコツ数式をnumpyに落としこむコツ
数式をnumpyに落としこむコツ
 
10分でわかる主成分分析(PCA)
10分でわかる主成分分析(PCA)10分でわかる主成分分析(PCA)
10分でわかる主成分分析(PCA)
 
はじめよう多変量解析~主成分分析編~
はじめよう多変量解析~主成分分析編~はじめよう多変量解析~主成分分析編~
はじめよう多変量解析~主成分分析編~
 
0528 kanntigai ui_ux
0528 kanntigai ui_ux0528 kanntigai ui_ux
0528 kanntigai ui_ux
 
女子の心をつかむUIデザインポイント - MERY編 -
女子の心をつかむUIデザインポイント - MERY編 -女子の心をつかむUIデザインポイント - MERY編 -
女子の心をつかむUIデザインポイント - MERY編 -
 
20140628_jaws-ug_クラウド女子会_HPC科あゆみ先生 #jawsug
20140628_jaws-ug_クラウド女子会_HPC科あゆみ先生  #jawsug20140628_jaws-ug_クラウド女子会_HPC科あゆみ先生  #jawsug
20140628_jaws-ug_クラウド女子会_HPC科あゆみ先生 #jawsug
 
はじめてのパターン認識 第6章 後半
はじめてのパターン認識 第6章 後半はじめてのパターン認識 第6章 後半
はじめてのパターン認識 第6章 後半
 
Ruby で高速なプログラムを書く
Ruby で高速なプログラムを書くRuby で高速なプログラムを書く
Ruby で高速なプログラムを書く
 

Similar to Numpy発表資料 tokyoscipy

University of manchester mathematical formula tables
University of manchester mathematical formula tablesUniversity of manchester mathematical formula tables
University of manchester mathematical formula tables
Gaurav Vasani
 
Interpolation functions
Interpolation functionsInterpolation functions
Interpolation functions
Tarun Gehlot
 
last lecture in infinite series
last lecture in infinite serieslast lecture in infinite series
last lecture in infinite series
Alaa Mohammed
 
Tugas matematika kelompok
Tugas matematika kelompokTugas matematika kelompok
Tugas matematika kelompok
achmadtrybuana
 
Modul 3 quadratic function
Modul 3 quadratic functionModul 3 quadratic function
Modul 3 quadratic function
Hafidz Mukhtar
 
Module 2 polynomial functions
Module 2   polynomial functionsModule 2   polynomial functions
Module 2 polynomial functions
dionesioable
 
Mathematical formula tables
Mathematical formula tablesMathematical formula tables
Mathematical formula tables
Saravana Selvan
 
Chapter 5 assignment
Chapter 5 assignmentChapter 5 assignment
Chapter 5 assignment
KarunaGupta1982
 
Clonal Selection: an Immunological Algorithm for Global Optimization over Con...
Clonal Selection: an Immunological Algorithm for Global Optimization over Con...Clonal Selection: an Immunological Algorithm for Global Optimization over Con...
Clonal Selection: an Immunological Algorithm for Global Optimization over Con...
Mario Pavone
 
Calculus B Notes (Notre Dame)
Calculus B Notes (Notre Dame)Calculus B Notes (Notre Dame)
Calculus B Notes (Notre Dame)
Laurel Ayuyao
 
Unit 1 Operation on signals
Unit 1  Operation on signalsUnit 1  Operation on signals
Unit 1 Operation on signals
Dr.SHANTHI K.G
 
some important questions for practice clas 12
some important questions for practice clas 12  some important questions for practice clas 12
some important questions for practice clas 12
nitishguptamaps
 
Guia edo todas
Guia edo todasGuia edo todas
Guia edo todas
Gonzalo Jiménez
 
MS2 POwer Rules
MS2 POwer RulesMS2 POwer Rules
9A%20thejesvi%20math%20journal%20activity%201-7.pdf
9A%20thejesvi%20math%20journal%20activity%201-7.pdf9A%20thejesvi%20math%20journal%20activity%201-7.pdf
9A%20thejesvi%20math%20journal%20activity%201-7.pdf
ThejesviIrugu1
 
Series expansion of exponential and logarithmic functions
Series expansion of exponential and logarithmic functionsSeries expansion of exponential and logarithmic functions
Series expansion of exponential and logarithmic functions
indu psthakur
 
Integral table
Integral tableIntegral table
Integral table
Ankitcos0
 
Calculus Final Exam
Calculus Final ExamCalculus Final Exam
Calculus Final Exam
Kuan-Lun Wang
 
整卷
整卷整卷
Single page-integral-table
Single page-integral-tableSingle page-integral-table
Single page-integral-table
Monique Anderson
 

Similar to Numpy発表資料 tokyoscipy (20)

University of manchester mathematical formula tables
University of manchester mathematical formula tablesUniversity of manchester mathematical formula tables
University of manchester mathematical formula tables
 
Interpolation functions
Interpolation functionsInterpolation functions
Interpolation functions
 
last lecture in infinite series
last lecture in infinite serieslast lecture in infinite series
last lecture in infinite series
 
Tugas matematika kelompok
Tugas matematika kelompokTugas matematika kelompok
Tugas matematika kelompok
 
Modul 3 quadratic function
Modul 3 quadratic functionModul 3 quadratic function
Modul 3 quadratic function
 
Module 2 polynomial functions
Module 2   polynomial functionsModule 2   polynomial functions
Module 2 polynomial functions
 
Mathematical formula tables
Mathematical formula tablesMathematical formula tables
Mathematical formula tables
 
Chapter 5 assignment
Chapter 5 assignmentChapter 5 assignment
Chapter 5 assignment
 
Clonal Selection: an Immunological Algorithm for Global Optimization over Con...
Clonal Selection: an Immunological Algorithm for Global Optimization over Con...Clonal Selection: an Immunological Algorithm for Global Optimization over Con...
Clonal Selection: an Immunological Algorithm for Global Optimization over Con...
 
Calculus B Notes (Notre Dame)
Calculus B Notes (Notre Dame)Calculus B Notes (Notre Dame)
Calculus B Notes (Notre Dame)
 
Unit 1 Operation on signals
Unit 1  Operation on signalsUnit 1  Operation on signals
Unit 1 Operation on signals
 
some important questions for practice clas 12
some important questions for practice clas 12  some important questions for practice clas 12
some important questions for practice clas 12
 
Guia edo todas
Guia edo todasGuia edo todas
Guia edo todas
 
MS2 POwer Rules
MS2 POwer RulesMS2 POwer Rules
MS2 POwer Rules
 
9A%20thejesvi%20math%20journal%20activity%201-7.pdf
9A%20thejesvi%20math%20journal%20activity%201-7.pdf9A%20thejesvi%20math%20journal%20activity%201-7.pdf
9A%20thejesvi%20math%20journal%20activity%201-7.pdf
 
Series expansion of exponential and logarithmic functions
Series expansion of exponential and logarithmic functionsSeries expansion of exponential and logarithmic functions
Series expansion of exponential and logarithmic functions
 
Integral table
Integral tableIntegral table
Integral table
 
Calculus Final Exam
Calculus Final ExamCalculus Final Exam
Calculus Final Exam
 
整卷
整卷整卷
整卷
 
Single page-integral-table
Single page-integral-tableSingle page-integral-table
Single page-integral-table
 

Recently uploaded

"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
Sease
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
LizaNolte
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
ScyllaDB
 
AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)
HarpalGohil4
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
christinelarrosa
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
DianaGray10
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
Sunil Jagani
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
Ortus Solutions, Corp
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
DianaGray10
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 

Recently uploaded (20)

"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
From Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMsFrom Natural Language to Structured Solr Queries using LLMs
From Natural Language to Structured Solr Queries using LLMs
 
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham HillinQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
inQuba Webinar Mastering Customer Journey Management with Dr Graham Hill
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
 
AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)
 
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptxPRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
PRODUCT LISTING OPTIMIZATION PRESENTATION.pptx
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectorsConnector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
Connector Corner: Seamlessly power UiPath Apps, GenAI with prebuilt connectors
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 

Numpy発表資料 tokyoscipy

  • 1. NUMPY - - gerumanium3_2
  • 6.
  • 8. : :
  • 9.
  • 10. Discriminant Analysis z Fisher (FDA) (discrimination) (classification) (LDA) (QDA)
  • 11. 1. - 2.
  • 12. fisher(1890 1962)
  • 13. 1. W B −1 2. X =W B 3. X λ 4. L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4
  • 14. x1: x2: x3: x4: L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4 L ” L ” l1 , l2 , l3 , l4
  • 15. K W = Sk L k=1 W T B Sk = (xn − mk )(xn − mk )T n∈Ck 1 W: mk = xn Nk n∈Ck T: N B: T = (xn − mn )(xn − m)T m=1 T =W +B
  • 16. L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4 l Bl Q≡ → max l Wl L l’Bl l’Wl
  • 17. Q L −1 X=W B X λ l1 , l2 , l3 , l4
  • 18. 1. W B −1 2. X =W B linalg.inv() 3. X λ linalg.eig() 4. L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4
  • 19. numpy
  • 21. >>from numpy import * >>data=loadtxt("iris.txt") >>
  • 22. >>># >>>Vi=array([data[i] for i in range(0,50)]) >>>#Vi Vi.T transpose(Vi) >>>Vi=Vi.T >>>Vi=array([Vi[i] for i in range(1,5)]) >>>   x 1 x2  x = x1 , x2 , x3 , x4 , x5 →x=  x3  x4
  • 23. >># >>Ve=array([data[i] for i in range(50,100)]) >>Ve=Ve.T >>Ve=array([Ve[i] for i in range(1,5)]) >> >># >>Se=array([data[i] for i in range(100,150)]) >>Se=Se.T >>Se=array([Se[i] for i in range(1,5)]) >>
  • 24. >>> # >>> data=data.T >>> #(4,150) >>> data=array([data[i] for i in range(1,5)]) >>>
  • 25. 1. W B −1 2. X =W B linalg.inv() 3. X λ linalg.eig() 4. L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4
  • 26. 1. W B
  • 27. 3 W = Sk k=1 = (V in − V¯i)(V in − V i)T ¯ n∈V i + (V en − V¯e)(V en − V¯e)T n∈V e + ¯ ¯ T (Sen − Se)(Sen − Se) n∈Se
  • 28. >W=zeros((4,4)) >#Vi >m1=array([[mean(i) for i in Vi]]) >m1=m1.T >W+=dot(Vi-m1,transpose(Vi-m1)) (V in − V¯i)(V in − V i)T ¯ n∈V i
  • 29. #Ve >m2=array([[mean(i) for i in Ve]]) >m2=m2.T >W+=dot(Ve-m2,transpose(Ve-m2)) > (V en − V¯e)(V en − V¯e)T n∈V e
  • 30. #Se >m3=array([[mean(i) for i in Se]]) >m3=m3.T >W+=dot(Se-m3,transpose(Se-m3)) ¯ ¯ T (Sen − Se)(Sen − Se) n∈Se
  • 31. T N T T = (xn − x)(xn − x) ¯ ¯ n=1 B=T−W
  • 32. >># >>M=array([[mean(i) for i in data]]).T >>T=dot(data-M,transpose(data-M)) # >>B=T-W >>
  • 33. 1. W B 2. −1 linalg.inv() X=W B 3. X λ linalg.eig() 4. L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4
  • 35. 1. W B −1 2. X =W B linalg.inv() 3. X λ linalg.eig() 4. L = l 1 x 1 + l 2 x 2 + l 3 x 3 + l4 x 4
  • 36. >>># >>>#la >>>#v la >>>la,v = linalg.eig(X) >>> la array([3.21919292e +01,2.85391043e-01, 3.25093377e-15, 3.08736744e-14]) >>>
  • 37. (1) L = −0.20874182x1 −0.38620369x2 +0.55401172x3 +0.7073504x4
  • 38. L ( L(1) L(x) ) (2) (1) L = −0.20874182x1 L = −0.20874182x1 −0.38620369x2 −0.38620369x2 +0.55401172x3 +0.55401172x3 +0.7073504x4 +0.7073504x4
  • 39.
  • 41. R 5 (2009) (2007) (2008)

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n