Sponsored Content
Full Discussion: Programming using sklearn
Top Forums Shell Programming and Scripting Programming using sklearn Post 303021135 by chercheur111 on Sunday 5th of August 2018 11:56:07 AM
Old 08-05-2018
Programming using sklearn

Hi,
Please i'd like to use prediction techniques in sklearn
I have this file:


Code:
x | y 

1| 1
2| 4
4|16


--> prediction techniques must give me this model y=x*x


using this model i can predict the value y of x=3
This is a sample example. In my experiment i use a file with 1000 lines.
Please, how can transform these lines on codes ?


Code:

from sklearn.preprocessing import PolynomialFeatures 
from sklearn import linear_model  
X = [[1, 2, 4], [1, 4, 16]]  
poly = PolynomialFeatures(degree=2) 
X_ = poly.fit_transform(X)

Thank you so much for help.
Kind regards.

Last edited by chercheur111; 08-05-2018 at 01:01 PM..
 

10 More Discussions You Might Find Interesting

1. Programming

c programming on vi

i am new in linux environment .I have used vi editor of Unix to get a programe compiled through "gcc ".kindly give me the options to get a program compiled & executed written in c on vi editor. I want the command to compile a file and the command to get that compiled file executed with any... (2 Replies)
Discussion started by: Rajraius
2 Replies

2. Programming

c programming or unix programming!?

i would like advice on the usbject of c programming (in the middle of reading a book on C). could i benefit more if i apply that knowledge in the unix format if i were able to, or would that take the point out of learning C, basically I want to stay away from strying too far away from unix and use... (1 Reply)
Discussion started by: moxxx68
1 Replies

3. Shell Programming and Scripting

Unix Systems Programming Vs Unix Programming

Several months ago I found a link that explained the difference between how a Unix Systems Admin would do scripting compared to what a Unix Programmer would do. It showed a basic script and then show several iterations that explained how the Systems Admin would change it to make it better. I was... (0 Replies)
Discussion started by: BCarlson
0 Replies

4. Programming

C++ programming

Sorry to ask this question here... where can I find a C++ programming thread? Thanks guys! (7 Replies)
Discussion started by: nadiamihu
7 Replies

5. Shell Programming and Scripting

New To Programming

Hello all!! I am new to programming, and to this forum. :D I am having sort of a problem. Me and my coworker are working on a code, both of us are stumped on a few things. One is we have a whole log file, i have found how to extract by column, but not by row. I need to extract by both.:confused:... (7 Replies)
Discussion started by: xkayla06
7 Replies

6. UNIX for Dummies Questions & Answers

Carreer:Networking Programming in Unix (C programming Language)

Hello, I am trying to learn Networking Programming in C in unix enviorment. I want to know how good it is to become a network programmer. i am crazy about Network programming but i also want to opt for the best carreer options. Anybody experienced Network Programmer, please tell me is my... (5 Replies)
Discussion started by: vibhory2j
5 Replies

7. Programming

C Programming - Hardware Programming

Can someone help me on suggesting some ways to access the memory content in RAM directly from C/C++ source code. Please provide me any book name or any URL so that I can get an exhaustive knowledge over it. If possible please give me some tips on interacting with hardwares directly through... (3 Replies)
Discussion started by: nandumishra
3 Replies

8. Shell Programming and Scripting

Sh programming

I have started writing one script. It is not taking the if block. Here is the script: #!/bin/sh set USER='/usr/ucb/whoami' ####################################################################### #Killing Process #######################################################################... (6 Replies)
Discussion started by: amarpreetka
6 Replies

9. UNIX for Dummies Questions & Answers

How does unix system administration, unix programming, unix network programming differ?

How does unix system administration, unix programming, unix network programming differ? Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies

10. UNIX for Dummies Questions & Answers

From iOS programming to Linux system programming

Hello. I like Linux and C programming language. Allways wanted to understand kernel and become a Linux system programmer. And I also like Objective-C and iOS. These two programming areas have relations: 1. Linux and iOS are UNIX-like systems, POSIX compliant. 2. It is useful to know C language... (2 Replies)
Discussion started by: Rockatansky
2 Replies
mlib_SignalLPC2Cepstral_S16(3MLIB)			    mediaLib Library Functions				mlib_SignalLPC2Cepstral_S16(3MLIB)

NAME
mlib_SignalLPC2Cepstral_S16 - convert linear prediction coefficients to cepstral coefficients SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_SignalLPC2Cepstral_S16(mlib_s16 *cepst, mlib_s32 cscale, const mlib_s16 *lpc, mlib_s32 lscale, mlib_s16 gain, mlib_s32 gscale, mlib_s32 length, mlib_s32 order); DESCRIPTION
The mlib_SignalLPC2Cepstral_S16() function converts linear prediction coefficients to cepstral coefficients. The user supplied scaling factor, cscale, will be used and the output will be saturated if necessary. The cepstral coefficients are the coefficients of the Fourier transform representation of the log magnitude spectrum. The LPC cepstral coefficients can be derived recursively from the LPC coefficients as following. c(0) = log(G) m-1 k c(m) = a(m) + SUM --- * c(k) * a(m-k), 1 <= m <= M k=1 m m-1 k c(m) = SUM --- * c(k) * a(m-k), m > M k=1 m See Fundamentals of Speech Recognition by Lawrence Rabiner and Biing-Hwang Juang, Prentice Hall, 1993. PARAMETERS
The function takes the following arguments: cepst The cepstral coefficients. cscale The scaling factor of the cepstral coefficients, where actual_data = output_data * 2**(-scaling_factor). lpc The linear prediction coefficients. lscale The scaling factor of the linear prediction coefficients, where actual_data = input_data * 2**(-scaling_factor). gain The gain of the LPC model. gscale The scaling factor of the gain of the LPC model, where actual_data = input_data * 2**(-scaling_factor). length The length of the cepstral coefficients. order The order of the linear prediction filter. RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_SignalLPC2Cepstral_S16(3MLIB), mlib_SignalLPC2Cepstral_S16_Adp(3MLIB), mlib_SignalLPC2Cepstral_F32(3MLIB), attributes(5) SunOS 5.10 10 Nov 2004 mlib_SignalLPC2Cepstral_S16(3MLIB)
All times are GMT -4. The time now is 02:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy