SlideShare a Scribd company logo
1 of 10
Manifold Learning MATLAB 
demo
Manifolds 
 “According to mathematics, manifold is a collection of points 
forming a certain kind of set, such as those of topologically 
closed surface.” 
 Example: Surface, Curve & point.
Terms to be used in code 
 X = data as D x N matrix (D = dimensionality, N = #points) 
 K = number of neighbors 
 dmax = max embedding dimensionality 
 Y = embedding as dmax x N matrix
General Code 
 X=rand(10,50); 
 k=20; 
 dmax=2; 
 [Y] = lle(X,k,dmax);
Functioning of code in MATLAB
Animated Version using MATLAB 
The input data can be read from a 
matrix in the workspace, from a text 
file, or selected from one of 8 built-in 
examples.
Description to every option 
 Load Matrix: Enter the name of a matrix in the MATLAB workspace 
and press this button. 
The matrix should be NxD, where 
N is the number of data items; 
D is the dimension of the manifold. 
 Load File: Enter the name of a text file and press this button. The text 
file should contain numbers separated by spaces with each data 
element as a row.
Parameters used in simulation 
 Target Dimension d: The desired dimension of the embedding. In 
general, the target dimension d should be less than the input 
manifold dimension D. 
 Nearest Neighbors K: Specifies the number of nearest neighbors 
(KNN) used to build the graph for the following methods: ISOMAP, 
LLE, Hessian LLE, Laplacian, and LTSA.
 Sigma: This specifies the width of the Gaussian kernel in the Diffusion Map 
method. 
 Alpha: This parameter controls the normalization used by Diffusion Map. 
Alpha = 0 is the Graph Laplacian 
Alpha = 1/2 is the Fokker-Plank propagator 
Alpha = 1 is the Laplace-Beltrami operator
Output 
The output for: 
d = 2; 
k = 8; 
Sigma = 10.0; 
Alpha = 1.0;

More Related Content

What's hot

Flood control by Dr Sandeep Yadav
Flood control by Dr Sandeep YadavFlood control by Dr Sandeep Yadav
Flood control by Dr Sandeep YadavPradeep Yadav
 
Traffic light.ppt (1)
Traffic light.ppt (1)Traffic light.ppt (1)
Traffic light.ppt (1)chelseaaaaad
 
Management Canadian 4th Edition Schermerhorn Test Bank
Management Canadian 4th Edition Schermerhorn Test BankManagement Canadian 4th Edition Schermerhorn Test Bank
Management Canadian 4th Edition Schermerhorn Test Bankryvaca
 
Introduction to gps and gnss
Introduction to gps and gnssIntroduction to gps and gnss
Introduction to gps and gnssVivek Srivastava
 
Introduction of gps global navigation satellite systems
Introduction of gps   global navigation satellite systems Introduction of gps   global navigation satellite systems
Introduction of gps global navigation satellite systems DocumentStory
 
Hydrological cycle and its components
Hydrological cycle and its componentsHydrological cycle and its components
Hydrological cycle and its componentsKinza Irshad
 
Data models in geographical information system(GIS)
Data models in geographical information system(GIS)Data models in geographical information system(GIS)
Data models in geographical information system(GIS)Pramoda Raj
 
Infiltration.
Infiltration.Infiltration.
Infiltration.Amr Kadry
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problemMohamed Gad
 
Structure of geographic data
Structure of geographic dataStructure of geographic data
Structure of geographic dataMd. Yousuf Gazi
 
CE3303 UNIT 2 WATER TREATMENT PPT.pptx
CE3303 UNIT 2 WATER TREATMENT PPT.pptxCE3303 UNIT 2 WATER TREATMENT PPT.pptx
CE3303 UNIT 2 WATER TREATMENT PPT.pptxshiva463860
 
Global positioning system (gps)
Global positioning system (gps)Global positioning system (gps)
Global positioning system (gps)Gokul Saud
 

What's hot (20)

Flood control by Dr Sandeep Yadav
Flood control by Dr Sandeep YadavFlood control by Dr Sandeep Yadav
Flood control by Dr Sandeep Yadav
 
GPS ppt.
GPS ppt. GPS ppt.
GPS ppt.
 
Traffic light.ppt (1)
Traffic light.ppt (1)Traffic light.ppt (1)
Traffic light.ppt (1)
 
Management Canadian 4th Edition Schermerhorn Test Bank
Management Canadian 4th Edition Schermerhorn Test BankManagement Canadian 4th Edition Schermerhorn Test Bank
Management Canadian 4th Edition Schermerhorn Test Bank
 
Canal lining
Canal liningCanal lining
Canal lining
 
Aquifer
AquiferAquifer
Aquifer
 
Introduction to gps and gnss
Introduction to gps and gnssIntroduction to gps and gnss
Introduction to gps and gnss
 
Introduction of gps global navigation satellite systems
Introduction of gps   global navigation satellite systems Introduction of gps   global navigation satellite systems
Introduction of gps global navigation satellite systems
 
Hydrological cycle and its components
Hydrological cycle and its componentsHydrological cycle and its components
Hydrological cycle and its components
 
Data models in geographical information system(GIS)
Data models in geographical information system(GIS)Data models in geographical information system(GIS)
Data models in geographical information system(GIS)
 
Navigation System
Navigation SystemNavigation System
Navigation System
 
Different layers of flexible pavement
Different layers of flexible pavementDifferent layers of flexible pavement
Different layers of flexible pavement
 
Infiltration.
Infiltration.Infiltration.
Infiltration.
 
Traveling salesman problem
Traveling salesman problemTraveling salesman problem
Traveling salesman problem
 
Structure of geographic data
Structure of geographic dataStructure of geographic data
Structure of geographic data
 
Presentation on GPS (Global Positioning System)
Presentation on GPS (Global Positioning System)Presentation on GPS (Global Positioning System)
Presentation on GPS (Global Positioning System)
 
CE3303 UNIT 2 WATER TREATMENT PPT.pptx
CE3303 UNIT 2 WATER TREATMENT PPT.pptxCE3303 UNIT 2 WATER TREATMENT PPT.pptx
CE3303 UNIT 2 WATER TREATMENT PPT.pptx
 
Global positioning system (gps)
Global positioning system (gps)Global positioning system (gps)
Global positioning system (gps)
 
What is GPS
What is GPSWhat is GPS
What is GPS
 
Expert system
Expert systemExpert system
Expert system
 

Similar to Understand Manifolds using MATLAB

Lab 5 - String Manipulation usingTASM Environment-1.docx
Lab 5 - String Manipulation usingTASM Environment-1.docxLab 5 - String Manipulation usingTASM Environment-1.docx
Lab 5 - String Manipulation usingTASM Environment-1.docxCCSSenatorAbogadoAj
 
statistical computation using R- an intro..
statistical computation using R- an intro..statistical computation using R- an intro..
statistical computation using R- an intro..Kamarudheen KV
 
A Multidimensional Distributed Array Abstraction for PGAS (HPCC'16)
A Multidimensional Distributed Array Abstraction for PGAS (HPCC'16)A Multidimensional Distributed Array Abstraction for PGAS (HPCC'16)
A Multidimensional Distributed Array Abstraction for PGAS (HPCC'16)Menlo Systems GmbH
 
Graph convolutional networks in apache spark
Graph convolutional networks in apache sparkGraph convolutional networks in apache spark
Graph convolutional networks in apache sparkEmiliano Martinez Sanchez
 
Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual Amairullah Khan Lodhi
 
Basics of MATLAB programming
Basics of MATLAB programmingBasics of MATLAB programming
Basics of MATLAB programmingRanjan Pal
 
Algorithms on Hadoop at Last.fm
Algorithms on Hadoop at Last.fmAlgorithms on Hadoop at Last.fm
Algorithms on Hadoop at Last.fmMark Levy
 
Map reduce in Hadoop BIG DATA ANALYTICS
Map reduce in Hadoop BIG DATA ANALYTICSMap reduce in Hadoop BIG DATA ANALYTICS
Map reduce in Hadoop BIG DATA ANALYTICSArchana Gopinath
 
Intro to MATLAB and K-mean algorithm
Intro to MATLAB and K-mean algorithmIntro to MATLAB and K-mean algorithm
Intro to MATLAB and K-mean algorithmkhalid Shah
 
Automatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELAutomatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELJoel Falcou
 
Signals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 BatchSignals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 BatchAmairullah Khan Lodhi
 
Subproblem-Tree Calibration: A Unified Approach to Max-Product Message Passin...
Subproblem-Tree Calibration: A Unified Approach to Max-Product Message Passin...Subproblem-Tree Calibration: A Unified Approach to Max-Product Message Passin...
Subproblem-Tree Calibration: A Unified Approach to Max-Product Message Passin...Varad Meru
 

Similar to Understand Manifolds using MATLAB (20)

Dsp lab manual
Dsp lab manualDsp lab manual
Dsp lab manual
 
Lab 5 - String Manipulation usingTASM Environment-1.docx
Lab 5 - String Manipulation usingTASM Environment-1.docxLab 5 - String Manipulation usingTASM Environment-1.docx
Lab 5 - String Manipulation usingTASM Environment-1.docx
 
Dsp file
Dsp fileDsp file
Dsp file
 
statistical computation using R- an intro..
statistical computation using R- an intro..statistical computation using R- an intro..
statistical computation using R- an intro..
 
A Multidimensional Distributed Array Abstraction for PGAS (HPCC'16)
A Multidimensional Distributed Array Abstraction for PGAS (HPCC'16)A Multidimensional Distributed Array Abstraction for PGAS (HPCC'16)
A Multidimensional Distributed Array Abstraction for PGAS (HPCC'16)
 
Introduction to R
Introduction to RIntroduction to R
Introduction to R
 
Statistics lab 1
Statistics lab 1Statistics lab 1
Statistics lab 1
 
Graph convolutional networks in apache spark
Graph convolutional networks in apache sparkGraph convolutional networks in apache spark
Graph convolutional networks in apache spark
 
Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual
 
Twopi.1
Twopi.1Twopi.1
Twopi.1
 
Basics of MATLAB programming
Basics of MATLAB programmingBasics of MATLAB programming
Basics of MATLAB programming
 
Algorithms on Hadoop at Last.fm
Algorithms on Hadoop at Last.fmAlgorithms on Hadoop at Last.fm
Algorithms on Hadoop at Last.fm
 
Map reduce in Hadoop BIG DATA ANALYTICS
Map reduce in Hadoop BIG DATA ANALYTICSMap reduce in Hadoop BIG DATA ANALYTICS
Map reduce in Hadoop BIG DATA ANALYTICS
 
MatlabIntro (1).ppt
MatlabIntro (1).pptMatlabIntro (1).ppt
MatlabIntro (1).ppt
 
Intro to MATLAB and K-mean algorithm
Intro to MATLAB and K-mean algorithmIntro to MATLAB and K-mean algorithm
Intro to MATLAB and K-mean algorithm
 
Automatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELAutomatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSEL
 
Signals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 BatchSignals And Systems Lab Manual, R18 Batch
Signals And Systems Lab Manual, R18 Batch
 
Es272 ch1
Es272 ch1Es272 ch1
Es272 ch1
 
Subproblem-Tree Calibration: A Unified Approach to Max-Product Message Passin...
Subproblem-Tree Calibration: A Unified Approach to Max-Product Message Passin...Subproblem-Tree Calibration: A Unified Approach to Max-Product Message Passin...
Subproblem-Tree Calibration: A Unified Approach to Max-Product Message Passin...
 
ECE 565 FInal Project
ECE 565 FInal ProjectECE 565 FInal Project
ECE 565 FInal Project
 

Recently uploaded

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting DataJhengPantaleon
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 

Recently uploaded (20)

Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data_Math 4-Q4 Week 5.pptx Steps in Collecting Data
_Math 4-Q4 Week 5.pptx Steps in Collecting Data
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 

Understand Manifolds using MATLAB

  • 2. Manifolds  “According to mathematics, manifold is a collection of points forming a certain kind of set, such as those of topologically closed surface.”  Example: Surface, Curve & point.
  • 3. Terms to be used in code  X = data as D x N matrix (D = dimensionality, N = #points)  K = number of neighbors  dmax = max embedding dimensionality  Y = embedding as dmax x N matrix
  • 4. General Code  X=rand(10,50);  k=20;  dmax=2;  [Y] = lle(X,k,dmax);
  • 6. Animated Version using MATLAB The input data can be read from a matrix in the workspace, from a text file, or selected from one of 8 built-in examples.
  • 7. Description to every option  Load Matrix: Enter the name of a matrix in the MATLAB workspace and press this button. The matrix should be NxD, where N is the number of data items; D is the dimension of the manifold.  Load File: Enter the name of a text file and press this button. The text file should contain numbers separated by spaces with each data element as a row.
  • 8. Parameters used in simulation  Target Dimension d: The desired dimension of the embedding. In general, the target dimension d should be less than the input manifold dimension D.  Nearest Neighbors K: Specifies the number of nearest neighbors (KNN) used to build the graph for the following methods: ISOMAP, LLE, Hessian LLE, Laplacian, and LTSA.
  • 9.  Sigma: This specifies the width of the Gaussian kernel in the Diffusion Map method.  Alpha: This parameter controls the normalization used by Diffusion Map. Alpha = 0 is the Graph Laplacian Alpha = 1/2 is the Fokker-Plank propagator Alpha = 1 is the Laplace-Beltrami operator
  • 10. Output The output for: d = 2; k = 8; Sigma = 10.0; Alpha = 1.0;

Editor's Notes

  1. File Name: Computer -> Education -> Internship Details -> LLE -> LLE MATLAB Code -> lle.m
  2. File Name: Computer -> Education -> Internship Details -> LLE -> LLE MATLAB Code -> mani.m
  3. Color Vector: Checking this box indicates that there is a N-dimensional column vector in the workspace that specifies the colors of the NxD input matrix.
  4. Nearest Neighbors ‘K’ : If K is too large or too small, the local geometry may not be interpreted correctly. The default is K=8, which seems to work well for the examples