Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5936943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:28:10+00:00 2026-05-22T15:28:10+00:00

Excuse my ignorance, I’m very new to Python. I’m trying to perform factor analysis

  • 0

Excuse my ignorance, I’m very new to Python. I’m trying to perform factor analysis in Python using MDP (though I can use another library if there’s a better solution).

I have an m by n matrix (called matrix) and I tried to do:

import mdp
mdp.nodes.FANode()(matrix)

but I get back an error. I’m guessing maybe my matrix isn’t formed properly? My goal is find out how many components are in the data and find out which rows load onto which components.

Here is the traceback:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "mdp/signal_node.py", line 630, in __call__
    return self.execute(x, *args, **kwargs)
  File "mdp/signal_node.py", line 611, in execute
    self._pre_execution_checks(x)
  File "mdp/signal_node.py", line 480, in _pre_execution_checks
    self.train(x)
  File "mdp/signal_node.py", line 571, in train
    self._check_input(x)
  File "mdp/signal_node.py", line 429, in _check_input
    if not x.ndim == 2:
AttributeError: 'list' object has no attribute 'ndim'

Does anyone have any idea what’s going on, and feel like explaining it to a Python newbie?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T15:28:11+00:00Added an answer on May 22, 2026 at 3:28 pm

    I have absolutely no experience with mdp, but it looks like it expects your matrices to be passed as a Numpy array instead of a list. Numpy is a package for high performance scientific computing. You can go to the Numpy home page and install it. After doing so, try altering your code to this:

    import mdp, numpy
    mdp.nodes.FANode()(numpy.array(matrix))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please excuse my ignorance on the topic, as I am relatively new to Hibernate
I'm new to python, so please excuse what is probably a pretty dumb question.
Excuse my ignorance but I'm having a tough time figuring this out. I'm trying
I'm very new to XQuery so excuse me if I am somehow missing something.
(Excuse any ignorance of mine here - I'm not a seasoned Oracle user.) I'm
Excuse my ignorance, but something's been bugging me about the Xcode debugger when running
Excuse my ignorance, but I don't know what the phrase means. I have a
Excuse my ignorance here but I know neither C++ nor GTK+. Which String type
Excuse my ignorance. My knowledge of regular expressions is extremely limited. I have the
Excuse my ignorance. I need to replace all data in a mysql field before

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.