SlideShare ist ein Scribd-Unternehmen logo
1 von 14
MACHINE LEARNING
PROJECTS WITH R
Yiou (Leo) Li
Outline


   Classification of glass data

   Clustering of glass data
Classification by ridge regression
3
Plotting the three classes by four features
4

                                 Simple Scatterplot Matrix
                                11   12   13   14   15                        0.5   1.0   1.5   2.0




                                                                                                      1.525
                        V2




                                                                                                      1.515
          15
          14
          13




                                          V3
          12
          11




                                                                                                      4
                                                                                                      3
                                                                 V4




                                                                                                      2
                                                                                                      1
                                                                                                      0
          2.0
          1.5




                                                                                     V5
          1.0
          0.5




                1.515   1.525                            0   1   2    3   4
Performance looks good when consider only the
    classification error rate
5
Performance is poor when consider ROC
6
Using high order polynomial helps improve ROC
7




    Decision point
Using high order polynomial helps improve TPR
    and FPR!
8



                    Y ~ [V2, V3, …, V10, V2*V3, V2*V4, …]
                             Training            Test
       True Positive Rate    0.6820833           0.55
       False Positive Rate   0.008368031         0.0804762
       Error rate            0.03953965          0.1270588



                              Y ~ [V2, V3 … , V10]
                              Training               Test
       True Positive Rate     0                      0
       False Positive Rate    0.00685288             0.007142857
       Error rate             0.1104277              0.1102941
Notes on ridge regression
9




    1. The ridge solutions are not invariant under scaling of the inputs --- usually
       standardize the input --- so that the solution is invariant to scaling of inputs

    2. Intercept β0 should be left out of the penalty term! --- so that the solution is
       invariant to the choice of origin of inputs and outputs
Outline


   Classification of glass data

   Clustering of glass data
Multi-Dimensional Scaling of glass
data (Labeled as: 1,2,3,5,6,7)
                                          Metric MDS




                       6
                                              1
                                              2
                                              3
                                              5
                                              6
                       4



                                              7
        Coordinate 2

                       2
                       0
                       -2




                            -4   -2   0            2     4   6

                                          Coordinate 1
Kmeans of glass
                           K-means cluster




                     1.0
                     0.8
                     0.6
      Correct rate

                     0.4
                     0.2
                     0.0




                             Original labels
Hierarchical of glass
                            Hierachical cluster




                      1.0
                      0.8
                      0.6
       Correct rate

                      0.4
                      0.2
                      0.0




                                Original labels
Correct rate

                  0.0   0.2   0.4          0.6   0.8   1.0
                                                                  EM of glass
                                                             EM




Original labels

Weitere ähnliche Inhalte

Ähnlich wie Machine learning projects with r

Amth250 octave matlab some solutions (3)
Amth250 octave matlab some solutions (3)Amth250 octave matlab some solutions (3)
Amth250 octave matlab some solutions (3)asghar123456
 
Wikipedia ws
Wikipedia wsWikipedia ws
Wikipedia wsYu Suzuki
 
Towards Probabilistic Assessment of Modularity
Towards Probabilistic Assessment of ModularityTowards Probabilistic Assessment of Modularity
Towards Probabilistic Assessment of ModularityKevin Hoffman
 
adc converter basics
adc converter basicsadc converter basics
adc converter basicshacker1500
 
Mlb graphs slide deck
Mlb graphs slide deckMlb graphs slide deck
Mlb graphs slide deckKevin Teh
 
Important Topics for JEE Advanced
Important Topics for JEE AdvancedImportant Topics for JEE Advanced
Important Topics for JEE Advanced100marks
 
VaR of Operational Risk
VaR of Operational RiskVaR of Operational Risk
VaR of Operational RiskRahmat Mulyana
 
Brief survey on Three-Dimensional Displays
Brief survey on Three-Dimensional DisplaysBrief survey on Three-Dimensional Displays
Brief survey on Three-Dimensional DisplaysTaufiq Widjanarko
 
RIT 101: Understanding Scores From MAP
RIT 101: Understanding Scores From MAPRIT 101: Understanding Scores From MAP
RIT 101: Understanding Scores From MAPNWEA
 
Objective Determination Of Minimum Engine Mapping Requirements For Optimal SI...
Objective Determination Of Minimum Engine Mapping Requirements For Optimal SI...Objective Determination Of Minimum Engine Mapping Requirements For Optimal SI...
Objective Determination Of Minimum Engine Mapping Requirements For Optimal SI...pmaloney1
 
股票期貨問答
股票期貨問答股票期貨問答
股票期貨問答frogman1688
 
Why we don’t know how many colors there are
Why we don’t know how many colors there areWhy we don’t know how many colors there are
Why we don’t know how many colors there areJan Morovic
 
SPICE MODEL of 2SK2962 (Professional+BDP Model) in SPICE PARK
SPICE MODEL of 2SK2962 (Professional+BDP Model) in SPICE PARKSPICE MODEL of 2SK2962 (Professional+BDP Model) in SPICE PARK
SPICE MODEL of 2SK2962 (Professional+BDP Model) in SPICE PARKTsuyoshi Horigome
 
Financial analysis
Financial analysisFinancial analysis
Financial analysiskanchan89
 
SPICE MODEL of 2SK2989 (Professional+BDP Model) in SPICE PARK
SPICE MODEL of 2SK2989 (Professional+BDP Model) in SPICE PARKSPICE MODEL of 2SK2989 (Professional+BDP Model) in SPICE PARK
SPICE MODEL of 2SK2989 (Professional+BDP Model) in SPICE PARKTsuyoshi Horigome
 

Ähnlich wie Machine learning projects with r (20)

Amth250 octave matlab some solutions (3)
Amth250 octave matlab some solutions (3)Amth250 octave matlab some solutions (3)
Amth250 octave matlab some solutions (3)
 
Wikipedia ws
Wikipedia wsWikipedia ws
Wikipedia ws
 
9th ICCS Noordwijkerhout
9th ICCS Noordwijkerhout9th ICCS Noordwijkerhout
9th ICCS Noordwijkerhout
 
Towards Probabilistic Assessment of Modularity
Towards Probabilistic Assessment of ModularityTowards Probabilistic Assessment of Modularity
Towards Probabilistic Assessment of Modularity
 
adc converter basics
adc converter basicsadc converter basics
adc converter basics
 
Mlb graphs slide deck
Mlb graphs slide deckMlb graphs slide deck
Mlb graphs slide deck
 
Metrado de madera
Metrado de maderaMetrado de madera
Metrado de madera
 
Important Topics for JEE Advanced
Important Topics for JEE AdvancedImportant Topics for JEE Advanced
Important Topics for JEE Advanced
 
DCT_TR802
DCT_TR802DCT_TR802
DCT_TR802
 
DCT_TR802
DCT_TR802DCT_TR802
DCT_TR802
 
DCT_TR802
DCT_TR802DCT_TR802
DCT_TR802
 
VaR of Operational Risk
VaR of Operational RiskVaR of Operational Risk
VaR of Operational Risk
 
Brief survey on Three-Dimensional Displays
Brief survey on Three-Dimensional DisplaysBrief survey on Three-Dimensional Displays
Brief survey on Three-Dimensional Displays
 
RIT 101: Understanding Scores From MAP
RIT 101: Understanding Scores From MAPRIT 101: Understanding Scores From MAP
RIT 101: Understanding Scores From MAP
 
Objective Determination Of Minimum Engine Mapping Requirements For Optimal SI...
Objective Determination Of Minimum Engine Mapping Requirements For Optimal SI...Objective Determination Of Minimum Engine Mapping Requirements For Optimal SI...
Objective Determination Of Minimum Engine Mapping Requirements For Optimal SI...
 
股票期貨問答
股票期貨問答股票期貨問答
股票期貨問答
 
Why we don’t know how many colors there are
Why we don’t know how many colors there areWhy we don’t know how many colors there are
Why we don’t know how many colors there are
 
SPICE MODEL of 2SK2962 (Professional+BDP Model) in SPICE PARK
SPICE MODEL of 2SK2962 (Professional+BDP Model) in SPICE PARKSPICE MODEL of 2SK2962 (Professional+BDP Model) in SPICE PARK
SPICE MODEL of 2SK2962 (Professional+BDP Model) in SPICE PARK
 
Financial analysis
Financial analysisFinancial analysis
Financial analysis
 
SPICE MODEL of 2SK2989 (Professional+BDP Model) in SPICE PARK
SPICE MODEL of 2SK2989 (Professional+BDP Model) in SPICE PARKSPICE MODEL of 2SK2989 (Professional+BDP Model) in SPICE PARK
SPICE MODEL of 2SK2989 (Professional+BDP Model) in SPICE PARK
 

Kürzlich hochgeladen

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Kürzlich hochgeladen (20)

Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Machine learning projects with r

  • 2. Outline  Classification of glass data  Clustering of glass data
  • 3. Classification by ridge regression 3
  • 4. Plotting the three classes by four features 4 Simple Scatterplot Matrix 11 12 13 14 15 0.5 1.0 1.5 2.0 1.525 V2 1.515 15 14 13 V3 12 11 4 3 V4 2 1 0 2.0 1.5 V5 1.0 0.5 1.515 1.525 0 1 2 3 4
  • 5. Performance looks good when consider only the classification error rate 5
  • 6. Performance is poor when consider ROC 6
  • 7. Using high order polynomial helps improve ROC 7 Decision point
  • 8. Using high order polynomial helps improve TPR and FPR! 8 Y ~ [V2, V3, …, V10, V2*V3, V2*V4, …] Training Test True Positive Rate 0.6820833 0.55 False Positive Rate 0.008368031 0.0804762 Error rate 0.03953965 0.1270588 Y ~ [V2, V3 … , V10] Training Test True Positive Rate 0 0 False Positive Rate 0.00685288 0.007142857 Error rate 0.1104277 0.1102941
  • 9. Notes on ridge regression 9 1. The ridge solutions are not invariant under scaling of the inputs --- usually standardize the input --- so that the solution is invariant to scaling of inputs 2. Intercept β0 should be left out of the penalty term! --- so that the solution is invariant to the choice of origin of inputs and outputs
  • 10. Outline  Classification of glass data  Clustering of glass data
  • 11. Multi-Dimensional Scaling of glass data (Labeled as: 1,2,3,5,6,7) Metric MDS 6 1 2 3 5 6 4 7 Coordinate 2 2 0 -2 -4 -2 0 2 4 6 Coordinate 1
  • 12. Kmeans of glass K-means cluster 1.0 0.8 0.6 Correct rate 0.4 0.2 0.0 Original labels
  • 13. Hierarchical of glass Hierachical cluster 1.0 0.8 0.6 Correct rate 0.4 0.2 0.0 Original labels
  • 14. Correct rate 0.0 0.2 0.4 0.6 0.8 1.0 EM of glass EM Original labels