You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mahout.apache.org by "Selvakumar Arumugam (Created) (JIRA)" <ji...@apache.org> on 2011/12/21 16:43:30 UTC

[jira] [Created] (MAHOUT-934) Deploy sgd classifier trained model in an application

Deploy sgd classifier trained model in an application
-----------------------------------------------------

                 Key: MAHOUT-934
                 URL: https://issues.apache.org/jira/browse/MAHOUT-934
             Project: Mahout
          Issue Type: New Feature
          Components: Classification, Integration
    Affects Versions: 0.6
         Environment: Operating System : Linux (Ubuntu)
Software Frameworks : Apache Mahout, Java, Servlet and Jsp
            Reporter: Selvakumar Arumugam
            Priority: Minor
             Fix For: 0.6


I have generated trained model by modifying mahout sgd classifier for my own train data.
But now i want to use that model in my web application which need to give response as classified category for user query.
I dont know how to use that model. So please tell me
How to deploy a sgd classifier trained MODEL in an web application or any sample application? 
Or
How to use that model in Jsp/Servlet Web application to classify the query keyword which given by user?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Re: [jira] [Created] (MAHOUT-934) Deploy sgd classifier trained model in an application

Posted by Ted Dunning <te...@gmail.com>.
Good answer Suneel.

If you want more details, you can look at
https://github.com/tdunning/Chapter-16

For the text that goes with that example, see Chapter 16 of the Mahout in
Action book.  (conflict of interest warning: I am an author)

On Wed, Dec 21, 2011 at 8:04 AM, Suneel Marthi <su...@yahoo.com>wrote:

> You would have to package the Model into your war (if Web application) or
> into your jar (if its a standalone app).
>
> You can read the Model from your application using
> ModelSerializer.readBinary() method call.
>
> OnlineLogisticRegression sgd = ModelSerializer.readBinary(
> new FileInputStream("model"), OnlineLogisticRegression.class);
>
>
> You can then invoke sgd.classify() to classify your user query.
>
>
>
>
> ________________________________
>  From: Selvakumar Arumugam (Created) (JIRA) <ji...@apache.org>
> To: dev@mahout.apache.org
> Sent: Wednesday, December 21, 2011 10:43 AM
> Subject: [jira] [Created] (MAHOUT-934) Deploy sgd classifier trained model
> in an application
>
> Deploy sgd classifier trained model in an application
> -----------------------------------------------------
>
>                  Key: MAHOUT-934
>                  URL: https://issues.apache.org/jira/browse/MAHOUT-934
>              Project: Mahout
>           Issue Type: New Feature
>           Components: Classification, Integration
>     Affects Versions: 0.6
>          Environment: Operating System : Linux (Ubuntu)
> Software Frameworks : Apache Mahout, Java, Servlet and Jsp
>             Reporter: Selvakumar Arumugam
>             Priority: Minor
>              Fix For: 0.6
>
>
> I have generated trained model by modifying mahout sgd classifier for my
> own train data.
> But now i want to use that model in my web application which need to give
> response as classified category for user query.
> I dont know how to use that model. So please tell me
> How to deploy a sgd classifier trained MODEL in an web application or any
> sample application?
> Or
> How to use that model in Jsp/Servlet Web application to classify the query
> keyword which given by user?
>
> --
> This message is automatically generated by JIRA.
> If you think it was sent incorrectly, please contact your JIRA
> administrators:
> https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
> For more information on JIRA, see: http://www.atlassian.com/software/jira
>

Re: [jira] [Created] (MAHOUT-934) Deploy sgd classifier trained model in an application

Posted by Suneel Marthi <su...@yahoo.com>.
You would have to package the Model into your war (if Web application) or into your jar (if its a standalone app).

You can read the Model from your application using ModelSerializer.readBinary() method call.

OnlineLogisticRegression sgd = ModelSerializer.readBinary(
new FileInputStream("model"), OnlineLogisticRegression.class);


You can then invoke sgd.classify() to classify your user query.




________________________________
 From: Selvakumar Arumugam (Created) (JIRA) <ji...@apache.org>
To: dev@mahout.apache.org 
Sent: Wednesday, December 21, 2011 10:43 AM
Subject: [jira] [Created] (MAHOUT-934) Deploy sgd classifier trained model in an application
 
Deploy sgd classifier trained model in an application
-----------------------------------------------------

                 Key: MAHOUT-934
                 URL: https://issues.apache.org/jira/browse/MAHOUT-934
             Project: Mahout
          Issue Type: New Feature
          Components: Classification, Integration
    Affects Versions: 0.6
         Environment: Operating System : Linux (Ubuntu)
Software Frameworks : Apache Mahout, Java, Servlet and Jsp
            Reporter: Selvakumar Arumugam
            Priority: Minor
             Fix For: 0.6


I have generated trained model by modifying mahout sgd classifier for my own train data.
But now i want to use that model in my web application which need to give response as classified category for user query.
I dont know how to use that model. So please tell me
How to deploy a sgd classifier trained MODEL in an web application or any sample application? 
Or
How to use that model in Jsp/Servlet Web application to classify the query keyword which given by user?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (MAHOUT-934) Deploy sgd classifier trained model in an application

Posted by "juan ignacio camet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13396400#comment-13396400 ] 

juan ignacio camet commented on MAHOUT-934:
-------------------------------------------

wow

                
> Deploy sgd classifier trained model in an application
> -----------------------------------------------------
>
>                 Key: MAHOUT-934
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-934
>             Project: Mahout
>          Issue Type: Question
>          Components: Classification, Integration
>    Affects Versions: 0.6
>         Environment: Operating System : Linux (Ubuntu)
> Software Frameworks : Apache Mahout, Java, Servlet and Jsp
>            Reporter: Selvakumar Arumugam
>            Priority: Minor
>              Labels: newbie
>             Fix For: 0.8
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> I have generated trained model by modifying mahout sgd classifier for my own train data.
> But now i want to use that model in my web application which need to give response as classified category for user query.
> I dont know how to use that model. So please tell me
> How to deploy a sgd classifier trained MODEL in an web application or any sample application? 
> Or
> How to use that model in Jsp/Servlet Web application to classify the query keyword which given by user?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MAHOUT-934) Deploy sgd classifier trained model in an application

Posted by "Selvakumar Arumugam (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAHOUT-934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13176077#comment-13176077 ] 

Selvakumar Arumugam commented on MAHOUT-934:
--------------------------------------------

@Jeff, Thanks for the correction.
                
> Deploy sgd classifier trained model in an application
> -----------------------------------------------------
>
>                 Key: MAHOUT-934
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-934
>             Project: Mahout
>          Issue Type: Question
>          Components: Classification, Integration
>    Affects Versions: 0.6
>         Environment: Operating System : Linux (Ubuntu)
> Software Frameworks : Apache Mahout, Java, Servlet and Jsp
>            Reporter: Selvakumar Arumugam
>            Priority: Minor
>              Labels: newbie
>             Fix For: 0.7
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> I have generated trained model by modifying mahout sgd classifier for my own train data.
> But now i want to use that model in my web application which need to give response as classified category for user query.
> I dont know how to use that model. So please tell me
> How to deploy a sgd classifier trained MODEL in an web application or any sample application? 
> Or
> How to use that model in Jsp/Servlet Web application to classify the query keyword which given by user?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (MAHOUT-934) Deploy sgd classifier trained model in an application

Posted by "Jeff Eastman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Eastman updated MAHOUT-934:
--------------------------------

    Fix Version/s:     (was: 0.7)
                   0.8
    
> Deploy sgd classifier trained model in an application
> -----------------------------------------------------
>
>                 Key: MAHOUT-934
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-934
>             Project: Mahout
>          Issue Type: Question
>          Components: Classification, Integration
>    Affects Versions: 0.6
>         Environment: Operating System : Linux (Ubuntu)
> Software Frameworks : Apache Mahout, Java, Servlet and Jsp
>            Reporter: Selvakumar Arumugam
>            Priority: Minor
>              Labels: newbie
>             Fix For: 0.8
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> I have generated trained model by modifying mahout sgd classifier for my own train data.
> But now i want to use that model in my web application which need to give response as classified category for user query.
> I dont know how to use that model. So please tell me
> How to deploy a sgd classifier trained MODEL in an web application or any sample application? 
> Or
> How to use that model in Jsp/Servlet Web application to classify the query keyword which given by user?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (MAHOUT-934) Deploy sgd classifier trained model in an application

Posted by "Jeff Eastman (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAHOUT-934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Eastman updated MAHOUT-934:
--------------------------------

    Fix Version/s:     (was: 0.6)
                   0.7
       Issue Type: Question  (was: New Feature)

This does not appear to be a feature improvement request rather a request for help in using an existing classifier.  Changing to a Question and the release date to 0.7.
                
> Deploy sgd classifier trained model in an application
> -----------------------------------------------------
>
>                 Key: MAHOUT-934
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-934
>             Project: Mahout
>          Issue Type: Question
>          Components: Classification, Integration
>    Affects Versions: 0.6
>         Environment: Operating System : Linux (Ubuntu)
> Software Frameworks : Apache Mahout, Java, Servlet and Jsp
>            Reporter: Selvakumar Arumugam
>            Priority: Minor
>              Labels: newbie
>             Fix For: 0.7
>
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> I have generated trained model by modifying mahout sgd classifier for my own train data.
> But now i want to use that model in my web application which need to give response as classified category for user query.
> I dont know how to use that model. So please tell me
> How to deploy a sgd classifier trained MODEL in an web application or any sample application? 
> Or
> How to use that model in Jsp/Servlet Web application to classify the query keyword which given by user?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira