Gayatri Kedar Patankar
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Sparsed PCA #### Principal component analysis (PCA) PCA is a popular data-processing and dimension-reduction technique, with numerous applications in engineering, biology, and social science. PCA guarantees minimal information loss and no correlartion. We regard this as a major positive. The drawback that this approach has is that despite achieving dimensionality reduction, we still have a significant number of explicitly used variables. The elastic net, a generalization of the lasso is a good variable reduction technique. We estimate the principal components with sparse loadings resulting in an approach that we term **Sparsed Principal Component Analysis(SPCA)**. #### The Lasso and The Elastic Net As contrast to the trivial method, the lasso is a penalized least squares method, imposing a constraint on the L1 norm of the regression coefficients. We obtain the lasso estimate $\hat{\beta}_{lasso}$ by minimizing the lasso criterion $$ \hat{\beta}_{lasso} = arg_{\beta}min||Y-\sum_{j=1}^{p}{X_j{\beta}_j}||^2+{\lambda}\sum_{j=1}^{p}|{\beta}_j|$$The lasso continuously shrinks the coefficients toward zero, and achieves its prediction accuracy via the bias variance trade-off. We obtain an accurate and sparse model. The number of observations still remains as a limitation. The elastic net overcomes this. For ${\lambda}_1$ and ${\lambda}_2$ non-negative, $$ \hat{\beta}_{lasso} = (1+{\lambda}_2)\{arg_{\beta}min||Y-\sum_{j=1}^{p}{X_j{\beta}_j}||^2+{\lambda}_2\sum_{j=1}^{p}|{\beta}_j|^2+{\lambda}_1\sum_{j=1}^{p}|{\beta}_j|\}$$The elastic net penalty is a convex combination of the ridge and lasso penalties. Lasso is just a special case of this when ${\lambda}_2=0$. #### Motivation A procedure called SCoTLASS uses an L1 constraint on PCA to obtain sparse loadings, however this has problems including high computational cost and insufficiently sparse loadings. As an alternative, an elastic net regression is created for the same. By regressing the principal components on variables, its loadings can be recovered. The pitfalls of this approach, that a unique solution is not always obtained, can be accounted for by a positive ridge penalty factor. This creates a sparse approximation to every principal component. Effectively, PCA can be transformed into k independent ridge regression problems. The lasso approach is used to produce sparse loadings. This can be generalized to: 1) A starts at the loadings of the first k ordinary principal components. 2) For a fixed A, solve elastic net problem for j = 1,2,..,k. 3) For a fixed B, compute the SVD of $\mathbf{X}^TXB$, and update $A=UV^T$. 4) Repeat steps 2 and 3 until convergence. 5) Normalization. Upon calculation, the explained total variance equals $\left\|\hat{Z}\! _{j,...,j-1} \right\|^{2}= R_{jj}^{2}$. This algorithm is computationally efficient for a small p < n. #### SCPA for p>>n As λ → ∞, we can use the special case of the elastic net algorithm using soft thresholding. $\beta _{j} = \left ( \left|\alpha_{j}^{T}X^{T}X \right|-\frac{\lambda _{1,j}}{2} \right )_{+}Sign\left ( \alpha _{j}^{T}X^{T}X \right )$, replacing step 2 in the general algorithm with this. ### Examples #### THE PITPROPS DATASET The pitprops data has n = 180 and p = 13. This is n >> p dataset so we considered all 6 PCs with λ = 0 and λ1 = (0.06, 0.16, 0.1, 0.5, 0.5, 0.5). Compared with the modified PCs of SCoTLASS, PCs by SPCA account for a larger amount of variance (75.8% vs. 69.3%) with a much sparser loading structure. The important variables associated with the six PCs do not overlap, which further makes the interpretations easier and clearer. When we made Loadings of the First Six Sparse PCs by SPCA it was interesting to note that even though the variance does not strictly monotonously decrease, the adjusted variance follows the right order. Also it took seconds to perform SPCA in R, whereas optimizing SCoTLASS over several values of t is an even more difficult computational challenge. #### A SYNTHETIC EXAMPLE We have 3 hidden factors V1, V2 and V3. Where V3 is derived from V1 and V2.The variance in this particular example was 290, 300, and 283.8, respectively. The numbers of variables associated with these three factors were 4, 4, and 2. Therefore V2 and V1 are almost equally important, and they are much more important than V3. The first two PCs together explain 99.6% of the total variance. These facts suggest that we only need to consider two derived variables with “correct” sparse representations.When SPCA (λ = 0) and simple thresholding was performed on this SPCA correctly identifies the sets of important variables. In fact, SPCA delivered the ideal sparse representations of the first two principal components. SCoTLASS was also able to find solution but it took more time then SPCA. #### RAMASWAMY DATA This analysis is to find a set of genes which are biologically relevant to the outcome (e.g. tumor type or survival time). For microarray data like this, it appears that SCoTLASS cannot be practically useful for finding sparse PCs.The idea to choose SPCA is intuitive: if the (sparse) principal component can explain a large part of the total variance of gene expression levels, then the subset of genes representing the principal component are considered important. As given in dataset taking p = 16603 and n = 144.We apply sparse with (λ = ∞) to find the leading sparse PC.Using SPCA the percentage of explained variance decreases at a slow rate, as the sparsity increases.

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully