SlideShare une entreprise Scribd logo
1  sur  41
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)

Contenu connexe

Tendances

Iit jee question_paper
Iit jee question_paperIit jee question_paper
Iit jee question_paperRahulMishra774
 
Comp decomp worked
Comp decomp workedComp decomp worked
Comp decomp workedJonna Ramsey
 
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 tmath260
 
Solving exponential equations
Solving exponential equationsSolving exponential equations
Solving exponential equationsShaun Wilson
 
Algebra 2 Unit 5 Lesson 2
Algebra 2 Unit 5 Lesson 2Algebra 2 Unit 5 Lesson 2
Algebra 2 Unit 5 Lesson 2Kate 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 tmath260
 
Tugasmatematikakelompok
TugasmatematikakelompokTugasmatematikakelompok
Tugasmatematikakelompokgundul28
 
2.1 Revision Game
2.1 Revision Game2.1 Revision Game
2.1 Revision Gamealihamp
 
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-app6892drayertaurus
 
The Chain Rule Powerpoint Lesson
The Chain Rule Powerpoint LessonThe Chain Rule Powerpoint Lesson
The Chain Rule Powerpoint LessonPaul Hawks
 
Specific Finite Groups(General)
Specific Finite Groups(General)Specific Finite Groups(General)
Specific Finite Groups(General)Shane Nicklas
 
Combined Functions
Combined FunctionsCombined Functions
Combined FunctionsJoviBerbz
 

Tendances (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
 

En vedette

Fisher線形判別分析とFisher Weight Maps
Fisher線形判別分析とFisher Weight MapsFisher線形判別分析とFisher Weight Maps
Fisher線形判別分析とFisher Weight MapsTakao 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_uxSaori 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科あゆみ先生 #jawsugAyumi Tada
 
はじめてのパターン認識 第6章 後半
はじめてのパターン認識 第6章 後半はじめてのパターン認識 第6章 後半
はじめてのパターン認識 第6章 後半Prunus 1350
 
Ruby で高速なプログラムを書く
Ruby で高速なプログラムを書くRuby で高速なプログラムを書く
Ruby で高速なプログラムを書くmametter
 

En vedette (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 で高速なプログラムを書く
 

Similaire à Numpy発表資料 tokyoscipy

University of manchester mathematical formula tables
University of manchester mathematical formula tablesUniversity of manchester mathematical formula tables
University of manchester mathematical formula tablesGaurav Vasani
 
Interpolation functions
Interpolation functionsInterpolation functions
Interpolation functionsTarun Gehlot
 
last lecture in infinite series
last lecture in infinite serieslast lecture in infinite series
last lecture in infinite seriesAlaa Mohammed
 
Tugas matematika kelompok
Tugas matematika kelompokTugas matematika kelompok
Tugas matematika kelompokachmadtrybuana
 
Modul 3 quadratic function
Modul 3 quadratic functionModul 3 quadratic function
Modul 3 quadratic functionHafidz Mukhtar
 
Module 2 polynomial functions
Module 2   polynomial functionsModule 2   polynomial functions
Module 2 polynomial functionsdionesioable
 
Mathematical formula tables
Mathematical formula tablesMathematical formula tables
Mathematical formula tablesSaravana Selvan
 
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 signalsDr.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
 
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.pdfThejesviIrugu1
 
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 functionsindu psthakur
 
Integral table
Integral tableIntegral table
Integral tableAnkitcos0
 
Single page-integral-table
Single page-integral-tableSingle page-integral-table
Single page-integral-tableMonique Anderson
 

Similaire à 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
 

Dernier

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 

Dernier (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

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)

Notes de l'éditeur

  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